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 DFFD843B7D for ; Tue, 5 Mar 2024 11:00:02 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D77484026B; Tue, 5 Mar 2024 11:00:02 +0100 (CET) Received: from NAM11-CO1-obe.outbound.protection.outlook.com (mail-co1nam11on2077.outbound.protection.outlook.com [40.107.220.77]) by mails.dpdk.org (Postfix) with ESMTP id ADD794026B for ; Tue, 5 Mar 2024 11:00:01 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=e89RRbU3quwA5+fZcUZswHHpo+vU2/iHj/ebuBslv1ApK7B3+02mRoDagdwktsFGODpxTKuENCb3E75X0Yf2ro1QTVnf3mXyXbofMv7ePayKAGnr8TYykobou9Ii3xBOk/kQ0TPYPyeGUc8sUw2cx8ci1HRhVXp2VyEPHfxigLBiU4MMoQXDnHcyPm6Uzts3ZMIAS8U0pdYTLTjb3ApuFeVq8xOxBVMyCy55Vpf8uzNFPAt7Aea/vSqIpb84QC5qQthJzLBzr1TNmltMv8NfoF8KDmK/jrxfNlvRvOpPOCgxoDBJPhaDs77erHLdCd9IOhSfQQGoGydB0ihXL7nFrQ== 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=gZsl4kjxkI/BnrrI3zTS8n6K8dSP8rfypE9LXhfY0Wg=; b=OGWc1jDxpr+fa/KuhzFohggVD5n+9oyqDEjWYDGNK7ru5CLC2SaMufDiN0ykrPUdjCaenk0ZK+//KpwLn7doxwfhaGSk0gL6uAkXp/s5qpc30zW6GLgyffesYQHZBuRokLcRDb5+gegE9b9UsSumPd24Io/Kd/s2XJOmvzG1TTsCyZ4qEZ4zVG/82WDkybiFA+HLvxtpQCnjkL+RN0Zi53Fc7dyFcOpO7/zMYHVzyzXi/4MNjGXhc9oW5SJRwXnTuv3B5RHvengPakjDj6xMkf6/Qw/vuL96n4KGHZpTlc8LnvetH1ijiKO3259YB0ioRiL/islxk3H1RcdNfgZg+w== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.161) 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=gZsl4kjxkI/BnrrI3zTS8n6K8dSP8rfypE9LXhfY0Wg=; b=AkTY7wjN4oZBaK63VZn1rUYRSUpUgy4QHAc43VJaNjUsM/T+U53wglD1UkX7Qy3TTnHwxfgz10azLJ1M9NiM379anXuJpyy6Akn3yb1eSOwp6CpXadCWcz5vMlyNAu6si11Bfnmd+PPagGZZq9xdgwfbA3jiMe3vjUcaNqj4dZKpvkpBfSfE1eyZ5T5+XV3ZG+5wds9YhOgIaWdwujsZWMneaXsWp97WCnBYtpS1t4qWxp3gHj0wksYP4inVMj2S/pQO0BeYDAjcrSkgA3ZJr+6kM+3ni3oJX4GkQ1gOBcPJcSBImzRkwgha9s8Zo7ijBcpz+pOQFk2kiADbKMtLZA== Received: from DM6PR08CA0037.namprd08.prod.outlook.com (2603:10b6:5:1e0::11) by PH0PR12MB7813.namprd12.prod.outlook.com (2603:10b6:510:286::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7339.39; Tue, 5 Mar 2024 09:59:58 +0000 Received: from CY4PEPF0000EDD6.namprd03.prod.outlook.com (2603:10b6:5:1e0:cafe::d5) by DM6PR08CA0037.outlook.office365.com (2603:10b6:5:1e0::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7339.39 via Frontend Transport; Tue, 5 Mar 2024 09:59:58 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.117.161) 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.161 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.117.161; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.117.161) by CY4PEPF0000EDD6.mail.protection.outlook.com (10.167.241.210) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7362.11 via Frontend Transport; Tue, 5 Mar 2024 09:59:58 +0000 Received: from rnnvmail201.nvidia.com (10.129.68.8) by mail.nvidia.com (10.129.200.67) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.41; Tue, 5 Mar 2024 01:59:48 -0800 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; Tue, 5 Mar 2024 01:59:46 -0800 From: Xueming Li To: Rongwei Liu CC: Matan Azrad , dpdk stable Subject: patch 'net/mlx5: fix stats query crash in secondary process' has been queued to stable release 23.11.1 Date: Tue, 5 Mar 2024 17:47:54 +0800 Message-ID: <20240305094757.439387-134-xuemingl@nvidia.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240305094757.439387-1-xuemingl@nvidia.com> References: <20240305094757.439387-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: rnnvmail202.nvidia.com (10.129.68.7) To rnnvmail201.nvidia.com (10.129.68.8) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CY4PEPF0000EDD6:EE_|PH0PR12MB7813:EE_ X-MS-Office365-Filtering-Correlation-Id: f9d4312b-7e84-4b6c-82da-08dc3cfb03fc X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: IVTWRmgF+3Y/f7KGuNEL87wqrx9lOzyzeYGvP16EtQs+3wu0ZB6pOcoX+m69H69T/DTrwk1fz4VClsI4gD9KBWRIgsrH0/akhvZkof6XKvQsrOA7/eAB9kj7GvqfdJASAgm7a27j6wQ1aQMr6OtRxUKfjql+bA6BT/fdeYGdg5bkId3nJME097OWV5kdGSBtPjgXtMaPWvAMX1mG1AqRaCYcM/eoIQHdugG16R8mMCBMe+HHw6ukDyxDUYjBQ5t5OgmKlMMJTJxzXr/hHoQbIKVbAN3iE4+D9b9PqZoDaAVZM14f4if5lg0I5GsW2lKg2TwyMRHD8dR++skLMJ+f20RblwPCXukUaCCGYvAce26ygAJKv6pCDjNTahVQtdbE3Vaw8MAgAeGJtEeB+bIf5HIfCDPZY7F/ZChqb1QWHthh8tGW+YHRotaYm7IHTLljVNoDetVrAvOjvWk0iY3Or1Kp6I9igjEYbXZr6aS5Mwo1klwbQeLIl3QOvjN6mieuPaHGBB8LsfeW9gPu2LAlE8smomEQSaEnN5+tuhwhCvLLSx4whYO/TLSdTC+UWJ0xBF11t9ItxmvUtlFpHTR/cbpq1zoCLWJZmME9lcmKl6DdgBjpqNNnEE2INhzkKaWiRDHe+7fCqUGizhM4m1a71CuOotXNPX2HRRuTd7g0FmxsH7DYyL/z+XsRchg/B+VFYE0L+wJn4+rvS3wO0HzqaI3S+Vhmx/ydouEhMl/cs69ByqUIfFZYuLodc+sN0rXV X-Forefront-Antispam-Report: CIP:216.228.117.161; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:dc6edge2.nvidia.com; CAT:NONE; SFS:(13230031)(82310400014)(36860700004)(376005); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Mar 2024 09:59:58.0012 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: f9d4312b-7e84-4b6c-82da-08dc3cfb03fc 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.161]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: CY4PEPF0000EDD6.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR12MB7813 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 03/31/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=1f3f99626970b526a0fb9b8dcb1281925d533e90 Thanks. Xueming Li --- >From 1f3f99626970b526a0fb9b8dcb1281925d533e90 Mon Sep 17 00:00:00 2001 From: Rongwei Liu Date: Mon, 22 Jan 2024 09:44:05 +0200 Subject: [PATCH] net/mlx5: fix stats query crash in secondary process Cc: Xueming Li [ upstream commit d312cab568ecdc8411cb3dc896e7d5020836399b ] The "outer_of_buffer" counter is owned by the primary process devx object and it is pointer by pointer in mlx5_priv structure. Actually, there are 4 levels' pointers in this piece of code. The secondary process can't access this part directly since it belongs to another process's heap. Return ENOTSUP as a workaround. Fixes: 750e48c7d8c3 ("common/mlx5: add DevX commands for queue counters") Signed-off-by: Rongwei Liu Acked-by: Matan Azrad --- drivers/net/mlx5/linux/mlx5_os.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/drivers/net/mlx5/linux/mlx5_os.c b/drivers/net/mlx5/linux/mlx5_os.c index ae82e1e5d8..fd104dabb2 100644 --- a/drivers/net/mlx5/linux/mlx5_os.c +++ b/drivers/net/mlx5/linux/mlx5_os.c @@ -2993,9 +2993,15 @@ mlx5_os_read_dev_stat(struct mlx5_priv *priv, const char *ctr_name, if (priv->sh) { if (priv->q_counters != NULL && - strcmp(ctr_name, "out_of_buffer") == 0) + strcmp(ctr_name, "out_of_buffer") == 0) { + if (rte_eal_process_type() == RTE_PROC_SECONDARY) { + DRV_LOG(WARNING, "Devx out_of_buffer counter is not supported in the secondary process"); + rte_errno = ENOTSUP; + return 1; + } return mlx5_devx_cmd_queue_counter_query (priv->q_counters, 0, (uint32_t *)stat); + } MKSTR(path, "%s/ports/%d/hw_counters/%s", priv->sh->ibdev_path, priv->dev_port, -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2024-03-05 17:39:34.978176933 +0800 +++ 0133-net-mlx5-fix-stats-query-crash-in-secondary-process.patch 2024-03-05 17:39:31.093566504 +0800 @@ -1 +1 @@ -From d312cab568ecdc8411cb3dc896e7d5020836399b Mon Sep 17 00:00:00 2001 +From 1f3f99626970b526a0fb9b8dcb1281925d533e90 Mon Sep 17 00:00:00 2001 @@ -4,0 +5,3 @@ +Cc: Xueming Li + +[ upstream commit d312cab568ecdc8411cb3dc896e7d5020836399b ] @@ -16 +18,0 @@ -Cc: stable@dpdk.org @@ -25 +27 @@ -index cc8e1919e8..f10e623953 100644 +index ae82e1e5d8..fd104dabb2 100644 @@ -28 +30 @@ -@@ -2998,9 +2998,15 @@ mlx5_os_read_dev_stat(struct mlx5_priv *priv, const char *ctr_name, +@@ -2993,9 +2993,15 @@ mlx5_os_read_dev_stat(struct mlx5_priv *priv, const char *ctr_name,