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 C3576A0C41; Sun, 24 Oct 2021 15:43:24 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id B04C84013F; Sun, 24 Oct 2021 15:43:24 +0200 (CEST) Received: from NAM12-MW2-obe.outbound.protection.outlook.com (mail-mw2nam12on2082.outbound.protection.outlook.com [40.107.244.82]) by mails.dpdk.org (Postfix) with ESMTP id 638C24003C for ; Sun, 24 Oct 2021 15:43:23 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=BDsCBKNfiwjQDlvAyzTOaQmUhMjCAilEEt4fiiHMrh9Z4uNro4QdALgKNQeBaDGVzz5Uk0m2GundR0N7ebDq22EDJe+d0G2tS05hS2l/zkfhruq2cNNPUvRgHiet1lsxQlRkBuK92nO8ZCTjJQOUp6gy6lRjcO1u3VLkRmNTostjI5aJfbSv4h+HF/kdx3M0LUZ4sI3A1JqQfvBmSgA+yCOY/fOawOhk6pBWDK7DfEe+8zwlZMbXVuf53k6iJOGp1x+nJo69rv6+rWXsbajEFYgQW/kvZgDwjVI6Us2YTG1WNi6LO+fzSqtB47QF6U7oWnquWVPjq5nFsmTfhq1LTA== 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=tU3iOtYxo64+6qNSFrqDNHVmtoTQVETrz9uIaEHP9ug=; b=BZAc3APR47TUaa3Glp48/y90Yz0NPNiXzgUMs1AvGHbf/VThZBMIxH3FSvct2ksjoAEfC8wyRWCq36WLMBa8/vO6BSh4pc3Hrl9jUUIrmuzn+PYY2u4w7bfazUX+G2s+Pc/zFUYmdb45mDS+AWPL6j/B86+/P+Uq5C//6WTOwn2nf9mmCM3RZu7y25tRolCDVeE5MlqGu/82ol1YYAP2TcESAowvjOiVe2eywfPIb+BXS7okApUrXJdCS5AYN3ZLfzQqD4qzvA0c7TGhpx5+HmVe4Tp77kS3kHgZyhMYVKS71NzWfMLQkj3n9paOQ9g8P7YiceWyqaiIhb+ObxMPmw== 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=tU3iOtYxo64+6qNSFrqDNHVmtoTQVETrz9uIaEHP9ug=; b=f/EmOYXrHgOmCORU1tLbOyFQv2iX1KIImWSb7oVYGna8m6PCXhgqtTuT9qYibf0u24I6wbWigqe8hdDx/nssidU7kKC7RARq9wc8AuV6LERloKBZfA5n7D5yG8e/UNa3A32uMLJ+IfpXd5od7xJM/NqhYVxeCZb0weqGbnKoNbp1fteRU3CXJPpfZ2AZAbJheJy/lcUt/1ksXVnawAimsORrzIcDA8Id15gYWy70VS9ZTnEqU/Pe6rMbueJ5/4FvHyJ9Vg5XPfDCVLQunsbjV5C8Jt8cbd+Ti0hsVn4tTD3oChqJ6zMwrc3VwYriZzd+fYzuMuMglQZsxXz/NQzWJw== Received: from DM8PR12MB5400.namprd12.prod.outlook.com (2603:10b6:8:3b::12) by DM4PR12MB5215.namprd12.prod.outlook.com (2603:10b6:5:397::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4628.18; Sun, 24 Oct 2021 13:43:22 +0000 Received: from DM8PR12MB5400.namprd12.prod.outlook.com ([fe80::d03d:1f75:ca20:6a32]) by DM8PR12MB5400.namprd12.prod.outlook.com ([fe80::d03d:1f75:ca20:6a32%6]) with mapi id 15.20.4628.020; Sun, 24 Oct 2021 13:43:21 +0000 From: Ori Kam To: Francis Kelly , Thomas Monjalon CC: JAMES HUNTER , Ady Agbarih , "dev@dpdk.org" , Ady Agbarih Thread-Topic: [PATCH 09/10] regex/mlx5: prevent QP double setup Thread-Index: AQHXx1xAWgVbIlGwpkKC0f44hR8VzKviK2gA Date: Sun, 24 Oct 2021 13:43:21 +0000 Message-ID: References: <20211022154600.2180938-1-fkelly@nvidia.com> <20211022154600.2180938-9-fkelly@nvidia.com> In-Reply-To: <20211022154600.2180938-9-fkelly@nvidia.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: nvidia.com; dkim=none (message not signed) header.d=none;nvidia.com; dmarc=none action=none header.from=nvidia.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 8423a2d7-556f-48bd-2f9b-08d996f43ec8 x-ms-traffictypediagnostic: DM4PR12MB5215: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:1201; x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: 42TpRFtGUBomBzLJ8O70xSJjOXQXl0Haxd6+dXL0RreuTc26Wqzl62TasVTMM/V6pV0rFRw1PleBkZrknVQE8lWwp5ZQwU606QpKvFrcoqpJR5s39LfCY4fVuDbTzAHq3QC8ptp9JssstnwqtoK6eKxISAs2VOcvZtsqoXYGoy7NCf44Qp3f+7O29D55Y1SOHEVmdQZTTI0dgNhT7W+NudblA/yARVUgRLiREyWrRptw/UxLzePI5gFL7Xc/09NjMUk21TXmGMe9C/69wHDtd0iGhgdpVOWcaCsAQEgxZqczOMa+LhtCc/fekkYFWpEnJQJXhy2Kr8+/DQohy83Ucx7Sj+cg3RBhhQ2FiQT0JUMObRogI+MI50utOKpaWWhr0o7XmX4rMxAtPuCGhk1xN1pYPE2ou31Z0V9ZTRLRXOHL6pnnpZZakZehnNwRKpDh6m4g359DWVMlLqHVBYRA3RjmLEx4VU7+oMsbu57DacoxWAkQ80Lg4eDzCiyZvXhcEqPVLMd2K7f5zEEe6scU+rz85elIPrdT6Kcd+5+Jla1mrKIEuwTS9t0zDxOJnrcO1V8CJ6di9ssWJFHNBy54sI/4xrm7im6aWlvpC/jWf3LpqyM2nq7YkwuqtL8w9yRsoWYTPtSXvdAfegY8CyrVijrx0sUK9O9ZuZ4iIo3zvj0zaIRGiDv9anP1BLh+b/JuozhdqaJrlMX+fEJFBffO/A== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DM8PR12MB5400.namprd12.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(366004)(6636002)(66446008)(66476007)(66946007)(64756008)(316002)(2906002)(508600001)(71200400001)(38100700002)(8676002)(83380400001)(186003)(76116006)(66556008)(122000001)(4326008)(110136005)(54906003)(52536014)(9686003)(55016002)(5660300002)(6506007)(7696005)(53546011)(8936002)(38070700005)(33656002)(86362001); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?Hgb1krrJKM6EG9c1gn5eiPnHIGD+KxsywJrTioZqmTHPWGeD17C8j+xEu8j8?= =?us-ascii?Q?sLAPc1k7/hmSuA/7DSHW7XpcigJIghRQBhOPHZHGSza6K1qEzi+0BQb40ChN?= =?us-ascii?Q?HUUkGBp62ErG/ZIWyteV+chHvQBDyH3X56QOdIANKXUYu0LbmZmyGYvWOpBJ?= =?us-ascii?Q?747nHOeiWMJAbDuKSKWLA9BGpsrWokQIAjLl55tLKknSd0LupKveFVyruA+e?= =?us-ascii?Q?2U8XQPG8CTVLbbURZicXTZH6DQuph8c+pom1k/GZ4V2TaU7xRQG5ZrvcicJg?= =?us-ascii?Q?Sa+lOwpT1Q5v2C2P09wl3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ascii?Q?i0iXghCx0k53+MB7gm6CKf8KZOFI333Ulm1y9HL3m6HNMFplpkDw8+gwd+5k?= =?us-ascii?Q?e/fQYXqi4ZMIXy31qEClDh4RiCy3X706IiqxupZY8QRYrmmcFoM3cTf9UEs2?= =?us-ascii?Q?bwORWwBHp2eMeD5HkyFz+VzRzz5UrAa+ySgN1OnkuOnrcGq700neH6pMDRny?= =?us-ascii?Q?WazmCBJvksjzPQh57P+zIOWYRfQLRlBB8fC9MPcuHHLgl2UpRkqny2dJCdyq?= =?us-ascii?Q?nHK+X7GyYMTbp/xFAMc19CXwjQwMgY+ipozlyBYWH3iCGa+jRhyQ0xnhfE5t?= =?us-ascii?Q?1f+sCFwjJeEoxV7c3x7IMT08pSAaVnHP1vVRx0gwAlxinwNMQJIss0zLLIiL?= =?us-ascii?Q?YR7z30Z868AHnVjqrLDtU1ov400UqerPD4Grryhl70E7Fm9gd7L/OLO9lcao?= =?us-ascii?Q?3DI9xrBjP0q7JaaIfnbI9t4xQhFPCOj5HYl3GBskRc90u9w3rb44frpALQJG?= =?us-ascii?Q?yZPp0QFaE0MGIpO8879boKPVlRs=3D?= 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: DM8PR12MB5400.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 8423a2d7-556f-48bd-2f9b-08d996f43ec8 X-MS-Exchange-CrossTenant-originalarrivaltime: 24 Oct 2021 13:43:21.7297 (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: UNmtIgKNZUb1Y468DH2V/Amzlye3DoEdVu74r6xhjhGNOdVBXqUzBXUB5iYOyfFCYxBJfQ2wCcBU0aaP3XLDcw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM4PR12MB5215 Subject: Re: [dpdk-dev] [PATCH 09/10] regex/mlx5: prevent QP double setup 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: Francis Kelly > Sent: Friday, October 22, 2021 6:46 PM > Subject: [PATCH 09/10] regex/mlx5: prevent QP double setup >=20 > From: Ady Agbarih >=20 > When mlx5_regex_qp_setup() is called make sure > the provided QP is not already setup. >=20 > Signed-off-by: Ady Agbarih > --- > drivers/regex/mlx5/mlx5_regex_control.c | 6 ++++++ > 1 file changed, 6 insertions(+) >=20 > diff --git a/drivers/regex/mlx5/mlx5_regex_control.c b/drivers/regex/mlx5= /mlx5_regex_control.c > index 52f66ecce8..17573c2e74 100644 > --- a/drivers/regex/mlx5/mlx5_regex_control.c > +++ b/drivers/regex/mlx5/mlx5_regex_control.c > @@ -207,6 +207,12 @@ mlx5_regex_qp_setup(struct rte_regexdev *dev, uint16= _t qp_ind, > uint16_t log_desc; >=20 > qp =3D &priv->qps[qp_ind]; > + if (qp->jobs) { > + DRV_LOG(ERR, "Attempting to setup QP a second time."); > + rte_errno =3D EINVAL; > + return -rte_errno; > + } > + > qp->flags =3D cfg->qp_conf_flags; > log_desc =3D rte_log2_u32(cfg->nb_desc); > /* > -- > 2.25.1 Acked-by: Ori Kam Best, Ori