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 C660FA00BE for ; Wed, 9 Mar 2022 20:02:57 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id B977B410E6; Wed, 9 Mar 2022 20:02:57 +0100 (CET) Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by mails.dpdk.org (Postfix) with ESMTP id 616524013F; Wed, 9 Mar 2022 20:02:55 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1646852575; x=1678388575; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=WGKKBLf9PiypQnRSFqBec/JqVkJqRpgY59raLE7gSaQ=; b=ALPtGndYAv+WjALpUo9cPyUsmFT2alhqBjImGo1yv3MvIFPHsQbH47z2 hspdyVQB6VcGhSRnApRQquNWoIF6qyhgFpVkdeKI63w0Fji8pSfeREL+E mp54hDWHljMhAt9BSgX+T7hI8IXo7XnUMxt6KImiYXhWJxuMIUbcn5n82 4ykkztRWMDhNq4DzmB0pU1am0dImkXv5M72QsC+J09+av3Stu3F/o05pZ vZG54Ak371gJkSVzxdKXe3dV05U7cJzLkyhEhbfiKFMlhjdAit0sKn84b 2xouCuMmGYoYbkw+PtMOtYJn/oi5oIr3KrV+ancRHCB0+9Pzlf9+Cv35+ w==; X-IronPort-AV: E=McAfee;i="6200,9189,10281"; a="318288679" X-IronPort-AV: E=Sophos;i="5.90,168,1643702400"; d="scan'208";a="318288679" Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Mar 2022 11:02:54 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.90,168,1643702400"; d="scan'208";a="495953735" Received: from orsmsx606.amr.corp.intel.com ([10.22.229.19]) by orsmga003.jf.intel.com with ESMTP; 09 Mar 2022 11:02:54 -0800 Received: from orsmsx611.amr.corp.intel.com (10.22.229.24) by ORSMSX606.amr.corp.intel.com (10.22.229.19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.21; Wed, 9 Mar 2022 11:02:54 -0800 Received: from orsmsx609.amr.corp.intel.com (10.22.229.22) 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.2308.21; Wed, 9 Mar 2022 11:02:53 -0800 Received: from ORSEDG601.ED.cps.intel.com (10.7.248.6) by orsmsx609.amr.corp.intel.com (10.22.229.22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.21 via Frontend Transport; Wed, 9 Mar 2022 11:02:53 -0800 Received: from NAM02-BN1-obe.outbound.protection.outlook.com (104.47.51.48) by edgegateway.intel.com (134.134.137.102) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2308.21; Wed, 9 Mar 2022 11:02:53 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=LdJ7frbMIGp3nsQUQaXtdwXO91e0dfEdE/fb6FgzzMbPcojP6tPZzCgd8E7nZ5F0abXzSZXSA37fUctnUC8IGIyq47NBj2tC5YEMDKjliDyfgPgVQ8/X8ANBgMYvmMmU/ypd7a4rOD+4VnpMQzvBkSfiEHgymJd4bvHdq6pw8GalKQOMvB9xApf888Y5Oq3eKLJ8QLrNeuQAUplJ5uKB9RDWyCDaS54cotUB3cfIjpGkbGZwPrFXjoiRx2jAvuJjL7FBVK7qEkoF2aIDp1kvIBdRUcgNWFP5WxjgTFb0zdkL/59ZLeVotKc0Lckb61SKbEZHCS3xuZoIvnmA5WxNaw== 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=UF5lHUnbl7VTkqOXnMnZCG7wT973fbSxAG8WBqQAiBM=; b=Zcvm7l1EyAZMtGJwyZt8VAdJvGmFI+GJi5GU03zZ0a55qwwGiDCj6rHhqbivCNxZCt4I3Dyor+m1w60oloCzXcNijUO5tC3i/9tE+kQyatVzJlLVdIWaFcOhdb3AMg3QTVMqWBz2KwST4KYXM83eweEYIRX3O0OYc3sNOr3K0+cP3C/6iZvPiqwXQnmtRuPzMfms13NtWaa1MJN7R/44Oi8cPsjoXvKm1ynoCcIG52aFsDKwPJf2musv07OjW5ixu4dnnwQzqNllXi5CchyH9uHvNSxk8Uyj95ASwW22ryIGOPa4MeNnghPt9c7R4n22M9uKdjlVmgGiIwynVTr4nQ== 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 DM8PR11MB5591.namprd11.prod.outlook.com (2603:10b6:8:38::23) by CH0PR11MB5459.namprd11.prod.outlook.com (2603:10b6:610:d2::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5038.16; Wed, 9 Mar 2022 19:02:51 +0000 Received: from DM8PR11MB5591.namprd11.prod.outlook.com ([fe80::4d22:453d:a721:125a]) by DM8PR11MB5591.namprd11.prod.outlook.com ([fe80::4d22:453d:a721:125a%5]) with mapi id 15.20.5038.027; Wed, 9 Mar 2022 19:02:51 +0000 From: "De Lara Guarch, Pablo" To: "Zhang, Roy Fan" , "Nicolau, Radu" , "Buckley, Daniel M" , Thomas Monjalon CC: "dev@dpdk.org" , "stable@dpdk.org" Subject: RE: [PATCH] crypto/ipsec_mb: fix GMAC parameters setting Thread-Topic: [PATCH] crypto/ipsec_mb: fix GMAC parameters setting Thread-Index: AQHYM6LOXTzqLlcQykqwagNrSBaZ2qy24riAgACFhxA= Date: Wed, 9 Mar 2022 19:02:51 +0000 Message-ID: References: <20220309104514.1180589-1-pablo.de.lara.guarch@intel.com> In-Reply-To: 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.401.20 authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: ac42e5fa-3b36-4b63-8715-08da01ff6928 x-ms-traffictypediagnostic: CH0PR11MB5459:EE_ x-microsoft-antispam-prvs: x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: N4HNslO++F7b8IDkGMJHWqBng4isXA5mhFO29Jx1Uojg/Fs1arGXaz7r3Oecy9LkJ6IJGGkCSl6/zqhs9+40EFiWyAxs+jYWu3Dp98uMY4a8Z0EFLnx9wYVNxi6p9tOa2ZkRzh14F/pRMOPXP7pSJhpsz23aDD+nFuam/pNIWdBBJWMAYfXYL75/+NBy/E7YwADESj1I/UNz5ZPJxlv3zYaflL3UUg+IACtdpM0BewBsITvcpPduTibw/RgIhaGQQXw+KwYEIkvH0JKu7DxDkRYptI/+V2kJXaI+hhg5e/PyAb4/eEKol4rG+AfuPlQMUA7bvUpSc/b76E/K5lVYN43d2/BBKywDAVj2O/4fm90MLlsDepxzJ4gYXI3JuZSE+edRfX3I1eWQ5+4K2XjAljCZaudHgAE/9Vj78sK+GprEdSYpE74b/sNLK8en/4d2pfx7TMhaEH3hCC+SzcD2cmaMVxoMyd6kgGDHZMv/1fZsHQF9JydFaubh5vT0LBEYB7yONGgxsNoqyT9IguR+m6GtFj6uiHAEm6ilplWHErxv0KR6kLCEjvzxNUIQyzKoyQ5CnvO2/NsY5f4vAoBzmPalkPhbO5qVsDbcoar1u3bXHJO10rm1zMsYm4lohwyE9wBZ20VhjOH+PKliAaDMLZ6r46IGkyWG3GRDkDtQz8KNUu3Ksyxk2IKRKbxKbE8XamNOOKJDMvTrGU7tN4rVtg== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DM8PR11MB5591.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230001)(366004)(64756008)(4326008)(66556008)(66946007)(8676002)(66446008)(26005)(83380400001)(86362001)(122000001)(38100700002)(2906002)(82960400001)(66476007)(5660300002)(52536014)(55016003)(38070700005)(8936002)(7696005)(6506007)(54906003)(110136005)(71200400001)(76116006)(508600001)(9686003)(33656002)(316002)(53546011)(186003); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?DW3SKsNMwuhrX+ZQwzSL4UgJbM+oKghA54BWzO94CN8QDxdXheiQNPhFF5G8?= =?us-ascii?Q?4I5iPOYITWOqRaYNBgpTF/RnsYImwm6KkOHyAVrcm3zuWldPhgpatzdY694J?= =?us-ascii?Q?hQerzEEzMUqRHOWv/iZGaQ+QipD8G0rEl60N+jfgJUpw40Xgjh/E/e5OAxt9?= =?us-ascii?Q?4Lzfxa3DHwklrRM3M+4X72ujOTMvgemclblx/wxgsApSm4k6IkMTaJFmJ2Iy?= =?us-ascii?Q?Mt/l5uqxucihJy7XaX5kBNtdTaom6+tc2VqS7q5Bxd3arxZ1DgIfkFQ2Hysv?= =?us-ascii?Q?8mUiM7AvizW1V62L77eKeBzR1FN80NAs1JDKKzZNwA4wOtCF0enTdC24JcAx?= =?us-ascii?Q?kGrD2kqDCJEW9G0whyQ5J5Y26OjsgYMm1AGK0RTOA52dSeWK6sGLhifNcFw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yQaws2Sp5hFf8GZOKvRudVSiXEsNLZto?= =?us-ascii?Q?hnboKMH3Yr3RhUNAJqo/NY/ey+BKZrC6NY1NYi4fsJeHv19DEMEqiv10BcpO?= =?us-ascii?Q?+jzX63K2dlptPpR7XEJgT+RwrOitMAxKSyLcddTh6dWh0n1Xsw8G8GAuRaYs?= =?us-ascii?Q?YMVBi5W/MjWPkMPKC6+4dfsPYNlot6zG8q7QF16m2cwiMUzO3sbQrTNfG3Av?= =?us-ascii?Q?jw2ohyvDweSC1usZIMQFgfxvVoOXFZc8ND2UK9s99ck9LkDFaizNUY/fVyWq?= =?us-ascii?Q?/MafP8dzxfEj+v3HvyF6YsvEhRn5IS/8zEAwyWy+RPmvUWcHrO9fHWAYuHTF?= =?us-ascii?Q?Wvfjb7kuVpkLqw2TLH6li9W9QuJbCLeaaTDLd/KvBofvk/BSv+SUZrXEnkaK?= =?us-ascii?Q?Ddbr6g=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: DM8PR11MB5591.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: ac42e5fa-3b36-4b63-8715-08da01ff6928 X-MS-Exchange-CrossTenant-originalarrivaltime: 09 Mar 2022 19:02:51.8117 (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: ShYqoXu1ZF5EVkNln4uiDWQHV5XDcRlBjuS3tXkomaMEKXUxEMWKBdLUgoX/9SGo4t+NLDKtrAQzLGT3lfAZGrJ3xPpU7SkqcKfim49462E= X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH0PR11MB5459 X-OriginatorOrg: intel.com X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Hi Thomas, > -----Original Message----- > From: Zhang, Roy Fan > Sent: Wednesday, March 9, 2022 11:01 AM > To: De Lara Guarch, Pablo ; Nicolau, Radu > ; Buckley, Daniel M > Cc: dev@dpdk.org; stable@dpdk.org > Subject: RE: [PATCH] crypto/ipsec_mb: fix GMAC parameters setting >=20 > > -----Original Message----- > > From: De Lara Guarch, Pablo > > Sent: Wednesday, March 9, 2022 10:45 AM > > To: Nicolau, Radu ; Buckley, Daniel M > > ; Zhang, Roy Fan > > Cc: dev@dpdk.org; De Lara Guarch, Pablo > > ; stable@dpdk.org > > Subject: [PATCH] crypto/ipsec_mb: fix GMAC parameters setting > > > > AES-GMAC requires plaintext length to be 0 when using AES-GCM, so only > > AAD data is used. > > > > Fixes: a501609ea646 ("crypto/ipsec_mb: fix length and offset > > settings") > > Cc: pablo.de.lara.guarch@intel.com > > Cc: stable@dpdk.org > > > > Signed-off-by: Pablo de Lara > > --- > > drivers/crypto/ipsec_mb/pmd_aesni_mb.c | 16 +++++++++++++--- > > 1 file changed, 13 insertions(+), 3 deletions(-) > > > > diff --git a/drivers/crypto/ipsec_mb/pmd_aesni_mb.c > > b/drivers/crypto/ipsec_mb/pmd_aesni_mb.c > > index c974886032..afa0b6e3a4 100644 > > --- a/drivers/crypto/ipsec_mb/pmd_aesni_mb.c > > +++ b/drivers/crypto/ipsec_mb/pmd_aesni_mb.c > > @@ -1296,9 +1296,9 @@ set_mb_job_params(IMB_JOB *job, struct > > ipsec_mb_qp *qp, > > op->sym->aead.data.offset; > > job->msg_len_to_hash_in_bytes =3D > > op->sym->aead.data.length; > > - } else { > > - job->msg_len_to_cipher_in_bytes =3D 0; > > + } else { /* AES-GMAC only, only AAD used */ > > job->msg_len_to_hash_in_bytes =3D 0; > > + job->hash_start_src_offset_in_bytes =3D 0; > > } > > > > job->iv =3D rte_crypto_op_ctod_offset(op, uint8_t *, @@ -1378,8 > > +1378,18 @@ set_mb_job_params(IMB_JOB *job, struct ipsec_mb_qp *qp, > > job->msg_len_to_cipher_in_bits =3D > > op->sym->cipher.data.length; > > break; > > - case IMB_CIPHER_CCM: > > case IMB_CIPHER_GCM: > > + if (session->cipher.mode =3D=3D IMB_CIPHER_NULL) { > > + /* AES-GMAC only (only AAD used) */ > > + job->msg_len_to_cipher_in_bytes =3D 0; > > + job->cipher_start_src_offset_in_bytes =3D 0; > > + } else { > > + job->cipher_start_src_offset_in_bytes =3D > > + op->sym->aead.data.offset; > > + job->msg_len_to_cipher_in_bytes =3D op->sym- > > >aead.data.length; > > + } > > + break; > > + case IMB_CIPHER_CCM: > > case IMB_CIPHER_CHACHA20_POLY1305: > > job->cipher_start_src_offset_in_bytes =3D > > op->sym->aead.data.offset; > > -- > > 2.25.1 > Acked-by: Fan Zhang Thanks Pablo! Would it be possible to merge this fix for this release? A previous commit merged in this release has introduced a bug, so it would be great if this fix can make it into 22.03. Thanks, Pablo