Subject: Re: [net-next 01/14] ethtool: Add helper routines to pass vf to rx_flow_spec

From: John Fastabend <[email-masked]>
Date: Thu, 28 May 2015 07:34:58 -0700

On 05/28/2015 06:18 AM, Or Gerlitz wrote:
> On Thu, May 28, 2015 at 2:25 PM, Jeff Kirsher
> <[email-masked]> wrote:
>> From: John Fastabend <[email-masked]>
>>
>> The ring_cookie is 64 bits wide which is much larger than can be used
>> for actual queue index values. So provide some helper routines to
>> pack a VF index into the cookie. This is useful to steer packets to
>> a VF ring without having to know the queue layout of the device.
>
> So this patch comes  to generalize the proprietary solution introduced
> in the below commit?
>

Well I developed it in a bit different context, but I would expect
the same mechanism to be used for i40e and any other devices that can
support this.

> commit e7c8c60bc5d48994a67e4b1c7bfb01d6979dbc54
> Author: Anjali Singhai Jain <[email-masked]>
> Date:   Tue Apr 7 19:45:31 2015 -0400
>
>      i40e: Add support to program FDir SB rules for VF from PF through ethtool
>
>      With this patch we can now add Flow director Sideband rules for a VF from
>      it's PF. Here is an example on how it can be done when VF id = 5 and
>      queue = 2:
>
>      "ethtool -N ethx flow-type udp4 src-ip x.x.x.x dst-ip y.y.y.y
> src-port p1 dst-port p2 action 2 user-def 5"
>
>      User-def specifies VF id and action specifies queue.
>
>
>>   include/uapi/linux/ethtool.h | 25 +++++++++++++++++++++++++
>>   1 file changed, 25 insertions(+)

[...]

-- 
John Fastabend         Intel Corporation