Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

net: move net_device priv_flags out from UAPI

These are private to userspace, and they're unstable
anyway and can be shuffled at will (see 080e4130b1fb)
so any userspace application relying on them is on crack.

Test compiled with allyesconfig.

mcgrof@drvbp1 /pub/mem/mcgrof/net-next (git::master)$ make allyesconfig
mcgrof@drvbp1 /pub/mem/mcgrof/net-next (git::master)$ time make -j 20
...
BUILD arch/x86/boot/bzImage
Setup is 16992 bytes (padded to 17408 bytes).
System is 56153 kB
CRC 721d2751
Kernel: arch/x86/boot/bzImage is ready (#1)
real 19m35.744s
user 280m37.984s
sys 27m54.104s

Cc: netdev@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Cc: Ben Hutchings <ben@decadent.org.uk>
Cc: Florian Fainelli <f.fainelli@gmail.com>
Cc: David Miller <davem@davemloft.net>
Signed-off-by: Luis R. Rodriguez <mcgrof@suse.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Luis R. Rodriguez and committed by
David S. Miller
7aa98047 589f5816

+83 -83
+83
include/linux/netdevice.h
··· 1147 1147 void *priv); 1148 1148 }; 1149 1149 1150 + /** 1151 + * enum net_device_priv_flags - &struct net_device priv_flags 1152 + * 1153 + * These are the &struct net_device, they are only set internally 1154 + * by drivers and used in the kernel. These flags are invisible to 1155 + * userspace, this means that the order of these flags can change 1156 + * during any kernel release. 1157 + * 1158 + * You should have a pretty good reason to be extending these flags. 1159 + * 1160 + * @IFF_802_1Q_VLAN: 802.1Q VLAN device 1161 + * @IFF_EBRIDGE: Ethernet bridging device 1162 + * @IFF_SLAVE_INACTIVE: bonding slave not the curr. active 1163 + * @IFF_MASTER_8023AD: bonding master, 802.3ad 1164 + * @IFF_MASTER_ALB: bonding master, balance-alb 1165 + * @IFF_BONDING: bonding master or slave 1166 + * @IFF_SLAVE_NEEDARP: need ARPs for validation 1167 + * @IFF_ISATAP: ISATAP interface (RFC4214) 1168 + * @IFF_MASTER_ARPMON: bonding master, ARP mon in use 1169 + * @IFF_WAN_HDLC: WAN HDLC device 1170 + * @IFF_XMIT_DST_RELEASE: dev_hard_start_xmit() is allowed to 1171 + * release skb->dst 1172 + * @IFF_DONT_BRIDGE: disallow bridging this ether dev 1173 + * @IFF_DISABLE_NETPOLL: disable netpoll at run-time 1174 + * @IFF_MACVLAN_PORT: device used as macvlan port 1175 + * @IFF_BRIDGE_PORT: device used as bridge port 1176 + * @IFF_OVS_DATAPATH: device used as Open vSwitch datapath port 1177 + * @IFF_TX_SKB_SHARING: The interface supports sharing skbs on transmit 1178 + * @IFF_UNICAST_FLT: Supports unicast filtering 1179 + * @IFF_TEAM_PORT: device used as team port 1180 + * @IFF_SUPP_NOFCS: device supports sending custom FCS 1181 + * @IFF_LIVE_ADDR_CHANGE: device supports hardware address 1182 + * change when it's running 1183 + * @IFF_MACVLAN: Macvlan device 1184 + */ 1185 + enum netdev_priv_flags { 1186 + IFF_802_1Q_VLAN = 1<<0, 1187 + IFF_EBRIDGE = 1<<1, 1188 + IFF_SLAVE_INACTIVE = 1<<2, 1189 + IFF_MASTER_8023AD = 1<<3, 1190 + IFF_MASTER_ALB = 1<<4, 1191 + IFF_BONDING = 1<<5, 1192 + IFF_SLAVE_NEEDARP = 1<<6, 1193 + IFF_ISATAP = 1<<7, 1194 + IFF_MASTER_ARPMON = 1<<8, 1195 + IFF_WAN_HDLC = 1<<9, 1196 + IFF_XMIT_DST_RELEASE = 1<<10, 1197 + IFF_DONT_BRIDGE = 1<<11, 1198 + IFF_DISABLE_NETPOLL = 1<<12, 1199 + IFF_MACVLAN_PORT = 1<<13, 1200 + IFF_BRIDGE_PORT = 1<<14, 1201 + IFF_OVS_DATAPATH = 1<<15, 1202 + IFF_TX_SKB_SHARING = 1<<16, 1203 + IFF_UNICAST_FLT = 1<<17, 1204 + IFF_TEAM_PORT = 1<<18, 1205 + IFF_SUPP_NOFCS = 1<<19, 1206 + IFF_LIVE_ADDR_CHANGE = 1<<20, 1207 + IFF_MACVLAN = 1<<21, 1208 + }; 1209 + 1210 + #define IFF_802_1Q_VLAN IFF_802_1Q_VLAN 1211 + #define IFF_EBRIDGE IFF_EBRIDGE 1212 + #define IFF_SLAVE_INACTIVE IFF_SLAVE_INACTIVE 1213 + #define IFF_MASTER_8023AD IFF_MASTER_8023AD 1214 + #define IFF_MASTER_ALB IFF_MASTER_ALB 1215 + #define IFF_BONDING IFF_BONDING 1216 + #define IFF_SLAVE_NEEDARP IFF_SLAVE_NEEDARP 1217 + #define IFF_ISATAP IFF_ISATAP 1218 + #define IFF_MASTER_ARPMON IFF_MASTER_ARPMON 1219 + #define IFF_WAN_HDLC IFF_WAN_HDLC 1220 + #define IFF_XMIT_DST_RELEASE IFF_XMIT_DST_RELEASE 1221 + #define IFF_DONT_BRIDGE IFF_DONT_BRIDGE 1222 + #define IFF_DISABLE_NETPOLL IFF_DISABLE_NETPOLL 1223 + #define IFF_MACVLAN_PORT IFF_MACVLAN_PORT 1224 + #define IFF_BRIDGE_PORT IFF_BRIDGE_PORT 1225 + #define IFF_OVS_DATAPATH IFF_OVS_DATAPATH 1226 + #define IFF_TX_SKB_SHARING IFF_TX_SKB_SHARING 1227 + #define IFF_UNICAST_FLT IFF_UNICAST_FLT 1228 + #define IFF_TEAM_PORT IFF_TEAM_PORT 1229 + #define IFF_SUPP_NOFCS IFF_SUPP_NOFCS 1230 + #define IFF_LIVE_ADDR_CHANGE IFF_LIVE_ADDR_CHANGE 1231 + #define IFF_MACVLAN IFF_MACVLAN 1232 + 1150 1233 /* 1151 1234 * The DEVICE structure. 1152 1235 * Actually, this whole structure is a big mistake. It mixes I/O
-83
include/uapi/linux/if.h
··· 112 112 #define IFF_VOLATILE (IFF_LOOPBACK|IFF_POINTOPOINT|IFF_BROADCAST|IFF_ECHO|\ 113 113 IFF_MASTER|IFF_SLAVE|IFF_RUNNING|IFF_LOWER_UP|IFF_DORMANT) 114 114 115 - /** 116 - * enum net_device_priv_flags - &struct net_device priv_flags 117 - * 118 - * These are the &struct net_device, they are only set internally 119 - * by drivers and used in the kernel. These flags are invisible to 120 - * userspace, this means that the order of these flags can change 121 - * during any kernel release. 122 - * 123 - * You should have a pretty good reason to be extending these flags. 124 - * 125 - * @IFF_802_1Q_VLAN: 802.1Q VLAN device 126 - * @IFF_EBRIDGE: Ethernet bridging device 127 - * @IFF_SLAVE_INACTIVE: bonding slave not the curr. active 128 - * @IFF_MASTER_8023AD: bonding master, 802.3ad 129 - * @IFF_MASTER_ALB: bonding master, balance-alb 130 - * @IFF_BONDING: bonding master or slave 131 - * @IFF_SLAVE_NEEDARP: need ARPs for validation 132 - * @IFF_ISATAP: ISATAP interface (RFC4214) 133 - * @IFF_MASTER_ARPMON: bonding master, ARP mon in use 134 - * @IFF_WAN_HDLC: WAN HDLC device 135 - * @IFF_XMIT_DST_RELEASE: dev_hard_start_xmit() is allowed to 136 - * release skb->dst 137 - * @IFF_DONT_BRIDGE: disallow bridging this ether dev 138 - * @IFF_DISABLE_NETPOLL: disable netpoll at run-time 139 - * @IFF_MACVLAN_PORT: device used as macvlan port 140 - * @IFF_BRIDGE_PORT: device used as bridge port 141 - * @IFF_OVS_DATAPATH: device used as Open vSwitch datapath port 142 - * @IFF_TX_SKB_SHARING: The interface supports sharing skbs on transmit 143 - * @IFF_UNICAST_FLT: Supports unicast filtering 144 - * @IFF_TEAM_PORT: device used as team port 145 - * @IFF_SUPP_NOFCS: device supports sending custom FCS 146 - * @IFF_LIVE_ADDR_CHANGE: device supports hardware address 147 - * change when it's running 148 - * @IFF_MACVLAN: Macvlan device 149 - */ 150 - enum netdev_priv_flags { 151 - IFF_802_1Q_VLAN = 1<<0, 152 - IFF_EBRIDGE = 1<<1, 153 - IFF_SLAVE_INACTIVE = 1<<2, 154 - IFF_MASTER_8023AD = 1<<3, 155 - IFF_MASTER_ALB = 1<<4, 156 - IFF_BONDING = 1<<5, 157 - IFF_SLAVE_NEEDARP = 1<<6, 158 - IFF_ISATAP = 1<<7, 159 - IFF_MASTER_ARPMON = 1<<8, 160 - IFF_WAN_HDLC = 1<<9, 161 - IFF_XMIT_DST_RELEASE = 1<<10, 162 - IFF_DONT_BRIDGE = 1<<11, 163 - IFF_DISABLE_NETPOLL = 1<<12, 164 - IFF_MACVLAN_PORT = 1<<13, 165 - IFF_BRIDGE_PORT = 1<<14, 166 - IFF_OVS_DATAPATH = 1<<15, 167 - IFF_TX_SKB_SHARING = 1<<16, 168 - IFF_UNICAST_FLT = 1<<17, 169 - IFF_TEAM_PORT = 1<<18, 170 - IFF_SUPP_NOFCS = 1<<19, 171 - IFF_LIVE_ADDR_CHANGE = 1<<20, 172 - IFF_MACVLAN = 1<<21, 173 - }; 174 - 175 - #define IFF_802_1Q_VLAN IFF_802_1Q_VLAN 176 - #define IFF_EBRIDGE IFF_EBRIDGE 177 - #define IFF_SLAVE_INACTIVE IFF_SLAVE_INACTIVE 178 - #define IFF_MASTER_8023AD IFF_MASTER_8023AD 179 - #define IFF_MASTER_ALB IFF_MASTER_ALB 180 - #define IFF_BONDING IFF_BONDING 181 - #define IFF_SLAVE_NEEDARP IFF_SLAVE_NEEDARP 182 - #define IFF_ISATAP IFF_ISATAP 183 - #define IFF_MASTER_ARPMON IFF_MASTER_ARPMON 184 - #define IFF_WAN_HDLC IFF_WAN_HDLC 185 - #define IFF_XMIT_DST_RELEASE IFF_XMIT_DST_RELEASE 186 - #define IFF_DONT_BRIDGE IFF_DONT_BRIDGE 187 - #define IFF_DISABLE_NETPOLL IFF_DISABLE_NETPOLL 188 - #define IFF_MACVLAN_PORT IFF_MACVLAN_PORT 189 - #define IFF_BRIDGE_PORT IFF_BRIDGE_PORT 190 - #define IFF_OVS_DATAPATH IFF_OVS_DATAPATH 191 - #define IFF_TX_SKB_SHARING IFF_TX_SKB_SHARING 192 - #define IFF_UNICAST_FLT IFF_UNICAST_FLT 193 - #define IFF_TEAM_PORT IFF_TEAM_PORT 194 - #define IFF_SUPP_NOFCS IFF_SUPP_NOFCS 195 - #define IFF_LIVE_ADDR_CHANGE IFF_LIVE_ADDR_CHANGE 196 - #define IFF_MACVLAN IFF_MACVLAN 197 - 198 115 #define IF_GET_IFACE 0x0001 /* for querying only */ 199 116 #define IF_GET_PROTO 0x0002 200 117