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 6049B43E57 for ; Sat, 13 Apr 2024 14:54:49 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 5C9AE40294; Sat, 13 Apr 2024 14:54:49 +0200 (CEST) Received: from NAM10-MW2-obe.outbound.protection.outlook.com (mail-mw2nam10on2047.outbound.protection.outlook.com [40.107.94.47]) by mails.dpdk.org (Postfix) with ESMTP id A133C400D6 for ; Sat, 13 Apr 2024 14:54:47 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=dRSJKWFq7g+g4UFPhcE0B3JAgXbOkSFUrlwju5PH6AWNrEqZEM3RzC1lF9vwfAJru4rm27Ha2eBXpexEx78Ld25m01ULqtG926GMMu0dmlkNimGllgf7mD2cHYxmTHwj7WBxJBpeb3+obdUsrlJvcqSdrfJKo6C78gwCYwFudx8sgIVd0u5l265SMvc5ZuQ2T4ADWI+/7ptnATnpfiTwCh4LJ4g+mX0iZPVeY0BOBispou5G3IhfTnmL3c4nKMB7gvL1zNf1GsiNIrQXS+sRXlp2mJ7iXZAtnQVlrixefdrAHIo0oGjiKHvzxFE5zZDMBOTfZNftpd0YZX28kxaJUw== 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=ZJZm7QO9UzdeI8eiwuKJ0DVEEmGa3a+xUziwV9SuN6c=; b=Yr6dzSiWOvHhvBcyShUO9HkrldZe3JOK6lHJE/u82zO/UVJp/4e2evVd5N1L9QDI117IJ3OM5HxWGuCljY00fnQuEUkiebisRsOF4UM1tcAP0+an+Qh5tydr17CZm5UJTTFc6LK2laAcB0Xc72XNDYfuzP4iW0etHI09RH/v+CX6VlCv9Rz12RQwyF9XQ6q68S7M06ReQqCy93YKwGRlB1MfxuEp3CLeijvNOPSiz4rnBnTvOB2lbXucnV65Ym4AhPOwQXwwlWnFCqBvH8U82EEGzNy3pAZV3qKvT7Q79Ko+HJmZDV2c2gqgltOAnCTuJN8oQfVlWP5AOa1OnR1giA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.160) 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 (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=ZJZm7QO9UzdeI8eiwuKJ0DVEEmGa3a+xUziwV9SuN6c=; b=C3DOa+Y4uf0vS9erHHZrw7mf8Zf/xbvJee/o6qd5/DkfboV8XaraNIDrU+BP/sooJYUJhvmiiMQnqTXSR7kgNFa4b45ItBMhrsg+rRU6LbcGZV+v3UA8SxQzSiqTnR6qrJ/0ChthOOD8uve4XqGf15TKAyu6Sxyd48SjW7j9qq1txpYOKx6e+PRzpI+1LM8U2ozxtQvF3+drMLdWVnuLpwHHPNawaf9jYUF+ZUQZpSoy/nqQ90xjm43nbOMD5iupi1xObd+oYnDQ6+EX+HSCdFx6aTyC/0pe/icV2ffqRG8YpzTS/uL6ybbAGYOeWC4pL6YjOagBlXTEVYAVjTpS/w== Received: from BYAPR02CA0056.namprd02.prod.outlook.com (2603:10b6:a03:54::33) by SJ0PR12MB6854.namprd12.prod.outlook.com (2603:10b6:a03:47c::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7409.55; Sat, 13 Apr 2024 12:54:44 +0000 Received: from SJ1PEPF00001CE3.namprd05.prod.outlook.com (2603:10b6:a03:54:cafe::22) by BYAPR02CA0056.outlook.office365.com (2603:10b6:a03:54::33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7472.30 via Frontend Transport; Sat, 13 Apr 2024 12:54:44 +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 SJ1PEPF00001CE3.mail.protection.outlook.com (10.167.242.11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7452.22 via Frontend Transport; Sat, 13 Apr 2024 12:54:44 +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.986.41; Sat, 13 Apr 2024 05:54:28 -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.1258.12; Sat, 13 Apr 2024 05:54:26 -0700 From: Xueming Li To: Bing Zhao CC: Suanming Mou , dpdk stable Subject: patch 'net/mlx5: prevent querying aged flows on uninit port' has been queued to stable release 23.11.1 Date: Sat, 13 Apr 2024 20:48:50 +0800 Message-ID: <20240413125005.725659-50-xuemingl@nvidia.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240413125005.725659-1-xuemingl@nvidia.com> References: <20240305094757.439387-1-xuemingl@nvidia.com> <20240413125005.725659-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: SJ1PEPF00001CE3:EE_|SJ0PR12MB6854:EE_ X-MS-Office365-Filtering-Correlation-Id: 7c0d4f35-7126-4b69-666f-08dc5bb8e4a3 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: ecKugMvcTSnVuyYUFyJxC1NXkxeOsrTPp60aASev/DUVhdS7l1hHVv+O4Gp7YmiM/+8sFerYnjtmbFOX5GRGQ5WO5iQJDABA10tYX88ERYRswSFo+zW9tB0y6uXuZEmDwSE5ygkNFmwrc0wPRTWMj1GsqdNTZS4rlajbKNnQt0DL2Kle/Jcp/ckunYwmTkxwcivsxZ+bz1V5cwI5TqJhG6CSVEG5NES318oSeaCuseiVOFxcssWNcJpvxIlSOMSuyg4zPPZ00CEsAehNggBXsvX1EvutdLudn1MKBASVQS7gwXDdk4BPNpcB4H4eqB7SczaT/frG7RLzR0wLPvWoW5yp460Do3F4SsSMoq7L3+jjhimjSJymsLozi8w1geMOPbPylDOxtMdawAtyqUjD5ymrj74P/6/YGqnsFutKvSlaKnc71DTjE0hiRdf1zehI7usoYPJJm0bPgGN2dHuZ4Aw47bx3IwJYa9lr6CQJpREGJkK/Xaq5ugZf2FgBcoHOP9Q5amfH8keu76U8l0mKCU6/bhwFQmbwL5Vnur/QLOf6B3dXJ6rUZa07bLp8xg7z00rxgybFDQzn8UHrn1v9LVn9wH3jG9J6JHHnwzwAVjn0sEFkrG9MrHSjjI8dSIg/WSJ8UOLBV8vIVJzDuH4kUBZBRKh+7ggT2kSSnsb/5JUQtYn+eF1ljAqwMhz6k0MmA+sDnU2GOgBB1WTEWabJGJZrvD5gssrV26+vcKzGv/l74air6taIByl1CTjMMEpc 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:(13230031)(1800799015)(36860700004)(82310400014)(376005); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Apr 2024 12:54:44.7479 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 7c0d4f35-7126-4b69-666f-08dc5bb8e4a3 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: SJ1PEPF00001CE3.namprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ0PR12MB6854 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.1 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 04/15/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=99be466799c897e5746c1cf65f2ffe599286702f Thanks. Xueming Li --- >From 99be466799c897e5746c1cf65f2ffe599286702f Mon Sep 17 00:00:00 2001 From: Bing Zhao Date: Wed, 21 Feb 2024 05:23:22 +0200 Subject: [PATCH] net/mlx5: prevent querying aged flows on uninit port Cc: Xueming Li [ upstream commit 3b1ccc5833b0bd89931e90c5e843134839ba46ce ] In HWS template API, the aging mechanism doesn't support shared host mode now. When the guest's counter is set to 0, the aging won't be initialized. The current implementation didn't prevent the user from querying the aged flows on the uninitialized port. The access of invalid pointers would cause a crash. With this commit, the flag of the per port aging initialization will be checked. This would help to get rid of the invalid accessing. Fixes: 04a4de756e14 ("net/mlx5: support flow age action with HWS") Signed-off-by: Bing Zhao Acked-by: Suanming Mou --- drivers/net/mlx5/mlx5_flow_hw.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/net/mlx5/mlx5_flow_hw.c b/drivers/net/mlx5/mlx5_flow_hw.c index bda1ecf121..25fef8c086 100644 --- a/drivers/net/mlx5/mlx5_flow_hw.c +++ b/drivers/net/mlx5/mlx5_flow_hw.c @@ -10746,6 +10746,10 @@ flow_hw_get_q_aged_flows(struct rte_eth_dev *dev, uint32_t queue_id, return rte_flow_error_set(error, EINVAL, RTE_FLOW_ERROR_TYPE_UNSPECIFIED, NULL, "empty context"); + if (!priv->hws_age_req) + return rte_flow_error_set(error, ENOENT, + RTE_FLOW_ERROR_TYPE_UNSPECIFIED, + NULL, "No aging initialized"); if (priv->hws_strict_queue) { if (queue_id >= age_info->hw_q_age->nb_rings) return rte_flow_error_set(error, EINVAL, -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2024-04-13 20:43:06.577389468 +0800 +++ 0050-net-mlx5-prevent-querying-aged-flows-on-uninit-port.patch 2024-04-13 20:43:04.967753971 +0800 @@ -1 +1 @@ -From 3b1ccc5833b0bd89931e90c5e843134839ba46ce Mon Sep 17 00:00:00 2001 +From 99be466799c897e5746c1cf65f2ffe599286702f Mon Sep 17 00:00:00 2001 @@ -4,0 +5,3 @@ +Cc: Xueming Li + +[ upstream commit 3b1ccc5833b0bd89931e90c5e843134839ba46ce ] @@ -18 +20,0 @@ -Cc: stable@dpdk.org @@ -27 +29 @@ -index bd5c46b6ad..91d1c59fbd 100644 +index bda1ecf121..25fef8c086 100644 @@ -30 +32 @@ -@@ -11219,6 +11219,10 @@ flow_hw_get_q_aged_flows(struct rte_eth_dev *dev, uint32_t queue_id, +@@ -10746,6 +10746,10 @@ flow_hw_get_q_aged_flows(struct rte_eth_dev *dev, uint32_t queue_id,