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 76B92A034C; Wed, 23 Feb 2022 03:09:46 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 0605840DF6; Wed, 23 Feb 2022 03:09:46 +0100 (CET) Received: from NAM02-DM3-obe.outbound.protection.outlook.com (mail-dm3nam07on2047.outbound.protection.outlook.com [40.107.95.47]) by mails.dpdk.org (Postfix) with ESMTP id 442E84067B; Wed, 23 Feb 2022 03:09:45 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=SFFaElYUT1gdyfaaaPo7rRw8jVJShd5nLB/G2h8BZ3srzjHR6u0rx+3BqUpyUftB5Oi5sZI4Ew7VaunEMH0TCBssIUUfh0vg/pnwxQnH6DgFfHx4JSJsiSMMTIWWvgnMrK9EiZBZhdgLGZUEyuzK/jErAQZGbU/3dnld2ALgFG8g8DsUnIHs9p7sJ7KRMFiifYHnWFKdfupL5FaJYdv89fe8NZ6xgVecO/+N07yDrFshGrtCsV5zP7MnPLnoa43icpr4n1eIXPUe1PvatJFBpxhAwzLBjn9it80Rt1M50IVxbWDTaMYdgAFTqJN9Fg5GNnjA5exQVSVGtb/n/D5CAQ== 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=Y8oANhW9GLkfU/DR5Hebq8xVC8E1eRfFNtcrmk2dTOI=; b=fPP8gC1EirQfbFVhxXj1YjF5Ukj/umKDZQFET+xRLP3ZksSmJj/dGt1hf42sUxRBvrx18snuD615Evh7uDNq4cIZuMn/N1Qyr9BI2CikBLe3iO457Q9IXmHcwA2ElsJwfmrLymQGMW3go9DyzqceUoF+MSoFcDZXom72iyWrlqzSLc0P2I00isgTNko9tdVZLB2BSxxxwASMC7Zl0IEDzl40FOj6yUH8UTaC3zpP0vPAOUrWcXGT2lu31s2f3TeXn3uxY1sLbw1qP+Ek11/1sDSTa0hu8TmSFU4m6f66q9I6pOhXfyB8sCaLpGkhY/edLZCTySgZmz+rxBHkQzXhUA== 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=Y8oANhW9GLkfU/DR5Hebq8xVC8E1eRfFNtcrmk2dTOI=; b=GtZw9Qk9Fjx0zylpn6jlpt7mJPBWlLIiKqvNftF4PXD6CS0hwl9n99OnrYFiCq+1o9BeCkMD4ZmljMGh9usWwDuIzDwS9YxM5OUDw+K+BtQzdnncz3IRxQmSNqwpvnl8ZI1sHY/nIiVuzj79cVi4Dk5k3Yku5jWjzxIHnNRz2qm5z/PWUK9fdHlayBe32NexY0saV6hcHUw/qdz2a6/RT00jRF6rQVjXrr0yX+kBqK0s8jCfN3YLiTo5W74XOgTwIP4bwI3QlLWZ/QeN7fv6LfAj76nAoTBcKn3llj4L8Jm2lLlknreiEKD0PamjnBFr22mFY1tuSXNLzGVXTLIl1Q== Received: from BN0PR08CA0019.namprd08.prod.outlook.com (2603:10b6:408:142::12) by MW2PR12MB4666.namprd12.prod.outlook.com (2603:10b6:302:13::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4995.24; Wed, 23 Feb 2022 02:09:42 +0000 Received: from BN8NAM11FT049.eop-nam11.prod.protection.outlook.com (2603:10b6:408:142:cafe::bf) by BN0PR08CA0019.outlook.office365.com (2603:10b6:408:142::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5017.22 via Frontend Transport; Wed, 23 Feb 2022 02:09:42 +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 BN8NAM11FT049.mail.protection.outlook.com (10.13.177.157) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.5017.22 via Frontend Transport; Wed, 23 Feb 2022 02:09:41 +0000 Received: from rnnvmail201.nvidia.com (10.129.68.8) by DRHQMAIL105.nvidia.com (10.27.9.14) with Microsoft SMTP Server (TLS) id 15.0.1497.18; Wed, 23 Feb 2022 02:09:40 +0000 Received: from nvidia.com (10.126.230.35) by rnnvmail201.nvidia.com (10.129.68.8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.9; Tue, 22 Feb 2022 18:09:37 -0800 From: Rongwei Liu To: , , , , Suanming Mou CC: , , Subject: [PATCH] net/mlx5: fix shared RSS destroy failure Date: Wed, 23 Feb 2022 04:09:25 +0200 Message-ID: <20220223020925.188786-1-rongweil@nvidia.com> X-Mailer: git-send-email 2.27.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.126.230.35] X-ClientProxiedBy: rnnvmail201.nvidia.com (10.129.68.8) To rnnvmail201.nvidia.com (10.129.68.8) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 8918ff65-33bf-4376-2739-08d9f6718da9 X-MS-TrafficTypeDiagnostic: MW2PR12MB4666:EE_ X-LD-Processed: 43083d15-7273-40c1-b7db-39efd9ccc17a,ExtAddr 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: +po8IwjIidrjNwVFWpD1ZgP9bdZIUN8f1iFLJaQyYmtTb/a70N3FgRA/XH1KVKToxR39fVELvCO/DE+s56ihbaHIuD+TW+oJSkFNbOqdb9X8mLRanHjt7ci4C4jQaR81TBGytMzNJolYt9UCt3VxBO4Ogiw41VuDggy8d5i4y56toFD7KD/+3/78oKFoS8JfgtRUUuoKlgyDl8JkRuuH9KnLCA8aJsC0lvI3QkZDk3ZZBDjld33y3tTco45LZBsBtT7ZXKYnRMCVHQt+qqxNOTugdZvlFhs8ud2sGk2cttd66fQBFCxJOqoHrKD/5n7ApcdaNN1Ar74UKl2eem7abAh+EEyhSQmhvxVqLL3G1YvRVkfo2BkPHeTKmJlyZSvGuzH8H4v2nw+Xga41qPhg5xgOEw59vJyz7ap5msgVEXjOGLQ7DbQoy9VjrtG4OBso5kGPk09dit66IITOPZz0Cyh1T6CDYFp3FcHo0/izp/ql+kbRljQvGneY6bquEuHANDwhl3Y0ljx9yN9FG1et9amS/ggIcpfRqJe1qAhGiXVo+HlX9AacJ1ZjW8wEdaHJYDmv2gglIqNpc4dTMpDCILnuTRYNJzdbLUrCtLXvjTc5+vHX6uTIuhK9BOf69vZHWBl3CaHutW//3bF9yMybQcGJ5hO7klZHquK13QR3pc1NMhdsBGdrL9lTfAG08vH0G+11G8xaR0HwAGK6l5QuHg== 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)(40470700004)(46966006)(36840700001)(70586007)(110136005)(8676002)(4326008)(8936002)(6666004)(7696005)(82310400004)(54906003)(70206006)(55016003)(316002)(86362001)(508600001)(6636002)(2616005)(36860700001)(336012)(40460700003)(426003)(16526019)(81166007)(1076003)(186003)(26005)(6286002)(356005)(36756003)(5660300002)(2906002)(47076005)(36900700001); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Feb 2022 02:09:41.4296 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 8918ff65-33bf-4376-2739-08d9f6718da9 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: BN8NAM11FT049.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: MW2PR12MB4666 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 When both shared and non-shared RSS actions were present in single flow rule shared RSS index was unset by mistake. For example: 1. flow indirect_action 0 create action_id 3 ingress action RSS ... 2. set sample_actions 0 mark id 43690 / queue index 0 / end 3. flow create 0 ingress group 107 pattern eth / sample ratio 2 index 0 / indirect 3 / end PMD translates the indirect action to a shared RSS description at first. In the split prefix flow, RSS->shared_rss is unset when translating sample queue action, the subfix flow will treat the RSS as non-shared. Fixes: 8e61555657b2 ("net/mlx5: fix shared RSS and mark actions combination") Cc: stable@dpdk.org Signed-off-by: Rongwei Liu Acked-by: Viacheslav Ovsiienko --- drivers/net/mlx5/mlx5_flow_dv.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c index ef9c66eddf..5349e5f439 100644 --- a/drivers/net/mlx5/mlx5_flow_dv.c +++ b/drivers/net/mlx5/mlx5_flow_dv.c @@ -11063,6 +11063,7 @@ flow_dv_hrxq_prepare(struct rte_eth_dev *dev, { struct mlx5_priv *priv = dev->data->dev_private; struct mlx5_flow_handle *dh = dev_flow->handle; + uint32_t shared_rss = rss_desc->shared_rss; struct mlx5_hrxq *hrxq; MLX5_ASSERT(rss_desc->queue_num); @@ -11073,6 +11074,7 @@ flow_dv_hrxq_prepare(struct rte_eth_dev *dev, if (rss_desc->hash_fields == 0) rss_desc->queue_num = 1; *hrxq_idx = mlx5_hrxq_get(dev, rss_desc); + rss_desc->shared_rss = shared_rss; if (!*hrxq_idx) return NULL; hrxq = mlx5_ipool_get(priv->sh->ipool[MLX5_IPOOL_HRXQ], -- 2.27.0