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 783FBA0548; Thu, 8 Sep 2022 08:06:56 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 27C0340143; Thu, 8 Sep 2022 08:06:56 +0200 (CEST) Received: from mga06.intel.com (mga06b.intel.com [134.134.136.31]) by mails.dpdk.org (Postfix) with ESMTP id 109AB400D6 for ; Thu, 8 Sep 2022 08:06:53 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1662617214; x=1694153214; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=YGP836W4TpDEBzIvm1t/721gzQ3A3xuiKcIUyDRuGBE=; b=hjEiC5/oTZVwW/gGiFNyPwbVcVGnbjYpJDVLSmkszVWhfDoDLWsJmMyr ZFne4xi3G4J0R1zXH/YCfV7oDP8ICpijDcQdop7oRoe0RsTkBy1pSXhyA 2an6xhgrkSbNjhSao6vCCY3Doxpqz7a8lBt5pxZtoHRGCGwqU/HnEgQdg O4zqg/7RJazSM+BulqinWBQfagf7BZtv3l88b1AEXuEWrsyWEs4vXadWi EbQu9IwTpP9Z/vdKp6jMXUQMOEV+Un+j1ZRdiAsJg2rINRw6BesTsPXbn Uz4TbnDgXCVlWXmw8AMsqeWD6h1mwCh2SMULwRyEGRbrAor3M0AzqjPs8 w==; X-IronPort-AV: E=McAfee;i="6500,9779,10463"; a="358809145" X-IronPort-AV: E=Sophos;i="5.93,299,1654585200"; d="scan'208";a="358809145" Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Sep 2022 23:06:53 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.93,299,1654585200"; d="scan'208";a="647917329" Received: from fmsmsx602.amr.corp.intel.com ([10.18.126.82]) by orsmga001.jf.intel.com with ESMTP; 07 Sep 2022 23:06:53 -0700 Received: from fmsmsx610.amr.corp.intel.com (10.18.126.90) by fmsmsx602.amr.corp.intel.com (10.18.126.82) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Wed, 7 Sep 2022 23:06:52 -0700 Received: from fmsmsx612.amr.corp.intel.com (10.18.126.92) by fmsmsx610.amr.corp.intel.com (10.18.126.90) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Wed, 7 Sep 2022 23:06:52 -0700 Received: from fmsmsx612.amr.corp.intel.com ([10.18.126.92]) by fmsmsx612.amr.corp.intel.com ([10.18.126.92]) with mapi id 15.01.2375.031; Wed, 7 Sep 2022 23:06:52 -0700 From: "Hu, Jiayu" To: Kumara Parameshwaran CC: "dev@dpdk.org" Subject: RE: [PATCH] gro: fix the chain index in insert_new_item for more than 2 packets Thread-Topic: [PATCH] gro: fix the chain index in insert_new_item for more than 2 packets Thread-Index: AQHYwpgvg62hmOD23Um2g2xve8pve63UKYqAgADjMPA= Date: Thu, 8 Sep 2022 06:06:52 +0000 Message-ID: References: <20220907085937.53694-1-kumaraparmesh92@gmail.com> <20220907093205.58735-1-kumaraparmesh92@gmail.com> In-Reply-To: <20220907093205.58735-1-kumaraparmesh92@gmail.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.1.200.100] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 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 > -----Original Message----- > From: Kumara Parameshwaran > Sent: Wednesday, September 7, 2022 5:32 PM > To: Hu, Jiayu > Cc: dev@dpdk.org; Kumara Parameshwaran > > Subject: [PATCH] gro: fix the chain index in insert_new_item for more tha= n 2 > packets >=20 > From: Kumara Parameshwaran >=20 > 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 >=20 > 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 =3D 0. So merge > works > find packet_0->packet_1 > packet_2 flow found. prev_indx =3D0, curr_index =3D 1. Matching > dequence numbers found but chained as > packet_0->packet_2->packet_1 >=20 > lib/gro/gro_tcp4.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) >=20 > 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 Thanks, Jiayu > =3D=3D > INVALID_ARRAY_INDEX) > return -1; > -- > 2.25.1