Deleted Added
full compact
30c30
< __FBSDID("$FreeBSD: stable/10/sys/dev/virtio/network/if_vtnet.c 267279 2014-06-09 15:09:05Z luigi $");
---
> __FBSDID("$FreeBSD: stable/10/sys/dev/virtio/network/if_vtnet.c 268010 2014-06-29 00:37:59Z bryanv $");
552a553
> #ifndef VTNET_LEGACY_TX
555c556
< #ifdef VTNET_LEGACY_TX
---
> #else
562,565c563,577
< if (virtio_with_feature(dev, VTNET_LRO_FEATURES) == 0)
< return;
< if (virtio_with_feature(dev, VIRTIO_NET_F_MRG_RXBUF))
< return;
---
> if (virtio_with_feature(dev, VTNET_LRO_FEATURES) &&
> virtio_with_feature(dev, VIRTIO_NET_F_MRG_RXBUF) == 0) {
> /*
> * LRO without mergeable buffers requires special care. This
> * is not ideal because every receive buffer must be large
> * enough to hold the maximum TCP packet, the Ethernet header,
> * and the header. This requires up to 34 descriptors with
> * MCLBYTES clusters. If we do not have indirect descriptors,
> * LRO is disabled since the virtqueue will not contain very
> * many receive buffers.
> */
> if (!virtio_with_feature(dev, VIRTIO_RING_F_INDIRECT_DESC)) {
> device_printf(dev,
> "LRO disabled due to both mergeable buffers and "
> "indirect descriptors not negotiated\n");
567,583c579,584
< /*
< * LRO without mergeable buffers requires special care. This is not
< * ideal because every receive buffer must be large enough to hold
< * the maximum TCP packet, the Ethernet header, and the header. This
< * requires up to 34 descriptors with MCLBYTES clusters. If we do
< * not have indirect descriptors, LRO is disabled since the virtqueue
< * will not contain very many receive buffers.
< */
< if (virtio_with_feature(dev, VIRTIO_RING_F_INDIRECT_DESC) == 0) {
< device_printf(dev,
< "LRO disabled due to both mergeable buffers and indirect "
< "descriptors not negotiated\n");
<
< features &= ~VTNET_LRO_FEATURES;
< sc->vtnet_features = virtio_negotiate_features(dev, features);
< } else
< sc->vtnet_flags |= VTNET_FLAG_LRO_NOMRG;
---
> features &= ~VTNET_LRO_FEATURES;
> sc->vtnet_features =
> virtio_negotiate_features(dev, features);
> } else
> sc->vtnet_flags |= VTNET_FLAG_LRO_NOMRG;
> }
2114d2114
< struct vtnet_softc *sc;
2120d2119
< sc = txq->vtntx_sc;
2947d2945
< device_t dev;
2951d2948
< dev = sc->vtnet_dev;
3072c3069
< struct virtio_net_ctrl_hdr hdr;
---
> struct virtio_net_ctrl_hdr hdr __aligned(2);
3106c3103
< } s;
---
> } s __aligned(2);
3138c3135
< } s;
---
> } s __aligned(2);
3221c3218
< struct virtio_net_ctrl_hdr hdr;
---
> struct virtio_net_ctrl_hdr hdr __aligned(2);
3334c3331
< } s;
---
> } s __aligned(2);