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>
This commit is contained in:
parent
a90b412cb8
commit
5f8444a3fa
3 changed files with 43 additions and 3 deletions
|
@ -781,6 +781,7 @@ struct netdev_tc_txq {
|
|||
* int (*ndo_set_vf_mac)(struct net_device *dev, int vf, u8* mac);
|
||||
* int (*ndo_set_vf_vlan)(struct net_device *dev, int vf, u16 vlan, u8 qos);
|
||||
* int (*ndo_set_vf_tx_rate)(struct net_device *dev, int vf, int rate);
|
||||
* int (*ndo_set_vf_spoofchk)(struct net_device *dev, int vf, bool setting);
|
||||
* int (*ndo_get_vf_config)(struct net_device *dev,
|
||||
* int vf, struct ifla_vf_info *ivf);
|
||||
* int (*ndo_set_vf_port)(struct net_device *dev, int vf,
|
||||
|
@ -900,6 +901,8 @@ struct net_device_ops {
|
|||
int queue, u16 vlan, u8 qos);
|
||||
int (*ndo_set_vf_tx_rate)(struct net_device *dev,
|
||||
int vf, int rate);
|
||||
int (*ndo_set_vf_spoofchk)(struct net_device *dev,
|
||||
int vf, bool setting);
|
||||
int (*ndo_get_vf_config)(struct net_device *dev,
|
||||
int vf,
|
||||
struct ifla_vf_info *ivf);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue