Skip to contentSkip to conversation

extend RSS offload types

PATCH Superseded Simei Su 2 participants 10 messages Nov 16, 2020 – Nov 18, 2020

lore
Share & tools
lore

Simei Su

author
#0 lore raw

cover extend RSS offload types

[PATCH v1 1/2] ethdev: add RSS offload types.
[PATCH v1 2/2] app/testpmd: add cmdline support for RSS types.

Simei Su (2):
ethdev: add eCPRI RSS offload types
app/testpmd: support extended RSS offload types

 app/test-pmd/cmdline.c         | 9 ++++++---
 app/test-pmd/config.c          | 3 ++-
 lib/librte_ethdev/rte_ethdev.h | 1 +
 3 files changed, 9 insertions(+), 4 deletions(-)
Signature · 1 line
2.9.5
author
#1 lore raw

PATCH 1/2 ethdev: add eCPRI RSS offload types

This patch defines new RSS offload types for eCPRI. For eCPRI with Message Type 0, the hash field is physical channel ID.

---
 lib/librte_ethdev/rte_ethdev.h | 1 +
 1 file changed, 1 insertion(+)
lib/librte_ethdev/rte_ethdev.h +1 -0
index 69fc973..f5f8919 100644
@@ -525,6 +525,7 @@ struct rte_eth_rss_conf {
 #define ETH_RSS_L2TPV3             (1ULL << 29)
 #define ETH_RSS_PFCP               (1ULL << 30)
 #define ETH_RSS_PPPOE		   (1ULL << 31)
+#define ETH_RSS_ECPRI		   (1ULL << 32)
 
 /*
  * We use the following macros to combine with above ETH_RSS_* for
Signature · 1 line
2.9.5
Reviewed-by on v1 1/2
#2 lore raw

Re: [dpdk-dev] [PATCH v1 1/2] ethdev: add eCPRI RSS offload types

Quoted 13 lines · Simei Su

This patch defines new RSS offload types for eCPRI. For eCPRI with Message Type 0, the hash field is physical channel ID.

---
  lib/librte_ethdev/rte_ethdev.h | 1 +
  1 file changed, 1 insertion(+)
lib/librte_ethdev/rte_ethdev.h +0 -0
index 69fc973..f5f8919 100644

lib/librte_ethdev/rte_ethdev.h struct rte_eth_rss_conf { · line 529

Quoted 5 lines
lib/librte_ethdev/rte_ethdev.h +1 -0
@@ -525,6 +525,7 @@ struct rte_eth_rss_conf {
  #define ETH_RSS_L2TPV3             (1ULL << 29)
  #define ETH_RSS_PFCP               (1ULL << 30)
  #define ETH_RSS_PPPOE		   (1ULL << 31)
+#define ETH_RSS_ECPRI		   (1ULL << 32)
 
author
#3 lore raw

PATCH 2/2 app/testpmd: support extended RSS offload types

In reply to Simei Su

This patch adds testpmd cmdline support for eCPRI.

---
 app/test-pmd/cmdline.c | 9 ++++++---
 app/test-pmd/config.c  | 3 ++-
 2 files changed, 8 insertions(+), 4 deletions(-)
app/test-pmd/cmdline.c +6 -3
index 5e2881e..e5f3462 100644
@@ -2164,7 +2164,8 @@ cmd_config_rss_parsed(void *parsed_result,
 		rss_conf.rss_hf = ETH_RSS_ETH | ETH_RSS_VLAN | ETH_RSS_IP |
 			ETH_RSS_TCP | ETH_RSS_UDP | ETH_RSS_SCTP |
 			ETH_RSS_L2_PAYLOAD | ETH_RSS_L2TPV3 | ETH_RSS_ESP |
-			ETH_RSS_AH | ETH_RSS_PFCP | ETH_RSS_GTPU;
+			ETH_RSS_AH | ETH_RSS_PFCP | ETH_RSS_GTPU |
+			ETH_RSS_ECPRI;
 	else if (!strcmp(res->value, "eth"))
 		rss_conf.rss_hf = ETH_RSS_ETH;
 	else if (!strcmp(res->value, "vlan"))
@@ -2223,6 +2224,8 @@ cmd_config_rss_parsed(void *parsed_result,
 		rss_conf.rss_hf = ETH_RSS_PPPOE;
 	else if (!strcmp(res->value, "gtpu"))
 		rss_conf.rss_hf = ETH_RSS_GTPU;
+	else if (!strcmp(res->value, "ecpri"))
+		rss_conf.rss_hf = ETH_RSS_ECPRI;
 	else if (!strcmp(res->value, "none"))
 		rss_conf.rss_hf = 0;
 	else if (!strcmp(res->value, "level-default")) {
@@ -2407,7 +2410,7 @@ cmdline_parse_token_string_t cmd_config_rss_hash_key_rss_type =
 				 "ipv6-tcp-ex#ipv6-udp-ex#"
 				 "l3-src-only#l3-dst-only#l4-src-only#l4-dst-only#"
 				 "l2-src-only#l2-dst-only#s-vlan#c-vlan#"
-				 "l2tpv3#esp#ah#pfcp#pppoe#gtpu");
+				 "l2tpv3#esp#ah#pfcp#pppoe#gtpu#ecpri");
 cmdline_parse_token_string_t cmd_config_rss_hash_key_value =
 	TOKEN_STRING_INITIALIZER(struct cmd_config_rss_hash_key, key, NULL);
 
@@ -2420,7 +2423,7 @@ cmdline_parse_inst_t cmd_config_rss_hash_key = {
 		"l2-payload|ipv6-ex|ipv6-tcp-ex|ipv6-udp-ex|"
 		"l3-src-only|l3-dst-only|l4-src-only|l4-dst-only|"
 		"l2-src-only|l2-dst-only|s-vlan|c-vlan|"
-		"l2tpv3|esp|ah|pfcp|pppoe|gtpu "
+		"l2tpv3|esp|ah|pfcp|pppoe|gtpu|ecpri "
 		"<string of hex digits (variable length, NIC dependent)>",
 	.tokens = {
 		(void *)&cmd_config_rss_hash_key_port,
app/test-pmd/config.c +2 -1
index 91e7542..b51de59 100644
@@ -87,7 +87,7 @@ const struct rss_type_info rss_type_table[] = {
 	{ "all", ETH_RSS_ETH | ETH_RSS_VLAN | ETH_RSS_IP | ETH_RSS_TCP |
 		ETH_RSS_UDP | ETH_RSS_SCTP | ETH_RSS_L2_PAYLOAD |
 		ETH_RSS_L2TPV3 | ETH_RSS_ESP | ETH_RSS_AH | ETH_RSS_PFCP |
-		ETH_RSS_GTPU},
+		ETH_RSS_GTPU | ETH_RSS_ECPRI},
 	{ "none", 0 },
 	{ "eth", ETH_RSS_ETH },
 	{ "l2-src-only", ETH_RSS_L2_SRC_ONLY },
@@ -136,6 +136,7 @@ const struct rss_type_info rss_type_table[] = {
 	{ "pfcp", ETH_RSS_PFCP },
 	{ "pppoe", ETH_RSS_PPPOE },
 	{ "gtpu", ETH_RSS_GTPU },
+	{ "ecpri", ETH_RSS_ECPRI },
 	{ NULL, 0 },
 };
 
Signature · 1 line
2.9.5
#4 lore raw

Re: [dpdk-dev] [PATCH v1 2/2] app/testpmd: support extended RSS offload types

Quoted 23 lines · Simei Su

This patch adds testpmd cmdline support for eCPRI.

---
  app/test-pmd/cmdline.c | 9 ++++++---
  app/test-pmd/config.c  | 3 ++-
  2 files changed, 8 insertions(+), 4 deletions(-)
app/test-pmd/cmdline.c +2 -1
index 5e2881e..e5f3462 100644
@@ -2164,7 +2164,8 @@ cmd_config_rss_parsed(void *parsed_result,
  		rss_conf.rss_hf = ETH_RSS_ETH | ETH_RSS_VLAN | ETH_RSS_IP |
  			ETH_RSS_TCP | ETH_RSS_UDP | ETH_RSS_SCTP |
  			ETH_RSS_L2_PAYLOAD | ETH_RSS_L2TPV3 | ETH_RSS_ESP |
-			ETH_RSS_AH | ETH_RSS_PFCP | ETH_RSS_GTPU;
+			ETH_RSS_AH | ETH_RSS_PFCP | ETH_RSS_GTPU |
+			ETH_RSS_ECPRI;
  	else if (!strcmp(res->value, "eth"))
  		rss_conf.rss_hf = ETH_RSS_ETH;
  	else if (!strcmp(res->value, "vlan"))

app/test-pmd/cmdline.c cmd_config_rss_parsed(void *parsed_result, · line 2231

Quoted 8 lines
app/test-pmd/cmdline.c +2 -0
@@ -2223,6 +2224,8 @@ cmd_config_rss_parsed(void *parsed_result,
  		rss_conf.rss_hf = ETH_RSS_PPPOE;
  	else if (!strcmp(res->value, "gtpu"))
  		rss_conf.rss_hf = ETH_RSS_GTPU;
+	else if (!strcmp(res->value, "ecpri"))
+		rss_conf.rss_hf = ETH_RSS_ECPRI;
  	else if (!strcmp(res->value, "none"))
  		rss_conf.rss_hf = 0;
  	else if (!strcmp(res->value, "level-default")) {

Can you please update 'cmd_config_rss.help_str' to add the 'ecpri'?

Also please update 'cmd_help_long_parsed()', "port config all rss ..." cmd to add the 'ecpri'.

And please update the documentation (doc/guides/testpmd_app_ug/testpmd_funcs.rst), add 'ecpri' to the section "port config - RSS"

author
#5 lore raw

v2 cover extend RSS offload types

In reply to Simei Su

[PATCH v2 1/2] ethdev: add RSS offload types.
[PATCH v2 2/2] app/testpmd: add cmdline support for RSS types.

v2:
* Update cmd_config_rss.help_str and cmd_help_long_parsed() to add the ecpri.
* Update the documentation to add the ecpri.

Simei Su (2):
ethdev: add eCPRI RSS offload types
app/testpmd: support extended RSS offload types

 app/test-pmd/cmdline.c                      | 13 ++++++++-----
 app/test-pmd/config.c                       |  3 ++-
 doc/guides/testpmd_app_ug/testpmd_funcs.rst |  2 +-
 lib/librte_ethdev/rte_ethdev.h              |  1 +
 4 files changed, 12 insertions(+), 7 deletions(-)
Signature · 1 line
2.9.5
author
#6 lore raw

PATCH v2 1/2 ethdev: add eCPRI RSS offload types

This patch defines new RSS offload types for eCPRI. For eCPRI with Message Type 0, the hash field is physical channel ID.

---
 lib/librte_ethdev/rte_ethdev.h | 1 +
 1 file changed, 1 insertion(+)
lib/librte_ethdev/rte_ethdev.h +1 -0
index 69fc973..f5f8919 100644
@@ -525,6 +525,7 @@ struct rte_eth_rss_conf {
 #define ETH_RSS_L2TPV3             (1ULL << 29)
 #define ETH_RSS_PFCP               (1ULL << 30)
 #define ETH_RSS_PPPOE		   (1ULL << 31)
+#define ETH_RSS_ECPRI		   (1ULL << 32)
 
 /*
  * We use the following macros to combine with above ETH_RSS_* for
Signature · 1 line
2.9.5
author
#7 lore raw

PATCH v2 2/2 app/testpmd: support extended RSS offload types

In reply to Simei Su

This patch adds testpmd cmdline support for eCPRI.

---
 app/test-pmd/cmdline.c                      | 13 ++++++++-----
 app/test-pmd/config.c                       |  3 ++-
 doc/guides/testpmd_app_ug/testpmd_funcs.rst |  2 +-
 3 files changed, 11 insertions(+), 7 deletions(-)
app/test-pmd/cmdline.c +8 -5
index 5e2881e..bde0de5 100644
@@ -788,7 +788,7 @@ static void cmd_help_long_parsed(void *parsed_result,
 			"receive buffers available.\n\n"
 
 			"port config all rss (all|default|ip|tcp|udp|sctp|"
-			"ether|port|vxlan|geneve|nvgre|vxlan-gpe|none|level-default|"
+			"ether|port|vxlan|geneve|nvgre|vxlan-gpe|ecpri|none|level-default|"
 			"level-outer|level-inner|<flowtype_id>)\n"
 			"    Set the RSS mode.\n\n"
 
@@ -2164,7 +2164,8 @@ cmd_config_rss_parsed(void *parsed_result,
 		rss_conf.rss_hf = ETH_RSS_ETH | ETH_RSS_VLAN | ETH_RSS_IP |
 			ETH_RSS_TCP | ETH_RSS_UDP | ETH_RSS_SCTP |
 			ETH_RSS_L2_PAYLOAD | ETH_RSS_L2TPV3 | ETH_RSS_ESP |
-			ETH_RSS_AH | ETH_RSS_PFCP | ETH_RSS_GTPU;
+			ETH_RSS_AH | ETH_RSS_PFCP | ETH_RSS_GTPU |
+			ETH_RSS_ECPRI;
 	else if (!strcmp(res->value, "eth"))
 		rss_conf.rss_hf = ETH_RSS_ETH;
 	else if (!strcmp(res->value, "vlan"))
@@ -2223,6 +2224,8 @@ cmd_config_rss_parsed(void *parsed_result,
 		rss_conf.rss_hf = ETH_RSS_PPPOE;
 	else if (!strcmp(res->value, "gtpu"))
 		rss_conf.rss_hf = ETH_RSS_GTPU;
+	else if (!strcmp(res->value, "ecpri"))
+		rss_conf.rss_hf = ETH_RSS_ECPRI;
 	else if (!strcmp(res->value, "none"))
 		rss_conf.rss_hf = 0;
 	else if (!strcmp(res->value, "level-default")) {
@@ -2293,7 +2296,7 @@ cmdline_parse_inst_t cmd_config_rss = {
 	.data = NULL,
 	.help_str = "port config all rss "
 		"all|default|eth|vlan|ip|tcp|udp|sctp|ether|port|vxlan|geneve|"
-		"nvgre|vxlan-gpe|l2tpv3|esp|ah|pfcp|none|level-default|"
+		"nvgre|vxlan-gpe|l2tpv3|esp|ah|pfcp|ecpri|none|level-default|"
 		"level-outer|level-inner|<flowtype_id>",
 	.tokens = {
 		(void *)&cmd_config_rss_port,
@@ -2407,7 +2410,7 @@ cmdline_parse_token_string_t cmd_config_rss_hash_key_rss_type =
 				 "ipv6-tcp-ex#ipv6-udp-ex#"
 				 "l3-src-only#l3-dst-only#l4-src-only#l4-dst-only#"
 				 "l2-src-only#l2-dst-only#s-vlan#c-vlan#"
-				 "l2tpv3#esp#ah#pfcp#pppoe#gtpu");
+				 "l2tpv3#esp#ah#pfcp#pppoe#gtpu#ecpri");
 cmdline_parse_token_string_t cmd_config_rss_hash_key_value =
 	TOKEN_STRING_INITIALIZER(struct cmd_config_rss_hash_key, key, NULL);
 
@@ -2420,7 +2423,7 @@ cmdline_parse_inst_t cmd_config_rss_hash_key = {
 		"l2-payload|ipv6-ex|ipv6-tcp-ex|ipv6-udp-ex|"
 		"l3-src-only|l3-dst-only|l4-src-only|l4-dst-only|"
 		"l2-src-only|l2-dst-only|s-vlan|c-vlan|"
-		"l2tpv3|esp|ah|pfcp|pppoe|gtpu "
+		"l2tpv3|esp|ah|pfcp|pppoe|gtpu|ecpri "
 		"<string of hex digits (variable length, NIC dependent)>",
 	.tokens = {
 		(void *)&cmd_config_rss_hash_key_port,
app/test-pmd/config.c +2 -1
index 91e7542..b51de59 100644
@@ -87,7 +87,7 @@ const struct rss_type_info rss_type_table[] = {
 	{ "all", ETH_RSS_ETH | ETH_RSS_VLAN | ETH_RSS_IP | ETH_RSS_TCP |
 		ETH_RSS_UDP | ETH_RSS_SCTP | ETH_RSS_L2_PAYLOAD |
 		ETH_RSS_L2TPV3 | ETH_RSS_ESP | ETH_RSS_AH | ETH_RSS_PFCP |
-		ETH_RSS_GTPU},
+		ETH_RSS_GTPU | ETH_RSS_ECPRI},
 	{ "none", 0 },
 	{ "eth", ETH_RSS_ETH },
 	{ "l2-src-only", ETH_RSS_L2_SRC_ONLY },
@@ -136,6 +136,7 @@ const struct rss_type_info rss_type_table[] = {
 	{ "pfcp", ETH_RSS_PFCP },
 	{ "pppoe", ETH_RSS_PPPOE },
 	{ "gtpu", ETH_RSS_GTPU },
+	{ "ecpri", ETH_RSS_ECPRI },
 	{ NULL, 0 },
 };
 
doc/guides/testpmd_app_ug/testpmd_funcs.rst +1 -1
index ebf7e68..9be4500 100644
@@ -2270,7 +2270,7 @@ port config - RSS
 
 Set the RSS (Receive Side Scaling) mode on or off::
 
-   testpmd> port config all rss (all|default|eth|vlan|ip|tcp|udp|sctp|ether|port|vxlan|geneve|nvgre|vxlan-gpe|l2tpv3|esp|ah|pfcp|none)
+   testpmd> port config all rss (all|default|eth|vlan|ip|tcp|udp|sctp|ether|port|vxlan|geneve|nvgre|vxlan-gpe|l2tpv3|esp|ah|pfcp|ecpri|none)
 
 RSS is on by default.
 
Signature · 1 line
2.9.5
#9 lore raw
In reply to Simei Su
Quoted 11 lines · Simei Su

[PATCH v2 1/2] ethdev: add RSS offload types.
[PATCH v2 2/2] app/testpmd: add cmdline support for RSS types.

v2:
* Update cmd_config_rss.help_str and cmd_help_long_parsed() to add the ecpri.
* Update the documentation to add the ecpri.

Simei Su (2):
ethdev: add eCPRI RSS offload types app/testpmd: support extended RSS offload types

Series applied to dpdk-next-net/main, thanks.