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 48640A0510; Sun, 8 May 2022 16:40:04 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 384AD4069D; Sun, 8 May 2022 16:40:04 +0200 (CEST) Received: from mga06.intel.com (mga06b.intel.com [134.134.136.31]) by mails.dpdk.org (Postfix) with ESMTP id ABC66406B4 for ; Sun, 8 May 2022 16:40:02 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1652020802; x=1683556802; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=LcbBY/WraML9XyJ4MURqVI3J/8DORLSWpEo2+okwIKg=; b=AKmiko2TzSy5KdH7O2MrJ5zB8OTy/dOVA5RBhK0JIcCMSg3QxLbs8tID YPEiEU3m/EnVEimbkBgnlDxmIMebJgnWqCbSko4FQ4WjoJ0ISbADXFEAW GWj8GRBDE8uS6xDx0XcAwYZARwTCa/9T9Q8mD4Oa0tEVAC1HqaWsX6LJM +UuM7yc3/rs3XyWrCDOVoajmunfHQEsFQmKNV8HLBEw3211t6d7aWklSN SRPcmQq5AiwqbNV8VOSWLhgwJ5esuYXSGgRu+E6joMjOCoTk+hLKPl1uL qvBj6IlZhc16Iebwd9SOaqbxZj+Qqyr05eJ4QXF9+3eTwOjzid8CyoUvt g==; X-IronPort-AV: E=McAfee;i="6400,9594,10341"; a="329419104" X-IronPort-AV: E=Sophos;i="5.91,208,1647327600"; d="scan'208";a="329419104" Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 May 2022 07:40:01 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.91,208,1647327600"; d="scan'208";a="518809579" Received: from fmsmsx604.amr.corp.intel.com ([10.18.126.84]) by orsmga003.jf.intel.com with ESMTP; 08 May 2022 07:39:58 -0700 Received: from fmsmsx610.amr.corp.intel.com (10.18.126.90) by fmsmsx604.amr.corp.intel.com (10.18.126.84) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.27; Sun, 8 May 2022 07:39:57 -0700 Received: from fmsmsx605.amr.corp.intel.com (10.18.126.85) 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.2308.27; Sun, 8 May 2022 07:39:57 -0700 Received: from FMSEDG603.ED.cps.intel.com (10.1.192.133) by fmsmsx605.amr.corp.intel.com (10.18.126.85) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.27 via Frontend Transport; Sun, 8 May 2022 07:39:57 -0700 Received: from NAM12-DM6-obe.outbound.protection.outlook.com (104.47.59.173) by edgegateway.intel.com (192.55.55.68) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2308.27; Sun, 8 May 2022 07:39:57 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Udsj8YHjwTr8F46cKg5sXSOFD7tBSudVQVKFBgF6LogJDVyA+FsLUp0yam4YAnRP+BDZ0cSHWQnkgr+PsRjPJceZikz4Wc+CWtPixiupPOtBGSGcvOhq6laC+fC96a+PxfV6P4P2wHng54RAaKQBFMGNYFr3la+KFBq8iaY3+edDOJL6VVgwRxS+qgu+1gFEHIGk9bEK+YVfdR+8mSiKk9xcB0iQDtz6qysVM0ugZvbQZQFBbK7FqMaeB/QegjAf3Ncj3SrjyeuSFAHErP3mMk3J3X1jqSx8cAT0bSkg26mvE+aMfkredphzgGaIgDJQVdEsv5miLlEavelPFNBVhQ== 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=h/NyKIEHx7iRu1YUfT9FD2fz0NC4CWJsPPiWlousm3Y=; b=VXEWINp/35jwfWzQYblhL/4Opc8SZVLeWWqUTOHprvA227iy62/O7oY3efZRdKtbHGRK0IQOdRHINthDcAve152NBYDsTXtT8HcQzEiDKrtjR8ifDCHVupsXmj1/mj6JLOerdfjvKWEjDEQeTZAfY0+UAPsOigcfVXMhC4k378Ed2FC9V7choNSVc1bEbO9Xl14fPNUq7viK4IL7o1LZEVl2nTKUJz1PmC+zlaOZCdSaB090crYC1If+CVT2Gfcy5/IpLPMlHb4/7Q2XCaZvfVG3G6uQfdYFQcTft4O29Y0uJf4v+sFCPgyZldY3lT/04vxq/R0AF4RZmpKtqEVeEw== 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 DM6PR11MB4281.namprd11.prod.outlook.com (2603:10b6:5:204::29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5227.18; Sun, 8 May 2022 14:39:56 +0000 Received: from DM8PR11MB5591.namprd11.prod.outlook.com ([fe80::b4e5:eb4b:e2f0:ed0c]) by DM8PR11MB5591.namprd11.prod.outlook.com ([fe80::b4e5:eb4b:e2f0:ed0c%6]) with mapi id 15.20.5227.023; Sun, 8 May 2022 14:39:56 +0000 From: "De Lara Guarch, Pablo" To: "Power, Ciara" , "dev@dpdk.org" CC: "Zhang, Roy Fan" , "Ji, Kai" Subject: RE: [PATCH 3/3] crypto/ipsec_mb: check SGL support for algorithm Thread-Topic: [PATCH 3/3] crypto/ipsec_mb: check SGL support for algorithm Thread-Index: AQHYSmqgwJX+YShC4U6B7AdDipBBwa0VNN9A Date: Sun, 8 May 2022 14:39:56 +0000 Message-ID: References: <20220407103041.4037942-1-ciara.power@intel.com> <20220407103041.4037942-4-ciara.power@intel.com> In-Reply-To: <20220407103041.4037942-4-ciara.power@intel.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.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: d7d13640-0a37-4de8-581c-08da31009ee0 x-ms-traffictypediagnostic: DM6PR11MB4281: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: bgkDvDeE1WkmxKXIAWa1E2cIjq+ij1mr//GYNXf5DEOGsF8vGHEIihqbI2Bu5LPiKH9NUt4beEiHddsRbmeL77hQW67WlvFDAZxyGk0XUTIrnxBrS9FTsRKKcYJpnSOF2N/sGMJWuBSY3pmVZgcvLHxHegVsxVn7Qe8+nXDJx3yt6aJGQhEg82ySdB8FbQVyYOqw6LpjmytoSLX/l6koZ60VFrVSisph/jtZmOdhYnl+vJSP/ntqt/YkKn/2HSg/k0qF2nTVUEL16WODKusEN0t6U4y54wagssq0lRrXu531MQDAYQ4/lSRPeKyXmERENnIeXGJNt0csDNr+vs27vZcG2x5Tfy+bcFPf47kaEuPcDAjYMfrPFJIjmzmK132D/UlPi7j5GG17n0caqGW+E32u4eIoDcbDWr+GTpvEbYUTCPocqT6vAWMZfEO0/oDh8KPzV+u5ikhy4reM9/w3EnxEhCsOG5kY0iVt5eI74ufNkPVSEkerj0ZQBLXj71eI/pYJpSzTcRrCYKrmxp2eDXD+yma6xKifCLJS3G+cSLtE1N5Q4aMKlrIB9WJMps9uuqypqpcv3x/5e0lYOCY5s/WMQ0CnsRdyn9b7n7gdyHpA6Hq9rhl7wrgp/pHqPHGPiNOIx5WaDL48vRXV3QNDSZZB7xYUoFJ3oXC2gwRGd7HyNQlVlejO6EawM6fziefFPP6bweUgZ6lQp+/tIgu3vw== 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)(83380400001)(26005)(9686003)(53546011)(7696005)(6506007)(122000001)(71200400001)(5660300002)(66556008)(33656002)(107886003)(186003)(2906002)(8936002)(508600001)(52536014)(38070700005)(38100700002)(76116006)(82960400001)(55016003)(316002)(66476007)(66946007)(66446008)(64756008)(8676002)(4326008)(86362001)(54906003)(110136005); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?9ZiF2GoEtlr8xsBn+CECUfdBHDPAwwenVLy026cx07Tji5xN2g+mCG9OBb6r?= =?us-ascii?Q?fIW+n1SBqVqc+hSYpCVcsWkFE1vuF0GqTNazwHG/91R9iVyudOgG7nqb3IOB?= =?us-ascii?Q?akharvPka4UTJbqCD5RvC7h6foAH+8RJuc115QCqLAK/xTziNVfhlGmfVknN?= =?us-ascii?Q?RiyrVU6GgV5Ioqr9qwJbjyEL5jKNaNwP/OlhCKxsUVfZg1QIiWpcr4dQFLYm?= =?us-ascii?Q?WCnd1X2BazdDR/LT1EeL4E1KKWcodvRcPFDi7/p5PxJk2NNCSqRItzsW9IG3?= =?us-ascii?Q?4nSlnuGN79LprxyqzoGNCu5GVz5mPRMx438eFgdDA35/W+SI9WkxYTlVrowx?= =?us-ascii?Q?Y4MJkqug/EdBWzzH80YJjX/bXJFvYcv6VLR6U6It8QiCxTVjS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xzZehF8mRKzRnMFiEmkygoBrp+NYu94MhCOIrCzO?= =?us-ascii?Q?IhGEzo5Q0ooIBInMBi2Ru+649zxnBslP90W5rlHLJIRpJWWRxorarcoZc+tF?= =?us-ascii?Q?hHZDYtY+x5WkiiFDGjArTlWNOG3C+xAOj6VtUUGZboPDM2ybg53g8/DTWJ7O?= =?us-ascii?Q?baq439cdFSg3eLEoeJ4DlLrpmobK1Wfx5UkkyoAKpYaN71hFN02AIdyv8uxe?= =?us-ascii?Q?fzioAcQ7qvs1m2umKgpiuBJhz/oPUWSIkDlvWKOAf11xH2yVcxYjqTfIh/2B?= =?us-ascii?Q?/lmsLPJmh33R+990KExmjKDUItk+kPEUsH3xI5nzHcU71OhTyQtW5WMkTGA+?= =?us-ascii?Q?IF3wBrXTIyTZOYPHhE3LlK4kN4gWZUhKq8nPa00JtENqy/mlOOXKN+ox/t1L?= =?us-ascii?Q?xN5bPmKk41VvckLMfss2veH4+pE7+vcTUQIwjnavzDS2hVwG+jxkT+2lOyPK?= =?us-ascii?Q?fuSjwtKkj/yvg0H5SXlyZTKjAkUq5mQ=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: d7d13640-0a37-4de8-581c-08da31009ee0 X-MS-Exchange-CrossTenant-originalarrivaltime: 08 May 2022 14:39:56.1454 (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: kR/WSjJBZPfAiXPZftAzkKa/7LQbnDJrD6GF9sbqEC8p0GXSJyXbZlH2q3tBZz1Q/mxf39bPiczCHsreWsUtW3N3gTEThEN8SK1md2/KrIY= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR11MB4281 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: Thursday, April 7, 2022 11:31 AM > To: dev@dpdk.org > Cc: Zhang, Roy Fan ; Ji, Kai ; > Power, Ciara ; De Lara Guarch, Pablo > > Subject: [PATCH 3/3] crypto/ipsec_mb: check SGL support for algorithm >=20 > This patch adds a check when dequeueing ops and processing, SGL support o= nly > exists for AES-GCM and CHACHA20_POLY1305 algorithms. > If an SGL op for an unsupported algorithm is being processed, submit a NU= LL job > instead. >=20 > Signed-off-by: Ciara Power > --- > drivers/crypto/ipsec_mb/pmd_aesni_mb.c | 7 +++++++ > 1 file changed, 7 insertions(+) >=20 > diff --git a/drivers/crypto/ipsec_mb/pmd_aesni_mb.c > b/drivers/crypto/ipsec_mb/pmd_aesni_mb.c > index 606c8a0caf..9b21c14f58 100644 > --- a/drivers/crypto/ipsec_mb/pmd_aesni_mb.c > +++ b/drivers/crypto/ipsec_mb/pmd_aesni_mb.c > @@ -1202,6 +1202,13 @@ set_mb_job_params(IMB_JOB *job, struct > ipsec_mb_qp *qp, > if (op->sym->m_src->nb_segs > 1) > sgl =3D 1; >=20 > + if (sgl && (session->cipher.mode !=3D IMB_CIPHER_GCM > + && session->cipher.mode !=3D > IMB_CIPHER_CHACHA20_POLY1305)) { > + op->status =3D RTE_CRYPTO_OP_STATUS_INVALID_ARGS; > + IPSEC_MB_LOG(ERR, "Device only supports SGL for AES-GCM or > CHACHA20_POLY1305 algorithms."); You can use check for cipher.mode inside the previous if, and avoid checkin= g for "sgl" again.