Re: [net-next 1/4] i40e/i40evf: Add capability exchange for outer checksum

2017-04-07 Thread Alexander Duyck
On Thu, Apr 6, 2017 at 11:38 PM, Or Gerlitz  wrote:
> On Fri, Apr 7, 2017 at 6:23 AM, Jeff Kirsher
>  wrote:
>> From: Preethi Banala 
>>
>> This patch adds a capability negotiation between VF and PF using ENCAP/
>> ENCAP_CSUM offload flags in order for the VF to support outer checksum
>> and TSO offloads for encapsulated packets.
>
> [...]
> -#define I40E_VIRTCHNL_VF_OFFLOAD_0X0010
> +#define I40E_VIRTCHNL_VF_OFFLOAD_ENCAP 0X0010
> +#define I40E_VIRTCHNL_VF_OFFLOAD_ENCAP_CSUM0X0020
>
> what happens when one of the PF or VF doesn't have this hunk, e.g one
> assumes value X and one assumes value Y for ENCAP_CSUM

The way the capability exchange works is that the VF advertises what
it wants and the PF does an AND of that value and a bitmask of what
the PF supports. The VF then receives the result and has to work with
that. So a legacy PF driver will cause the VF to drop support for
something like this because these bits are not supported.

That way both the PF and VF should know what to expect from each other
in terms of what is supported without it being implied based on the VF
device IDs.

- Alex


Re: [net-next 1/4] i40e/i40evf: Add capability exchange for outer checksum

2017-04-07 Thread Or Gerlitz
On Fri, Apr 7, 2017 at 6:23 AM, Jeff Kirsher
 wrote:
> From: Preethi Banala 
>
> This patch adds a capability negotiation between VF and PF using ENCAP/
> ENCAP_CSUM offload flags in order for the VF to support outer checksum
> and TSO offloads for encapsulated packets.

[...]
-#define I40E_VIRTCHNL_VF_OFFLOAD_0X0010
+#define I40E_VIRTCHNL_VF_OFFLOAD_ENCAP 0X0010
+#define I40E_VIRTCHNL_VF_OFFLOAD_ENCAP_CSUM0X0020

what happens when one of the PF or VF doesn't have this hunk, e.g one
assumes value X and one assumes value Y for ENCAP_CSUM