Thread (30 messages) 30 messages, 5 authors, 2011-09-27

Re: [net-next 05/10] if_link: Add additional parameter to IFLA_VF_INFO for spoof checking

flat view

From: Ben Hutchings <hidden>
Date: 2011-09-25 20:07:03

On Sun, 2011-09-25 at 10:22 -0700, Stephen Hemminger wrote:
On Sat, 24 Sep 2011 02:17:38 -0700
Jeff Kirsher [off-list ref] wrote:
quoted
From: Greg Rose <redacted>

Add configuration setting for drivers to turn spoof checking on or off
for discrete VFs.

Signed-off-by: Greg Rose <redacted>
Signed-off-by: Jeff Kirsher <redacted>
---
 include/linux/if_link.h   |    7 +++++++
 include/linux/netdevice.h |    3 +++
 net/core/rtnetlink.c      |   25 ++++++++++++++++++++++---
 3 files changed, 32 insertions(+), 3 deletions(-)
diff --git a/include/linux/if_link.h b/include/linux/if_link.h
index 0ee969a..8bd6d6d 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,12 +301,18 @@ struct ifla_vf_tx_rate {
 	__u32 rate; /* Max TX bandwidth in Mbps, 0 disables throttling */
 };
 
+struct ifla_vf_spoofchk {
+	__u32 vf;
+	__u32 setting;
+};
+
 struct ifla_vf_info {
 	__u32 vf;
 	__u8 mac[32];
 	__u32 vlan;
 	__u32 qos;
 	__u32 tx_rate;
+	__u32 spoofchk;
 };
This breaks ABI compatibility, unless you add some special case code
to handle the case of tools sending the old ifla_vf_info. Users may have older version
of ip utilities that send smaller size structure.
Unless I'm missing something, that structure is not sent or received by
userland; that's why I thought it should be #ifdef __KERNEL__.

Ben.

-- 
Ben Hutchings, Staff Engineer, Solarflare
Not speaking for my employer; that's the marketing department's job.
They asked us to note that Solarflare product names are trademarked.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help