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 4387DA0C43; Fri, 22 Oct 2021 17:48:41 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8EC044122D; Fri, 22 Oct 2021 17:48:18 +0200 (CEST) Received: from NAM10-DM6-obe.outbound.protection.outlook.com (mail-dm6nam10on2078.outbound.protection.outlook.com [40.107.93.78]) by mails.dpdk.org (Postfix) with ESMTP id F197D41217 for ; Fri, 22 Oct 2021 17:48:12 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=MC1igW61vWqlwDmaDvOV66ZETxK2KkZj8fnbAWdD5Hs3qfVuM4H9rWgcS8cOb46iH4Ecuqre9zrAh+lwF2u2aO9Vlsk/Nu9JkaCA2Zqt9Z0/ye+YuPlgC5q8l9pWNWapeV6Uy7IUCgZCVVqdLcRxZi2iAI56YClN0NaU65fp24CmcEc+YPFKgZqsb60oK2Yvxcz5O+6kEfWgbcyWfi21opZQ53Rbefz6Gk/WVp4kOlawbW0u3nPwk0JwzMEMkndSoJPs8jYYTZACVIJJJmkUPQFfeyXwEaajF+G0lIAFxEUXj5VU+DZ6LccI9x2mqCukVR5rqOQdJi5wNU2CroEDsg== 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=q3Vta6pbRhC90S/hn/ctYqPivqK+79c2SZKcpibwEOA=; b=U5HFcSqxU6PssDtdEJj2nAl4TudvYpjOSOe5jNcjDmNTXmRsn0KbeuJDlo9IgJI16B6K8Fy62sElOtEPkyyFiQSBmVWKe4blh2TN9Dm7mTUa9mwUaYJyxn1qEzFLQkpK6D0dk+qUejgez8QKEeMUKX2qo++MSO6E0LkLcgz9PMx/YWv7zyMcJjI3jtGtwDBtbpXjlXZra68Eh0BcyzVr0LPLucNZCDWNHcjH372ReSwZt5x/CeGjEYnYNfFrx+VKdJ8J0Fu/lolp7d/krQ3e0clE0g4KD8Ygf9XQnFEsnmiPgPdfywPeHTXU/OI7sCWF0X1CpGEuVShhfgvN9C2kug== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.112.34) smtp.rcpttodomain=gmail.com smtp.mailfrom=nvidia.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); 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=q3Vta6pbRhC90S/hn/ctYqPivqK+79c2SZKcpibwEOA=; b=HKHFbv9+G0ze8ZNWCgYArhK2RhShFkImoBKCIIUJ9HRE/gFQJ/3X1n50jCQ4rz/vCWzQ9ZM130f7StD3ERLr4DzwI0U2Aas47tvPgtvIjJa2OyHaTgkVZWEeEUBQtbYOwScmWS0YHgbIMhzPESuuPrOdQHAkfPXl2pKhHPssMOHiWM4GKP1GG58+AbnOisz5oOY5eaJexWTBlJ6xyiX4kW1YLyLSJHrXidcourG9I6YYx8zLaNTzDwzRIEEM9kkFLJYbyzhtZlGX/cJskeU1o55xjRzSUljOkV+NQ439laXN1EFM8KSnC65czFiH2VINB63Y7zHBXV5HfysTjx2+GQ== Received: from DM5PR20CA0006.namprd20.prod.outlook.com (2603:10b6:3:93::16) by BN8PR12MB3105.namprd12.prod.outlook.com (2603:10b6:408:67::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4608.18; Fri, 22 Oct 2021 15:48:11 +0000 Received: from DM6NAM11FT022.eop-nam11.prod.protection.outlook.com (2603:10b6:3:93:cafe::f4) by DM5PR20CA0006.outlook.office365.com (2603:10b6:3:93::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4628.16 via Frontend Transport; Fri, 22 Oct 2021 15:48:11 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.112.34) smtp.mailfrom=nvidia.com; gmail.com; dkim=none (message not signed) header.d=none;gmail.com; dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.112.34 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.112.34; helo=mail.nvidia.com; Received: from mail.nvidia.com (216.228.112.34) by DM6NAM11FT022.mail.protection.outlook.com (10.13.172.210) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.4628.16 via Frontend Transport; Fri, 22 Oct 2021 15:48:11 +0000 Received: from nvidia.com (172.20.187.6) by HQMAIL107.nvidia.com (172.20.187.13) with Microsoft SMTP Server (TLS) id 15.0.1497.18; Fri, 22 Oct 2021 15:48:08 +0000 From: Francis Kelly To: , Ori Kam CC: , , , Ady Agbarih Date: Fri, 22 Oct 2021 15:45:59 +0000 Message-ID: <20211022154600.2180938-9-fkelly@nvidia.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211022154600.2180938-1-fkelly@nvidia.com> References: <20211022154600.2180938-1-fkelly@nvidia.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [172.20.187.6] X-ClientProxiedBy: HQMAIL107.nvidia.com (172.20.187.13) To HQMAIL107.nvidia.com (172.20.187.13) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 8bef1106-f23e-4792-2cee-08d995735a1d X-MS-TrafficTypeDiagnostic: BN8PR12MB3105: 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: G2uc9NJcO+Jn0yGLqKFpU00CxCDUXzEmNI9VQ9rLnmNHJ1E2B2iSSNO3eiBfbNE7g3cIC6T91drBKeO/HovAipEk3FOhWy9qeLAvqnvTwjd1jfCncFbnDwY4bNfFYhgBPaRjhfAGBCPuyTtMpn7WH1lFG6JO+/Gg9O2CBua1xkqrydph9Tu6LiMXImfQoowGRfqsUQz+cTFb2C8Yax4qCgOZfcCdh7lvrvT5LfhMr7pk8wMvC29dFO04iEaOaFbeMfPFEFLkCCJabJpw44iJbuTDf8i/kQZGYHungwelswVc8OiQyjnfa9ktcBaCXSeDZ4Fyev2LWKtQzJFOgHaeCQ36CTiaHkL2AsYueCw7OjgzqQeR4ew+QK80X/n0HzKJFGVlr/e13WwF8h2TwjMVSXy2HVBi3E1J3buYFaQtMSQBlKSL8Z0t1jR9hLBN0h1HJ9rmix4sif5bE9xelwfgEboL/4m1xYzf/YHhtukOG/mq/sTUr5jKdd8z2aodhuVJpL0BF+jft3SsfDQlZO9r+YdDavUEQLjVp+jDfe2qMJDMWrIrxV2ffrH8sZcdf6+zdDz3xUHBHRZcq9Gq53lkMHVuT7ZYUOictVTDFqI2uPfTT/5lGMFuCRQ2MNaMWbiYW0jFeTyLNP5/YDrMCIAUYtRy3WIaN0DhDSsdAAyiNrZ6of2rwUDVabCdUkVngsHf11gi7kz/zRiyI6m0u2zKQg== X-Forefront-Antispam-Report: CIP:216.228.112.34; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:schybrid03.nvidia.com; CAT:NONE; SFS:(4636009)(36840700001)(46966006)(86362001)(4744005)(55016002)(4326008)(16526019)(8676002)(70206006)(6636002)(186003)(70586007)(8936002)(47076005)(336012)(82310400003)(5660300002)(26005)(6286002)(36756003)(54906003)(508600001)(6666004)(7696005)(110136005)(7636003)(426003)(316002)(356005)(36906005)(2906002)(36860700001)(2616005)(1076003); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Oct 2021 15:48:11.4095 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 8bef1106-f23e-4792-2cee-08d995735a1d X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[216.228.112.34]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: DM6NAM11FT022.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN8PR12MB3105 Subject: [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" From: Ady Agbarih When mlx5_regex_qp_setup() is called make sure the provided QP is not already setup. Signed-off-by: Ady Agbarih --- drivers/regex/mlx5/mlx5_regex_control.c | 6 ++++++ 1 file changed, 6 insertions(+) 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; qp = &priv->qps[qp_ind]; + if (qp->jobs) { + DRV_LOG(ERR, "Attempting to setup QP a second time."); + rte_errno = EINVAL; + return -rte_errno; + } + qp->flags = cfg->qp_conf_flags; log_desc = rte_log2_u32(cfg->nb_desc); /* -- 2.25.1