[dpdk-dev] [PATCH v4 08/13] testpmd: rework csum forward engine

Olivier MATZ olivier.matz at 6wind.com
Fri Nov 28 10:54:26 CET 2014


Hi Jijiang,

On 11/28/2014 09:54 AM, Liu, Jijiang wrote:
>>> My understanding of the meaning of the flags is:
>>>
>>>    - PKT_TX_IP_CKSUM: tell the NIC to compute IP cksum
> 
>> My initial thought:
>> It tells the NIC that it is an IPV4 packet for which it has to compute checksum.
>>
>>>
>>>    - PKT_TX_IPV4: tell the NIC it's an IPv4 packet. Required for L4
>>>      checksum offload or TSO.
>>
>> It tells the NIC that it is an IPV4 packet for which it shouldn't compute checksum.
>>
>>>
>>>    - PKT_TX_IPV6: tell the NIC it's an IPv6 packet. Required for L4
>>>      checksum offload or TSO.
>>
>> Yes.
>>
>>>
>>> If it's a i40e driver requirement, don't you think it's better to
>>> change the driver?
> 
> There should be two logics in csum engine, which is  that either HW computes TX checksum (using PKT_TX_IP_CKSUM) or SW compute TX checksum(use PKT_TX_IPV4(or another flag) to tell driver no IP checksum offload requirement ),

To me it's strange to have a flag saying "it's ipv4 and do the
checksum" and another one saying "it's ipv4 and don't do the checksum".

We can clearly see we have 2 different things to know about the
packet:

- is it ipv4?
- do we want the hw checksum?

I think that mapping the flags on these 2 questions is the most logical.

> I think we shouldn't use L3 flag to tell driver what HW need do for L4,  L3 and L4 flag should be separated .

What L4 operation are you talking about?

Regards,
Olivier


More information about the dev mailing list