[PATCH 1/2] app/testpmd: prepare to support TCP in Tx only mode
Andrew Rybchenko
andrew.rybchenko at oktetlabs.ru
Fri Nov 11 09:54:25 CET 2022
On 11/11/22 11:36, Andrew Rybchenko wrote:
> On 10/19/22 19:39, Ferruh Yigit wrote:
>> On 10/17/2022 3:41 PM, Andrew Rybchenko wrote:
>>> @@ -449,7 +474,8 @@ tx_only_begin(portid_t pi)
>>> return -EINVAL;
>>> }
>>> - setup_pkt_udp_ip_headers(&pkt_ip_hdr, &pkt_udp_hdr, pkt_data_len);
>>> + setup_pkt_l4_ip_headers(IPPROTO_UDP, &pkt_ip_hdr, &pkt_l4_hdr,
>>> + pkt_data_len);
>>
>> 'pkt_data_len' is calculated as following, it is correct for this
>> patch, but it will be wrong in next patch because UDP header size is
>> used in calculation.
>> Need to fix this code, either in this patch and make it protocol
>> agnostic, or in next patch with protocol check.
>
> Again, the goal of the patch is to do cosmetic changes to
> prepare to add new functionality in follow up patches.
> The patch does not add TCP support. So, I don't understand
> how it can be improved here. So, I'll fix the problem in the
> next patch when I have TCP support and corresponding branching.
> Thanks a lot for the catch.
>
I've changed my mind on the best place where to fix it.
I agree that it would be more logical to fix it here
since all infrastructure to support other L4 protocol
is added here.
More information about the dev
mailing list