From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 54699A0542; Wed, 5 Oct 2022 14:16:29 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 060CB40694; Wed, 5 Oct 2022 14:16:29 +0200 (CEST) Received: from wout4-smtp.messagingengine.com (wout4-smtp.messagingengine.com [64.147.123.20]) by mails.dpdk.org (Postfix) with ESMTP id D03FA40143 for ; Wed, 5 Oct 2022 14:16:27 +0200 (CEST) Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.west.internal (Postfix) with ESMTP id 6A6C232003C0; Wed, 5 Oct 2022 08:16:26 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute3.internal (MEProxy); Wed, 05 Oct 2022 08:16:26 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= cc:cc:content-transfer-encoding:content-type:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to; s=fm2; t=1664972185; x= 1665058585; bh=Za5pLVD2JcSv1gjYi/VeBWo/LqmXHK7HwaDo4IougIA=; b=n jlSV9tMCVGcxW4ygIJ1hmkMjanNs3rboH1ySEUXc+1R4H8irTDc/ozuQmPG6oLzN DvkmCEjmnVOq3vto8HL+HM7Xj2zFJ10KBXDn0WRJSDYWjW62dWcmJz4blou7o85x w2daaZJol0OF3VUdcYRluvm6ww4RrWa/3sZs2M//J+8Gt8eIjGiEgItDHBkwmiGh ejO2+/3jpWrZwR9iQPonY22Au59A0qMAPugsaxQCqxywMG8W0FrGchfjSyjG+PTY CS5+KixCrAue4DUXjj/GK2cUJlSsoFncBzcWt2agGf4XOUac702uM5CJzt2TZu3G hJqV4JbsBZ/uC/SHpZnNQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t=1664972185; x= 1665058585; bh=Za5pLVD2JcSv1gjYi/VeBWo/LqmXHK7HwaDo4IougIA=; b=p HkhC9MDmTh7R537NCgn0CUbzhtQ2duj9927DBSu3nKc1fSpgDnk5vMuIgTi/AJZ1 7OyNVj2MDyFAna1JnAeX8ywsEQtndk5VRu2mogTDhXujPvSipApgLXuQkN93CdjQ KGEUXqXbJg6StdGbLPL0AodQWe+qb6bMDf1HlaVNPEORsNLwzFNxA6cfcERFhBzT ya9lu2GNZ8ETZ82wvu5E6DMFHEnsPm8lf2E5uLzdfZqwObgcJM+OfQlW4N1ARiaC JJnGeoU1dRvoYMylXt/dm2VQUyCIdMCSQ7Os12bqTC78bDSURqhoKdnvmL1Fj61U qP7sQ1LiU8jnN48JIplEw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvfedrfeeifedggeelucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvvefufffkjghfggfgtgesthfuredttddtvdenucfhrhhomhepvfhhohhm rghsucfoohhnjhgrlhhonhcuoehthhhomhgrshesmhhonhhjrghlohhnrdhnvghtqeenuc ggtffrrghtthgvrhhnpedtjeeiieefhedtfffgvdelteeufeefheeujefgueetfedttdei kefgkeduhedtgfenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfh hrohhmpehthhhomhgrshesmhhonhhjrghlohhnrdhnvght X-ME-Proxy: Feedback-ID: i47234305:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 5 Oct 2022 08:16:25 -0400 (EDT) From: Thomas Monjalon To: Kumara Parameshwaran Cc: dev@dpdk.org, "Hu, Jiayu" 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 Message-ID: <11893985.eQLIkvUDd3@thomas> In-Reply-To: References: <20220907085937.53694-1-kumaraparmesh92@gmail.com> <20220907093205.58735-1-kumaraparmesh92@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org > > 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 > > --- > > 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 Applied, thanks.