DPDK patches and discussions
 help / color / mirror / Atom feed
From: Huisong Li <lihuisong@huawei.com>
To: <aman.deep.singh@intel.com>, <yuying.zhang@intel.com>,
	<ferruh.yigit@xilinx.com>, <andrew.rybchenko@oktetlabs.ru>
Cc: <dev@dpdk.org>, <thomas@monjalon.net>, <huangdaode@huawei.com>,
	<liudongdong3@huawei.com>, <lihuisong@huawei.com>
Subject: [PATCH V5 6/7] app/testpmd: reorder elements in RSS type table array
Date: Fri, 24 Jun 2022 15:24:00 +0800	[thread overview]
Message-ID: <20220624072401.21839-7-lihuisong@huawei.com> (raw)
In-Reply-To: <20220624072401.21839-1-lihuisong@huawei.com>

There are group and individual types in rss_type_table[]. However, group
types are very scattered, and individual types are not arranged based on
the bit number order in 'RTE_ETH_RSS_xxx'. For a clear distribution of
types and better maintenance, this patch reorders this table.

Signed-off-by: Huisong Li <lihuisong@huawei.com>
---
 app/test-pmd/config.c | 51 +++++++++++++++++++++++--------------------
 1 file changed, 27 insertions(+), 24 deletions(-)

diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c
index b3cb68003c..cc97aaa0ce 100644
--- a/app/test-pmd/config.c
+++ b/app/test-pmd/config.c
@@ -85,17 +85,20 @@ static const struct {
 };
 
 const struct rss_type_info rss_type_table[] = {
+	/* Group types */
 	{ "all", RTE_ETH_RSS_ETH | RTE_ETH_RSS_VLAN | RTE_ETH_RSS_IP | RTE_ETH_RSS_TCP |
 		RTE_ETH_RSS_UDP | RTE_ETH_RSS_SCTP | RTE_ETH_RSS_L2_PAYLOAD |
 		RTE_ETH_RSS_L2TPV3 | RTE_ETH_RSS_ESP | RTE_ETH_RSS_AH | RTE_ETH_RSS_PFCP |
 		RTE_ETH_RSS_GTPU | RTE_ETH_RSS_ECPRI | RTE_ETH_RSS_MPLS | RTE_ETH_RSS_L2TPV2},
 	{ "none", 0 },
-	{ "eth", RTE_ETH_RSS_ETH },
-	{ "l2-src-only", RTE_ETH_RSS_L2_SRC_ONLY },
-	{ "l2-dst-only", RTE_ETH_RSS_L2_DST_ONLY },
+	{ "ip", RTE_ETH_RSS_IP },
+	{ "udp", RTE_ETH_RSS_UDP },
+	{ "tcp", RTE_ETH_RSS_TCP },
+	{ "sctp", RTE_ETH_RSS_SCTP },
+	{ "tunnel", RTE_ETH_RSS_TUNNEL },
 	{ "vlan", RTE_ETH_RSS_VLAN },
-	{ "s-vlan", RTE_ETH_RSS_S_VLAN },
-	{ "c-vlan", RTE_ETH_RSS_C_VLAN },
+
+	/* Individual type */
 	{ "ipv4", RTE_ETH_RSS_IPV4 },
 	{ "ipv4-frag", RTE_ETH_RSS_FRAG_IPV4 },
 	{ "ipv4-tcp", RTE_ETH_RSS_NONFRAG_IPV4_TCP },
@@ -108,7 +111,7 @@ const struct rss_type_info rss_type_table[] = {
 	{ "ipv6-udp", RTE_ETH_RSS_NONFRAG_IPV6_UDP },
 	{ "ipv6-sctp", RTE_ETH_RSS_NONFRAG_IPV6_SCTP },
 	{ "ipv6-other", RTE_ETH_RSS_NONFRAG_IPV6_OTHER },
-	{ "l2-payload", RTE_ETH_RSS_L2_PAYLOAD },
+	{ "l2_payload", RTE_ETH_RSS_L2_PAYLOAD },
 	{ "ipv6-ex", RTE_ETH_RSS_IPV6_EX },
 	{ "ipv6-tcp-ex", RTE_ETH_RSS_IPV6_TCP_EX },
 	{ "ipv6-udp-ex", RTE_ETH_RSS_IPV6_UDP_EX },
@@ -116,33 +119,33 @@ const struct rss_type_info rss_type_table[] = {
 	{ "vxlan", RTE_ETH_RSS_VXLAN },
 	{ "geneve", RTE_ETH_RSS_GENEVE },
 	{ "nvgre", RTE_ETH_RSS_NVGRE },
-	{ "ip", RTE_ETH_RSS_IP },
-	{ "udp", RTE_ETH_RSS_UDP },
-	{ "tcp", RTE_ETH_RSS_TCP },
-	{ "sctp", RTE_ETH_RSS_SCTP },
-	{ "tunnel", RTE_ETH_RSS_TUNNEL },
-	{ "l3-pre32", RTE_ETH_RSS_L3_PRE32 },
-	{ "l3-pre40", RTE_ETH_RSS_L3_PRE40 },
-	{ "l3-pre48", RTE_ETH_RSS_L3_PRE48 },
-	{ "l3-pre56", RTE_ETH_RSS_L3_PRE56 },
-	{ "l3-pre64", RTE_ETH_RSS_L3_PRE64 },
-	{ "l3-pre96", RTE_ETH_RSS_L3_PRE96 },
-	{ "l3-src-only", RTE_ETH_RSS_L3_SRC_ONLY },
-	{ "l3-dst-only", RTE_ETH_RSS_L3_DST_ONLY },
-	{ "l4-src-only", RTE_ETH_RSS_L4_SRC_ONLY },
-	{ "l4-dst-only", RTE_ETH_RSS_L4_DST_ONLY },
+	{ "gtpu", RTE_ETH_RSS_GTPU },
+	{ "eth", RTE_ETH_RSS_ETH },
+	{ "s-vlan", RTE_ETH_RSS_S_VLAN },
+	{ "c-vlan", RTE_ETH_RSS_C_VLAN },
 	{ "esp", RTE_ETH_RSS_ESP },
 	{ "ah", RTE_ETH_RSS_AH },
 	{ "l2tpv3", RTE_ETH_RSS_L2TPV3 },
 	{ "pfcp", RTE_ETH_RSS_PFCP },
 	{ "pppoe", RTE_ETH_RSS_PPPOE },
-	{ "gtpu", RTE_ETH_RSS_GTPU },
-	{ "ecpri", RTE_ETH_RSS_ECPRI },
+	{"ecpri", RTE_ETH_RSS_ECPRI },
 	{ "mpls", RTE_ETH_RSS_MPLS },
 	{ "ipv4-chksum", RTE_ETH_RSS_IPV4_CHKSUM },
 	{ "l4-chksum", RTE_ETH_RSS_L4_CHKSUM },
 	{ "l2tpv2", RTE_ETH_RSS_L2TPV2 },
-	{ NULL, 0 },
+	{ "l3-pre96", RTE_ETH_RSS_L3_PRE96 },
+	{ "l3-pre64", RTE_ETH_RSS_L3_PRE64 },
+	{ "l3-pre56", RTE_ETH_RSS_L3_PRE56 },
+	{ "l3-pre48", RTE_ETH_RSS_L3_PRE48 },
+	{ "l3-pre40", RTE_ETH_RSS_L3_PRE40 },
+	{ "l3-pre32", RTE_ETH_RSS_L3_PRE32 },
+	{ "l2-dst-only", RTE_ETH_RSS_L2_DST_ONLY },
+	{ "l2-src-only", RTE_ETH_RSS_L2_SRC_ONLY },
+	{ "l4-dst-only", RTE_ETH_RSS_L4_DST_ONLY },
+	{ "l4-src-only", RTE_ETH_RSS_L4_SRC_ONLY },
+	{ "l3-dst-only", RTE_ETH_RSS_L3_DST_ONLY },
+	{ "l3-src-only", RTE_ETH_RSS_L3_SRC_ONLY },
+	{ NULL, 0},
 };
 
 static const struct {
-- 
2.33.0


  parent reply	other threads:[~2022-06-24  7:26 UTC|newest]

Thread overview: 72+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-29 10:24 [PATCH V2 0/2] fix RSS types display Huisong Li
2022-04-29 10:24 ` [PATCH V2 1/2] app/testpmd: fix supported RSS offload display Huisong Li
2022-04-29 10:24 ` [PATCH V2 2/2] app/testpmd: unify RSS types display Huisong Li
2022-06-07  8:32 ` [PATCH V3 app/testpmd 0/4] fix RSS types and flow type Huisong Li
2022-06-07  8:32   ` [PATCH V3 app/testpmd 1/4] app/testpmd: fix supported RSS offload display Huisong Li
2022-06-07 15:45     ` Ferruh Yigit
2022-06-09  3:25       ` lihuisong (C)
2022-06-17  1:38         ` lihuisong (C)
2022-06-20 12:35         ` Ferruh Yigit
2022-06-21  2:17           ` lihuisong (C)
2022-06-07  8:32   ` [PATCH V3 app/testpmd 2/4] app/testpmd: unify RSS types display and obtaination Huisong Li
2022-06-07 15:46     ` Ferruh Yigit
2022-06-09  3:25       ` lihuisong (C)
2022-06-07  8:32   ` [PATCH V3 app/testpmd 3/4] app/testpmd: compact RSS types output in some commands Huisong Li
2022-06-07 15:46     ` Ferruh Yigit
2022-06-09  3:41       ` lihuisong (C)
2022-06-20 12:37         ` Ferruh Yigit
2022-06-07  8:32   ` [PATCH V3 app/testpmd 4/4] app/testpmd: remove duplicated flow type to string table Huisong Li
2022-06-07 15:47     ` Ferruh Yigit
2022-06-09  3:26       ` lihuisong (C)
2022-06-20 12:38         ` Ferruh Yigit
2022-06-21  2:18           ` lihuisong (C)
2022-06-21  7:51             ` Ferruh Yigit
2022-06-21 12:21               ` lihuisong (C)
2022-06-24  4:12 ` [PATCH V4 0/7] app/testpmd: fix RSS and flow type Huisong Li
2022-06-24  4:12   ` [PATCH V4 1/7] app/testpmd: fix supported RSS offload display Huisong Li
2022-06-24  4:12   ` [PATCH V4 2/7] app/testpmd: unify the name of L2 payload offload Huisong Li
2022-06-24  4:12   ` [PATCH V4 3/7] app/testpmd: refactor config all RSS command Huisong Li
2022-06-24  4:12   ` [PATCH V4 4/7] app/testpmd: unify RSS types display Huisong Li
2022-06-24  4:12   ` [PATCH V4 5/7] app/testpmd: compact RSS types output in some commands Huisong Li
2022-06-24  4:12   ` [PATCH V4 6/7] app/testpmd: reorder elements in RSS type table array Huisong Li
2022-06-24  4:12   ` [PATCH V4 7/7] app/testpmd: remove duplicated flow type to string table Huisong Li
2022-06-24  7:23 ` [PATCH V5 0/7] app/testpmd: fix RSS and flow type Huisong Li
2022-06-24  7:23   ` [PATCH V5 1/7] app/testpmd: fix supported RSS offload display Huisong Li
2022-06-24 13:01     ` Ferruh Yigit
2022-06-25  2:12       ` lihuisong (C)
2022-06-28 13:18         ` Ferruh Yigit
2022-06-24  7:23   ` [PATCH V5 2/7] app/testpmd: unify the name of L2 payload offload Huisong Li
2022-06-24 13:53     ` Ferruh Yigit
2022-06-25  2:12       ` lihuisong (C)
2022-06-28 13:17         ` Ferruh Yigit
2022-06-29  1:47           ` lihuisong (C)
2022-06-24  7:23   ` [PATCH V5 3/7] app/testpmd: refactor config all RSS command Huisong Li
2022-06-24 13:55     ` Ferruh Yigit
2022-06-25  2:13       ` lihuisong (C)
2022-06-24  7:23   ` [PATCH V5 4/7] app/testpmd: unify RSS types display Huisong Li
2022-06-24  7:23   ` [PATCH V5 5/7] app/testpmd: compact RSS types output in some commands Huisong Li
2022-06-24 14:04     ` Ferruh Yigit
2022-06-25  2:13       ` lihuisong (C)
2022-06-28 13:18         ` Ferruh Yigit
2022-06-24  7:24   ` Huisong Li [this message]
2022-06-24 14:00     ` [PATCH V5 6/7] app/testpmd: reorder elements in RSS type table array Ferruh Yigit
2022-06-25  2:14       ` lihuisong (C)
2022-06-24  7:24   ` [PATCH V5 7/7] app/testpmd: remove duplicated flow type to string table Huisong Li
2022-06-24  8:55   ` [PATCH V5 0/7] app/testpmd: fix RSS and flow type lihuisong (C)
2022-06-24  8:59     ` David Marchand
2022-06-24  9:54       ` lihuisong (C)
2022-06-24 10:44         ` Ferruh Yigit
2022-06-25  1:09           ` lihuisong (C)
2022-06-28 13:18             ` Ferruh Yigit
2022-06-29  8:34 ` [PATCH V6 0/8] " Huisong Li
2022-06-29  8:34   ` [PATCH V6 1/8] app/testpmd: fix supported RSS offload display Huisong Li
2022-06-29  8:34   ` [PATCH V6 2/8] app/testpmd: unify the name of L2 payload offload Huisong Li
2022-06-29  8:34   ` [PATCH V6 3/8] doc: testpmd rename RSS type ether to L2 payload Huisong Li
2022-06-29  8:34   ` [PATCH V6 4/8] app/testpmd: refactor config all RSS command Huisong Li
2022-06-29  8:34   ` [PATCH V6 5/8] app/testpmd: unify RSS types display Huisong Li
2022-06-29  8:34   ` [PATCH V6 6/8] app/testpmd: compact RSS types output in some commands Huisong Li
2022-06-29  8:34   ` [PATCH V6 7/8] app/testpmd: reorder elements in RSS type table array Huisong Li
2022-06-29  8:34   ` [PATCH V6 8/8] app/testpmd: remove duplicated flow type to string table Huisong Li
2022-06-29  9:59   ` [PATCH V6 0/8] app/testpmd: fix RSS and flow type lihuisong (C)
2022-06-29 14:13     ` Ferruh Yigit
2022-06-29 20:05   ` Ferruh Yigit

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220624072401.21839-7-lihuisong@huawei.com \
    --to=lihuisong@huawei.com \
    --cc=aman.deep.singh@intel.com \
    --cc=andrew.rybchenko@oktetlabs.ru \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@xilinx.com \
    --cc=huangdaode@huawei.com \
    --cc=liudongdong3@huawei.com \
    --cc=thomas@monjalon.net \
    --cc=yuying.zhang@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).