Re: [RFC net-next 1/2] if_link : add support for VF privileges
From: Ben Hutchings <hidden>
Date: 2012-02-14 23:25:00
On Tue, 2012-02-14 at 13:26 -0600, Ajit Khaparde wrote:
quoted hunk ↗ jump to hunk
Signed-off-by: Ajit Khaparde <redacted> --- include/linux/if_link.h | 21 +++++++++++++++++++++ include/linux/netdevice.h | 3 +++ net/core/rtnetlink.c | 17 ++++++++++++++++- 3 files changed, 40 insertions(+), 1 deletions(-)diff --git a/include/linux/if_link.h b/include/linux/if_link.h index c52d4b5..9c93a8e 100644 --- a/include/linux/if_link.h +++ b/include/linux/if_link.h@@ -280,11 +280,26 @@ enum { IFLA_VF_VLAN, IFLA_VF_TX_RATE, /* TX Bandwidth Allocation */ IFLA_VF_SPOOFCHK, /* Spoof Checking on/off switch */ + IFLA_VF_PRIVILEGE, /* VF Privilege level setting */ __IFLA_VF_MAX, }; #define IFLA_VF_MAX (__IFLA_VF_MAX - 1) +enum { + IFLA_VF_PRIVILEGE_DEFAULT = 1, /* Default privileges */
What are the default privileges? Should existing drivers report that their VFs have this?
+ IFLA_VF_PRIVILEGE_STATS = 2, /* Privilege to gather statistics */
I assume that means port or board statistics as opposed to statistics for the VF?
+ IFLA_VF_PRIVILEGE_LNK_MGMT = 4, /* Privilege to manage link params */ + IFLA_VF_PRIVILEGE_DIAG = 8, /* Privilege to perform diagnostics */ + IFLA_VF_PRIVILEGE_MAC = 16, /* Privilege to modify MAC address */ + IFLA_VF_PRIVILEGE_VLAN = 32, /* Privilege to add or remove VLANs */
I assume these two apply to RX filtering of the VF itself. How about control over TX filtering?
+ IFLA_VF_PRIVILEGE_DEV_CFG = 64, /* Unrestricted admin access privlege */
Does that include all the other privileges, or does it mean 'everything else'?
+ IFLA_VF_PRIVILEGE_SECURE = 128, /* Privilege to access secure content */
What does that mean?
+ __IFLA_VF_PRIVILEGE_MAX, +}; + +#define IFLA_VF_PRIVILEGE_MAX (__IFLA_VF_PRIVILEGE_MAX - 1)
[...] This doesn't seem to make sense for an enumeration of flags. 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.