From: Mahesh Bandewar <maheshb@google.com>
To: David Miller <davem@davemloft.net>
Cc: netdev <netdev@vger.kernel.org>, Mahesh Bandewar <maheshb@google.com>
Subject: [PATCH 19/20] virtio_net: extending (hw_/wanted_/vlan_)features fields to a bitmap.
Date: Tue, 5 Apr 2011 17:44:24 -0700 [thread overview]
Message-ID: <1302050665-10460-20-git-send-email-maheshb@google.com> (raw)
In-Reply-To: <1302050665-10460-19-git-send-email-maheshb@google.com>
Converting current use of (hw_/wanted_/vlan_)features to
legacy_(hw_/wanted_/vlan_)features to differntiate from the proposed usage.
Signed-off-by: Mahesh Bandewar <maheshb@google.com>
---
drivers/net/virtio_net.c | 21 +++++++++++----------
1 files changed, 11 insertions(+), 10 deletions(-)
diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c
index 0cb0b06..36eed90 100644
--- a/drivers/net/virtio_net.c
+++ b/drivers/net/virtio_net.c
@@ -892,33 +892,34 @@ static int virtnet_probe(struct virtio_device *vdev)
/* Set up network device as normal. */
dev->netdev_ops = &virtnet_netdev;
- dev->features = NETIF_F_HIGHDMA;
+ dev->legacy_features = NETIF_F_HIGHDMA;
SET_ETHTOOL_OPS(dev, &virtnet_ethtool_ops);
SET_NETDEV_DEV(dev, &vdev->dev);
/* Do we support "hardware" checksums? */
if (virtio_has_feature(vdev, VIRTIO_NET_F_CSUM)) {
/* This opens up the world of extra features. */
- dev->hw_features |= NETIF_F_HW_CSUM|NETIF_F_SG|NETIF_F_FRAGLIST;
+ dev->legacy_hw_features |= NETIF_F_HW_CSUM|NETIF_F_SG|NETIF_F_FRAGLIST;
if (csum)
- dev->features |= NETIF_F_HW_CSUM|NETIF_F_SG|NETIF_F_FRAGLIST;
+ dev->legacy_features |= NETIF_F_HW_CSUM|NETIF_F_SG|NETIF_F_FRAGLIST;
if (virtio_has_feature(vdev, VIRTIO_NET_F_GSO)) {
- dev->hw_features |= NETIF_F_TSO | NETIF_F_UFO
+ dev->legacy_hw_features |= NETIF_F_TSO | NETIF_F_UFO
| NETIF_F_TSO_ECN | NETIF_F_TSO6;
}
/* Individual feature bits: what can host handle? */
if (virtio_has_feature(vdev, VIRTIO_NET_F_HOST_TSO4))
- dev->hw_features |= NETIF_F_TSO;
+ dev->legacy_hw_features |= NETIF_F_TSO;
if (virtio_has_feature(vdev, VIRTIO_NET_F_HOST_TSO6))
- dev->hw_features |= NETIF_F_TSO6;
+ dev->legacy_hw_features |= NETIF_F_TSO6;
if (virtio_has_feature(vdev, VIRTIO_NET_F_HOST_ECN))
- dev->hw_features |= NETIF_F_TSO_ECN;
+ dev->legacy_hw_features |= NETIF_F_TSO_ECN;
if (virtio_has_feature(vdev, VIRTIO_NET_F_HOST_UFO))
- dev->hw_features |= NETIF_F_UFO;
+ dev->legacy_hw_features |= NETIF_F_UFO;
if (gso)
- dev->features |= dev->hw_features & (NETIF_F_ALL_TSO|NETIF_F_UFO);
+ dev->legacy_features |=
+ dev->legacy_hw_features & (NETIF_F_ALL_TSO|NETIF_F_UFO);
/* (!csum && gso) case will be fixed by register_netdev() */
}
@@ -965,7 +966,7 @@ static int virtnet_probe(struct virtio_device *vdev)
vi->cvq = vqs[2];
if (virtio_has_feature(vi->vdev, VIRTIO_NET_F_CTRL_VLAN))
- dev->features |= NETIF_F_HW_VLAN_FILTER;
+ dev->legacy_features |= NETIF_F_HW_VLAN_FILTER;
}
err = register_netdev(dev);
--
1.7.3.1
next prev parent reply other threads:[~2011-04-06 0:44 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-04-06 0:44 [PATCH 00/20] extending (hw_/wanted_/vlan_)features fields to a bitmap Mahesh Bandewar
2011-04-06 0:44 ` [PATCH 01/20] net-core: " Mahesh Bandewar
2011-04-06 0:44 ` [PATCH 02/20] net-ipv4: " Mahesh Bandewar
2011-04-06 0:44 ` [PATCH 03/20] net-ipv6: " Mahesh Bandewar
2011-04-06 0:44 ` [PATCH 04/20] net-vlan: " Mahesh Bandewar
2011-04-06 0:44 ` [PATCH 05/20] net-bridge: " Mahesh Bandewar
2011-04-06 0:44 ` [PATCH 06/20] net-decnet: " Mahesh Bandewar
2011-04-06 0:44 ` [PATCH 07/20] net-dsa: " Mahesh Bandewar
2011-04-06 0:44 ` [PATCH 08/20] net-l2tp: " Mahesh Bandewar
2011-04-06 0:44 ` [PATCH 09/20] net-phonet: " Mahesh Bandewar
2011-04-06 0:44 ` [PATCH 10/20] net-sctp: " Mahesh Bandewar
2011-04-06 0:44 ` [PATCH 11/20] net-wireless: " Mahesh Bandewar
2011-04-06 0:44 ` [PATCH 12/20] loopback: " Mahesh Bandewar
2011-04-06 0:44 ` [PATCH 13/20] veth: " Mahesh Bandewar
2011-04-06 0:44 ` [PATCH 14/20] jme: " Mahesh Bandewar
2011-04-06 0:44 ` [PATCH 15/20] sungem: " Mahesh Bandewar
2011-04-06 0:44 ` [PATCH 16/20] sunhme: " Mahesh Bandewar
2011-04-06 0:44 ` [PATCH 17/20] usb-smsc75xx: " Mahesh Bandewar
2011-04-06 0:44 ` [PATCH 18/20] usb-smsc95xx: " Mahesh Bandewar
2011-04-06 0:44 ` Mahesh Bandewar [this message]
2011-04-06 0:44 ` [PATCH 20/20] xen: " Mahesh Bandewar
2011-04-06 1:27 ` [PATCH 01/20] net-core: " Ben Hutchings
2011-04-06 1:35 ` Mahesh Bandewar
2011-04-06 1:45 ` Ben Hutchings
2011-04-06 10:29 ` Michał Mirosław
2011-04-06 17:34 ` Mahesh Bandewar
2011-04-07 15:00 ` [PATCHv2 " Mahesh Bandewar
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1302050665-10460-20-git-send-email-maheshb@google.com \
--to=maheshb@google.com \
--cc=davem@davemloft.net \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).