Fwd: [PATCH] gro : fix pkt length when extra bytes are padded to ethernet frame

kumaraparameshwaran rathinavel kumaraparamesh92 at gmail.com
Tue Oct 11 07:47:58 CEST 2022


On Tue, Oct 11, 2022 at 1:03 AM David Marchand <david.marchand at redhat.com>
wrote:

> On Mon, Oct 10, 2022 at 7:51 PM Kumara Parameshwaran
> <kumaraparamesh92 at gmail.com> wrote:
> >
> > From: Kumara Parameshwaran <kumaraparamesh92 at gmail.com>
> >
> > When GRO packets are merged the packet length is used while
> > merging the adjacent packets. If the padded bytes are accounted
> > we would end up acking unsent TCP segments.
> >
> > Signed-off-by: Kumara Parameshwaran <kumaraparamesh92 at gmail.com>
> > v1:
> >         If there is padding to the ethernet frame cases where timestamp
> is disabled
> >         the packet length should be validated with the total ip length
> as packet length
> >         is used in the GRO merging logic
>
> Please, can you test with current main branch?
> We recently merged a fix:
>
> https://git.dpdk.org/dpdk/commit/?id=b8a55871d5af6f5b8694b1cb5eacbc629734e403
>
> Thanks, David. I did look at the patch. This would fix the problem, but
>> lets say for a case of an ACK packet where TCP data length would be zero
>> and if the packet contains the padded bytes, this check should be done
>> before the follwing check and not after this. @Hu, Jiayu
>> <jiayu.hu at intel.com>  @Jun Qiu <jun.qiu at jaguarmicro.com>  please let me
>> know your thoughts.
>>
> /*
>> * Don't process the packet whose payload length is less than or
>> * equal to 0.
>> */
>> tcp_dl = pkt->pkt_len - hdr_len;
>> if (tcp_dl <= 0)
>> return -1;
>>
> --
> David Marchand
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mails.dpdk.org/archives/dev/attachments/20221011/cfded750/attachment.htm>


More information about the dev mailing list