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 E86E64380F; Thu, 4 Jan 2024 03:23:57 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D61F7402BF; Thu, 4 Jan 2024 03:23:57 +0100 (CET) Received: from NAM04-MW2-obe.outbound.protection.outlook.com (mail-mw2nam04on2064.outbound.protection.outlook.com [40.107.101.64]) by mails.dpdk.org (Postfix) with ESMTP id 5BB4D40266 for ; Thu, 4 Jan 2024 03:23:56 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=hD9Fq2SOGv6N7iFQhhMK0ur7B1hDOiEhwKxmiXFV+a9QfypODklQyy0/PH+eoSjLf346FDiOcv/wrOy2MAT8tkMqN8tyC//0/ziySbCx6rSkFgPCOeDq9xfGQB1EdSMCQEW4aYfON9k09HBspP7fmeffKZ0luDq4BXdTMpEHNopbq9ylmdR1QPneuy+LTMFcQr360gHIve+vnjuNrq0VuxuaSGvG2to8a5dLPmA+7vKXzZAyaGeQ25kAiSM2RlfEl73p5BhoVFJNCar3CTvhOkiDMo3PEyen0IQqse4W/bteRzQ3QwU6uG9L9utNFZMTMVPTIfOnEXGcz6bZDEkxCQ== 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=kGokqS4Pn+L3cxZ4RG8BeGVpMI6wW6CzDuqW/MvaqyI=; b=YwYPBwkLS5Ujya9XLJcJdaW+hewzfnku6tDWwenJne7E1T4zJKUsOkpuSK5gIAHYliIuzUNMV8WLy1Iz1PZFysOASNWMCCcYKr3CPz6/COodLooYpdm4XcN/ue6aBwo+JovB9GKAVxwJZ4wrvBtdE7cmOpq8YhbMAk0Bh1EVWXCJGngWH9Cnu71vrqT80R291X1mwG9vigyGUl/Lv6i4ejVsq0ib0OOMAOQrPZVMAlcQcbCq9lBCOMiVlboONmDK9tHX8GaNDyz4AeiFWJnztJBBMhdnxV1s0mdCqs+o5nSFqvNfYi/W6n5GVBmRNptmYYCgBH4yY7RopmHyg40rwQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nvidia.com; dmarc=pass action=none header.from=nvidia.com; dkim=pass header.d=nvidia.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=kGokqS4Pn+L3cxZ4RG8BeGVpMI6wW6CzDuqW/MvaqyI=; b=E8s0FJKcRf29qxynk5/OuyII85jVrrkg9GXBYWbXtSZwnmUE5jonK4fnZVP6O+ikHBrpvUbTg0oUT4x3HC/Fz1ccFY0wM3YsMPmGt1Zy9IbUZnLRSukMjr4kIkEpVzw7QSows4P/ujZh/NiCjIfHUnzpctwPr5sU223oeykB9ysNbGIJCD7n/ogQ2xFfXX9OqdcMORcwwgCRKNym6YEK57D4gkUYwdewI9+lSzxx6NMdxSWifAUNmoUyRSRtOMux7Pwu9YEHdMshSl7xuIQNbyUpa8s7sOi4hj18TqBuFS1p3Ev9DvCS4H+akfgs8RKaXbi4ge7XCxnhXnyqEPW6Jw== Received: from CO6PR12MB5396.namprd12.prod.outlook.com (2603:10b6:303:139::8) by DM6PR12MB4546.namprd12.prod.outlook.com (2603:10b6:5:2ae::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7135.25; Thu, 4 Jan 2024 02:23:53 +0000 Received: from CO6PR12MB5396.namprd12.prod.outlook.com ([fe80::18b:c5f5:5d5:d9cc]) by CO6PR12MB5396.namprd12.prod.outlook.com ([fe80::18b:c5f5:5d5:d9cc%6]) with mapi id 15.20.7135.023; Thu, 4 Jan 2024 02:23:52 +0000 From: Suanming Mou To: Anoob Joseph CC: "dev@dpdk.org" , Ciara Power Subject: RE: [EXT] [PATCH] app/test-crypto-perf: fix invalid mbuf next operation Thread-Topic: [EXT] [PATCH] app/test-crypto-perf: fix invalid mbuf next operation Thread-Index: AQHaPfiU/QMl9XpfsU6BaqXERk7bL7DH8iEAgAAUB/CAADTagIAAsxIg Date: Thu, 4 Jan 2024 02:23:52 +0000 Message-ID: References: <20240103035357.720016-1-suanmingm@nvidia.com> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nvidia.com; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: CO6PR12MB5396:EE_|DM6PR12MB4546:EE_ x-ms-office365-filtering-correlation-id: e573c017-66eb-4b4e-685f-08dc0ccc31da x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: V9qDPvAVb8DErdLVnRbW+kog9AuJb/52h7ZGdNg2+rdmBK46Z/f3MGhPnl93pWfok5v4vILt+aVJGDGhegoFv/qO1D7xezZCKpVTJfVWlwcq/zaDnLlEtD/TljcyAJOiKZwfbVzsUznwMvhOChj2DsYIXFnneSZ4t1q9FNisjSA/QG11DTQBcMl9dWNxzrOzf471/zMwflvPeQeRq7vBCYEDxtHNjzzjaJ8tzow8Ne7zMd8vI1CBLsK9Ek5PL6fMJpFdbubInYCLfriJ9Cw4jxJ3JIJ80U6E46lX8zE2S1qCEie8mSl2HSTvwSKwanyYubm3/zzNaMR7i4paV0NWUo1kVhXAruWmWQFdT79Xmg8vXM6Qx+4Tn6qIYi3P+VqCZPeLtLg/h3YEGo0wp7xh+c1PpAh1xuNdZzG8ys0Q5vazmZ2PzmZp6lghTaC1iyQFem6d3dkBUm78K1pZeAqzRvkKlQR1r1OAlQiuKFWCA1vkSmrewK9ADM1G/xIoqtXv1YCq2Iw1hLdxh3C8r/AUBi1mdr7FRnwGyFH6L6n6vVnWmIzmejWMs4R4/xEhtDQScB0gNucnGQth3nVrJ7ObBhCR+5CNrvDBjOdUCwkCryd5LYkC+nwEyEvgGzLksnJB51Kmvou4Gea7/bzIdNVnaIgrwVg+O8j05fIhOhT74XY= x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:CO6PR12MB5396.namprd12.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230031)(396003)(136003)(366004)(346002)(376002)(39860400002)(230922051799003)(230173577357003)(230273577357003)(1800799012)(64100799003)(186009)(451199024)(122000001)(38100700002)(38070700009)(55016003)(86362001)(53546011)(9686003)(7696005)(71200400001)(83380400001)(478600001)(52536014)(4326008)(76116006)(66446008)(64756008)(66476007)(66946007)(66556008)(26005)(6916009)(316002)(54906003)(8936002)(8676002)(33656002)(6506007)(5660300002)(41300700001)(2906002); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?1U4TkV9VzB+/bHkcwHOMfgHfge5HkzpKtygtSZkUiTo1Y6/zCeUCJifEvE3Q?= =?us-ascii?Q?YgllRiTU1Xaz+HHBQRCo4iIOMNBbzOLFeZoH1O0tPzlfELHdfqMw4R171gR9?= =?us-ascii?Q?aCGpkQxXstJR/9zIjU9CjbnK5F9t6snlGcm0PpG/BzUJa0/nkXypSXVG+07R?= =?us-ascii?Q?qa0vnkyP2sl/HdDZAyeZaJGd8e4u8UnL4glgz2m9MsZcMXEDKTowr+0A4LyZ?= =?us-ascii?Q?31CN2utSJxFxwPu5ovMTwMWtcjQXQ+7HpN/4RaZLflKJaN0xBMF4b+kYdMw+?= =?us-ascii?Q?bTG/iHoMJoU0HyO4mV+RV2yp5n/nwg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Q?0vKg4XKEInTCcPaHI2JEuL56gULigA1o5p4a6hzVIf1Yq4sbHD032tVmLnH5?= =?us-ascii?Q?HgTXPwD2uhvFBX30uK0YvqIq77giUT+gX1wn5wcNjIPpZ0btt7Hips4fqM/g?= =?us-ascii?Q?xEJLjwY2O60x3MSU3O16abu9u4BkXPyrFuE0UtOt3t8RAivNkkbvqMrWL5cc?= =?us-ascii?Q?U7sENJJO3bzSRk6G0pWoeGGmLFvnSw4AiFohjICGXxaRRfaoOsqVWkctdcZx?= =?us-ascii?Q?zjzF4CpfGGSvYRd6A1T2mdFQxog1IpI7Q610NDkkbc5YiBj+YGztPZNoMOsK?= =?us-ascii?Q?qRg0aA7LCBXSQGCHuPtbZmbCEfqwAgbUWMiKJlinYBzoRUgpxfDmHZP4pbVg?= =?us-ascii?Q?zLdq7FmEVHHYN4HqGAsDub7CGmsxLjJYkAuxPDcu?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: CO6PR12MB5396.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: e573c017-66eb-4b4e-685f-08dc0ccc31da X-MS-Exchange-CrossTenant-originalarrivaltime: 04 Jan 2024 02:23:52.8959 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: gbvx8NOqva22x8TWmXVhvzU8NsMdZvPW8eMojddgs8Yv21lYQ5LFYL5NaZbqXXYz8v4pOhUjh2YAXOL0YQYlZA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR12MB4546 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: Anoob Joseph > Sent: Wednesday, January 3, 2024 11:43 PM > To: Suanming Mou > Cc: dev@dpdk.org; Ciara Power > Subject: RE: [EXT] [PATCH] app/test-crypto-perf: fix invalid mbuf next op= eration >=20 > Hi Suanming, >=20 > Please see inline. >=20 > Thanks, > Anoob >=20 > > -----Original Message----- > > From: Suanming Mou > > Sent: Wednesday, January 3, 2024 6:06 PM > > To: Anoob Joseph > > Cc: dev@dpdk.org; Ciara Power > > Subject: RE: [EXT] [PATCH] app/test-crypto-perf: fix invalid mbuf next > > operation > > > > Hi, > > > > > -----Original Message----- > > > From: Anoob Joseph > > > Sent: Wednesday, January 3, 2024 7:22 PM > > > To: Suanming Mou > > > Cc: dev@dpdk.org; Ciara Power > > > Subject: RE: [EXT] [PATCH] app/test-crypto-perf: fix invalid mbuf > > > next operation > > > > > > Hi Suanming, > > > > > > Good catch. Please see inline. > > > > > > Thanks, > > > Anoob > > > > > > > -----Original Message----- > > > > From: Suanming Mou > > > > Sent: Wednesday, January 3, 2024 9:24 AM > > > > To: Ciara Power > > > > Cc: dev@dpdk.org > > > > Subject: [EXT] [PATCH] app/test-crypto-perf: fix invalid mbuf next > > > > operation > > > > > > > > External Email > > > > > > > > ------------------------------------------------------------------ > > > > -- > > > > -- In fill_multi_seg_mbuf(), when remaining_segments is 0, > > > > rte_mbuf m's next should pointer to NULL instead of a new > > > > rte_mbuf, that casues setting m->next as NULL out of the while > > > > loop to the invalid mbuf. > > > > > > > > This commit fixes the invalid mbuf next operation. > > > > > > > > Fixes: bf9d6702eca9 ("app/crypto-perf: use single mempool") > > > > > > > > Signed-off-by: Suanming Mou > > > > --- > > > > app/test-crypto-perf/cperf_test_common.c | 12 +++++++----- > > > > 1 file changed, 7 insertions(+), 5 deletions(-) > > > > > > > > diff --git a/app/test-crypto-perf/cperf_test_common.c > > > > b/app/test-crypto- perf/cperf_test_common.c index > > > > 932aab16df..ad2076dd2e 100644 > > > > --- a/app/test-crypto-perf/cperf_test_common.c > > > > +++ b/app/test-crypto-perf/cperf_test_common.c > > > > @@ -72,13 +72,15 @@ fill_multi_seg_mbuf(struct rte_mbuf *m, struct > > > > rte_mempool *mp, > > > > rte_mbuf_refcnt_set(m, 1); > > > > next_mbuf =3D (struct rte_mbuf *) ((uint8_t *) m + > > > > mbuf_hdr_size + segment_sz); > > > > - m->next =3D next_mbuf; > > > > - m =3D next_mbuf; > > > > - remaining_segments--; > > > > > > > > + remaining_segments--; > > > > + if (remaining_segments > 0) { > > > > > > [Anoob] Would it make sense to move assignment of next_mbuf also to h= ere? > > > That way, the checks will become self explanatory. > > > next_mbuf =3D (struct rte_mbuf *) ((uint8_t *) m + > > > mbuf_hdr_size + segment_sz); > > > > > > > Make sense. Maybe just like that: > > m->next =3D (struct rte_mbuf *) ((uint8_t *) m + > > mbuf_hdr_size + segment_sz); > > m =3D m->next; > > > > What do you think? >=20 > [Anoob] Yes. That's even better. >=20 > I think we can have line lengths upto 100 characters now. In case you fin= d it > easier to put in single line. OK, thanks for the suggestion. >=20 > > > > > > + m->next =3D next_mbuf; > > > > + m =3D next_mbuf; > > > > + } else { > > > > + m->next =3D NULL; > > > > + } > > > > } while (remaining_segments > 0); > > > > - > > > > - m->next =3D NULL; > > > > } > > > > > > > > static void > > > > -- > > > > 2.34.1