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 F3E74A00BE; Sun, 10 Apr 2022 11:25:45 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 31498410E5; Sun, 10 Apr 2022 11:25:42 +0200 (CEST) Received: from NAM10-MW2-obe.outbound.protection.outlook.com (mail-mw2nam10on2048.outbound.protection.outlook.com [40.107.94.48]) by mails.dpdk.org (Postfix) with ESMTP id 9CE6E406B4; Sun, 10 Apr 2022 11:25:40 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=RtfnToLcEa5tzBv/OLStnlpKNGzEgd4ircUd57UcSA19n68eit9O3MEp8xqWXHmiW/USQXL4UHv3AvmNFPOuZbB3ZnCaJ1mTIp4+cx02aORHC9jJyRhjLqXjQMO94wOWKO+VNnSPqsYQm5nqjdRWODo1ZNbCzQ+jD/zZ0IX9uMzTa7bcEktSv10PJDe7w95HyOKGhZ++qjRdVppyRwLtyNxcilB7PDmYl6l6zVM68vbXDisZinbnRIhS/JPnPPhplfrH9w2k1cibOVwleSHp7grFKRGwLPQgAJ/azEpnxghIky6tSKjlekOkc1pX9v6fH7AeODDO3LT1vIYh46b+aQ== 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=+VH3ANZiTinWyzv76VHS4ZKHnUUEthxb/AEGQ0mdCoI=; b=cQ/K92hNSjUU1hU8zvgYGQPgO9pgNWB4QKGWwVBmgB5DAP6k1WwMl7EBWmikKh9BKKI1gwPpCSpyOlRGooKoPYJ8y/ETzcmJvEQGU4yyLFVtEN9EyC8pBeBC63F1R6qBAHd1no9vtcYSSgD7Y4sl0PlABfebNLnYvexG/Qh3tRgB9SO7Q/kviCTxpPgJzT40D/9v77k7738pW3Z7wag4WWGg446lsY0VHYyGp+QIVw1r63Ul6jFbUd0k1Xu7J4bvtRNhvqKRQ6wclsAZDAE9v2Xtk9mr+utX3/zsopoNBAF1xcOZlc3uqQxWq4pNASxp7vP0RLB9HgaxgW5AMAyH2g== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 12.22.5.238) smtp.rcpttodomain=dpdk.org smtp.mailfrom=nvidia.com; dmarc=pass (p=reject sp=reject 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=+VH3ANZiTinWyzv76VHS4ZKHnUUEthxb/AEGQ0mdCoI=; b=h0ZgiXcvLb22BpprOdVNIol5ztkZOFWQlOo4tzydXQbAAMKPsbGJKQJwFGJhGylb/2At/lTqfQNjXwUhD35MmFLjKzOg6FoUz0ucu7mVgzn6pZ9gL3/YhWoZ3TZE+KHf1nrEC07s/SCVMTz/cR6voq8VaiRLy4OE6+ndKLgL2QtfXfZJ6mL8Vibe9D4zPAsCulH/pRZJ7rJF1P15xqt37kjl6zr//Nzln0o+C7IjPsFHGMSwOUW6MbiBXskj3GEyZywHHCkEhujh7PCZoI9nBPXhiCDx4POO8sjdSAYSDO+E16+HJaT3pk9jY/Tg/+mb08FPNvYKMGeCG/HLPytrtQ== Received: from BN9PR03CA0293.namprd03.prod.outlook.com (2603:10b6:408:f5::28) by MN2PR12MB4392.namprd12.prod.outlook.com (2603:10b6:208:264::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5144.27; Sun, 10 Apr 2022 09:25:39 +0000 Received: from BN8NAM11FT020.eop-nam11.prod.protection.outlook.com (2603:10b6:408:f5:cafe::9) by BN9PR03CA0293.outlook.office365.com (2603:10b6:408:f5::28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5144.23 via Frontend Transport; Sun, 10 Apr 2022 09:25:38 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 12.22.5.238) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 12.22.5.238 as permitted sender) receiver=protection.outlook.com; client-ip=12.22.5.238; helo=mail.nvidia.com; Received: from mail.nvidia.com (12.22.5.238) by BN8NAM11FT020.mail.protection.outlook.com (10.13.176.223) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.5144.20 via Frontend Transport; Sun, 10 Apr 2022 09:25:38 +0000 Received: from rnnvmail202.nvidia.com (10.129.68.7) by DRHQMAIL105.nvidia.com (10.27.9.14) with Microsoft SMTP Server (TLS) id 15.0.1497.32; Sun, 10 Apr 2022 09:25:37 +0000 Received: from rnnvmail202.nvidia.com (10.129.68.7) by rnnvmail202.nvidia.com (10.129.68.7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.22; Sun, 10 Apr 2022 02:25:37 -0700 Received: from nvidia.com (10.127.8.13) by mail.nvidia.com (10.129.68.7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.22 via Frontend Transport; Sun, 10 Apr 2022 02:25:35 -0700 From: Michael Baum To: CC: Matan Azrad , Raslan Darawsheh , Viacheslav Ovsiienko , Subject: [PATCH 1/3] net/mlx5: fix setting flags to external RxQ Date: Sun, 10 Apr 2022 12:25:26 +0300 Message-ID: <20220410092528.1001685-2-michaelba@nvidia.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220410092528.1001685-1-michaelba@nvidia.com> References: <20220410092528.1001685-1-michaelba@nvidia.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: a8e8d04b-b1a3-4c19-213c-08da1ad41374 X-MS-TrafficTypeDiagnostic: MN2PR12MB4392: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: meXolAZmbiZwzNuwnt3mjBrcaTGColjYoFm34ehgKTSpW3LRHsMP6fdeuaPAYo5e6e9hYEfwwSFCcZvUz2qAJSWtwd5zm36s90YVptqTrjXqQQz6A2cAQzdXgTSiKiEAmve4OljxD3g7lng5UiwYqlgpjc4QVOVNkZL4mCUEcQt42/W17bJ0ijeCicrsF0Efxfva0awCyd6sdkcDpvtNKUkDZtWkKparoYS7Ziz1Ws6QQIh2CxnkFFa9bV8fg9kjo0esZNi8HLcnvBnKunQeExLc7T64hHrCTz3W3JoUgPZmZ6D0e3S2pe1aFv4Y7KOW4btk+vm8FU4DkwY28vwekiV0nBcGA+cZUvHZN6vCDLgJ8IUIOLUHQEpAbGsx/rOcITgC5nLYOjfhSPiH4+OW5b6HwIGzZSnIiiT+4NWElUDHLcTANJkMA6ZipX6hWFBAqppPAtBE0br8mx49R1uVQGmHtPxK3BaX4LKiwML/4eHDzW/eBTcwbL4Lprb+YXYiK1shT7A1ZFa9lfJ+5ddpTPAkJhz1+frUd+AvrgGhtZ0JwhOs0Hlfq4ELH0o0heFCfxC265iRHyqlkzpfvzEL2Q583162A3gLS7GUX4NVLmlsd86P0H0e9/wurjlimrBTOZe7GSCIl+68pnVVcewic875JzNBKmwcD//0NA53AGJeho+HqN3txVAGbt5XFIRlLddjmR93h6ACHqVPzNhWEw== X-Forefront-Antispam-Report: CIP:12.22.5.238; CTRY:US; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:mail.nvidia.com; PTR:InfoNoRecords; CAT:NONE; SFS:(13230001)(4636009)(36840700001)(40470700004)(46966006)(2616005)(5660300002)(4326008)(8676002)(2906002)(86362001)(82310400005)(6666004)(7696005)(356005)(6286002)(8936002)(36756003)(508600001)(83380400001)(26005)(81166007)(316002)(55016003)(47076005)(186003)(6916009)(1076003)(40460700003)(336012)(426003)(54906003)(70586007)(450100002)(36860700001)(70206006)(36900700001); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Apr 2022 09:25:38.6394 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: a8e8d04b-b1a3-4c19-213c-08da1ad41374 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[12.22.5.238]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: BN8NAM11FT020.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR12MB4392 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 The flow_drv_rxq_flags_set sets the Rx queue flags (Mark/Flag and Tunnel Ptypes) according to the device flow. It tries to get the RxQ control structure to update its ptype. however, external RxQs don't have control structure to update and it may cause a crash. This patch add check whether this Queue is external. Fixes: 311b17e669ab ("net/mlx5: support queue/RSS actions for external Rx queue") Cc: stable@dpdk.org Signed-off-by: Michael Baum Acked-by: Matan Azrad --- drivers/net/mlx5/mlx5_flow.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c index 78cb38d42b..e7542afa80 100644 --- a/drivers/net/mlx5/mlx5_flow.c +++ b/drivers/net/mlx5/mlx5_flow.c @@ -1379,8 +1379,11 @@ flow_drv_rxq_flags_set(struct rte_eth_dev *dev, return; for (i = 0; i != ind_tbl->queues_n; ++i) { int idx = ind_tbl->queues[i]; - struct mlx5_rxq_ctrl *rxq_ctrl = mlx5_rxq_ctrl_get(dev, idx); + struct mlx5_rxq_ctrl *rxq_ctrl; + if (mlx5_is_external_rxq(dev, idx)) + continue; + rxq_ctrl = mlx5_rxq_ctrl_get(dev, idx); MLX5_ASSERT(rxq_ctrl != NULL); if (rxq_ctrl == NULL) continue; @@ -1483,8 +1486,11 @@ flow_drv_rxq_flags_trim(struct rte_eth_dev *dev, MLX5_ASSERT(dev->data->dev_started); for (i = 0; i != ind_tbl->queues_n; ++i) { int idx = ind_tbl->queues[i]; - struct mlx5_rxq_ctrl *rxq_ctrl = mlx5_rxq_ctrl_get(dev, idx); + struct mlx5_rxq_ctrl *rxq_ctrl; + if (mlx5_is_external_rxq(dev, idx)) + continue; + rxq_ctrl = mlx5_rxq_ctrl_get(dev, idx); MLX5_ASSERT(rxq_ctrl != NULL); if (rxq_ctrl == NULL) continue; -- 2.25.1