Netdev Archive on lore.kernel.org
 help / color / Atom feed
From: David Miller <davem@davemloft.net>
To: kaber@trash.net
Cc: torvalds@linux-foundation.org, hayeswang@realtek.com,
	akpm@linux-foundation.org, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: [PATCH] net: Restore NETIF_F_* bit ordering.
Date: Thu, 02 May 2013 04:31:32 -0400 (EDT)
Message-ID: <20130502.043132.2103406228463666807.davem@davemloft.net> (raw)
In-Reply-To: <20130502.041625.412316202038784117.davem@davemloft.net>


Commit 8ad227ff89a7e6f05d07cd0acfd95ed3a24450ca ("net: vlan: add
802.1ad support") added some new NETIF_F_* features bits, but it
added them in the middle of existing values.

Userland depends upon the flag bits via the per-netdevice 'flags'
sysfs file.

So restore the previous ordering by adding the new flags at the
end.

Reported-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
---

Linus, just apply this to your tree directly if it works for you.

It obviously should since this is essentially what you tested already.

Thanks.

diff --git a/include/linux/netdev_features.h b/include/linux/netdev_features.h
index cbaa027..09906b7 100644
--- a/include/linux/netdev_features.h
+++ b/include/linux/netdev_features.h
@@ -25,9 +25,6 @@ enum {
 	NETIF_F_HW_VLAN_CTAG_TX_BIT,	/* Transmit VLAN CTAG HW acceleration */
 	NETIF_F_HW_VLAN_CTAG_RX_BIT,	/* Receive VLAN CTAG HW acceleration */
 	NETIF_F_HW_VLAN_CTAG_FILTER_BIT,/* Receive filtering on VLAN CTAGs */
-	NETIF_F_HW_VLAN_STAG_TX_BIT,	/* Transmit VLAN STAG HW acceleration */
-	NETIF_F_HW_VLAN_STAG_RX_BIT,	/* Receive VLAN STAG HW acceleration */
-	NETIF_F_HW_VLAN_STAG_FILTER_BIT,/* Receive filtering on VLAN STAGs */
 	NETIF_F_VLAN_CHALLENGED_BIT,	/* Device cannot handle VLAN packets */
 	NETIF_F_GSO_BIT,		/* Enable software GSO. */
 	NETIF_F_LLTX_BIT,		/* LockLess TX - deprecated. Please */
@@ -59,6 +56,9 @@ enum {
 	NETIF_F_LOOPBACK_BIT,		/* Enable loopback */
 	NETIF_F_RXFCS_BIT,		/* Append FCS to skb pkt data */
 	NETIF_F_RXALL_BIT,		/* Receive errored frames too */
+	NETIF_F_HW_VLAN_STAG_TX_BIT,	/* Transmit VLAN STAG HW acceleration */
+	NETIF_F_HW_VLAN_STAG_RX_BIT,	/* Receive VLAN STAG HW acceleration */
+	NETIF_F_HW_VLAN_STAG_FILTER_BIT,/* Receive filtering on VLAN STAGs */
 
 	/*
 	 * Add your fresh new feature above and remember to update
@@ -86,9 +86,6 @@ enum {
 #define NETIF_F_HW_VLAN_CTAG_FILTER __NETIF_F(HW_VLAN_CTAG_FILTER)
 #define NETIF_F_HW_VLAN_CTAG_RX	__NETIF_F(HW_VLAN_CTAG_RX)
 #define NETIF_F_HW_VLAN_CTAG_TX	__NETIF_F(HW_VLAN_CTAG_TX)
-#define NETIF_F_HW_VLAN_STAG_FILTER __NETIF_F(HW_VLAN_STAG_FILTER)
-#define NETIF_F_HW_VLAN_STAG_RX	__NETIF_F(HW_VLAN_STAG_RX)
-#define NETIF_F_HW_VLAN_STAG_TX	__NETIF_F(HW_VLAN_STAG_TX)
 #define NETIF_F_IP_CSUM		__NETIF_F(IP_CSUM)
 #define NETIF_F_IPV6_CSUM	__NETIF_F(IPV6_CSUM)
 #define NETIF_F_LLTX		__NETIF_F(LLTX)
@@ -110,6 +107,9 @@ enum {
 #define NETIF_F_RXALL		__NETIF_F(RXALL)
 #define NETIF_F_GSO_GRE		__NETIF_F(GSO_GRE)
 #define NETIF_F_GSO_UDP_TUNNEL	__NETIF_F(GSO_UDP_TUNNEL)
+#define NETIF_F_HW_VLAN_STAG_FILTER __NETIF_F(HW_VLAN_STAG_FILTER)
+#define NETIF_F_HW_VLAN_STAG_RX	__NETIF_F(HW_VLAN_STAG_RX)
+#define NETIF_F_HW_VLAN_STAG_TX	__NETIF_F(HW_VLAN_STAG_TX)
 
 /* Features valid for ethtool to change */
 /* = all defined minus driver/device-class-related */

  reply index

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-01 20:47 [GIT] Networking David Miller
2013-05-02  1:28 ` Linus Torvalds
2013-05-02  4:37   ` Linus Torvalds
2013-05-02  4:55     ` Linus Torvalds
2013-05-02  6:45       ` David Miller
2013-05-02  7:03         ` Patrick McHardy
2013-05-02  8:16           ` David Miller
2013-05-02  8:31             ` David Miller [this message]
2013-05-02  8:36             ` Patrick McHardy
2013-05-02  9:06               ` Bjørn Mork
2013-05-02  9:17                 ` David Miller
2013-05-02 10:19                   ` Bjørn Mork
2013-05-02 10:28                   ` Ben Hutchings
2013-05-02 11:51                     ` Bjørn Mork
2013-05-02 16:22                       ` Michał Mirosław
2013-05-03 23:35                         ` Pavel Simerda
2013-05-09  9:02                           ` Pavel Simerda
2013-05-02 16:27                       ` Dan Williams
2013-05-02 18:01                 ` David Miller
2013-05-02 18:53                   ` John Stoffel
2013-05-02 20:18                     ` Ben Hutchings
2013-05-02 20:40                       ` John Stoffel
2013-05-02 17:58               ` David Miller
2013-05-02  5:23   ` David Miller
2013-05-02  6:41   ` Francois Romieu
2013-05-02 16:34   ` Dan Williams
2013-05-02 17:39     ` David Miller
2013-05-02 17:47       ` Michał Mirosław
2013-05-02 17:55         ` David Miller
2013-05-02 18:06           ` David Miller
2013-05-02 18:15             ` Dan Williams
2013-05-02 18:21               ` David Miller
2013-05-02 18:24     ` Dan Williams
2013-05-02 18:52       ` Linus Torvalds
2013-05-02 18:53         ` Linus Torvalds
2013-05-02 19:17           ` Dan Williams
2013-05-02 20:22             ` Dan Williams
2013-05-06 23:35               ` Dan Williams

Reply instructions:

You may reply publically 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=20130502.043132.2103406228463666807.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=akpm@linux-foundation.org \
    --cc=hayeswang@realtek.com \
    --cc=kaber@trash.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=torvalds@linux-foundation.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

Netdev Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/netdev/0 netdev/git/0.git
	git clone --mirror https://lore.kernel.org/netdev/1 netdev/git/1.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 netdev netdev/ https://lore.kernel.org/netdev \
		netdev@vger.kernel.org
	public-inbox-index netdev

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.netdev


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git