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 80B09A0C40; Thu, 29 Jul 2021 10:58:42 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 6653640687; Thu, 29 Jul 2021 10:58:42 +0200 (CEST) Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by mails.dpdk.org (Postfix) with ESMTP id 0C3E240041 for ; Thu, 29 Jul 2021 10:58:39 +0200 (CEST) X-IronPort-AV: E=McAfee;i="6200,9189,10059"; a="192432181" X-IronPort-AV: E=Sophos;i="5.84,278,1620716400"; d="scan'208";a="192432181" Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Jul 2021 01:58:38 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.84,278,1620716400"; d="scan'208";a="438164002" Received: from fmsmsx605.amr.corp.intel.com ([10.18.126.85]) by fmsmga007.fm.intel.com with ESMTP; 29 Jul 2021 01:58:38 -0700 Received: from fmsmsx612.amr.corp.intel.com (10.18.126.92) 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.2242.4; Thu, 29 Jul 2021 01:58:38 -0700 Received: from fmsmsx609.amr.corp.intel.com (10.18.126.89) by fmsmsx612.amr.corp.intel.com (10.18.126.92) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.10; Thu, 29 Jul 2021 01:58:38 -0700 Received: from fmsedg602.ED.cps.intel.com (10.1.192.136) by fmsmsx609.amr.corp.intel.com (10.18.126.89) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.10 via Frontend Transport; Thu, 29 Jul 2021 01:58:38 -0700 Received: from NAM10-BN7-obe.outbound.protection.outlook.com (104.47.70.102) 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.2242.10; Thu, 29 Jul 2021 01:58:37 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=XfwvBlJQLrTmoblqmevLRlCRqJEVZSnAh0TJl6wBxRzmyYNJWe6oG5OnZ03yVR0UhLIvXPZ3steoyPSXforn4aeRA391zObPy13WZn5j/JvA5+z7EQSpMdoPAHOrCs0Ptkxy4kcIOrarV189WyHhAaYNuXQmDeoGqo5V0y7jz9T5NP3sRjJL4M3C5N3fb499LAtx7hETfWiQbivHiqZ4HP8Hj6d9hNCuj/YVrt2pKVDg1NulkCC5cskBUEyJyASNAsjW5OvXexhlj0jbeAEAJkFDlTsNMwcyl6D622e6BUOG0Q0YmjV3aKwo23TmBv6Bu+311aKzgeScNCq2ehHW9w== 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-SenderADCheck; bh=ued47/i/av2N/DP3uPC3pfR9EKw0B2KmJvoN2VWNJ4c=; b=kJwos4F8UR2euyiTPqMEZJOVoZeJrdUP8KT7AlK26NtVth7Sz98dj0/AKmWDF6TXwakhTwxcePNR5jUp5wmcfTBtOn7SILaIdViTXZj+c60ho3oJFKhADWsqy+YzY7KxefJxEFjPmp2QcrW0lbYWghalpo3W0oz9/qDavNTzGXkxHH8UaoFDnxzvwe8jtj9kef4htdyPx5mHpvEnfQ5DUYZwlIwXvbv3RlRDFIPopt+AYybODOtfAdTO1EWc5/XNvUdaU2VVvYp3F66woyb+Ey3bCQoqiGbxaXje3QCLnG6mWZdNR+h5oi5PjnFxP6Ti46E5LHbjryh80vR6z7jpDA== 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=ued47/i/av2N/DP3uPC3pfR9EKw0B2KmJvoN2VWNJ4c=; b=xlAGnr//dZa4oH+Qel9mBfZ1Ehr9Vd1gnLWiG/SxCnAdRM8Kq1RaCAs+KDSUpkJKoMGHrsyQSuAw61fzsIgPM8Wqxggk3PO4OYcIeb146mGKCdkZ2X9CjA/PM4HKov/CRVK233fObmCB6tp5eTz6Q391X2VCKG7RccqdcASq1iE= Received: from BL0PR11MB3043.namprd11.prod.outlook.com (2603:10b6:208:33::19) by MN2PR11MB4317.namprd11.prod.outlook.com (2603:10b6:208:179::33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4352.28; Thu, 29 Jul 2021 08:58:36 +0000 Received: from BL0PR11MB3043.namprd11.prod.outlook.com ([fe80::3048:2055:b488:129f]) by BL0PR11MB3043.namprd11.prod.outlook.com ([fe80::3048:2055:b488:129f%5]) with mapi id 15.20.4373.021; Thu, 29 Jul 2021 08:58:36 +0000 From: "Zhang, Roy Fan" To: "Kusztal, ArkadiuszX" , "dev@dpdk.org" CC: "gakhil@marvell.com" , "Trahe, Fiona" Thread-Topic: [PATCH 1/2] drivers/qat: fix wrong return value for invalid service Thread-Index: AQHXg8w/WPMxBCjW/0CcgE7uOkXK/6tZqCHA Date: Thu, 29 Jul 2021 08:58:36 +0000 Message-ID: References: <20210728161831.6807-1-arkadiuszx.kusztal@intel.com> <20210728161831.6807-2-arkadiuszx.kusztal@intel.com> In-Reply-To: <20210728161831.6807-2-arkadiuszx.kusztal@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.0.76 dlp-reaction: no-action dlp-product: dlpe-windows authentication-results: intel.com; dkim=none (message not signed) header.d=none;intel.com; dmarc=none action=none header.from=intel.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 355a72de-9238-4d78-d5b7-08d9526f0d08 x-ms-traffictypediagnostic: MN2PR11MB4317: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:366; x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: Gn8E7XneV7CL7C0UkhgrvjmkGrG+MSdk7NG5/Hccs4Ndafhq6EKOXZg/M75e0VGNpqeP8d5ams7rGFi+6pp2hGZfyyWxhwvbIav67RJ4cEhDSpdP8naj4BF9u1JHLz6kKU535KesWpD8Nfa1uj3xavQj9ynjkJWN6UC/jggKyvmGabOFpWeDcOXVGeywbAs8cQnDk8zOHBl9GuIZwkoFSagLcStiDrHXwJMStG6EjIDFZ0PCbekSkMmrOJgrZoEXr253jVCMgnndxlgEN5om9hohvZWr6e5lk9Fq44WCkaXVZUHLQRcsehvtuRmy7Nf/olAq/O1OtmL0wgJ9SN5tfcF+pZcEXN6XH0jcFIcuwbtA3FUrF6myfO/PiU5XMPngpboMPhDM89M+eiXcdWkRmi7Nt6AltiG3FLFY/k7NCma1HuElJ9GaY/R684+V9qMxXHIhSqk7bMKedCdS3zLsnlvHB+JxoJ8sBggjcafNmy7CGj7KBO43QwczmdU0YD1bv7WpaJdpQQ6xT32/tqxPWHoyx1JdLUTxcqiJ45o0KSD7EQM1VKF8qW7bNVsTj+X+W5hFklf5GIwP3KF9T2Vzd+WRb9vWcCcCuczugDnah7S8US1b66YrT181EUpt0lmopFGPMg6L+FbTTn3EtEdtXYcVcv6+j4NF3HZjj8lMIaZPcejIyX4WbdQolse1thV3b6X4+7yW6iXQisrfpJSoRw== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BL0PR11MB3043.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(366004)(316002)(66476007)(66556008)(64756008)(66446008)(66946007)(76116006)(5660300002)(2906002)(83380400001)(52536014)(7696005)(71200400001)(186003)(55016002)(53546011)(6506007)(26005)(86362001)(38070700005)(508600001)(122000001)(38100700002)(8936002)(4326008)(9686003)(8676002)(107886003)(110136005)(54906003)(33656002); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?Windows-1252?Q?3PLATZtkUJ76/p+n+05bl+oFyhZgUdIrTzkfJZMOzwKs+zyUM586i4vK?= =?Windows-1252?Q?fUFm91KDRuP1AQv9bzO0QVU0gsjDxkWF5ZShGju7DY5hxnpjhQD4M0RQ?= =?Windows-1252?Q?rCgt8qdgMYUvW6rxGGCbIa44Vo/njCk6zYP92UQFkqVBMhz30w6QHn6u?= =?Windows-1252?Q?MBsPBj8sbYZtHTe1M5NCGp6sO7YtH3Fw6aTpteRDGKcSI5HuNVPoI0FD?= =?Windows-1252?Q?XgSR/w24nXzutyY/RQudn3DTm2QFE1skbeKWzpVxVnLRJ+IioSQDfrfO?= =?Windows-1252?Q?2DZhSiYIhI1E1jf2Qh8Oi1X4I5iqjZEEMIF+C4OLNAJ+9uHMcEvs6ksn?= =?Windows-1252?Q?ayf4r67CAcabtPR/zkYT8gNEdfPeu2pVmTKzKjkVRwIgdiYiu6dvbn7L?= =?Windows-1252?Q?4/dAklipR58YtwYdQ6axLeYUam51Z3BRIPiG/Zzu/Js1uR7RdKU7tyod?= =?Windows-1252?Q?mkvMaK0Wu181eIXI+n1v+hRhqDM4Y+R+vvzuIJEgqdPw2Qq0yTAIIo7C?= =?Windows-1252?Q?2Z2ZUacVgnfVjTGebVf++c+KMs/0Y9XWAEnJKFRO6W9oltFhSXOwrzwb?= =?Windows-1252?Q?+wjm/qcmhW89gxlsfrueT+wnk9Z4Z70CJP4gpTvNaZp83zGpudQGl5cb?= =?Windows-1252?Q?O7Mn2Q3J4x2wToE1reST4FgLiV7mUq/1E9FItuJlZaAkhdfBVY73t4A/?= =?Windows-1252?Q?VS7fhgnM+DIMrDBA+AvqyZPSmvW+iZ+1Kl+8Uf/4a8XU+/RBrT6tQ6pb?= =?Windows-1252?Q?XX5Xcs08cIaW/XgYjVckzEsaHt3vYJB36G1dxdJS0dSZq8G4c4bwbcfM?= =?Windows-1252?Q?RKm+06PgAYirfg/byUxyUphztTgukRnIoC9dgvvOVrIsQiszKA3DQyTD?= =?Windows-1252?Q?4BjgSx83iLSdcEfJE6kW1KSXgplsy9Es6KexZZVq5kDGyS6ZhQb9akrs?= =?Windows-1252?Q?yAaM+MPv4fqXrpBkPyY8LBp+Hla7Z/tExbi1M2Iv7MgtzYbdtU9vsNfW?= =?Windows-1252?Q?632i7M4c1NbUVrfIocDpKfZU2HBFqKCotZNRtHv1YHnBnEvxsOO/d61l?= =?Windows-1252?Q?lkbdSN69S0GijMvRtNUy1WwHvcDzwHec7cM1TFCPrTtfdsxdmGSpWa0Z?= =?Windows-1252?Q?CU9iJzG9HCNPaCzeJ7TEr0pLPaqfqsPaqE4uoSKpTU9rSVaZ7OHRz7Lr?= =?Windows-1252?Q?kX5FzHF7/cvssZJQ3oQui8uGHGfPqOKAHdn3wUHNgeT2n7JRR5xBcbxp?= =?Windows-1252?Q?hkXttB6xqdoWWLTuvJwYTbEyGctSBhOwDnF5614MBc0TPsMGQ5NXPc69?= =?Windows-1252?Q?7HshESzXgnf373w3OfWHjRG3VHTMFkWkYsndGZYXEJCqaoBYeAl2tOi4?= =?Windows-1252?Q?+TYg1yozQR2QhxFrOcnXA3zbjOPTsCVEyFWbwApIrGdgNTSDIO0GY33v?= 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: BL0PR11MB3043.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 355a72de-9238-4d78-d5b7-08d9526f0d08 X-MS-Exchange-CrossTenant-originalarrivaltime: 29 Jul 2021 08:58:36.1667 (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: y4NFr3Kj4YJoU6ABBTavpWwKOComfHmdVVxSl4cXQKz4Dxd0NQ+iTDlY99FepQFurXEmlPnFwxgqEETvh89ktw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR11MB4317 X-OriginatorOrg: intel.com Subject: Re: [dpdk-dev] [PATCH 1/2] drivers/qat: fix wrong return value for invalid service 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" > -----Original Message----- > From: Kusztal, ArkadiuszX > Sent: Wednesday, July 28, 2021 5:19 PM > To: dev@dpdk.org > Cc: gakhil@marvell.com; Trahe, Fiona ; Zhang, Roy > Fan ; Kusztal, ArkadiuszX > > Subject: [PATCH 1/2] drivers/qat: fix wrong return value for invalid serv= ice >=20 > Fix invalid value that is returned when asymmetric crypto > or compression service is selected. >=20 > Fixes: 8f393c4ffdc1 ("common/qat: support GEN4 devices") >=20 > Signed-off-by: Arek Kusztal > --- > drivers/compress/qat/qat_comp_pmd.c | 2 +- > drivers/crypto/qat/qat_asym_pmd.c | 2 +- > 2 files changed, 2 insertions(+), 2 deletions(-) >=20 > diff --git a/drivers/compress/qat/qat_comp_pmd.c > b/drivers/compress/qat/qat_comp_pmd.c > index cfdcb6b3d1..92a2285b53 100644 > --- a/drivers/compress/qat/qat_comp_pmd.c > +++ b/drivers/compress/qat/qat_comp_pmd.c > @@ -713,7 +713,7 @@ qat_comp_dev_create(struct qat_pci_device > *qat_pci_dev, >=20 > if (qat_pci_dev->qat_dev_gen =3D=3D QAT_GEN4) { > QAT_LOG(ERR, "Compression PMD not supported on QAT > 4xxx"); > - return 0; > + return -(EFAULT); > } > snprintf(name, RTE_COMPRESSDEV_NAME_MAX_LEN, "%s_%s", > qat_pci_dev->name, "comp"); > diff --git a/drivers/crypto/qat/qat_asym_pmd.c > b/drivers/crypto/qat/qat_asym_pmd.c > index 56ccca36d1..d4680c3847 100644 > --- a/drivers/crypto/qat/qat_asym_pmd.c > +++ b/drivers/crypto/qat/qat_asym_pmd.c > @@ -253,7 +253,7 @@ qat_asym_dev_create(struct qat_pci_device > *qat_pci_dev, >=20 > if (qat_pci_dev->qat_dev_gen =3D=3D QAT_GEN4) { > QAT_LOG(ERR, "Asymmetric crypto PMD not supported on > QAT 4xxx"); > - return 0; > + return -(EFAULT); > } > snprintf(name, RTE_CRYPTODEV_NAME_MAX_LEN, "%s_%s", > qat_pci_dev->name, "asym"); > -- > 2.30.2 Acked-by: Fan Zhang