On 19/03/14 08:13, Thomas Graf wrote:
> On 03/18/2014 11:28 PM, Anton Ivanov (antivano) wrote:
>>
>>>>>   In most cases this would "work"
>>>>> because the packet wouldn't appear to be a TCP packet, however if the
>>>>> right data is in the right offsets (offsets of Ethertype, IP
>>>>> protocol)
>>>>> it seems like the device might incorrectly report a checksum
>>>>> error. If
>>>>> this is possible, it will be a very subtle bug!
>>>> Can you actually provide at least one example based in reality please?
>>>>
>>> https://github.com/adrianschroeter/kernel-source/blob/master/patches.drivers/i40e-0087-i40e-Rx-checksum-offload-for-VXLAN.patch
>>>
>>
>> Another person doing per-protocol special "you need to buy a new adapter
>> for a new protocol" magic and not reading the documentation...
>>
>> Instead of actually reading how it is supposed to be done so that _ANY_
>> encaps further downstream can take care of it.
>>
>> http://lxr.free-electrons.com/source/include/linux/skbuff.h#L40
>
> I agree with you but the reality is this:
>
> $ git grep ' = CHECKSUM_UNNECESSARY' drivers/net/ | wc -l
> 102

I know :(

If you look at the actual code however, most cases where you will see
UNNECESSARY will be TCP checksum on non-encapsulated payloads - not
something we should care about.

> $ git grep ' = CHECKSUM_COMPLETE' drivers/net/ | wc -l
> 22
>
> Looking at the 3 specific drivers which already support UDP
> encap offload (bnx2x, i40e, mlx4):

All I can say - bad design.

One change in the encaps and it breaks (probably by design too - you get
to sell new NICs).

My old comment that we should not be bound in the architecture choices
by bad designs by any particular vendor is still valid too. Even more
valid - thanks for illustrating it.

> $ git grep ' = CHECKSUM_' */+(bnx2x|mlx4|i40e)
> broadcom/bnx2x/bnx2x_cmn.c:  skb->ip_summed = CHECKSUM_UNNECESSARY;
> broadcom/bnx2x/bnx2x_cmn.c:  skb->ip_summed = CHECKSUM_UNNECESSARY;
> intel/i40e/i40e_txrx.c:      skb->ip_summed = CHECKSUM_NONE;
> intel/i40e/i40e_txrx.c:      skb->ip_summed = CHECKSUM_UNNECESSARY;
> mellanox/mlx4/en_rx.c:       gro_skb->ip_summed = CHECKSUM_UNNECESSARY;
> mellanox/mlx4/en_rx.c:       ip_summed = CHECKSUM_UNNECESSARY;
> mellanox/mlx4/en_rx.c:       ip_summed = CHECKSUM_NONE;
> mellanox/mlx4/en_rx.c:       ip_summed = CHECKSUM_NONE;
>
> _______________________________________________
> nvo3 mailing list
> [email protected]
> https://www.ietf.org/mailman/listinfo/nvo3
>

_______________________________________________
nvo3 mailing list
[email protected]
https://www.ietf.org/mailman/listinfo/nvo3

Reply via email to