From: Simon Horman <horms@verge.net.au>
To: netdev@vger.kernel.org
Cc: Jesse Gross <jesse@nicira.com>, "David S. Miller" <davem@davemloft.net>
Subject: [patch net-next] net: increase the size of priv_flags and add IFF_OVS_DATAPATH
Date: Tue, 24 Aug 2010 11:26:41 +0900 [thread overview]
Message-ID: <20100824022637.GA11820@verge.net.au> (raw)
IFF_OVS_DATAPATH is a place-holder for the Open vSwitch datapath
which I am preparing to submit for merging.
As all 16 bits of priv_flags are already assigned flags, also increase
the size of priv_flags to 32 bits.
Unfortunately, by my calculations this increases the size of
struct net_device by 4 bytes on 32bit architectures and
8 bytes on 64 bit architectures. I couldn't see an obvious
way to avoid that.
Cc: Jesse Gross <jesse@nicira.com>
Signed-off-by: Simon Horman <horms@verge.net.au>
---
I had hoped this patch would be much cleaner :^)
Index: nf-next-2.6/include/linux/if.h
===================================================================
--- nf-next-2.6.orig/include/linux/if.h 2010-08-24 10:29:41.000000000 +0900
+++ nf-next-2.6/include/linux/if.h 2010-08-24 11:11:39.000000000 +0900
@@ -75,6 +75,8 @@
#define IFF_DISABLE_NETPOLL 0x2000 /* disable netpoll at run-time */
#define IFF_MACVLAN_PORT 0x4000 /* device used as macvlan port */
#define IFF_BRIDGE_PORT 0x8000 /* device used as bridge port */
+#define IFF_OVS_DATAPATH 0x10000 /* device used as Open vSwitch
+ * dapath port */
#define IF_GET_IFACE 0x0001 /* for querying only */
#define IF_GET_PROTO 0x0002
Index: nf-next-2.6/include/linux/netdevice.h
===================================================================
--- nf-next-2.6.orig/include/linux/netdevice.h 2010-08-24 10:38:14.000000000 +0900
+++ nf-next-2.6/include/linux/netdevice.h 2010-08-24 11:11:14.000000000 +0900
@@ -907,7 +907,7 @@ struct net_device {
unsigned int flags; /* interface flags (a la BSD) */
unsigned short gflags;
- unsigned short priv_flags; /* Like 'flags' but invisible to userspace. */
+ unsigned int priv_flags; /* Like 'flags' but invisible to userspace. */
unsigned short padded; /* How much padding added by alloc_netdev() */
unsigned char operstate; /* RFC2863 operstate */
next reply other threads:[~2010-08-24 2:26 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-08-24 2:26 Simon Horman [this message]
2010-08-24 3:44 ` [patch net-next] net: increase the size of priv_flags and add IFF_OVS_DATAPATH David Miller
2010-08-24 4:53 ` Simon Horman
2010-08-24 6:48 ` Jay Vosburgh
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=20100824022637.GA11820@verge.net.au \
--to=horms@verge.net.au \
--cc=davem@davemloft.net \
--cc=jesse@nicira.com \
--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).