diff options
author | Greg Rose <gregory.v.rose@intel.com> | 2011-10-07 23:05:24 -0400 |
---|---|---|
committer | Jeff Kirsher <jeffrey.t.kirsher@intel.com> | 2011-10-16 16:15:38 -0400 |
commit | 5f8444a3fa617076f8da51a3e8ecce01a5d7f738 (patch) | |
tree | 196aa6b0e949ceef2bd7b639c300e40bc0bdb9ad /include/linux/if_link.h | |
parent | a90b412cb8c7ccc1689f9ea130883d00a1f0a5bb (diff) |
if_link: Add additional parameter to IFLA_VF_INFO for spoof checking
Add configuration setting for drivers to turn spoof checking on or off
for discrete VFs.
v2 - Fix indentation problem, wrap the ifla_vf_info structure in
#ifdef __KERNEL__ to prevent user space from accessing and
change function paramater for the spoof check setting netdev
op from u8 to bool.
v3 - Preset spoof check setting to -1 so that user space tools such
as ip can detect that the driver didn't report a spoofcheck
setting. Prevents incorrect display of spoof check settings
for drivers that don't report it.
Signed-off-by: Greg Rose <gregory.v.rose@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Diffstat (limited to 'include/linux/if_link.h')
-rw-r--r-- | include/linux/if_link.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/include/linux/if_link.h b/include/linux/if_link.h index 0ee969a5593d..c52d4b5f872a 100644 --- a/include/linux/if_link.h +++ b/include/linux/if_link.h | |||
@@ -279,6 +279,7 @@ enum { | |||
279 | IFLA_VF_MAC, /* Hardware queue specific attributes */ | 279 | IFLA_VF_MAC, /* Hardware queue specific attributes */ |
280 | IFLA_VF_VLAN, | 280 | IFLA_VF_VLAN, |
281 | IFLA_VF_TX_RATE, /* TX Bandwidth Allocation */ | 281 | IFLA_VF_TX_RATE, /* TX Bandwidth Allocation */ |
282 | IFLA_VF_SPOOFCHK, /* Spoof Checking on/off switch */ | ||
282 | __IFLA_VF_MAX, | 283 | __IFLA_VF_MAX, |
283 | }; | 284 | }; |
284 | 285 | ||
@@ -300,13 +301,22 @@ struct ifla_vf_tx_rate { | |||
300 | __u32 rate; /* Max TX bandwidth in Mbps, 0 disables throttling */ | 301 | __u32 rate; /* Max TX bandwidth in Mbps, 0 disables throttling */ |
301 | }; | 302 | }; |
302 | 303 | ||
304 | struct ifla_vf_spoofchk { | ||
305 | __u32 vf; | ||
306 | __u32 setting; | ||
307 | }; | ||
308 | #ifdef __KERNEL__ | ||
309 | |||
310 | /* We don't want this structure exposed to user space */ | ||
303 | struct ifla_vf_info { | 311 | struct ifla_vf_info { |
304 | __u32 vf; | 312 | __u32 vf; |
305 | __u8 mac[32]; | 313 | __u8 mac[32]; |
306 | __u32 vlan; | 314 | __u32 vlan; |
307 | __u32 qos; | 315 | __u32 qos; |
308 | __u32 tx_rate; | 316 | __u32 tx_rate; |
317 | __u32 spoofchk; | ||
309 | }; | 318 | }; |
319 | #endif | ||
310 | 320 | ||
311 | /* VF ports management section | 321 | /* VF ports management section |
312 | * | 322 | * |