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 9FBE8457A1 for ; Mon, 12 Aug 2024 14:56:31 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 9A516402C3; Mon, 12 Aug 2024 14:56:31 +0200 (CEST) Received: from NAM11-DM6-obe.outbound.protection.outlook.com (mail-dm6nam11on2073.outbound.protection.outlook.com [40.107.223.73]) by mails.dpdk.org (Postfix) with ESMTP id 012604029C for ; Mon, 12 Aug 2024 14:56:29 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=dyjMP6yZvRFp5BknD98xKiJv/ioDEI77yfxQwo9DBlR3FB+41fSM/lcJHwO2E7o3tPqCiW4XdrdiY418GcRS74tjgmgb7mAijDjzTGK89c44qzzCD38VIdECKrUmHo6OlT4gue14hZlqkj/qyCHo4VqcuXrMhOBD2y2hyJ3DEt1P5ArVBLqhTd1+QYysNpd3bwd6aEzi6rsvrfDjl7cVUuIZONIEf04DzSv1u6d57WtRlHM6ixydn+tPrqw/0GDct0WRcV1iSdhhxNm4BNKHfIAE75Mq9561lCx8wAAzYvFMBKb3iJlCobtp8vD+fZ8sCf1AccOxAtx0byNjSUgj+w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=O4qe14kNLaDTh3c8DBjKpjEy2kqPWOYtxeBJ4I6c570=; b=bOwwdvb+ifZ0oFFtOWMLJStfvZfBLWSrWu6nNZmW7bsa7Cj0FyQbUGsLDRer7Sty53LJv18wQ8NAbwP8nnBGMDFhXqKX0ep7wAAN6e6AkLFcENYJfGvd7fCafnocwW9l9cC5gM4IPaAoSQhVHP4q5hK0GEFMEuZgRSMXeAiwsHD+KM6NQPBoEAhZvQE7wGZ+u92/WGwsH0q1EmZecMtxoPdXvUoUqh8GzpJWQN5tyWXPGr9UgpWvyX5L5mpSmVbl2eYScXosPFSiR4Imc9Lq1eZTE8VyL7kDRCSu/zAf1WGFWYDbcvWAbZ306rxCw628qM1hZ1nmu7OxEFMpDrSdxA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.160) smtp.rcpttodomain=intel.com 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 (0) 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=O4qe14kNLaDTh3c8DBjKpjEy2kqPWOYtxeBJ4I6c570=; b=cgavB1HnDpw3h8SSNxtEOLX/wSOFCz0NAxqyTr36Lrk3PcJ8GOjMDprgLiLNoa7yoN3+3+3KuXgSWj9goWg1+TPsuHtjvn6NRE9cKMpcJyzV2e/vRRY9JsToBKTi/0Ufdo8Iz+yXqm/uCPVHoNq5b3tBIfD+gUZ5Ol3FdNC1ADxMgd8mUjD3/TGuzboH+nKQptxcIyAIPPUOaSnLWXZFkoLuZOXgSZPcZif+4Lg0utEmrYUgwJWF/mvpxUCrL4wSJui7kmu6ZPg0wtlq/mtoAOyIDdMhdVngrksugGxickgZymCA+Cd1rsjBPiluBcJ6KUiAu8rdnA+2GsBTuqfxWA== Received: from DM6PR14CA0061.namprd14.prod.outlook.com (2603:10b6:5:18f::38) by DS7PR12MB6167.namprd12.prod.outlook.com (2603:10b6:8:98::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7849.20; Mon, 12 Aug 2024 12:56:27 +0000 Received: from DS1PEPF0001708F.namprd03.prod.outlook.com (2603:10b6:5:18f:cafe::54) by DM6PR14CA0061.outlook.office365.com (2603:10b6:5:18f::38) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7828.33 via Frontend Transport; Mon, 12 Aug 2024 12:56:26 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.117.160) 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 216.228.117.160 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.117.160; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.117.160) by DS1PEPF0001708F.mail.protection.outlook.com (10.167.17.139) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7828.19 via Frontend Transport; Mon, 12 Aug 2024 12:56:26 +0000 Received: from rnnvmail201.nvidia.com (10.129.68.8) by mail.nvidia.com (10.129.200.66) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.4; Mon, 12 Aug 2024 05:56:16 -0700 Received: from nvidia.com (10.126.231.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.1544.4; Mon, 12 Aug 2024 05:56:14 -0700 From: Xueming Li To: Mateusz Pacuszka CC: , Ian Stokes , Bruce Richardson , dpdk stable Subject: patch 'net/ice/base: fix check for existing switch rule' has been queued to stable release 23.11.2 Date: Mon, 12 Aug 2024 20:48:55 +0800 Message-ID: <20240812125035.389667-59-xuemingl@nvidia.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240812125035.389667-1-xuemingl@nvidia.com> References: <20240712110153.309690-23-xuemingl@nvidia.com> <20240812125035.389667-1-xuemingl@nvidia.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.126.231.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-TrafficTypeDiagnostic: DS1PEPF0001708F:EE_|DS7PR12MB6167:EE_ X-MS-Office365-Filtering-Correlation-Id: d9a789a7-3422-4af9-681a-08dcbace2d87 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|36860700013|376014|82310400026|1800799024; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?xWMCFLKfj7yYyb31pQuzaDC8UtQkGsvAPBy2HL7ANsKFVi8c1F7+sNdW9//c?= =?us-ascii?Q?n3mbCxBW/B9dtk3B7RH8AJjHknzdDS79+kHx60ItGNgrs8yiTRRg04d+shqO?= =?us-ascii?Q?R4XWEuL0PjZM/mf8tnGj3503SGahV6PS0AAa2BrCnTK6PeQTN5y6CbYfYfYE?= =?us-ascii?Q?XRQxL1y6+SXCT6QsSvzXNM9eCNstXmpQH0lc1tbLKHdQRWnCGG/xM2zcauRX?= =?us-ascii?Q?FAUYiIj16+5PHRgAM0GsWUJNsCbr9QslSidC9FAmTL0JqEVt02CAzembj1+c?= =?us-ascii?Q?1F9qbbhb73zsT5wcF3/sDQIcGrFXqlma1vIdtD8hX+14MLf+cqwmNFQ+RkWs?= =?us-ascii?Q?ibwozMCQvkQcxUm2VMxzmRi0bhyVX7WiaPYM0qxw1QJdElEflEGLCNdneGaU?= =?us-ascii?Q?aJZ3Tx9PHxU5965Ph4U8EOm4jonBGM+g6J8ANC0Jih7BKLEEOZSEXAx+rOUS?= =?us-ascii?Q?bZIwjqAtbKHjGtKtNZ6QFfLzdJ7Yjv7CWBXhBa/uHc4QvgdmaulKi3pv5kuA?= =?us-ascii?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P/4A=3D=3D?= X-Forefront-Antispam-Report: CIP:216.228.117.160; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:dc6edge1.nvidia.com; CAT:NONE; SFS:(13230040)(36860700013)(376014)(82310400026)(1800799024); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Aug 2024 12:56:26.8395 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: d9a789a7-3422-4af9-681a-08dcbace2d87 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[216.228.117.160]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: DS1PEPF0001708F.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS7PR12MB6167 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Hi, FYI, your patch has been queued to stable release 23.11.2 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 08/14/24. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://git.dpdk.org/dpdk-stable/log/?h=23.11-staging This queued commit can be viewed at: https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=abd055ea635cdc1df9386a75ddda6157c785d541 Thanks. Xueming Li --- >From abd055ea635cdc1df9386a75ddda6157c785d541 Mon Sep 17 00:00:00 2001 From: Mateusz Pacuszka Date: Wed, 26 Jun 2024 12:41:20 +0100 Subject: [PATCH] net/ice/base: fix check for existing switch rule Cc: Xueming Li [ upstream commit 771db7d9466488135a2899f8809d6e61bc685ed5 ] In case the rule already exists and another VSI wants to subscribe to it, a new VSI list is being created and both VSIs are moved to it. Currently, the check for already existing VSI with the same rule is done based on fdw_id.hw_vsi_id, which applies only to LOOKUP_RX flag. Change it to vsi_handle. This is software VSI ID, but it can be applied here, because vsi_map itself is also based on it. Additionally change return status in case the VSI already exists in the VSI map to "Already exists". Such case should be handled by the caller. Fixes: c7dd15931183 ("net/ice/base: add virtual switch code") Signed-off-by: Mateusz Pacuszka Signed-off-by: Ian Stokes Acked-by: Bruce Richardson --- drivers/net/ice/base/ice_switch.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/ice/base/ice_switch.c b/drivers/net/ice/base/ice_switch.c index 07ebc624f5..c4fd07199e 100644 --- a/drivers/net/ice/base/ice_switch.c +++ b/drivers/net/ice/base/ice_switch.c @@ -4603,7 +4603,7 @@ ice_add_update_vsi_list(struct ice_hw *hw, u16 vsi_handle_arr[2]; /* A rule already exists with the new VSI being added */ - if (cur_fltr->fwd_id.hw_vsi_id == new_fltr->fwd_id.hw_vsi_id) + if (cur_fltr->vsi_handle == new_fltr->vsi_handle) return ICE_ERR_ALREADY_EXISTS; vsi_handle_arr[0] = cur_fltr->vsi_handle; @@ -4651,7 +4651,7 @@ ice_add_update_vsi_list(struct ice_hw *hw, /* A rule already exists with the new VSI being added */ if (ice_is_bit_set(m_entry->vsi_list_info->vsi_map, vsi_handle)) - return ICE_SUCCESS; + return ICE_ERR_ALREADY_EXISTS; /* Update the previously created VSI list set with * the new VSI ID passed in -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2024-08-12 20:44:04.505987641 +0800 +++ 0058-net-ice-base-fix-check-for-existing-switch-rule.patch 2024-08-12 20:44:02.115069298 +0800 @@ -1 +1 @@ -From 771db7d9466488135a2899f8809d6e61bc685ed5 Mon Sep 17 00:00:00 2001 +From abd055ea635cdc1df9386a75ddda6157c785d541 Mon Sep 17 00:00:00 2001 @@ -4,0 +5,3 @@ +Cc: Xueming Li + +[ upstream commit 771db7d9466488135a2899f8809d6e61bc685ed5 ] @@ -17 +19,0 @@ -Cc: stable@dpdk.org @@ -27 +29 @@ -index fa5bd94c58..f8d98d8a9e 100644 +index 07ebc624f5..c4fd07199e 100644 @@ -30 +32 @@ -@@ -4624,7 +4624,7 @@ ice_add_update_vsi_list(struct ice_hw *hw, +@@ -4603,7 +4603,7 @@ ice_add_update_vsi_list(struct ice_hw *hw, @@ -39 +41 @@ -@@ -4672,7 +4672,7 @@ ice_add_update_vsi_list(struct ice_hw *hw, +@@ -4651,7 +4651,7 @@ ice_add_update_vsi_list(struct ice_hw *hw, @@ -43 +45 @@ -- return 0; +- return ICE_SUCCESS;