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 8CEFCA00C5 for ; Wed, 20 Jul 2022 10:26:34 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 883D640FAE; Wed, 20 Jul 2022 10:26:34 +0200 (CEST) Received: from NAM11-BN8-obe.outbound.protection.outlook.com (mail-bn8nam11on2041.outbound.protection.outlook.com [40.107.236.41]) by mails.dpdk.org (Postfix) with ESMTP id 5B5CE410F1 for ; Wed, 20 Jul 2022 10:26:33 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ZAYPmwtO1hj4/uKPr1j5FPsDXAOF+i/gni2x7ymUfuPswo4NxNLSviwlYSFmOnr0cFzDZfR72/xTMoxoWO1l24lSiNo5Xb/JuGsP+gx+FnfNVqI4NavZKCzW1y6eN50uR+n0Va+ipkfJZtfNasG1TakGbZUWemj53d0LcYHF+rjCuV12taLbcTNvrI/WbRXgrg1pG1u1r/JIs26m74/k8TG8UaFo6wbBFtmO7ZkPwZQluJEjL5U9VQVFgw0YzflIJIQprhyJMzWErrTtuE0+q3ncCenQA61yx5+aDYuWaJj5UXxRcSZ7B5UI1cIWkFojtS3Lmvy64ubf5xeg9cn2hA== 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=/OdJYIJ2ofDd1xH1KBpbMh+4vYP9l5gCVk65dqf+vCg=; b=bmzcJf2Ml56+7ycOXRZrJEWlyzGiEoW+VwdzZw8JoNwiM9wPrHOvSlhi2q5eIHBrxuWQx3WxfxMnRUoD9xDHKovam1S7wyeKZJCn/rIwsrKTbcvPJh1mMKIZrOFMjr8yu5H6MtFzVI2weSY1h2xhSY/J/hNZ4HayvZH5jqlalKTNWX1Q0yRvXdKOPWSMQzApidKh/h75lrbATJpRIVVOBQGLUm6+eQmlR++4GKfDWhbafEfGB5pSiegr9qkpJvmYYz8zw2uja4+7E3w08EiYL9fKPNMw2Vj24FnTRgazXapuAjJzDtdZLhsLxG3vxLA44zDhUYIGMiWKKGUTD5Khew== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 12.22.5.236) 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=/OdJYIJ2ofDd1xH1KBpbMh+4vYP9l5gCVk65dqf+vCg=; b=QaCekNjimN8oJH7m1vwtDYc3JdDmA5a/gv6u1Y7A6yl7XrOJubAIQ9yCwPJfo1Skq/lBJ8mmTIc1FIeAq2y8C5Tz6gaI6msAcxIh4q61FnfnxvSRGqRJ800Y0oz0GWi0K4dB8b8MFaD/a0esF6el+whCz7r1itsQ2NTTCc8uBJDmFWt7UWBJFscDdXO5LcWq+m6JdVKPfAasVA/OfAwPg/lxVCnKQdYGIEa9CqNTS80PPCwY/z1iXIl50uS27hYLMkDq7Cwyk61+K/AGHvjxwAJu+fHU5R/vXt+a/LW0MBHiCYx6+IPTZdYi2Mh6gUh5+TuCPwOD6C25XaDX662Rbg== Received: from MWH0EPF00056D0F.namprd21.prod.outlook.com (2603:10b6:30f:fff2:0:1:0:11) by DM5PR12MB4664.namprd12.prod.outlook.com (2603:10b6:4:a1::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5438.21; Wed, 20 Jul 2022 08:26:31 +0000 Received: from CO1NAM11FT013.eop-nam11.prod.protection.outlook.com (2a01:111:f400:7eab::204) by MWH0EPF00056D0F.outlook.office365.com (2603:1036:d20::b) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5458.5 via Frontend Transport; Wed, 20 Jul 2022 08:26:30 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 12.22.5.236) 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.236 as permitted sender) receiver=protection.outlook.com; client-ip=12.22.5.236; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (12.22.5.236) by CO1NAM11FT013.mail.protection.outlook.com (10.13.174.227) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.5458.17 via Frontend Transport; Wed, 20 Jul 2022 08:26:30 +0000 Received: from rnnvmail201.nvidia.com (10.129.68.8) by DRHQMAIL109.nvidia.com (10.27.9.19) with Microsoft SMTP Server (TLS) id 15.0.1497.32; Wed, 20 Jul 2022 08:26:29 +0000 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.986.26; Wed, 20 Jul 2022 01:26:28 -0700 From: Xueming Li To: Huisong Li CC: , Ferruh Yigit , dpdk stable Subject: patch 'app/testpmd: fix supported RSS offload display' has been queued to stable release 20.11.6 Date: Wed, 20 Jul 2022 11:21:24 +0300 Message-ID: <20220720082132.3954126-55-xuemingl@nvidia.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20220720082132.3954126-1-xuemingl@nvidia.com> References: <20220621080301.2315720-1-xuemingl@nvidia.com> <20220720082132.3954126-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-Office365-Filtering-Correlation-Id: 201b4a7e-dcac-4864-45c3-08da6a298c48 X-MS-TrafficTypeDiagnostic: DM5PR12MB4664:EE_ X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?Y9xU3G0A3PuvTMo1K2SQOn7kIoVJR88FwDJ8Wdaoe84dduDmtt1Z/Xw1OORk?= =?us-ascii?Q?NJSwQBdVcyNMLfwxUjS2Ens/sf70RNGDZByqiR1EyqkP9V4fGOsyehdd4nbQ?= =?us-ascii?Q?IOOkh5n93ja61dSCBIKP/M0s5jkQdRh1pPkzUyWiY9eEarC/X11uXNjj4S2T?= =?us-ascii?Q?bUg9g6P5b6zcK95WsfQjL4KnQBwM7uY1bbsfU3h0OzHw4Bw1fYIgmJCop3J4?= =?us-ascii?Q?PM6QKCdub5/Kk5sSKF/gGt83gByg2loqToCxMdmkLAXu4Rv7HgQuApQCIavU?= =?us-ascii?Q?0PlzjOJ8vZaYvYzmM6djuvXiBmoNM0ItaLeKUMXDWIkQTOZjQuxZL2qFTT55?= =?us-ascii?Q?+y2Ec5LbYT7vr5AeX9z+q5J5T2jVkRy2WvmASDXbaK6vxK3/j1PGs8d73W46?= =?us-ascii?Q?axFWc9y34TVQ7375lUZat5XSG0TBZ3qN/Gl4xg1j9sONyYkGwsQww5gvHF7V?= =?us-ascii?Q?6W6BJW3Oddo/EX0PdAhV3v+0YZp1k6O6DTY5ZhVEUOGns5FzIP6XPunT4FMo?= =?us-ascii?Q?vVmxU7/qSjPIT3V59Ewo2+Xu/fXlRGqosc96YomN1mMhCT4xMQY5a01ap3SZ?= =?us-ascii?Q?WcUxEONu+djgnraHaodMXXyMkrRnWZ+BlM2lAPRqBbZ6C96ZD2zpUD4x4e4Y?= =?us-ascii?Q?4/LC6iZUEPtPc2C8D+SHun+a9CarlZHfr5GfXCb3O2VyVCKWoiA2H6JI2LTI?= =?us-ascii?Q?NF+mgl1B0Zep0VO62qh6YAmcemu7zMf2GkwdTrfzilr481ENIJxTvUf5cXIS?= =?us-ascii?Q?Z9bzqdSq8XTUetZkAP2rj23nKAGbC8XFHT13YhndUnIwiGqOVib8yR68OBDX?= =?us-ascii?Q?Sn3oS4MxuPH6/vulurvTSLtAK4Ojl6mX/0Mlb/uvTlkGSM1UzrAGMIcKWr7U?= =?us-ascii?Q?BLRZJZW5N+QuJfMgQexKxfUl2IgrCF/v/L4qqyJAx7pTRx26cd5Eq064EOdI?= =?us-ascii?Q?+2lRo+XfZX2xqlRaBE7o1g=3D=3D?= X-Forefront-Antispam-Report: CIP:12.22.5.236; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:InfoNoRecords; CAT:NONE; SFS:(13230016)(4636009)(346002)(376002)(136003)(396003)(39860400002)(46966006)(36840700001)(40470700004)(40480700001)(6916009)(2616005)(55016003)(40460700003)(5660300002)(81166007)(36860700001)(54906003)(356005)(86362001)(82740400003)(2906002)(316002)(82310400005)(83380400001)(478600001)(36756003)(1076003)(8676002)(47076005)(426003)(70586007)(70206006)(6286002)(186003)(336012)(4326008)(8936002)(966005)(7696005)(26005)(6666004)(41300700001)(16526019)(53546011)(36900700001); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Jul 2022 08:26:30.5002 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 201b4a7e-dcac-4864-45c3-08da6a298c48 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.236]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: CO1NAM11FT013.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR12MB4664 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 20.11.6 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 07/22/22. 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://github.com/steevenlee/dpdk This queued commit can be viewed at: https://github.com/steevenlee/dpdk/commit/88660d765353a6369ab0e37126b26b7387c3797e Thanks. Xueming Li --- >From 88660d765353a6369ab0e37126b26b7387c3797e Mon Sep 17 00:00:00 2001 From: Huisong Li Date: Wed, 29 Jun 2022 16:34:44 +0800 Subject: [PATCH] app/testpmd: fix supported RSS offload display Cc: Xueming Li [ upstream commit 3c23ee6cdddf28641f52f31ced84d3feb867027c ] The rte_eth_dev_info.flow_type_rss_offloads is populated in terms of RTE_ETH_RSS_* bits. If PMD sets RTE_ETH_RSS_L3_SRC_ONLY to dev_info->flow_type_rss_offloads. testpmd will display "user defined 63" when run 'show port info 0'. Because testpmd use flowtype_to_str() to display the supported RSS offload of PMD. In fact, the function is used to display flow type in FDIR commands for i40e or ixgbe. This patch uses the RTE_ETH_RSS_* bits to display supported RSS offload of PMD. Fixes: b12964f621dc ("ethdev: unification of RSS offload types") Signed-off-by: Huisong Li Signed-off-by: Ferruh Yigit --- app/test-pmd/config.c | 36 ++++++++++++++++++++++++------------ app/test-pmd/testpmd.h | 2 ++ 2 files changed, 26 insertions(+), 12 deletions(-) diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c index d24fb7763e..f3ffc23ecd 100644 --- a/app/test-pmd/config.c +++ b/app/test-pmd/config.c @@ -63,8 +63,6 @@ #define NS_PER_SEC 1E9 -static char *flowtype_to_str(uint16_t flow_type); - static const struct { enum tx_pkt_split split; const char *name; @@ -566,6 +564,19 @@ skip_parse: }; } +const char * +rsstypes_to_str(uint64_t rss_type) +{ + uint16_t i; + + for (i = 0; rss_type_table[i].str != NULL; i++) { + if (rss_type_table[i].rss_type == rss_type) + return rss_type_table[i].str; + } + + return NULL; +} + void port_infos_display(portid_t port_id) { @@ -668,19 +679,20 @@ port_infos_display(portid_t port_id) if (!dev_info.flow_type_rss_offloads) printf("No RSS offload flow type is supported.\n"); else { + uint64_t rss_offload_types = dev_info.flow_type_rss_offloads; uint16_t i; - char *p; printf("Supported RSS offload flow types:\n"); - for (i = RTE_ETH_FLOW_UNKNOWN + 1; - i < sizeof(dev_info.flow_type_rss_offloads) * CHAR_BIT; i++) { - if (!(dev_info.flow_type_rss_offloads & (1ULL << i))) - continue; - p = flowtype_to_str(i); - if (p) - printf(" %s\n", p); - else - printf(" user defined %d\n", i); + for (i = 0; i < sizeof(rss_offload_types) * CHAR_BIT; i++) { + uint64_t rss_offload = UINT64_C(1) << i; + if ((rss_offload_types & rss_offload) != 0) { + const char *p = rsstypes_to_str(rss_offload); + if (p) + printf(" %s\n", p); + else + printf(" user defined %u\n", + i); + } } } diff --git a/app/test-pmd/testpmd.h b/app/test-pmd/testpmd.h index 745e673b8d..d21d8501d5 100644 --- a/app/test-pmd/testpmd.h +++ b/app/test-pmd/testpmd.h @@ -1027,6 +1027,8 @@ uint16_t tx_pkt_set_dynf(uint16_t port_id, __rte_unused uint16_t queue, void add_tx_dynf_callback(portid_t portid); void remove_tx_dynf_callback(portid_t portid); int update_jumbo_frame_offload(portid_t portid); +const char *rsstypes_to_str(uint64_t rss_type); + /* * Work-around of a compilation error with ICC on invocations of the -- 2.35.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-07-20 15:01:01.343388684 +0800 +++ 0055-app-testpmd-fix-supported-RSS-offload-display.patch 2022-07-20 15:00:58.797667023 +0800 @@ -1 +1 @@ -From 3c23ee6cdddf28641f52f31ced84d3feb867027c Mon Sep 17 00:00:00 2001 +From 88660d765353a6369ab0e37126b26b7387c3797e Mon Sep 17 00:00:00 2001 @@ -4,0 +5,3 @@ +Cc: Xueming Li + +[ upstream commit 3c23ee6cdddf28641f52f31ced84d3feb867027c ] @@ -15 +17,0 @@ -Cc: stable@dpdk.org @@ -20 +22 @@ - app/test-pmd/config.c | 40 ++++++++++++++++++++++++++-------------- + app/test-pmd/config.c | 36 ++++++++++++++++++++++++------------ @@ -22 +24 @@ - 2 files changed, 28 insertions(+), 14 deletions(-) + 2 files changed, 26 insertions(+), 12 deletions(-) @@ -25 +27 @@ -index 62833fe97c..a1183ad18e 100644 +index d24fb7763e..f3ffc23ecd 100644 @@ -28 +30 @@ -@@ -66,8 +66,6 @@ +@@ -63,8 +63,6 @@ @@ -37,2 +39,2 @@ -@@ -675,6 +673,19 @@ print_dev_capabilities(uint64_t capabilities) - } +@@ -566,6 +564,19 @@ skip_parse: + }; @@ -57 +59 @@ -@@ -779,19 +790,20 @@ port_infos_display(portid_t port_id) +@@ -668,19 +679,20 @@ port_infos_display(portid_t port_id) @@ -76 +78 @@ -+ uint64_t rss_offload = RTE_BIT64(i); ++ uint64_t rss_offload = UINT64_C(1) << i; @@ -88,18 +89,0 @@ -@@ -5604,6 +5616,8 @@ set_record_burst_stats(uint8_t on_off) - record_burst_stats = on_off; - } - -+#if defined(RTE_NET_I40E) || defined(RTE_NET_IXGBE) -+ - static char* - flowtype_to_str(uint16_t flow_type) - { -@@ -5647,8 +5661,6 @@ flowtype_to_str(uint16_t flow_type) - return NULL; - } - --#if defined(RTE_NET_I40E) || defined(RTE_NET_IXGBE) -- - static inline void - print_fdir_mask(struct rte_eth_fdir_masks *mask) - { @@ -107 +91 @@ -index eeefb5e70f..195488b602 100644 +index 745e673b8d..d21d8501d5 100644 @@ -110,4 +94,4 @@ -@@ -1199,6 +1199,8 @@ extern int flow_parse(const char *src, void *result, unsigned int size, - struct rte_flow_item **pattern, - struct rte_flow_action **actions); - +@@ -1027,6 +1027,8 @@ uint16_t tx_pkt_set_dynf(uint16_t port_id, __rte_unused uint16_t queue, + void add_tx_dynf_callback(portid_t portid); + void remove_tx_dynf_callback(portid_t portid); + int update_jumbo_frame_offload(portid_t portid); @@ -116,3 +100,3 @@ - /* For registering driver specific testpmd commands. */ - struct testpmd_driver_commands { - TAILQ_ENTRY(testpmd_driver_commands) next; + + /* + * Work-around of a compilation error with ICC on invocations of the