2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-12-20 19:23:57 +08:00

net: increase the size of priv_flags and add IFF_OVS_DATAPATH

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>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Simon Horman 2010-08-23 16:26:41 +00:00 committed by David S. Miller
parent 0fdc100bdc
commit 1726442e11
2 changed files with 3 additions and 1 deletions

View File

@ -75,6 +75,8 @@
#define IFF_DISABLE_NETPOLL 0x2000 /* disable netpoll at run-time */ #define IFF_DISABLE_NETPOLL 0x2000 /* disable netpoll at run-time */
#define IFF_MACVLAN_PORT 0x4000 /* device used as macvlan port */ #define IFF_MACVLAN_PORT 0x4000 /* device used as macvlan port */
#define IFF_BRIDGE_PORT 0x8000 /* device used as bridge 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_IFACE 0x0001 /* for querying only */
#define IF_GET_PROTO 0x0002 #define IF_GET_PROTO 0x0002

View File

@ -901,7 +901,7 @@ struct net_device {
unsigned int flags; /* interface flags (a la BSD) */ unsigned int flags; /* interface flags (a la BSD) */
unsigned short gflags; 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 short padded; /* How much padding added by alloc_netdev() */
unsigned char operstate; /* RFC2863 operstate */ unsigned char operstate; /* RFC2863 operstate */