netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH iproute2] ip link set vf: Added "query_rss" command
@ 2015-03-22 18:52 Vlad Zolotarov
  2015-03-23 10:42 ` Jeff Kirsher
  2015-03-24 22:47 ` Stephen Hemminger
  0 siblings, 2 replies; 6+ messages in thread
From: Vlad Zolotarov @ 2015-03-22 18:52 UTC (permalink / raw)
  To: stephen, kuznet, netdev; +Cc: jeffrey.t.kirsher, Vlad Zolotarov

Add a new option to toggle the ability of querying the RSS configuration of a specific VF.

VF RSS information like RSS hash key may be considered sensitive on some devices where
this information is shared between VF and PF and thus its querying may be prohibited by default.

This new option allows a system administrator with privileges to modify a PF state
to control if the above VF querying is allowed or not.

For example:
 To enable RSS querying of VF[0] of ethX:
 >> ip link set dev ethX vf 0 query_rss on

Signed-off-by: Vlad Zolotarov <vladz@cloudius-systems.com>
---
 include/linux/if_link.h |  8 ++++++++
 ip/iplink.c             | 13 +++++++++++++
 2 files changed, 21 insertions(+)

diff --git a/include/linux/if_link.h b/include/linux/if_link.h
index 3450c3f..ca831e2 100644
--- a/include/linux/if_link.h
+++ b/include/linux/if_link.h
@@ -457,6 +457,9 @@ enum {
 	IFLA_VF_SPOOFCHK,	/* Spoof Checking on/off switch */
 	IFLA_VF_LINK_STATE,	/* link state enable/disable/auto switch */
 	IFLA_VF_RATE,		/* Min and Max TX Bandwidth Allocation */
+	IFLA_VF_RSS_QUERY_EN,	/* RSS Redirection Table and Hash Key query
+				 * on/off switch
+				 */
 	__IFLA_VF_MAX,
 };
 
@@ -489,6 +492,11 @@ struct ifla_vf_spoofchk {
 	__u32 setting;
 };
 
+struct ifla_vf_rss_query_en {
+	__u32 vf;
+	__u32 setting;
+};
+
 enum {
 	IFLA_VF_LINK_STATE_AUTO,	/* link state of the uplink */
 	IFLA_VF_LINK_STATE_ENABLE,	/* link always up */
diff --git a/ip/iplink.c b/ip/iplink.c
index 5893ee4..6498041 100644
--- a/ip/iplink.c
+++ b/ip/iplink.c
@@ -80,6 +80,7 @@ void iplink_usage(void)
 	fprintf(stderr, "				   [ rate TXRATE ] ] \n");
 
 	fprintf(stderr, "				   [ spoofchk { on | off} ] ] \n");
+	fprintf(stderr, "				   [ query_rss { on | off} ] ] \n");
 	fprintf(stderr, "				   [ state { auto | enable | disable} ] ]\n");
 	fprintf(stderr, "			  [ master DEVICE ]\n");
 	fprintf(stderr, "			  [ nomaster ]\n");
@@ -331,6 +332,18 @@ static int iplink_parse_vf(int vf, int *argcp, char ***argvp,
 			ivs.vf = vf;
 			addattr_l(&req->n, sizeof(*req), IFLA_VF_SPOOFCHK, &ivs, sizeof(ivs));
 
+		} else if (matches(*argv, "query_rss") == 0) {
+			struct ifla_vf_rss_query_en ivs;
+			NEXT_ARG();
+			if (matches(*argv, "on") == 0)
+				ivs.setting = 1;
+			else if (matches(*argv, "off") == 0)
+				ivs.setting = 0;
+			else
+				invarg("Invalid \"query_rss\" value\n", *argv);
+			ivs.vf = vf;
+			addattr_l(&req->n, sizeof(*req), IFLA_VF_RSS_QUERY_EN, &ivs, sizeof(ivs));
+
 		} else if (matches(*argv, "state") == 0) {
 			struct ifla_vf_link_state ivl;
 			NEXT_ARG();
-- 
2.1.0

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH iproute2] ip link set vf: Added "query_rss" command
  2015-03-22 18:52 [PATCH iproute2] ip link set vf: Added "query_rss" command Vlad Zolotarov
@ 2015-03-23 10:42 ` Jeff Kirsher
  2015-03-23 10:46   ` Vlad Zolotarov
  2015-03-24 22:47 ` Stephen Hemminger
  1 sibling, 1 reply; 6+ messages in thread
From: Jeff Kirsher @ 2015-03-23 10:42 UTC (permalink / raw)
  To: Vlad Zolotarov; +Cc: stephen, kuznet, netdev

[-- Attachment #1: Type: text/plain, Size: 1008 bytes --]

On Sun, 2015-03-22 at 20:52 +0200, Vlad Zolotarov wrote:
> Add a new option to toggle the ability of querying the RSS
> configuration of a specific VF.
> 
> VF RSS information like RSS hash key may be considered sensitive on
> some devices where
> this information is shared between VF and PF and thus its querying may
> be prohibited by default.
> 
> This new option allows a system administrator with privileges to
> modify a PF state
> to control if the above VF querying is allowed or not.
> 
> For example:
>  To enable RSS querying of VF[0] of ethX:
>  >> ip link set dev ethX vf 0 query_rss on
> 
> Signed-off-by: Vlad Zolotarov <vladz@cloudius-systems.com>
> ---
>  include/linux/if_link.h |  8 ++++++++
>  ip/iplink.c             | 13 +++++++++++++
>  2 files changed, 21 insertions(+)

I have added your other patch series to my next-queue tree for further
review and testing.  I have also made validation aware of this patch to
properly review your changes, thanks Vlad.

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH iproute2] ip link set vf: Added "query_rss" command
  2015-03-23 10:42 ` Jeff Kirsher
@ 2015-03-23 10:46   ` Vlad Zolotarov
  0 siblings, 0 replies; 6+ messages in thread
From: Vlad Zolotarov @ 2015-03-23 10:46 UTC (permalink / raw)
  To: Jeff Kirsher; +Cc: stephen, kuznet, netdev



On 03/23/15 12:42, Jeff Kirsher wrote:
> On Sun, 2015-03-22 at 20:52 +0200, Vlad Zolotarov wrote:
>> Add a new option to toggle the ability of querying the RSS
>> configuration of a specific VF.
>>
>> VF RSS information like RSS hash key may be considered sensitive on
>> some devices where
>> this information is shared between VF and PF and thus its querying may
>> be prohibited by default.
>>
>> This new option allows a system administrator with privileges to
>> modify a PF state
>> to control if the above VF querying is allowed or not.
>>
>> For example:
>>   To enable RSS querying of VF[0] of ethX:
>>   >> ip link set dev ethX vf 0 query_rss on
>>
>> Signed-off-by: Vlad Zolotarov <vladz@cloudius-systems.com>
>> ---
>>   include/linux/if_link.h |  8 ++++++++
>>   ip/iplink.c             | 13 +++++++++++++
>>   2 files changed, 21 insertions(+)
> I have added your other patch series to my next-queue tree for further
> review and testing.  I have also made validation aware of this patch to
> properly review your changes, thanks Vlad.

Great! Thanks, Jeff.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH iproute2] ip link set vf: Added "query_rss" command
  2015-03-22 18:52 [PATCH iproute2] ip link set vf: Added "query_rss" command Vlad Zolotarov
  2015-03-23 10:42 ` Jeff Kirsher
@ 2015-03-24 22:47 ` Stephen Hemminger
  2015-04-13 11:04   ` Vlad Zolotarov
  1 sibling, 1 reply; 6+ messages in thread
From: Stephen Hemminger @ 2015-03-24 22:47 UTC (permalink / raw)
  To: Vlad Zolotarov; +Cc: kuznet, netdev, jeffrey.t.kirsher

On Sun, 22 Mar 2015 20:52:58 +0200
Vlad Zolotarov <vladz@cloudius-systems.com> wrote:

> Add a new option to toggle the ability of querying the RSS configuration of a specific VF.
> 
> VF RSS information like RSS hash key may be considered sensitive on some devices where
> this information is shared between VF and PF and thus its querying may be prohibited by default.
> 
> This new option allows a system administrator with privileges to modify a PF state
> to control if the above VF querying is allowed or not.
> 
> For example:
>  To enable RSS querying of VF[0] of ethX:
>  >> ip link set dev ethX vf 0 query_rss on  
> 
> Signed-off-by: Vlad Zolotarov <vladz@cloudius-systems.com>

Holding off on this going into iproute until kernel component goes
into net-next

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH iproute2] ip link set vf: Added "query_rss" command
  2015-03-24 22:47 ` Stephen Hemminger
@ 2015-04-13 11:04   ` Vlad Zolotarov
  2015-04-26 10:35     ` Vlad Zolotarov
  0 siblings, 1 reply; 6+ messages in thread
From: Vlad Zolotarov @ 2015-04-13 11:04 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: kuznet, netdev, jeffrey.t.kirsher



On 03/25/15 00:47, Stephen Hemminger wrote:
> On Sun, 22 Mar 2015 20:52:58 +0200
> Vlad Zolotarov <vladz@cloudius-systems.com> wrote:
>
>> Add a new option to toggle the ability of querying the RSS configuration of a specific VF.
>>
>> VF RSS information like RSS hash key may be considered sensitive on some devices where
>> this information is shared between VF and PF and thus its querying may be prohibited by default.
>>
>> This new option allows a system administrator with privileges to modify a PF state
>> to control if the above VF querying is allowed or not.
>>
>> For example:
>>   To enable RSS querying of VF[0] of ethX:
>>   >> ip link set dev ethX vf 0 query_rss on
>>
>> Signed-off-by: Vlad Zolotarov <vladz@cloudius-systems.com>
> Holding off on this going into iproute until kernel component goes
> into net-next

Hi. The kernel patches have been pulled by Dave. Could u, pls., proceed 
with this one?

thanks,
vlad

>

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH iproute2] ip link set vf: Added "query_rss" command
  2015-04-13 11:04   ` Vlad Zolotarov
@ 2015-04-26 10:35     ` Vlad Zolotarov
  0 siblings, 0 replies; 6+ messages in thread
From: Vlad Zolotarov @ 2015-04-26 10:35 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: kuznet, netdev, jeffrey.t.kirsher



On 04/13/15 14:04, Vlad Zolotarov wrote:
>
>
> On 03/25/15 00:47, Stephen Hemminger wrote:
>> On Sun, 22 Mar 2015 20:52:58 +0200
>> Vlad Zolotarov <vladz@cloudius-systems.com> wrote:
>>
>>> Add a new option to toggle the ability of querying the RSS 
>>> configuration of a specific VF.
>>>
>>> VF RSS information like RSS hash key may be considered sensitive on 
>>> some devices where
>>> this information is shared between VF and PF and thus its querying 
>>> may be prohibited by default.
>>>
>>> This new option allows a system administrator with privileges to 
>>> modify a PF state
>>> to control if the above VF querying is allowed or not.
>>>
>>> For example:
>>>   To enable RSS querying of VF[0] of ethX:
>>>   >> ip link set dev ethX vf 0 query_rss on
>>>
>>> Signed-off-by: Vlad Zolotarov <vladz@cloudius-systems.com>
>> Holding off on this going into iproute until kernel component goes
>> into net-next
>
> Hi. The kernel patches have been pulled by Dave. Could u, pls., 
> proceed with this one?

ping ;)

>
> thanks,
> vlad
>
>>
>

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2015-04-26 10:35 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-03-22 18:52 [PATCH iproute2] ip link set vf: Added "query_rss" command Vlad Zolotarov
2015-03-23 10:42 ` Jeff Kirsher
2015-03-23 10:46   ` Vlad Zolotarov
2015-03-24 22:47 ` Stephen Hemminger
2015-04-13 11:04   ` Vlad Zolotarov
2015-04-26 10:35     ` Vlad Zolotarov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).