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 BA85F4301F for ; Thu, 10 Aug 2023 02:01:58 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id B17BA410FD; Thu, 10 Aug 2023 02:01:58 +0200 (CEST) Received: from NAM10-DM6-obe.outbound.protection.outlook.com (mail-dm6nam10on2086.outbound.protection.outlook.com [40.107.93.86]) by mails.dpdk.org (Postfix) with ESMTP id 15E0140DD8 for ; Thu, 10 Aug 2023 02:01:57 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Dg1Vm8TBVlz8cXLTlPsVCynJDd2SuwXPvjzivg4dHI8Da0jbDzh56zQGY/bcZmix9etPj4WerH0rhQhqwr+1Il9PJ/CYzFr0NVUjZXbQBiDRkiX84ZaviOM3379xkp8G9ACgib2lnHYTZLIOOBUj2AYG8bZLL0vj7y/tDxmASdtP1MIB/VC+sXpc+FkBHmXZVN/Whj49xAobOPGW29WYGvivs3xKwYVZ+7sR+pxmypdW73ertQxIZf0lw2z/Eii36HDvG4wo01bvw4MDZW+RXOtJTtrj+lzMKOOMxGTwsNEPunWWrXA7Tb6VK1TBB2ATMC537XyHTSPd9RTyAW1uiA== 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=GFrcbgZhgO+QNzOClE4YXhZWArYs8Hjn3ON/IV8BUOE=; b=JuKv8/NERdIGsrcy6smzxV7sAMNlEefTPMTj38Vg7xrI6TZ3ymTHlEGSEZzcnE5laz0I13+srRQ4jwhvGL3MGx8iOz8ug8VgEXUYQI7roD9e6BXzI2e4zRmW1cCW4eGHrzjLfhYNv24LuQ1kFQnJnHcd9mfVWNcrDZqJ2yuFMDH0FKst0mE7nWGSgN/bOSQGr6vM3KCdd73v1oh64f6Q4vAeRZegFe7J58++TSVNES1OaGWJv+4UAiqwmVlXSl798k8fTSTu31DcVSMxRrKZpISbIrfFHlUucjiU3py0y0QkX8ugw+/yl8fP3yoemOYh3Wh4Qr4D6jbrA96dArtjqQ== 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 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=GFrcbgZhgO+QNzOClE4YXhZWArYs8Hjn3ON/IV8BUOE=; b=eaCONHKC3iTk4soJxd6iCMXduV4SBvg7G46y8uGVue3PFxULRP3cksZZ+cPvE6uKcHBrkOp14DY0QFuHvjxkwwfp2NBHogglO1pjaUUIj0NzMs9WyV5/sPKjzcjexx93QPR4HxHDDBrJOtfiFae2wAkQe4AX5Dla8R7KQzG5F50cTDY2BmZFhLFgf3/1oT1EvU5TOHF/oqhk2ulADemUEc8d9p3r7678YYGb0WjAwesCBt6b2EUVU2BAajfO1jqQr6luFTdSDtZukwhO/NESx9gLbccqg5JhKafBOeByHP4ZsFfY9XxnjXEr4n3cplgsIu6qhojTWcgnWwXFlJuavw== Received: from CY5PR04CA0020.namprd04.prod.outlook.com (2603:10b6:930:1e::10) by CH0PR12MB5316.namprd12.prod.outlook.com (2603:10b6:610:d7::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6652.30; Thu, 10 Aug 2023 00:01:55 +0000 Received: from CY4PEPF0000EDD5.namprd03.prod.outlook.com (2603:10b6:930:1e:cafe::b) by CY5PR04CA0020.outlook.office365.com (2603:10b6:930:1e::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6652.27 via Frontend Transport; Thu, 10 Aug 2023 00:01:55 +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 CY4PEPF0000EDD5.mail.protection.outlook.com (10.167.241.209) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6652.19 via Frontend Transport; Thu, 10 Aug 2023 00:01:55 +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.5; Wed, 9 Aug 2023 17:01:37 -0700 Received: from nvidia.com (10.126.230.37) 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.37; Wed, 9 Aug 2023 17:01:35 -0700 From: Xueming Li To: Sean Zhang CC: Viacheslav Ovsiienko , dpdk stable Subject: patch 'net/mlx5: fix flow dump for modify field' has been queued to stable release 22.11.3 Date: Thu, 10 Aug 2023 07:58:52 +0800 Message-ID: <20230809235947.1187-20-xuemingl@nvidia.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230809235947.1187-1-xuemingl@nvidia.com> References: <20230625063544.11183-1-xuemingl@nvidia.com> <20230809235947.1187-1-xuemingl@nvidia.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.126.230.37] 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: CY4PEPF0000EDD5:EE_|CH0PR12MB5316:EE_ X-MS-Office365-Filtering-Correlation-Id: 4cde0065-f952-4598-ee75-08db99350249 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: lzBEVccb7A+fDIfSchWk0BalOHfYFBjP/dvoCujoNy2Lvd2YdgFEWVn2Zj7UhkiqYE4Sf55L43dp1oXNJ88rJt7BaHOoCf/9tnY4tcYlQoULUHIA+g+ooDt9v4HFSSXc8yCVqT9/O3/pc+QmcYfAjqHf+T0721a+e2BEQZ/skCKK63iBHj3u3k0UmMynM/Y8zhDlCfWclzwvEg8upttpfKkJA2RMBOSkqgxhXcQW3WKUXWdTzfzfm1d6kLowzrx3mLrtOBa8YNgC9ZE9Jweh/wHlwCRg1PYMpxYZEf0SJeJlgGW1C5olXcrMIuc6S+wUinGSk2T4ma4yQg4OiQboYFR7BDgOgrD040gO/6yCZqPl1/2pd/zJEPW+wscsmS3IBh99EBFldZ7dDUxI46K8WOFTA1Czn8NJhWqkrOPm6stY66A6UEIy1WjcZlK7q14RSEkEpgu8b2ofBotjt19voqfo6B7DRNFGnQGbQZRTaBZqeJUVRc1vLEMM9d6kM5wwhWMX2R0/CzicWqr91E19zM/2x99b6OvUrlFdMVibVPOpvA6Erqsy4Dlvyt4QbOEeny9N6lQKmIf0KFbTqypbYtPv8UzwCPL5yysz73KGeCqG1z0SWbJrtLWgF/Imoec+tfPpJzmTM24WscvCoxCmoq+q4zpDK6q4TwUPD4Tc5NjIZyXszoF1+W9HEDhOhhZ07ZfuKuV41SghnVrt7fasfAJHfHF8sIVb7k9lFOTP12nf/MwDasqlj4n35rYu0spwwdHjxoEZ7Y+PM/X204Hcsg== 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:(13230028)(4636009)(396003)(376002)(136003)(39860400002)(346002)(82310400008)(1800799006)(186006)(451199021)(40470700004)(46966006)(36840700001)(83380400001)(966005)(6666004)(7696005)(40480700001)(82740400003)(37006003)(53546011)(54906003)(36860700001)(478600001)(4326008)(316002)(6636002)(2616005)(426003)(47076005)(26005)(336012)(1076003)(6286002)(16526019)(70586007)(70206006)(41300700001)(6862004)(8676002)(8936002)(40460700003)(55016003)(5660300002)(2906002)(7636003)(356005)(36756003)(86362001); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Aug 2023 00:01:55.2366 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 4cde0065-f952-4598-ee75-08db99350249 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: CY4PEPF0000EDD5.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH0PR12MB5316 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 22.11.3 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/11/23. 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=22.11-staging This queued commit can be viewed at: https://git.dpdk.org/dpdk-stable/commit/?h=22.11-staging&id=fa39f4c3582f719937e87e7b50490c5742e725dd Thanks. Xueming Li --- >From fa39f4c3582f719937e87e7b50490c5742e725dd Mon Sep 17 00:00:00 2001 From: Sean Zhang Date: Thu, 29 Jun 2023 13:00:44 +0300 Subject: [PATCH] net/mlx5: fix flow dump for modify field Cc: Xueming Li [ upstream commit faecafc16f69c559323ec46ef110a771ce0bd7fb ] When using other process to dump flow information, the modify field information cannot be dumpped due to incorrect lcore value. Add loop to get modify field information from all lcore to fix the issue. Fixes: a7ac7fae4919 ("net/mlx5: enhance flow dump") Signed-off-by: Sean Zhang Acked-by: Viacheslav Ovsiienko --- drivers/net/mlx5/mlx5_flow.c | 58 +++++++++++++++++++++++++----------- 1 file changed, 41 insertions(+), 17 deletions(-) diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c index f4487bc136..54cab0ec05 100644 --- a/drivers/net/mlx5/mlx5_flow.c +++ b/drivers/net/mlx5/mlx5_flow.c @@ -9775,23 +9775,47 @@ mlx5_flow_dev_dump_sh_all(struct rte_eth_dev *dev, } i = lcore_index; - for (j = 0; j <= h->mask; j++) { - l_inconst = &h->buckets[j].l; - if (!l_inconst || !l_inconst->cache[i]) - continue; - - e = LIST_FIRST(&l_inconst->cache[i]->h); - while (e) { - modify_hdr = - (struct mlx5_flow_dv_modify_hdr_resource *)e; - data = (const uint8_t *)modify_hdr->actions; - size = (size_t)(modify_hdr->actions_num) * 8; - actions_num = modify_hdr->actions_num; - id = (uint64_t)(uintptr_t)modify_hdr->action; - type = DR_DUMP_REC_TYPE_PMD_MODIFY_HDR; - save_dump_file(data, size, type, id, - (void *)(&actions_num), file); - e = LIST_NEXT(e, next); + if (lcore_index == MLX5_LIST_NLCORE) { + for (i = 0; i <= (uint32_t)lcore_index; i++) { + for (j = 0; j <= h->mask; j++) { + l_inconst = &h->buckets[j].l; + if (!l_inconst || !l_inconst->cache[i]) + continue; + + e = LIST_FIRST(&l_inconst->cache[i]->h); + while (e) { + modify_hdr = + (struct mlx5_flow_dv_modify_hdr_resource *)e; + data = (const uint8_t *)modify_hdr->actions; + size = (size_t)(modify_hdr->actions_num) * 8; + actions_num = modify_hdr->actions_num; + id = (uint64_t)(uintptr_t)modify_hdr->action; + type = DR_DUMP_REC_TYPE_PMD_MODIFY_HDR; + save_dump_file(data, size, type, id, + (void *)(&actions_num), file); + e = LIST_NEXT(e, next); + } + } + } + } else { + for (j = 0; j <= h->mask; j++) { + l_inconst = &h->buckets[j].l; + if (!l_inconst || !l_inconst->cache[i]) + continue; + + e = LIST_FIRST(&l_inconst->cache[i]->h); + while (e) { + modify_hdr = + (struct mlx5_flow_dv_modify_hdr_resource *)e; + data = (const uint8_t *)modify_hdr->actions; + size = (size_t)(modify_hdr->actions_num) * 8; + actions_num = modify_hdr->actions_num; + id = (uint64_t)(uintptr_t)modify_hdr->action; + type = DR_DUMP_REC_TYPE_PMD_MODIFY_HDR; + save_dump_file(data, size, type, id, + (void *)(&actions_num), file); + e = LIST_NEXT(e, next); + } } } -- 2.25.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2023-08-09 21:51:20.025556500 +0800 +++ 0073-net-mlx5-fix-flow-dump-for-modify-field.patch 2023-08-09 21:51:18.224352000 +0800 @@ -1 +1 @@ -From faecafc16f69c559323ec46ef110a771ce0bd7fb Mon Sep 17 00:00:00 2001 +From fa39f4c3582f719937e87e7b50490c5742e725dd Mon Sep 17 00:00:00 2001 @@ -4,0 +5,3 @@ +Cc: Xueming Li + +[ upstream commit faecafc16f69c559323ec46ef110a771ce0bd7fb ] @@ -11 +13,0 @@ -Cc: stable@dpdk.org @@ -20 +22 @@ -index cf83db7b60..abb86241fc 100644 +index f4487bc136..54cab0ec05 100644 @@ -23 +25 @@ -@@ -10390,23 +10390,47 @@ mlx5_flow_dev_dump_sh_all(struct rte_eth_dev *dev, +@@ -9775,23 +9775,47 @@ mlx5_flow_dev_dump_sh_all(struct rte_eth_dev *dev,