From: kumaraparameshwaran rathinavel <kumaraparamesh92@gmail.com>
To: Jun Qiu <jun.qiu@jaguarmicro.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>,
David Marchand <david.marchand@redhat.com>,
"Hu, Jiayu" <jiayu.hu@intel.com>
Subject: Re: [PATCH] gro : fix pkt length when extra bytes are padded to ethernet frame
Date: Wed, 12 Oct 2022 13:18:23 +0530 [thread overview]
Message-ID: <CANxNyau2wQovTAtgAe+fYEEeu+NdFPZSjNNpZTWLdODAQxr5jA@mail.gmail.com> (raw)
In-Reply-To: <TY0PR06MB5683EA1C3F173C48D16A210BF7229@TY0PR06MB5683.apcprd06.prod.outlook.com>
[-- Attachment #1: Type: text/plain, Size: 2462 bytes --]
Shall I raise a PR with the change ?
On Wed, Oct 12, 2022 at 7:04 AM Jun Qiu <jun.qiu@jaguarmicro.com> wrote:
> Yes, It's better to do it before the tcp_dl check.
>
>
>
> 1. /* trim the tail padding bytes */
> 2. ip_tlen = rte_be_to_cpu_16(ipv4_hdr->total_length);
> 3. *if* (pkt->pkt_len > (uint32_t)(ip_tlen + pkt->l2_len))
> 4. rte_pktmbuf_trim(pkt, pkt->pkt_len - ip_tlen - pkt->l2_len);
> 5.
> 6. /*
> 7. * Don't process the packet whose payload length is less than or
> 8. * equal to 0.
> 9. */
> 10. tcp_dl = pkt->pkt_len - hdr_len;
> 11. *if* (tcp_dl <= 0)
> 12. *return* -1;
>
> *From:* kumaraparameshwaran rathinavel <kumaraparamesh92@gmail.com>
> *Sent:* Tuesday, October 11, 2022 1:48 PM
> *To:* dev@dpdk.org; David Marchand <david.marchand@redhat.com>; Hu, Jiayu
> <jiayu.hu@intel.com>; Jun Qiu <jun.qiu@jaguarmicro.com>
> *Subject:* Fwd: [PATCH] gro : fix pkt length when extra bytes are padded
> to ethernet frame
>
>
>
>
>
>
>
> On Tue, Oct 11, 2022 at 1:03 AM David Marchand <david.marchand@redhat.com>
> wrote:
>
> On Mon, Oct 10, 2022 at 7:51 PM Kumara Parameshwaran
> <kumaraparamesh92@gmail.com> wrote:
> >
> > From: Kumara Parameshwaran <kumaraparamesh92@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@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@intel.com> @Jun Qiu <jun.qiu@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
>
>
[-- Attachment #2: Type: text/html, Size: 13379 bytes --]
next prev parent reply other threads:[~2022-10-12 7:48 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-10 17:51 Kumara Parameshwaran
2022-10-10 19:32 ` David Marchand
[not found] ` <CANxNyasJ7RWk6S9hArfKc=m39huCOgab92sV4DjxDh0VENLf7Q@mail.gmail.com>
2022-10-11 5:47 ` Fwd: " kumaraparameshwaran rathinavel
2022-10-12 1:34 ` Jun Qiu
2022-10-12 7:48 ` kumaraparameshwaran rathinavel [this message]
2022-10-12 7:50 ` David Marchand
2022-10-16 7:01 ` Hu, Jiayu
2022-10-17 13:27 ` kumaraparameshwaran rathinavel
2023-10-31 18:49 ` Stephen Hemminger
2022-10-16 14:43 ` [PATCH v2] gro : check for payload length after the trim Kumara Parameshwaran
2022-10-18 8:21 ` Hu, Jiayu
2022-10-26 15:23 ` Thomas Monjalon
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CANxNyau2wQovTAtgAe+fYEEeu+NdFPZSjNNpZTWLdODAQxr5jA@mail.gmail.com \
--to=kumaraparamesh92@gmail.com \
--cc=david.marchand@redhat.com \
--cc=dev@dpdk.org \
--cc=jiayu.hu@intel.com \
--cc=jun.qiu@jaguarmicro.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).