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 B20EEA00C3; Wed, 21 Sep 2022 15:32:34 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 9EB864067C; Wed, 21 Sep 2022 15:32:34 +0200 (CEST) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by mails.dpdk.org (Postfix) with ESMTP id E8B9F4014F for ; Wed, 21 Sep 2022 15:32:32 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1663767153; x=1695303153; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=CHHNTNDoULjWeL6xeYhaZrPwXguf2doIpAmqdu8CaFo=; b=J3VvWTGJWCbV5Jl2JpW466DRozr5XTlBzd6z9iBGk0gg6xBtTOwFErN8 mGh6dopUCqIKeAXcu5K+EgmddqburhcmhQ8urxTuJthnzPrg6KXi+NlUc sqXAv3yxpK66xBXrLTpD/+8uTYysZ8L0uE8hSBQkqruOMo6UDwbGKj4zJ /RYYsejYlZYL2tfMso+7G1oFYuebuGvXsNEWsIuBYxvY7Fw9kNFPV2Uhy i1dNDxViAcg+YVR8BAh7Ig4u/6gkpMdIDG/3LPeJQD8uZmrP7z6ccGATM 8WBrprd3uKlPdl6UlrM+iw1TP9Vm7MINcwwd+n7RT2QwrKjZx07nAWo8M w==; X-IronPort-AV: E=McAfee;i="6500,9779,10477"; a="287073389" X-IronPort-AV: E=Sophos;i="5.93,333,1654585200"; d="scan'208";a="287073389" Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 Sep 2022 06:32:31 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.93,333,1654585200"; d="scan'208";a="708448348" Received: from fmsmsx602.amr.corp.intel.com ([10.18.126.82]) by FMSMGA003.fm.intel.com with ESMTP; 21 Sep 2022 06:32:31 -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, 21 Sep 2022 06:32:31 -0700 Received: from fmsedg602.ED.cps.intel.com (10.1.192.136) 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 via Frontend Transport; Wed, 21 Sep 2022 06:32:31 -0700 Received: from NAM10-BN7-obe.outbound.protection.outlook.com (104.47.70.106) by edgegateway.intel.com (192.55.55.71) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2375.31; Wed, 21 Sep 2022 06:32:30 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=e3NhlJKPKfQIOJOwfrnN9BmqqiIc3gyxcpVNyO6uDkv6BMzn1EKoctT2NVhwND3g8dAx0hfYjqu1lrK6L1hsJbQjD7aFvgwk462ViNMRgbmlXkYK1rqcu1AkEkHBq8LoNVlDayA2Jzlsew5NArdU+yWM8hip9e182s8/v1F9NgEeBzNOJHUoWSEB0CIyjGqIMlKjGRixhKnPnCjfUNu4nJx2NEcheNfPKqDLNJYtcRrZitYP0aZwPpf5jIXvKLUcEPJeA8SQkJunF53lHImf/pZvBQYvzE25f2HwRAoml2d0OFpPu2J0jW5UJ0KWXN+HPdxXXEikXvoqlI67feqGIQ== 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=GZ6bN83iLwngr+seebxoaeQ2YGiKrSNMIrzsNEKgLa4=; b=KcKJoEWciC8MXKIYn8MHZkLdKbobhAr5vj61o3L+D1mdUOHvO/fLXF5Or7bPBO8HbVnibi+BggUnk5K8bSG/HVpZn8m9lf8IneMX2LLAbVEFauNJCrnG1f85VOWcQN5HYZE7kMvTSgXdffdW7OsfgLAWbx5ceCmuvqSlSXy7CpTjcAYEzLPAruOF3vKqL0vt0A6TkBUosBP2Tda/8x/USv7Lh2CLvW4MJUOqR2gSjj6T1fhLvt+S/QsElzfb3lnZ8D4dsFCIEUk9yCvP8fLwnBxIaixDsU6HjRibzF9nI+wkDYw5215Ogi4jRBg8VUxYVm/xdV3b1xSrCQlsmd38Bw== 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 Received: from MW5PR11MB5809.namprd11.prod.outlook.com (2603:10b6:303:197::6) by BN9PR11MB5227.namprd11.prod.outlook.com (2603:10b6:408:134::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5654.16; Wed, 21 Sep 2022 13:32:28 +0000 Received: from MW5PR11MB5809.namprd11.prod.outlook.com ([fe80::6ec2:a685:e63d:ab75]) by MW5PR11MB5809.namprd11.prod.outlook.com ([fe80::6ec2:a685:e63d:ab75%7]) with mapi id 15.20.5632.019; Wed, 21 Sep 2022 13:32:28 +0000 From: "Zhang, Roy Fan" To: "Power, Ciara" , Akhil Goyal CC: "dev@dpdk.org" , "Ji, Kai" , "De Lara Guarch, Pablo" Subject: RE: [PATCH v3 1/5] test/crypto: fix wireless auth digest segment Thread-Topic: [PATCH v3 1/5] test/crypto: fix wireless auth digest segment Thread-Index: AQHYzbjKH8KEEnMwiUKJQ5X5tkOjqq3p4N4w Date: Wed, 21 Sep 2022 13:32:28 +0000 Message-ID: References: <20220812132334.75707-1-ciara.power@intel.com> <20220921125036.9104-1-ciara.power@intel.com> <20220921125036.9104-2-ciara.power@intel.com> In-Reply-To: <20220921125036.9104-2-ciara.power@intel.com> Accept-Language: zh-Hans-HK, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-version: 11.6.500.17 dlp-reaction: no-action dlp-product: dlpe-windows authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: MW5PR11MB5809:EE_|BN9PR11MB5227:EE_ x-ms-office365-filtering-correlation-id: 2e17d675-673f-4676-867b-08da9bd5ba7f x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: ZNRPdYeRN58gdF5pPnpRPGhMRAl176AIJEVqrMyQ3eakioLRgildZALLIVOpTebc543+xWICOCYK4gyDTDZSWaILtTNh1tfuZ5lLO9MG9rgyjAPM/HheQbymXWPKrlszVbTB8nvm5K0cF4y2YkP8eMaL18DOW9qpYChfm/AK4G83aaehnMCe78QnarbWnbczxGxTv8Y3YawNliiRSqEuO0fPy9mE1gQP3J+xHvYfc7TeldWjjagi3G649/NlXrT0C15orB6O2kzqGPGzWzebCQaqtPXZfDKGqO556ar6lHB0EsWoHfJfgjLYf1e0QNC42DidX1tB6m31IL5yKYwIHKrq4j5v1uY8E5RN5tPyX6KO89TZBiXy2LvTpMmcSKrhXRMhK5e97NNQNLhJvejBmh6aAVkUBO8i3BZZo+8l3B/+u8JZ8tUZ5ukGM/0o5DmO/RkgV6UgV4TXRDLXpySH9eTmMMUSs+WoSrnGAlYwDfHkRmKky0YCp6NTRQuPJ1BLNGX9dRc2grXN0D5iHRcwYP3ax+vFwRBu6lRCyQdGS1oRtsfCdRDD6Kft42N56I2dmF+E5NAcafFxnNpAk1xStW/ySdoljmct7S6NUmB3o1mX9DU5dF4YA/IMBd966wjLaXtZNbxA58XD3Bi11pjDKXH2kJlQaRBcxnZBlFfTHHZIBQdOWr7Xp0JjXFTFLfpvGR5VttIyTzSs1sZjyTY+0alizYJoQIBOt2RAa5EBxDVd9XP998c8oiDVTSG1djmBOk/loFTv93GL8ylzksoAlw== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:MW5PR11MB5809.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230022)(376002)(136003)(346002)(366004)(396003)(39860400002)(451199015)(86362001)(186003)(83380400001)(82960400001)(55016003)(41300700001)(38100700002)(122000001)(38070700005)(5660300002)(8936002)(76116006)(2906002)(52536014)(64756008)(54906003)(110136005)(66556008)(66476007)(66946007)(8676002)(316002)(66446008)(4326008)(6506007)(53546011)(7696005)(9686003)(107886003)(26005)(478600001)(71200400001)(33656002); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?Windows-1252?Q?SCbU5EODAhZQUqe+N+N60ixPI8AyKSY2MGn+4tVsIQl+3Gx56t+9Hug5?= =?Windows-1252?Q?YLGSVKKYRA5oomdJBvNDXZZIgvgqzo0lcu19eqgE1dKgXI+SoJyEiGfL?= =?Windows-1252?Q?a9YWuUQYJu7ZiLhSFyA6uykDuwuL9lSYsmwtu3uR7Wc+y9M0wxGrkWtK?= =?Windows-1252?Q?5k35TpKcOALfiR/n7h+xfpXxuje7wWCNik3mlUkqeNfVey3ADI5IWfZU?= =?Windows-1252?Q?C8NWGdUCxdMjWn9Zn8uWdJFql62IXcjUhsmcLaw8O/cpSdYoghEnUNee?= =?Windows-1252?Q?9WcuoDfrH+DFAEWEEJqU5fFax7xc+bEhbrFD293cpvOWPDEWDm4PpfPw?= =?Windows-1252?Q?xcYKAdXQp2JjJAJANHl7zhMNqPpQB2GiB+EW2jTjlZCrdZwHfqmaZ+H3?= =?Windows-1252?Q?MUKTwcr7I8riUHITW2BRzc3+y4djhmjSwf5VGEvMBbPYdnbtdYiNuchH?= =?Windows-1252?Q?Fnya7MCnJU6C0ip8Y56ceYGCB9a18AdDieB44W94UHnJjhYMQDgIpjs1?= =?Windows-1252?Q?IExURflMwfodzewiEghS/q9p/msFBMegGl6AhTI8wnB7CG8qPuB0ld4K?= =?Windows-1252?Q?8rPtX9cyUQMytRywqbBAbZvAPofIqJDvhdbtcrd/6bT10UE0S5axLWpP?= =?Windows-1252?Q?nF3xBUfdw371YNPaFdwG4oAQbnsG9uIYknAdPpvRjY9jaUI0AqTYHHEV?= =?Windows-1252?Q?3CDRy/GksP+sai5Zo5gHPQzoGnGzbNfu6AzSoivDdKCbVXBHP/I+orpN?= =?Windows-1252?Q?6UZWTgJErmlhQZrtNT0etXdm+OK1Ny/rdBeIhw5jBu2ojb7QSQ1dCzNL?= =?Windows-1252?Q?Y1WAtK7hJFr+DC7jBNsHAlrYneCWELmtC9l7uwKYNu+AOdpvrVeeydP6?= =?Windows-1252?Q?WDqjhAujSAMN4F6NiUBkKprBJkzns2U5Xa/6xkKJgk1IEvnAa1g3RGo0?= =?Windows-1252?Q?BE64SCRvRtwm2ZFtqHLLj83opx+REJXvsPfFzQQlN0SMnlX0vFngKkFj?= =?Windows-1252?Q?LymIuBYJcvEkCaQ56ToQtdntqQ037Rh7mAEoYKGHqAJTpeJP1OEH0o4d?= =?Windows-1252?Q?IE5CgoYNL86RI0fyOtbDeB6N1HHbYHOpYLBl2Hw4/v7jL8KceDwTtyqE?= =?Windows-1252?Q?mCqIsKLW4BbhFmThH4fTxfUlSL8vTTMmmoYmJ8L8+d0RCbquvlGmcH8t?= =?Windows-1252?Q?wv+rqAhZdu+/ryEMjD1IgaF1sA3SK5yl//F2r5AFAwlF4GL7k8HT6tnO?= =?Windows-1252?Q?SRqLRaXak6xlfEJAfNkTkp1mIiuLq0UBY5GNxLxu5kMGaGQWv2Cl4t88?= =?Windows-1252?Q?9SJPjtxYMpjIw5ugGu/oP7VSQamDVhD5fKxhvY67UGxI14t2c0ScWaZK?= =?Windows-1252?Q?UW8wtlMK8DswS+YkXD+Y+U2oAY7X1XjAI5dFUMMgfs+WMAPCUHRXOgDB?= =?Windows-1252?Q?n6yj+mSKaIqrLP8QAFge641DsZbrs8SD37trMB9yakp4JAU6ZxFkzOdW?= =?Windows-1252?Q?VVNHmeZXxAsRe9LUtMcSNwP8QLtzfP79kI0/AbnmJ5/gqDbU+b6NbjQx?= =?Windows-1252?Q?3bFOWVk4LrP6ItlyClkk0zDnJNCEeKbIcAuziMsgS/LV2MEBPZJATTEP?= =?Windows-1252?Q?oV5Gyo85ov5xUdmGKBrhc8Tq+ROPzWMbuCptFwftovhJIAUe076K4H/M?= =?Windows-1252?Q?dweb2Fb1zLxgGEzx6T+l8DiGJiqJ5xrU?= Content-Type: text/plain; charset="Windows-1252" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: MW5PR11MB5809.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 2e17d675-673f-4676-867b-08da9bd5ba7f X-MS-Exchange-CrossTenant-originalarrivaltime: 21 Sep 2022 13:32:28.4980 (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: pF4CmuKgwXFHhS/JYYPs83Y8hOO1clw8GwvI/o3r+W/lk9iOdozyqvFHm4cMxCNQAmoNUVvy9Y/iY0By5JBefA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN9PR11MB5227 X-OriginatorOrg: intel.com 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 Hi Ciara, > -----Original Message----- > From: Power, Ciara > Sent: Wednesday, September 21, 2022 1:51 PM > To: Akhil Goyal ; Zhang, Roy Fan > > Cc: dev@dpdk.org; Ji, Kai ; De Lara Guarch, Pablo > ; Power, Ciara > Subject: [PATCH v3 1/5] test/crypto: fix wireless auth digest segment >=20 > The segment size for some tests was too small to hold the auth digest. > This caused issues when using op->sym->auth.digest.data for comparisons > in AESNI_MB PMD after a subsequent patch enables SGL. >=20 > For example, if segment size is 2, and digest size is 4, then 4 bytes > are read from op->sym->auth.digest.data, which overflows into the memory > after the segment, rather than using the second segment that contains > the remaining half of the digest. >=20 > Fixes: 11c5485bb276 ("test/crypto: add scatter-gather tests for IP and OO= P") >=20 > Signed-off-by: Ciara Power > --- > app/test/test_cryptodev.c | 8 ++++++++ > 1 file changed, 8 insertions(+) >=20 > diff --git a/app/test/test_cryptodev.c b/app/test/test_cryptodev.c > index 6ee4480399..5533c135b0 100644 > --- a/app/test/test_cryptodev.c > +++ b/app/test/test_cryptodev.c > @@ -3040,6 +3040,14 @@ create_wireless_algo_auth_cipher_operation( > remaining_off -=3D rte_pktmbuf_data_len(sgl_buf); > sgl_buf =3D sgl_buf->next; > } > + > + /* The last segment should be large enough to hold full digest > */ > + if (sgl_buf->data_len < auth_tag_len) { > + rte_pktmbuf_free(sgl_buf->next); > + sgl_buf->next =3D NULL; > + rte_pktmbuf_append(sgl_buf, auth_tag_len - > sgl_buf->data_len); The append shall work once the mbufs are correctly set and mempool is allocated well. But we should not assume that - it is better to add a simpl= e check here to make sure the mbuf are appended. Other than that, Acked-by: Fan Zhang