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 3DBCAA0547; Thu, 28 Oct 2021 14:33:42 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 0BD1341100; Thu, 28 Oct 2021 14:33:42 +0200 (CEST) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by mails.dpdk.org (Postfix) with ESMTP id D64F740DF4; Thu, 28 Oct 2021 14:33:40 +0200 (CEST) X-IronPort-AV: E=McAfee;i="6200,9189,10150"; a="230657478" X-IronPort-AV: E=Sophos;i="5.87,189,1631602800"; d="scan'208";a="230657478" Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Oct 2021 05:24:21 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.87,189,1631602800"; d="scan'208";a="447947669" Received: from orsmsx603.amr.corp.intel.com ([10.22.229.16]) by orsmga003.jf.intel.com with ESMTP; 28 Oct 2021 05:24:21 -0700 Received: from orsmsx611.amr.corp.intel.com (10.22.229.24) by ORSMSX603.amr.corp.intel.com (10.22.229.16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.12; Thu, 28 Oct 2021 05:24:20 -0700 Received: from orsmsx608.amr.corp.intel.com (10.22.229.21) by ORSMSX611.amr.corp.intel.com (10.22.229.24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.12; Thu, 28 Oct 2021 05:24:20 -0700 Received: from ORSEDG602.ED.cps.intel.com (10.7.248.7) by orsmsx608.amr.corp.intel.com (10.22.229.21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.12 via Frontend Transport; Thu, 28 Oct 2021 05:24:20 -0700 Received: from NAM10-BN7-obe.outbound.protection.outlook.com (104.47.70.103) by edgegateway.intel.com (134.134.137.103) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2242.12; Thu, 28 Oct 2021 05:24:20 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=LqDD0e5eejRk8B9fP0StNpdYTsDR/mwsEAqCffRuyl66X/ehOTpz/tG5neOXFtzPSZACXSVv2zTSGZrEULQhERWlkCz33WK9oCia1BXjsq4lyZPdxN5ZCnzBPnx7OQf8tpctjtyawQGP0aJWCc2NqVrT0Bn0gOthhtqe5gEDg9sS49KPNe0J28Wg3Vg/o46KZCuUxd+POMhjH6j2bYNg9ChXgvuqgvYUwRfrKEFjxRETFFnvx8j6lQeaZtXFfty8Nc0tnt+Bw5MAn3pM7ptV63YCHW3G/tHu8vUVfG+epqAmZ9PQNAGHXsUMGpnF67BNFJ1UGuIj0VjEveOpO0Mseg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=lyxToq2h61UN/RkzjocKs1lbzcDsjWMoFsZz+/pc2uM=; b=aEu9t9P896omvbyjvBKIXy5oYat2eiiphIJV3yTQYAU5RMQ5uihhOSZEltkUvXY8ANrQuMjrVoneu9+YVeChsViSifuTCH8C3sMSG9gyRHxF82VGtVebNpncoo8FrH02gnhYgvsQKyVo2Vt8NDHGBGtG1nBDAELaxpbaDf6iJEV2Kxnjqg8eIWsSl/02I1rMgWZSU0moKzmFFIAFPFoUOsBM3aOvDHdEjHknwIU4KyvLt3aSDkNiuW4vGCKuN4zL3v3jUbDMwEM4ehrMongnNDYd+F91sieoQAEJ2c3iQWwUNC24jkgi02wUbJAf04zFsRTk6zU6RWvW+N77H2q/Dw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.onmicrosoft.com; s=selector2-intel-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=lyxToq2h61UN/RkzjocKs1lbzcDsjWMoFsZz+/pc2uM=; b=DV4QbVRJbuin8iOhpEcbnTdsNoEZCxn6fc9ZMhJG6ilPG0ceuajz+Aa+X0GQWLIvIF01TmLbHNUhaXRTDtp6K+EMSeCqRu59gdJ+atXEbshzbSsrZLWOjKJV+7HLIRgT4eEfbbJZqoCyGRuwiezB8nkpHEhxOpN4v0Z+l9TAah4= Received: from DM6PR11MB4491.namprd11.prod.outlook.com (2603:10b6:5:204::19) by DM6PR11MB3386.namprd11.prod.outlook.com (2603:10b6:5:5c::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4628.20; Thu, 28 Oct 2021 12:24:18 +0000 Received: from DM6PR11MB4491.namprd11.prod.outlook.com ([fe80::2c0c:5383:f814:3b4e]) by DM6PR11MB4491.namprd11.prod.outlook.com ([fe80::2c0c:5383:f814:3b4e%6]) with mapi id 15.20.4649.015; Thu, 28 Oct 2021 12:24:18 +0000 From: "Ananyev, Konstantin" To: huichao cai , "dev@dpdk.org" CC: "stable@dpdk.org" Thread-Topic: [PATCH] ip_frag: fix the buf of fragmenting IPv4 fragment Thread-Index: AQHXyXXeirCoP5vs30GcSbtLEJavGavoWk7g Date: Thu, 28 Oct 2021 12:24:18 +0000 Message-ID: References: <1635148553-50086-1-git-send-email-chcchc88@163.com> In-Reply-To: <1635148553-50086-1-git-send-email-chcchc88@163.com> Accept-Language: en-GB, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-reaction: no-action dlp-version: 11.6.200.16 authentication-results: 163.com; dkim=none (message not signed) header.d=none;163.com; dmarc=none action=none header.from=intel.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 67c105e2-ac72-4da5-8ac0-08d99a0ddd5d x-ms-traffictypediagnostic: DM6PR11MB3386: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:2449; x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: 42MYyrZAJ3U7xVoR/LJpj8BI2MWlcZiHVfLMs9cr7O+DFLDnFuIUOIHigYiyv2dQgUclgBfvXNgZ29sn9baHxZYhIeA96+PHTLH9/QbqJfltpEc5PNhLOaSTwxxSQIG63+SVsz02WCNh598I20Bhbw+KxGyQ7g9cejO9CNuOskCJAwyWDBx+/JausxNMXUi59CeLbZwpxHJv++l0yCVEdjWDRWOLI7bBieA8sZknetiJAcwA9A7oLo7akstWB9SVldQPRHbsA9ND0OPdTVo9k0+AVQ00EIX9fP+Foij5ZsSYbRNM1wlxl7LO5/oqayfJCqHqquuJgmTgfgDfSK5PaqljwfMkav120qMXRxXnMbwGCDG91dJwjt7azZfzPbEhiKecWZBu1NTLTDGuAgey7RklTOUHgfAlUU7erUvuWuxmxP1ui2Cl+tFl+PtVSakTJHsVIq3kEDOKJLLeFqz7wmjbanjLQumKjbZIPdmga350YNsSjp7u6RkYn9fLcQEK1GHsj3s4Gz5NXHekAhadHwICYnG91boqgUdLBeCKc4Al5h6K5loP/aX1g8aG8Tn3pFUEbLw4WCwxc0+AYoJviTCB9V/OshOUwZ6jL1xI9iP4lGayJ6nY8hWxVx5XqDAYpMVVSuIw7c9x8qyAzuNkYDPzoRVH0vbS5MuRJomch/bSHzZ2eA14qDasnprXiFT4ucib6GRhpZLAYlUu8jBZ+g== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DM6PR11MB4491.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(366004)(8676002)(186003)(9686003)(33656002)(71200400001)(8936002)(122000001)(110136005)(5660300002)(55016002)(66446008)(508600001)(66946007)(52536014)(66476007)(38070700005)(4326008)(316002)(26005)(76116006)(86362001)(66556008)(7696005)(82960400001)(2906002)(6506007)(55236004)(83380400001)(64756008)(38100700002); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?TR147/oeUlg6pgU+4HasXC41hO7kM+NuhS32tvaO+yOFoQ+8PeBeROoTWFzs?= =?us-ascii?Q?uGAfmYdXxKESB8NaRLt/OMDmNcr1d/va8WwQ3Or8e5mTo7i9L8HUEH+mOOps?= =?us-ascii?Q?N7hSzMDkUDmckNk9OBGh/2PGkfqOTjQCZYYVoom+aFtyCg+cb0zDr5SXyzgR?= =?us-ascii?Q?Ezf3CdNHnGccUyVx6PsVl+7UbO60oKMu4c5MJktWjib70p4l6DG+JolitI0e?= =?us-ascii?Q?Ao0fzHtH0VKf3d4/EwgO4BRhLlB+B6/AEW44HCrUMsf9G5dLJ1uZiVDpbBok?= =?us-ascii?Q?EV9ipVgwm04O4pw+/Op6NuueUxuqhJSrNAWuBoW5i5wAtM+1rNOvhsLgxbbZ?= =?us-ascii?Q?YjSOTSLL3DTibLV3yFWq2NwJWyckijSyOTm+PoxpELBvznYJfMUjS28la0sm?= =?us-ascii?Q?lQIAiR+H222ohXd4ni2qcT1FYLnutkAvokgozJDXyMSRRCTNXPeoHNbl3wVc?= =?us-ascii?Q?Z+ZuJhfPlewhwocv4ukxEjKb/HXycw60RIcvlCQiFdo8SdzmsApI2i/vQOI8?= =?us-ascii?Q?DqvlBJ4aIjTcSnu3x0w39CQ51fCo+g0FrjDRqF23O4sjA/6t1Q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x6cOFJg+uyCUy5A64vf8jOo3vQwA+452rcqwy7teow2VW1?= =?us-ascii?Q?HVkAs1xLzHQXRujxWnjjqB923Raj2x1iV2W5YeVrZd3IZ/O+o+ObY29UKGw0?= =?us-ascii?Q?8/Xvk2FZPkyjKXKiUCYiCoAci+TFK72OnG739jYd/pvL7qzSMO8BWQgaPtDH?= =?us-ascii?Q?cQwg0gxP/DuALlWM8pibfuOQCq2CvH5C0H9pDdVUPNg3Q0aMCR2WxFuXekRY?= =?us-ascii?Q?krJGnA=3D=3D?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: DM6PR11MB4491.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 67c105e2-ac72-4da5-8ac0-08d99a0ddd5d X-MS-Exchange-CrossTenant-originalarrivaltime: 28 Oct 2021 12:24:18.7464 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: H12JHYB9LOgrupfd68FOGwA02lu7Lf3MMja9hPOnNu/JgNE4veZEM2ccNlwYWIri/EjmYYC3piYhBlYnviRpqMLxb96ldXoN4Ls9YqAdMfc= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR11MB3386 X-OriginatorOrg: intel.com Subject: Re: [dpdk-dev] [PATCH] ip_frag: fix the buf of fragmenting IPv4 fragment 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 Sender: "dev" > Bugzilla ID: 835 > Fixes: 567473433b7e ("ip_frag: fix fragmenting IPv4 fragment") > Cc: stable@dpdk.org > Signed-off-by: huichao cai > --- > lib/ip_frag/rte_ipv4_fragmentation.c | 9 +++------ > 1 file changed, 3 insertions(+), 6 deletions(-) >=20 > diff --git a/lib/ip_frag/rte_ipv4_fragmentation.c b/lib/ip_frag/rte_ipv4_= fragmentation.c > index fead5a9..2e7739d 100644 > --- a/lib/ip_frag/rte_ipv4_fragmentation.c > +++ b/lib/ip_frag/rte_ipv4_fragmentation.c > @@ -75,7 +75,7 @@ static inline void __free_fragments(struct rte_mbuf *mb= [], uint32_t num) > uint32_t out_pkt_pos, in_seg_data_pos; > uint32_t more_in_segs; > uint16_t fragment_offset, flag_offset, frag_size, header_len; > - uint16_t frag_bytes_remaining, not_last_frag; > + uint16_t frag_bytes_remaining; >=20 > /* > * Formal parameter checking. > @@ -116,9 +116,7 @@ static inline void __free_fragments(struct rte_mbuf *= mb[], uint32_t num) > in_seg =3D pkt_in; > in_seg_data_pos =3D header_len; > out_pkt_pos =3D 0; > - fragment_offset =3D (uint16_t)((flag_offset & > - RTE_IPV4_HDR_OFFSET_MASK) << RTE_IPV4_HDR_FO_SHIFT); > - not_last_frag =3D (uint16_t)(flag_offset & IPV4_HDR_MF_MASK); > + fragment_offset =3D 0; >=20 > more_in_segs =3D 1; > while (likely(more_in_segs)) { > @@ -188,8 +186,7 @@ static inline void __free_fragments(struct rte_mbuf *= mb[], uint32_t num) >=20 > __fill_ipv4hdr_frag(out_hdr, in_hdr, header_len, > (uint16_t)out_pkt->pkt_len, > - flag_offset, fragment_offset, > - not_last_frag || more_in_segs); > + flag_offset, fragment_offset, more_in_segs); >=20 > fragment_offset =3D (uint16_t)(fragment_offset + > out_pkt->pkt_len - header_len); > -- > 1.8.3.1 Acked-by: Konstantin Ananyev