netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
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 02/20] net-ipv4: extending (hw_/wanted_/vlan_)features fields to a bitmap.
Date: Tue,  5 Apr 2011 17:44:07 -0700	[thread overview]
Message-ID: <1302050665-10460-3-git-send-email-maheshb@google.com> (raw)
In-Reply-To: <1302050665-10460-2-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>
---
 net/ipv4/ip_gre.c                  |    6 +++---
 net/ipv4/ip_output.c               |   12 ++++++------
 net/ipv4/ipip.c                    |    4 ++--
 net/ipv4/ipmr.c                    |    2 +-
 net/ipv4/netfilter/nf_nat_helper.c |    2 +-
 5 files changed, 13 insertions(+), 13 deletions(-)

diff --git a/net/ipv4/ip_gre.c b/net/ipv4/ip_gre.c
index da5941f..e358cbf 100644
--- a/net/ipv4/ip_gre.c
+++ b/net/ipv4/ip_gre.c
@@ -1260,7 +1260,7 @@ static void ipgre_tunnel_setup(struct net_device *dev)
 	dev->flags		= IFF_NOARP;
 	dev->iflink		= 0;
 	dev->addr_len		= 4;
-	dev->features		|= NETIF_F_NETNS_LOCAL;
+	dev->legacy_features	|= NETIF_F_NETNS_LOCAL;
 	dev->priv_flags		&= ~IFF_XMIT_DST_RELEASE;
 }
 
@@ -1506,7 +1506,7 @@ static void ipgre_tap_setup(struct net_device *dev)
 	dev->destructor 	= ipgre_dev_free;
 
 	dev->iflink		= 0;
-	dev->features		|= NETIF_F_NETNS_LOCAL;
+	dev->legacy_features	|= NETIF_F_NETNS_LOCAL;
 }
 
 static int ipgre_newlink(struct net *src_net, struct net_device *dev, struct nlattr *tb[],
@@ -1533,7 +1533,7 @@ static int ipgre_newlink(struct net *src_net, struct net_device *dev, struct nla
 
 	/* Can use a lockless transmit, unless we generate output sequences */
 	if (!(nt->parms.o_flags & GRE_SEQ))
-		dev->features |= NETIF_F_LLTX;
+		dev->legacy_features |= NETIF_F_LLTX;
 
 	err = register_netdevice(dev);
 	if (err)
diff --git a/net/ipv4/ip_output.c b/net/ipv4/ip_output.c
index 86a2843..cb83f7f 100644
--- a/net/ipv4/ip_output.c
+++ b/net/ipv4/ip_output.c
@@ -816,7 +816,7 @@ static int __ip_append_data(struct sock *sk, struct sk_buff_head *queue,
 	 */
 	if (transhdrlen &&
 	    length + fragheaderlen <= mtu &&
-	    rt->dst.dev->features & NETIF_F_V4_CSUM &&
+	    rt->dst.dev->legacy_features & NETIF_F_V4_CSUM &&
 	    !exthdrlen)
 		csummode = CHECKSUM_PARTIAL;
 
@@ -825,7 +825,7 @@ static int __ip_append_data(struct sock *sk, struct sk_buff_head *queue,
 	cork->length += length;
 	if (((length > mtu) || (skb && skb_is_gso(skb))) &&
 	    (sk->sk_protocol == IPPROTO_UDP) &&
-	    (rt->dst.dev->features & NETIF_F_UFO)) {
+	    (rt->dst.dev->legacy_features & NETIF_F_UFO)) {
 		err = ip_ufo_append_data(sk, queue, getfrag, from, length,
 					 hh_len, fragheaderlen, transhdrlen,
 					 mtu, flags);
@@ -873,7 +873,7 @@ alloc_new_skb:
 			fraglen = datalen + fragheaderlen;
 
 			if ((flags & MSG_MORE) &&
-			    !(rt->dst.dev->features&NETIF_F_SG))
+			    !(rt->dst.dev->legacy_features & NETIF_F_SG))
 				alloclen = mtu;
 			else
 				alloclen = fraglen;
@@ -960,7 +960,7 @@ alloc_new_skb:
 		if (copy > length)
 			copy = length;
 
-		if (!(rt->dst.dev->features&NETIF_F_SG)) {
+		if (!(rt->dst.dev->legacy_features & NETIF_F_SG)) {
 			unsigned int off;
 
 			off = skb->len;
@@ -1131,7 +1131,7 @@ ssize_t	ip_append_page(struct sock *sk, struct page *page,
 	if (inet->cork.flags & IPCORK_OPT)
 		opt = inet->cork.opt;
 
-	if (!(rt->dst.dev->features&NETIF_F_SG))
+	if (!(rt->dst.dev->legacy_features & NETIF_F_SG))
 		return -EOPNOTSUPP;
 
 	hh_len = LL_RESERVED_SPACE(rt->dst.dev);
@@ -1151,7 +1151,7 @@ ssize_t	ip_append_page(struct sock *sk, struct page *page,
 	inet->cork.length += size;
 	if ((size + skb->len > mtu) &&
 	    (sk->sk_protocol == IPPROTO_UDP) &&
-	    (rt->dst.dev->features & NETIF_F_UFO)) {
+	    (rt->dst.dev->legacy_features & NETIF_F_UFO)) {
 		skb_shinfo(skb)->gso_size = mtu - fragheaderlen;
 		skb_shinfo(skb)->gso_type = SKB_GSO_UDP;
 	}
diff --git a/net/ipv4/ipip.c b/net/ipv4/ipip.c
index bfc17c5..37360d6 100644
--- a/net/ipv4/ipip.c
+++ b/net/ipv4/ipip.c
@@ -751,8 +751,8 @@ static void ipip_tunnel_setup(struct net_device *dev)
 	dev->flags		= IFF_NOARP;
 	dev->iflink		= 0;
 	dev->addr_len		= 4;
-	dev->features		|= NETIF_F_NETNS_LOCAL;
-	dev->features		|= NETIF_F_LLTX;
+	dev->legacy_features	|= NETIF_F_NETNS_LOCAL;
+	dev->legacy_features	|= NETIF_F_LLTX;
 	dev->priv_flags		&= ~IFF_XMIT_DST_RELEASE;
 }
 
diff --git a/net/ipv4/ipmr.c b/net/ipv4/ipmr.c
index 1f62eae..f94b754 100644
--- a/net/ipv4/ipmr.c
+++ b/net/ipv4/ipmr.c
@@ -469,7 +469,7 @@ static void reg_vif_setup(struct net_device *dev)
 	dev->flags		= IFF_NOARP;
 	dev->netdev_ops		= &reg_vif_netdev_ops,
 	dev->destructor		= free_netdev;
-	dev->features		|= NETIF_F_NETNS_LOCAL;
+	dev->legacy_features	|= NETIF_F_NETNS_LOCAL;
 }
 
 static struct net_device *ipmr_reg_vif(struct net *net, struct mr_table *mrt)
diff --git a/net/ipv4/netfilter/nf_nat_helper.c b/net/ipv4/netfilter/nf_nat_helper.c
index 31427fb..7c4e698 100644
--- a/net/ipv4/netfilter/nf_nat_helper.c
+++ b/net/ipv4/netfilter/nf_nat_helper.c
@@ -160,7 +160,7 @@ static void nf_nat_csum(struct sk_buff *skb, struct iphdr *iph, void *data,
 
 	if (skb->ip_summed != CHECKSUM_PARTIAL) {
 		if (!(rt->rt_flags & RTCF_LOCAL) &&
-		    skb->dev->features & NETIF_F_V4_CSUM) {
+		    skb->dev->legacy_features & NETIF_F_V4_CSUM) {
 			skb->ip_summed = CHECKSUM_PARTIAL;
 			skb->csum_start = skb_headroom(skb) +
 					  skb_network_offset(skb) +
-- 
1.7.3.1


  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   ` Mahesh Bandewar [this message]
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                                     ` [PATCH 19/20] virtio_net: " Mahesh Bandewar
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-3-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).