diff options
author | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2014-08-07 10:36:12 +0400 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2014-08-07 10:36:12 +0400 |
commit | 5e2aa2ed08e2e280121dc7cf5609c87d464f12ef (patch) | |
tree | ca7d7b1480285e3b617fecc5b41f0ce150a82c32 /drivers/net/virtio_net.c | |
parent | f62d14a8072b9756db36ba394e2b267470a40240 (diff) | |
parent | fc8104bc5a3f6f49d79f45f2706f79f77a9fb2ae (diff) | |
download | linux-5e2aa2ed08e2e280121dc7cf5609c87d464f12ef.tar.xz |
Merge branch 'next' into for-linus
Prepare first round of input updates for 3.17.
Diffstat (limited to 'drivers/net/virtio_net.c')
-rw-r--r-- | drivers/net/virtio_net.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c index 8a852b5f215f..7d9f84a91f37 100644 --- a/drivers/net/virtio_net.c +++ b/drivers/net/virtio_net.c @@ -1646,7 +1646,7 @@ static int virtnet_probe(struct virtio_device *vdev) dev->netdev_ops = &virtnet_netdev; dev->features = NETIF_F_HIGHDMA; - SET_ETHTOOL_OPS(dev, &virtnet_ethtool_ops); + dev->ethtool_ops = &virtnet_ethtool_ops; SET_NETDEV_DEV(dev, &vdev->dev); /* Do we support "hardware" checksums? */ @@ -1724,6 +1724,13 @@ static int virtnet_probe(struct virtio_device *vdev) if (virtio_has_feature(vdev, VIRTIO_NET_F_CTRL_VQ)) vi->has_cvq = true; + if (vi->any_header_sg) { + if (vi->mergeable_rx_bufs) + dev->needed_headroom = sizeof(struct virtio_net_hdr_mrg_rxbuf); + else + dev->needed_headroom = sizeof(struct virtio_net_hdr); + } + /* Use single tx/rx queue pair as default */ vi->curr_queue_pairs = 1; vi->max_queue_pairs = max_queue_pairs; |