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 DA3D3A0540 for ; Wed, 6 Jul 2022 22:35:38 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id C5D1840DF7; Wed, 6 Jul 2022 22:35:38 +0200 (CEST) Received: from mail-wr1-f50.google.com (mail-wr1-f50.google.com [209.85.221.50]) by mails.dpdk.org (Postfix) with ESMTP id 76C6A40691 for ; Wed, 6 Jul 2022 22:35:37 +0200 (CEST) Received: by mail-wr1-f50.google.com with SMTP id z12so13995546wrq.7 for ; Wed, 06 Jul 2022 13:35:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=5Ije3zO6qhnoAGu6NjmQZfFhsN+wuS+Y7m0xX8Ql26A=; b=DJVTWrH7WkEcMriu9M6ov7PMh80Vy8ozRttdqCMS0uUE1m7pmtT+RlEopeHDcuv4Qm oN8Dtv675DnJieiN5QlqyQ2TkITsxIqgEP3/8W8j9saODqbnOzw9w9jKGuTIZWRKytxk klVEeL8yemWEmfvXUEdXZYfmSuowci3ka/8M9jH4X+Gxd+zl9/ttLdurdY1cR2MUTTnM TENZclV2na+p/YgpIDLT5BHCFuPw9zppFJLwaFufIns0IGc9nE/avn1fIU7uNNiaQQI1 vheGW60oWl9XkJki7Pw+fmBNprqd3J3YWRUMcayY6Up/LdV7Wo1zlkoUk7OTTyX/UN3W ONww== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=5Ije3zO6qhnoAGu6NjmQZfFhsN+wuS+Y7m0xX8Ql26A=; b=ESkChpTGUrVoXHPpIOt1seCcz4ka7vcP6OYKqizFABJdp7iV9mq4oEU/pwiWAOoAfR P4z6HCbMIYQmcfZwFFn87MO/2DA9cM7y3wcJ82dlVlNK5ZRRi6QmUsaZTn7o4Vy3LP7e VsbIJxVm4z2b60EUzyslCKTz3ONeMLASlEKZojiErnpGGTcIwIXT4+pp2SnyOZ970y+L oLlLvFkkjpX0jcl4x8i9HXmtnY6t2iJVNDvnjQbzCa7+6xoazvIcJ4VFnmILjkDj7AQy iln9G3Pwwd/5x0dZy7hoIeD/Sgb8CmQ34XXNxMpH0uGJAku6v0zpljR1qqN/5zZrc3YK Ia2w== X-Gm-Message-State: AJIora/a3fahhJBqdxz2egD8lAaIBJgl+JgOpornplyI0Yu6rCXygr3l ahGv72zUcMTBz72WYCPv5Cw= X-Google-Smtp-Source: AGRyM1u/4nqDE/gE5vDaV+B89L5NWvyx4o5xa4Gq2SaEsbeWALmg6u2Uo1R917+nVmIuZorQOhdNFg== X-Received: by 2002:a5d:47c3:0:b0:21b:c774:a7 with SMTP id o3-20020a5d47c3000000b0021bc77400a7mr37886208wrc.626.1657139736964; Wed, 06 Jul 2022 13:35:36 -0700 (PDT) Received: from localhost ([2a01:4b00:f41a:3600:360b:9754:2e3a:c344]) by smtp.gmail.com with ESMTPSA id o11-20020a05600c4fcb00b003942a244f40sm24432886wmq.25.2022.07.06.13.35.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Jul 2022 13:35:36 -0700 (PDT) From: luca.boccassi@gmail.com To: Huisong Li Cc: Ferruh Yigit , dpdk stable Subject: patch 'app/testpmd: fix supported RSS offload display' has been queued to stable release 21.11.2 Date: Wed, 6 Jul 2022 21:34:44 +0100 Message-Id: <20220706203506.3422496-9-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220706203506.3422496-1-luca.boccassi@gmail.com> References: <20220628151938.2278711-26-ktraynor@redhat.com> <20220706203506.3422496-1-luca.boccassi@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 21.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 07/08/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/kevintraynor/dpdk-stable This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable/commit/b6e496325594c0dc79d89d608c5a33917a259b74 Thanks. Luca Boccassi --- >From b6e496325594c0dc79d89d608c5a33917a259b74 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 [ 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 | 40 ++++++++++++++++++++++++++-------------- app/test-pmd/testpmd.h | 2 ++ 2 files changed, 28 insertions(+), 14 deletions(-) diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c index f8c058f204..ad1b5f51d5 100644 --- a/app/test-pmd/config.c +++ b/app/test-pmd/config.c @@ -66,8 +66,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; @@ -674,6 +672,19 @@ print_dev_capabilities(uint64_t capabilities) } } +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) { @@ -778,19 +789,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 = RTE_BIT64(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); + } } } @@ -4825,6 +4837,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) { @@ -4868,8 +4882,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) { diff --git a/app/test-pmd/testpmd.h b/app/test-pmd/testpmd.h index 8fb3c3a3af..18abee907c 100644 --- a/app/test-pmd/testpmd.h +++ b/app/test-pmd/testpmd.h @@ -1124,6 +1124,8 @@ extern int flow_parse(const char *src, void *result, unsigned int size, struct rte_flow_item **pattern, struct rte_flow_action **actions); +const char *rsstypes_to_str(uint64_t rss_type); + /* * Work-around of a compilation error with ICC on invocations of the * rte_be_to_cpu_16() function. -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-07-06 21:07:53.877328616 +0100 +++ 0009-app-testpmd-fix-supported-RSS-offload-display.patch 2022-07-06 21:07:53.535518554 +0100 @@ -1 +1 @@ -From 3c23ee6cdddf28641f52f31ced84d3feb867027c Mon Sep 17 00:00:00 2001 +From b6e496325594c0dc79d89d608c5a33917a259b74 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 3c23ee6cdddf28641f52f31ced84d3feb867027c ] + @@ -15 +16,0 @@ -Cc: stable@dpdk.org @@ -25 +26 @@ -index 62833fe97c..a1183ad18e 100644 +index f8c058f204..ad1b5f51d5 100644 @@ -37 +38 @@ -@@ -675,6 +673,19 @@ print_dev_capabilities(uint64_t capabilities) +@@ -674,6 +672,19 @@ print_dev_capabilities(uint64_t capabilities) @@ -57 +58 @@ -@@ -779,19 +790,20 @@ port_infos_display(portid_t port_id) +@@ -778,19 +789,20 @@ port_infos_display(portid_t port_id) @@ -88 +89 @@ -@@ -5604,6 +5616,8 @@ set_record_burst_stats(uint8_t on_off) +@@ -4825,6 +4837,8 @@ set_record_burst_stats(uint8_t on_off) @@ -97 +98 @@ -@@ -5647,8 +5661,6 @@ flowtype_to_str(uint16_t flow_type) +@@ -4868,8 +4882,6 @@ flowtype_to_str(uint16_t flow_type) @@ -107 +108 @@ -index eeefb5e70f..195488b602 100644 +index 8fb3c3a3af..18abee907c 100644 @@ -110 +111 @@ -@@ -1199,6 +1199,8 @@ extern int flow_parse(const char *src, void *result, unsigned int size, +@@ -1124,6 +1124,8 @@ extern int flow_parse(const char *src, void *result, unsigned int size, @@ -116,3 +117,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 + * rte_be_to_cpu_16() function.