[PATCH] app/test-pmd: fix L4 checksum with padding data

Ferruh Yigit ferruh.yigit at amd.com
Mon Nov 20 11:47:36 CET 2023


On 11/17/2023 4:22 PM, Stephen Hemminger wrote:
> On Fri, 17 Nov 2023 09:29:41 +0000
> Ferruh Yigit <ferruh.yigit at amd.com> wrote:
> 
>>>> I agree using 'l3_len' instead is correct fix.
>>>>
>>>> But this requires ABI/API change,
>>>> plus do we have any reason to keep the padding, discarding it as this
>>>> patch does is also simpler alternative.  
>>>
>>>
>>> Possibly an API version to change the args would work to fix.
>>>  
>>
>> rte_ipv4_udptcp_cksum_mbuf() and rte_ipv6_udptcp_cksum_mbuf() are inline
>> functions, unfortunately we can't version them.
>>
>> But those functions already gets IP header as parameter, can't we use IP
>> header to get the payload size? If so this can be fixed without updating
>> API.
> 
> Inlines are easier. Just make a fixed new function and make sure the old
> one is not used.  They shouldn't have been inline in the first place.
>

I guess inlines as because of performance concerns, since it is in datapath.


More information about the stable mailing list