summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorGreg Rose <gregory.v.rose@intel.com>2011-10-08 03:05:24 +0000
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>2011-10-16 13:15:38 -0700
commit5f8444a3fa617076f8da51a3e8ecce01a5d7f738 (patch)
tree196aa6b0e949ceef2bd7b639c300e40bc0bdb9ad /include
parenta90b412cb8c7ccc1689f9ea130883d00a1f0a5bb (diff)
downloadlinux-3.10-5f8444a3fa617076f8da51a3e8ecce01a5d7f738.tar.gz
linux-3.10-5f8444a3fa617076f8da51a3e8ecce01a5d7f738.tar.bz2
linux-3.10-5f8444a3fa617076f8da51a3e8ecce01a5d7f738.zip
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')
-rw-r--r--include/linux/if_link.h10
-rw-r--r--include/linux/netdevice.h3
2 files changed, 13 insertions, 0 deletions
diff --git a/include/linux/if_link.h b/include/linux/if_link.h
index 0ee969a5593..c52d4b5f872 100644
--- a/include/linux/if_link.h
+++ b/include/linux/if_link.h
@@ -279,6 +279,7 @@ enum {
IFLA_VF_MAC, /* Hardware queue specific attributes */
IFLA_VF_VLAN,
IFLA_VF_TX_RATE, /* TX Bandwidth Allocation */
+ IFLA_VF_SPOOFCHK, /* Spoof Checking on/off switch */
__IFLA_VF_MAX,
};
@@ -300,13 +301,22 @@ struct ifla_vf_tx_rate {
__u32 rate; /* Max TX bandwidth in Mbps, 0 disables throttling */
};
+struct ifla_vf_spoofchk {
+ __u32 vf;
+ __u32 setting;
+};
+#ifdef __KERNEL__
+
+/* We don't want this structure exposed to user space */
struct ifla_vf_info {
__u32 vf;
__u8 mac[32];
__u32 vlan;
__u32 qos;
__u32 tx_rate;
+ __u32 spoofchk;
};
+#endif
/* VF ports management section
*
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index 43b32983ba1..0db1f5f6d4a 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -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);