From: Thomas Monjalon <thomas@monjalon.net>
To: Kumara Parameshwaran <kumaraparamesh92@gmail.com>
Cc: dev@dpdk.org, "Hu, Jiayu" <jiayu.hu@intel.com>
Subject: Re: [PATCH] gro: fix the chain index in insert_new_item for more than 2 packets
Date: Wed, 05 Oct 2022 14:16:24 +0200 [thread overview]
Message-ID: <11893985.eQLIkvUDd3@thomas> (raw)
In-Reply-To: <d0fcbaee2b8e49b3ab6e6290ede6c313@intel.com>
> > When more than two packets are merged in a flow, and if we receive a 3rd
> > packet which is matching the sequence of the 2nd packet the prev_idx will
> > be 1 and not 2, hence resulting in packet re-ordering
> >
> > Signed-off-by: Kumara Parameshwaran <kumaraparamesh92@gmail.com>
> > ---
> > V1:
> > Initial changes to fix packet reordering issue when
> > more than 2 items are chained in a flow.
> > Ex:
> > 3 mergeable TCP packets received in order.
> > packet_0 - no flow found so insert the packet and new start
> > index -> 0
> > packet_1-> flow found. prev_idx, curr_index = 0. So merge
> > works
> > find packet_0->packet_1
> > packet_2 flow found. prev_indx =0, curr_index = 1. Matching
> > dequence numbers found but chained as
> > packet_0->packet_2->packet_1
> >
> > lib/gro/gro_tcp4.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/lib/gro/gro_tcp4.c b/lib/gro/gro_tcp4.c index
> > 7498c66141..9758e28fd5 100644
> > --- a/lib/gro/gro_tcp4.c
> > +++ b/lib/gro/gro_tcp4.c
> > @@ -305,7 +305,7 @@ gro_tcp4_reassemble(struct rte_mbuf *pkt,
> > * length is greater than the max value. Store
> > * the packet into the flow.
> > */
> > - if (insert_new_item(tbl, pkt, start_time, prev_idx,
> > + if (insert_new_item(tbl, pkt, start_time, cur_idx,
> > sent_seq, ip_id, is_atomic)
>
> Good catch.
>
> Acked-by: Jiayu Hu <Jiayu.hu@intel.com>
Applied, thanks.
next prev parent reply other threads:[~2022-10-05 12:16 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-07 8:59 Kumara Parameshwaran
2022-09-07 9:32 ` Kumara Parameshwaran
2022-09-08 6:06 ` Hu, Jiayu
2022-10-05 12:16 ` Thomas Monjalon [this message]
2022-11-01 7:03 ` [PATCH v5] gro : fix reordering of packets in GRO library Kumara Parameshwaran
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=11893985.eQLIkvUDd3@thomas \
--to=thomas@monjalon.net \
--cc=dev@dpdk.org \
--cc=jiayu.hu@intel.com \
--cc=kumaraparamesh92@gmail.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).