add RSS configuration for iavf
Subsystems (2)
cover add RSS configuration for iavf
Because the VF must be capable of configuring RSS, so add RSS configuration for iavf. The supported protocol rss input set as below.
eth-src-only/
eth-dst-only/
svlan/
cvlan/
ipv4/
ipv6/
l3_src_only/
l3_dst_only/
l2tpv3/
esp/
ah/
pfcp/
gtpu down/
gtpu up/
udp/
tcp/
sctp/
This patchset depends on below patch sets. (1)http://patches.dpdk.org/project/dpdk/list/?series=8961
net/iavf: support FDIR capabiltiy
(2)http://patches.dpdk.org/project/dpdk/list/?series=8950
add generic filter support for iavf
Jeff Guo (4):
ethdev: add new RSS offload types
net/iavf: add RSS configuration for VFs
app/testpmd: support GTP PDU type
app/testpmd: add new types to RSS hash commands
app/test-pmd/cmdline.c | 24 +- app/test-pmd/cmdline_flow.c | 11 +- app/test-pmd/config.c | 8 + drivers/net/iavf/Makefile | 1 + drivers/net/iavf/iavf.h | 10 + drivers/net/iavf/iavf_hash.c | 1134 ++++++++++++++++++++++++++++++++ drivers/net/iavf/iavf_vchnl.c | 33 +- drivers/net/iavf/meson.build | 1 + lib/librte_ethdev/rte_ethdev.h | 12 +- 9 files changed, 1225 insertions(+), 9 deletions(-) create mode 100644 drivers/net/iavf/iavf_hash.c
Signature · 1 line
2.20.1
PATCH 1/4 ethdev: add new RSS offload types
Defines some new RSS offload types for ETH/SVLAN/CVLAN/GTPU/L2TPV3/ ESP/AH/PFCP.
--- lib/librte_ethdev/rte_ethdev.h | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-)
lib/librte_ethdev/rte_ethdev.h +11 -1
@@ -524,7 +524,17 @@ struct rte_eth_rss_conf {#define ETH_RSS_L3_SRC_ONLY (1ULL << 63)#define ETH_RSS_L3_DST_ONLY (1ULL << 62)#define ETH_RSS_L4_SRC_ONLY (1ULL << 61) -#define ETH_RSS_L4_DST_ONLY (1ULL << 60) +#define ETH_RSS_L4_DST_ONLY (1ULL << 60) +#define ETH_RSS_ETH_SRC_ONLY (1ULL << 59) +#define ETH_RSS_ETH_DST_ONLY (1ULL << 58) +#define ETH_RSS_S_VLAN (1ULL << 57) +#define ETH_RSS_C_VLAN (1ULL << 56) +#define ETH_RSS_ESP_SPI (1ULL << 55) +#define ETH_RSS_AH_SPI (1ULL << 54) +#define ETH_RSS_L2TPV3_SESS_ID (1ULL << 53) +#define ETH_RSS_GTPU_UP (1ULL << 52) +#define ETH_RSS_GTPU_DWN (1ULL << 51) +#define ETH_RSS_PFCP_SEID (1ULL << 50)/** * For input set change of hash filter, if SRC_ONLY and DST_ONLY of
Signature · 1 line
2.20.1
PATCH 2/4 net/iavf: add RSS configuration for VFs
In reply to Jeff GuoAdd RSS configuration for VFs. The VF must be capable of configuring RSS.
--- drivers/net/iavf/Makefile | 1 + drivers/net/iavf/iavf.h | 10 + drivers/net/iavf/iavf_hash.c | 1134 +++++++++++++++++++++++++++++++++ drivers/net/iavf/iavf_vchnl.c | 33 +- drivers/net/iavf/meson.build | 1 + 5 files changed, 1174 insertions(+), 5 deletions(-) create mode 100644 drivers/net/iavf/iavf_hash.c
drivers/net/iavf/Makefile +1 -0
@@ -24,6 +24,7 @@ SRCS-$(CONFIG_RTE_LIBRTE_IAVF_PMD) += iavf_ethdev.c SRCS-$(CONFIG_RTE_LIBRTE_IAVF_PMD) += iavf_vchnl.c SRCS-$(CONFIG_RTE_LIBRTE_IAVF_PMD) += iavf_rxtx.c SRCS-$(CONFIG_RTE_LIBRTE_IAVF_PMD) += iavf_generic_flow.c +SRCS-$(CONFIG_RTE_LIBRTE_IAVF_PMD) += iavf_hash.c ifeq ($(CONFIG_RTE_ARCH_X86), y) SRCS-$(CONFIG_RTE_LIBRTE_IAVF_PMD) += iavf_rxtx_vec_sse.c endif
drivers/net/iavf/iavf.h +10 -0
@@ -74,6 +74,13 @@#define IAVF_COMMS_PROTO_L2TPv3 0x0000000000000008#define IAVF_COMMS_PROTO_ESP 0x0000000000000010 +/* DDP package type */ +enum ice_pkg_type { +IAVF_PKG_TYPE_UNKNOWN , +IAVF_PKG_TYPE_OS_DEFAULT , +IAVF_PKG_TYPE_COMMS , +}; +struct iavf_adapter ;struct iavf_rx_queue ;struct iavf_tx_queue ;
@@ -151,6 +158,7 @@ struct iavf_adapter {bool tx_vec_allowed;const uint32_t *ptype_tbl;bool stopped; +enum ice_pkg_type active_pkg_type;/* loaded ddp package type */ };/* IAVF_DEV_PRIVATE_TO */
@@ -256,4 +264,6 @@ int iavf_config_promisc(struct iavf_adapter *adapter, bool enable_unicast,int iavf_add_del_eth_addr (struct iavf_adapter *adapter,struct rte_ether_addr *addr,bool add);int iavf_add_del_vlan (struct iavf_adapter *adapter,uint16_t vlanid,bool add); +int iavf_add_del_rss_cfg (struct iavf_adapter *adapter, +struct virtchnl_rss_cfg *rss_cfg,bool add);#endif /* _IAVF_ETHDEV_H_ */
drivers/net/iavf/iavf_hash.c new file +1134 -0
1,134 lines not on this page · raw message
drivers/net/iavf/iavf_vchnl.c +28 -5
@@ -336,13 +336,10 @@ iavf_get_vf_resource(struct iavf_adapter *adapter) args.out_buffer = vf->aq_resp; args.out_size =IAVF_AQ_BUF_SZ ; -/* TODO: basic offload capabilities, need to -* add advanced/optional offload capabilities -*/ - caps =IAVF_BASIC_OFFLOAD_CAPS |VIRTCHNL_VF_CAP_ADV_LINK_SPEED |VIRTCHNL_VF_OFFLOAD_QUERY_DDP | -VIRTCHNL_VF_OFFLOAD_RX_FLEX_DESC ; +VIRTCHNL_VF_OFFLOAD_RX_FLEX_DESC | +VIRTCHNL_VF_OFFLOAD_ADV_RSS_PF ; args.in_args = (uint8_t *)∩︀ args.in_args_size =sizeof (caps);
@@ -867,3 +864,29 @@ iavf_add_del_vlan(struct iavf_adapter *adapter, uint16_t vlanid, bool add)return err; } + +int +iavf_add_del_rss_cfg (struct iavf_adapter *adapter, +struct virtchnl_rss_cfg *rss_cfg,bool add) +{ +struct iavf_info *vf =IAVF_DEV_PRIVATE_TO_VF (adapter); +struct iavf_cmd_info args; +int err; + +memset (&args,0 ,sizeof (args)); + args.ops = add ?VIRTCHNL_OP_ADD_RSS_CFG : +VIRTCHNL_OP_DEL_RSS_CFG ; + args.in_args = (u8 *)rss_cfg; + args.in_args_size =sizeof (*rss_cfg); + args.out_buffer = vf->aq_resp; + args.out_size =IAVF_AQ_BUF_SZ ; + + err =iavf_execute_vf_cmd (adapter, &args); +if (err) +PMD_DRV_LOG (ERR , +"Failed to execute command of %s" , + add ?"OP_ADD_RSS_CFG" : +"OP_DEL_RSS_INPUT_CFG" ); + +return err; +}
drivers/net/iavf/meson.build +1 -0
@@ -13,6 +13,7 @@ sources = files( 'iavf_rxtx.c', 'iavf_vchnl.c', 'iavf_generic_flow.c', + 'iavf_hash.c', ) if arch_subdir == 'x86'
Signature · 1 line
2.20.1
PATCH 3/4 app/testpmd: support GTP PDU type
In reply to Jeff GuoAdd gtp pdu type configure in the cmdline.
--- app/test-pmd/cmdline_flow.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-)
app/test-pmd/cmdline_flow.c +10 -1
@@ -49,6 +49,7 @@ enum index {PORT_ID ,GROUP_ID ,PRIORITY_LEVEL , +GTP_PSC_PDU_T ,/* Top-level command. */ SET,
@@ -1626,6 +1627,13 @@ static const struct token token_list[] = { .call = parse_int, .comp = comp_none, }, + [GTP_PSC_PDU_T] = { + .name = "{GTPU pdu type}", + .type = "INTEGER", + .help = "gtpu pdu uplink/downlink identifier", + .call = parse_int, + .comp = comp_none, + },/* Top-level command. */ [FLOW] = { .name = "flow",
@@ -2615,7 +2623,8 @@ static const struct token token_list[] = { [ITEM_GTP_PSC_PDU_T] = { .name = "pdu_t", .help = "PDU type", - .next = NEXT(item_gtp_psc, NEXT_ENTRY(UNSIGNED), item_param), + .next =NEXT (item_gtp_psc,NEXT_ENTRY (GTP_PSC_PDU_T ), + item_param), .args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_gtp_psc, pdu_type)), },
Signature · 1 line
2.20.1
PATCH 4/4 app/testpmd: add new types to RSS hash commands
In reply to Jeff GuoAdd some new types, such as eth-src-only/eth-dst-only/svlan/cvlan/ l2tpv3/esp/ah/pfcp types into RSS hash commands, it could be used to configure these rss input set by cmdline.
--- app/test-pmd/cmdline.c | 24 ++++++++++++++++++++++-- app/test-pmd/config.c | 8 ++++++++ 2 files changed, 30 insertions(+), 2 deletions(-)
app/test-pmd/cmdline.c +22 -2
@@ -2299,6 +2299,22 @@ cmd_config_rss_parsed(void *parsed_result, rss_conf.rss_hf =ETH_RSS_L4_SRC_ONLY ; else if (!strcmp(res->value, "l4-dst-only")) rss_conf.rss_hf =ETH_RSS_L4_DST_ONLY ; + else if (!strcmp(res->value, "eth-src-only")) + rss_conf.rss_hf =ETH_RSS_ETH_SRC_ONLY ; + else if (!strcmp(res->value, "eth-dst-only")) + rss_conf.rss_hf =ETH_RSS_ETH_DST_ONLY ; + else if (!strcmp(res->value, "s-vlan")) + rss_conf.rss_hf =ETH_RSS_S_VLAN ; + else if (!strcmp(res->value, "c-vlan")) + rss_conf.rss_hf =ETH_RSS_C_VLAN ; + else if (!strcmp(res->value, "l2tpv3")) + rss_conf.rss_hf =ETH_RSS_L2TPV3_SESS_ID ; + else if (!strcmp(res->value, "esp")) + rss_conf.rss_hf =ETH_RSS_ESP_SPI ; + else if (!strcmp(res->value, "ah")) + rss_conf.rss_hf =ETH_RSS_AH_SPI ; + else if (!strcmp(res->value, "pfcp")) + rss_conf.rss_hf =ETH_RSS_PFCP_SEID ; else if (!strcmp(res->value, "none")) rss_conf.rss_hf =0 ; else if (!strcmp(res->value, "default"))
@@ -2467,7 +2483,9 @@ cmdline_parse_token_string_t cmd_config_rss_hash_key_rss_type ="ipv4-other#ipv6#ipv6-frag#ipv6-tcp#ipv6-udp#" "ipv6-sctp#ipv6-other#l2-payload#ipv6-ex#" "ipv6-tcp-ex#ipv6-udp-ex#" - "l3-src-only#l3-dst-only#l4-src-only#l4-dst-only"); +"l3-src-only#l3-dst-only#l4-src-only#l4-dst-only#" +"eth-src-only#eth-dst-only#s-vlan#c-vlan#" + "l2tpv3#esp#ah#pfcp");cmdline_parse_token_string_t cmd_config_rss_hash_key_value = TOKEN_STRING_INITIALIZER(struct cmd_config_rss_hash_key, key, NULL);
@@ -2478,7 +2496,9 @@ cmdline_parse_inst_t cmd_config_rss_hash_key = {"ipv4|ipv4-frag|ipv4-tcp|ipv4-udp|ipv4-sctp|ipv4-other|" "ipv6|ipv6-frag|ipv6-tcp|ipv6-udp|ipv6-sctp|ipv6-other|" "l2-payload|ipv6-ex|ipv6-tcp-ex|ipv6-udp-ex|" -"l3-src-only|l3-dst-only|l4-src-only|l4-dst-only " +"l3-src-only|l3-dst-only|l4-src-only|l4-dst-only|" +"eth-src-only|eth-dst-only|s-vlan|c-vlan|" +"l2tpv3|esp|ah|pfcp " "<string of hex digits (variable length, NIC dependent)>", .tokens = { (void *)&cmd_config_rss_hash_key_port,
app/test-pmd/config.c +8 -0
@@ -77,6 +77,10 @@ const struct rss_type_info rss_type_table[] = {ETH_RSS_UDP |ETH_RSS_SCTP | ETH_RSS_L2_PAYLOAD }, { "none", 0 }, + { "eth-src-only", ETH_RSS_ETH_SRC_ONLY }, + { "eth-dst-only", ETH_RSS_ETH_DST_ONLY }, + { "s-vlan", ETH_RSS_S_VLAN }, + { "c-vlan", ETH_RSS_C_VLAN }, { "ipv4", ETH_RSS_IPV4 }, { "ipv4-frag", ETH_RSS_FRAG_IPV4 }, { "ipv4-tcp", ETH_RSS_NONFRAG_IPV4_TCP },
@@ -106,6 +110,10 @@ const struct rss_type_info rss_type_table[] = { { "l3-dst-only", ETH_RSS_L3_DST_ONLY }, { "l4-src-only", ETH_RSS_L4_SRC_ONLY }, { "l4-dst-only", ETH_RSS_L4_DST_ONLY }, + { "l2tpv3", ETH_RSS_L2TPV3_SESS_ID }, + { "esp", ETH_RSS_ESP_SPI }, + { "ah", ETH_RSS_AH_SPI }, + { "pfcp", ETH_RSS_PFCP_SEID }, { NULL, 0 }, };
Signature · 1 line
2.20.1
v2 cover add RSS configuration for iavf
Because the VF must be capable of configuring RSS, so add RSS configuration for iavf. The supported protocol rss input set as below.
eth-src-only/
eth-dst-only/
svlan/
cvlan/
ipv4/
ipv6/
l3_src_only/
l3_dst_only/
l2tpv3/
esp/
ah/
pfcp/
gtpu down/
gtpu up/
udp/
tcp/
sctp/
This patchset depends on below patch sets. (1)http://patches.dpdk.org/project/dpdk/list/?series=8961
net/iavf: support FDIR capabiltiy
(2)http://patches.dpdk.org/project/dpdk/list/?series=8950
add generic filter support for iavf
v1:
1.refine some rte eth rss offload types.
2.add NAT T ESP and refine gtpu down/up
3.reference some fixing patch from pf side.
Jeff Guo (4):
ethdev: add new RSS offload types
net/iavf: add RSS configuration for VFs
app/testpmd: support GTP PDU type
app/testpmd: add new types to RSS hash commands
app/test-pmd/cmdline.c | 24 +- app/test-pmd/cmdline_flow.c | 11 +- app/test-pmd/config.c | 8 + drivers/net/iavf/Makefile | 1 + drivers/net/iavf/iavf.h | 10 + drivers/net/iavf/iavf_hash.c | 1157 ++++++++++++++++++++++++++++++++ drivers/net/iavf/iavf_vchnl.c | 33 +- drivers/net/iavf/meson.build | 1 + lib/librte_ethdev/rte_ethdev.h | 11 +- 9 files changed, 1247 insertions(+), 9 deletions(-) create mode 100644 drivers/net/iavf/iavf_hash.c
Signature · 1 line
2.20.1
PATCH v2 1/4 ethdev: add new RSS offload types
Defines some new RSS offload types for ETH/SVLAN/CVLAN/GTPU/L2TPV3/ ESP/AH/PFCP.
---
v1:
1.refine some rte eth rss offload types.
--- lib/librte_ethdev/rte_ethdev.h | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-)
lib/librte_ethdev/rte_ethdev.h +10 -1
@@ -511,6 +511,13 @@ struct rte_eth_rss_conf {#define ETH_RSS_GENEVE (1ULL << 20)#define ETH_RSS_NVGRE (1ULL << 21)#define ETH_RSS_GTPU (1ULL << 23) +#define ETH_RSS_ETH (1ULL << 24) +#define ETH_RSS_S_VLAN (1ULL << 25) +#define ETH_RSS_C_VLAN (1ULL << 26) +#define ETH_RSS_IPSEC_ESP (1ULL << 27) +#define ETH_RSS_IPSEC_AH (1ULL << 28) +#define ETH_RSS_L2TPV3 (1ULL << 29) +#define ETH_RSS_PFCP (1ULL << 30)/* * We use the following macros to combine with above ETH_RSS_* for
@@ -524,7 +531,9 @@ struct rte_eth_rss_conf {#define ETH_RSS_L3_SRC_ONLY (1ULL << 63)#define ETH_RSS_L3_DST_ONLY (1ULL << 62)#define ETH_RSS_L4_SRC_ONLY (1ULL << 61) -#define ETH_RSS_L4_DST_ONLY (1ULL << 60) +#define ETH_RSS_L4_DST_ONLY (1ULL << 60) +#define ETH_RSS_ETH_SRC_ONLY (1ULL << 59) +#define ETH_RSS_ETH_DST_ONLY (1ULL << 58)/** * For input set change of hash filter, if SRC_ONLY and DST_ONLY of
Signature · 1 line
2.20.1
Re: [dpdk-dev] [dpdk-dev v2 1/4] ethdev: add new RSS offload types
Hi Jeff,
Quoted 26 lines
-----Original Message-----
From: dev <[email protected]> On Behalf Of Jeff Guo
Sent: Thursday, March 26, 2020 4:41 PM
To: Ye, Xiaolong <[email protected]>; Zhang, Qi Z <[email protected]>
Cc: [email protected]; Wu, Jingjing <[email protected]>; Cao, Yahui <[email protected]>; Su, Simei <[email protected]>; Guo, Jia <[email protected]>
Subject: [dpdk-dev] [dpdk-dev v2 1/4] ethdev: add new RSS offload typesDefines some new RSS offload types for ETH/SVLAN/CVLAN/GTPU/L2TPV3/ ESP/AH/PFCP.
Signed-off-by Jeff Guo <[email protected]>---
v1:
1.refine some rte eth rss offload types.--- lib/librte_ethdev/rte_ethdev.h | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-)lib/librte_ethdev/rte_ethdev.h +0
-0
lib/librte_ethdev/rte_ethdev.h struct rte_eth_rss_conf { · line 518
Quoted 8 lines
lib/librte_ethdev/rte_ethdev.h +5
-0@@ -511,6 +511,13 @@ struct rte_eth_rss_conf {#define ETH_RSS_GENEVE (1ULL << 20)#define ETH_RSS_NVGRE (1ULL << 21)#define ETH_RSS_GTPU (1ULL << 23) +#define ETH_RSS_ETH (1ULL << 24) +#define ETH_RSS_S_VLAN (1ULL << 25) +#define ETH_RSS_C_VLAN (1ULL << 26) +#define ETH_RSS_IPSEC_ESP (1ULL << 27) +#define ETH_RSS_IPSEC_AH (1ULL << 28)
Is IPSEC needed in above ESP and AH macros?
Would ETH_RSS_ESP and ETH_RSS_AH be sufficient ?
Quoted 17 lines
lib/librte_ethdev/rte_ethdev.h +2
-0+#define ETH_RSS_L2TPV3 (1ULL << 29) +#define ETH_RSS_PFCP (1ULL << 30)/* * We use the following macros to combine with above ETH_RSS_* for @@ - 524,7 +531,9 @@ struct
rte_eth_rss_conf{#define ETH_RSS_L3_SRC_ONLY (1ULL << 63) #define ETH_RSS_L3_DST_ONLY (1ULL << 62) #define ETH_RSS_L4_SRC_ONLY (1ULL << 61)lib/librte_ethdev/rte_ethdev.h +3
-2-#define ETH_RSS_L4_DST_ONLY (1ULL << 60) +#define ETH_RSS_L4_DST_ONLY (1ULL << 60) +#define ETH_RSS_ETH_SRC_ONLY (1ULL << 59) +#define ETH_RSS_ETH_DST_ONLY (1ULL << 58)/** * For input set change of hash filter, if SRC_ONLY and DST_ONLY of --
Quoted 1 line
2.20.1
Regards,
Bernard.
Re: [dpdk-dev] [dpdk-dev v2 1/4] ethdev: add new RSS offload types
Quoted 36 lines
-----Original Message-----
From: Iremonger, Bernard <[email protected]>
Sent: Wednesday, April 8, 2020 1:02 AM
To: Guo, Jia <[email protected]>; Ye, Xiaolong <[email protected]>; Zhang, Qi Z <[email protected]>
Cc: [email protected]; Wu, Jingjing <[email protected]>; Cao, Yahui <[email protected]>; Su, Simei <[email protected]>; Guo, Jia <[email protected]>
Subject: RE: [dpdk-dev] [dpdk-dev v2 1/4] ethdev: add new RSS offload typesHi Jeff,
Quoted 22 lines
-----Original Message-----
From: dev <[email protected]> On Behalf Of Jeff Guo
Sent: Thursday, March 26, 2020 4:41 PM
To: Ye, Xiaolong <[email protected]>; Zhang, Qi Z <[email protected]>
Cc: [email protected]; Wu, Jingjing <[email protected]>; Cao, Yahui <[email protected]>; Su, Simei <[email protected]>; Guo, Jia <[email protected]>
Subject: [dpdk-dev] [dpdk-dev v2 1/4] ethdev: add new RSS offload typesDefines some new RSS offload types for ETH/SVLAN/CVLAN/GTPU/L2TPV3/ ESP/AH/PFCP.
Signed-off-by Jeff Guo <[email protected]>---
v1:
1.refine some rte eth rss offload types.--- lib/librte_ethdev/rte_ethdev.h | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-)
Quoted 16 lines
lib/librte_ethdev/rte_ethdev.h struct rte_eth_rss_conf { · line 518
Quoted 13 lines
(quoted diff) +0
-0
b/lib/librte_ethdev/rte_ethdev.hindexd1a593ad1..29cdf07cd100644lib/librte_ethdev/rte_ethdev.h +5
-0@@ -511,6 +511,13 @@ struct rte_eth_rss_conf {#define ETH_RSS_GENEVE (1ULL << 20)#define ETH_RSS_NVGRE (1ULL << 21)#define ETH_RSS_GTPU (1ULL << 23) +#define ETH_RSS_ETH (1ULL << 24) +#define ETH_RSS_S_VLAN (1ULL << 25) +#define ETH_RSS_C_VLAN (1ULL << 26) +#define ETH_RSS_IPSEC_ESP (1ULL << 27) +#define ETH_RSS_IPSEC_AH (1ULL << 28)Is IPSEC needed in above ESP and AH macros?
WouldETH_RSS_ESPandETH_RSS_AHbe sufficient ?
+1
Quoted 25 lines
lib/librte_ethdev/rte_ethdev.h struct rte_eth_rss_conf { · line 523
Quoted 6 lines
lib/librte_ethdev/rte_ethdev.h +2
-0+#define ETH_RSS_L2TPV3 (1ULL << 29) +#define ETH_RSS_PFCP (1ULL << 30)/* * We use the following macros to combine with above ETH_RSS_* for @@
Quoted 13 lines
-
524,7 +531,9 @@ structrte_eth_rss_conf{#define ETH_RSS_L3_SRC_ONLY (1ULL << 63) #define ETH_RSS_L3_DST_ONLY (1ULL << 62) #define ETH_RSS_L4_SRC_ONLY (1ULL << 61)lib/librte_ethdev/rte_ethdev.h +3
-2-#define ETH_RSS_L4_DST_ONLY (1ULL << 60) +#define ETH_RSS_L4_DST_ONLY (1ULL << 60) +#define ETH_RSS_ETH_SRC_ONLY (1ULL << 59) +#define ETH_RSS_ETH_DST_ONLY (1ULL << 58)/** * For input set change of hash filter, if SRC_ONLY and DST_ONLY of -- Quoted 1 line
2.20.1
Regards,
Bernard.
Re: [dpdk-dev] [dpdk-dev v2 1/4] ethdev: add new RSS offload types
Bernard and qi
Quoted 50 lines · Qi Z
Quoted 35 lines
-----Original Message-----
From: Iremonger, Bernard <[email protected]>
Sent: Wednesday, April 8, 2020 1:02 AM
To: Guo, Jia <[email protected]>; Ye, Xiaolong <[email protected]>; Zhang, Qi Z <[email protected]>
Cc: [email protected]; Wu, Jingjing <[email protected]>; Cao, Yahui <[email protected]>; Su, Simei <[email protected]>; Guo, Jia <[email protected]>
Subject: RE: [dpdk-dev] [dpdk-dev v2 1/4] ethdev: add new RSS offload typesHi Jeff,
Quoted 22 lines
-----Original Message-----
From: dev <[email protected]> On Behalf Of Jeff Guo
Sent: Thursday, March 26, 2020 4:41 PM
To: Ye, Xiaolong <[email protected]>; Zhang, Qi Z <[email protected]>
Cc: [email protected]; Wu, Jingjing <[email protected]>; Cao, Yahui <[email protected]>; Su, Simei <[email protected]>; Guo, Jia <[email protected]>
Subject: [dpdk-dev] [dpdk-dev v2 1/4] ethdev: add new RSS offload typesDefines some new RSS offload types for ETH/SVLAN/CVLAN/GTPU/L2TPV3/ ESP/AH/PFCP.
Signed-off-by Jeff Guo <[email protected]>---
v1:
1.refine some rte eth rss offload types.--- lib/librte_ethdev/rte_ethdev.h | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-)Quoted 15 lines
lib/librte_ethdev/rte_ethdev.h struct rte_eth_rss_conf { · line 518
Quoted 13 lines
(quoted diff) +0
-0
b/lib/librte_ethdev/rte_ethdev.hindexd1a593ad1..29cdf07cd100644lib/librte_ethdev/rte_ethdev.h +5
-0@@ -511,6 +511,13 @@ struct rte_eth_rss_conf {#define ETH_RSS_GENEVE (1ULL << 20)#define ETH_RSS_NVGRE (1ULL << 21)#define ETH_RSS_GTPU (1ULL << 23) +#define ETH_RSS_ETH (1ULL << 24) +#define ETH_RSS_S_VLAN (1ULL << 25) +#define ETH_RSS_C_VLAN (1ULL << 26) +#define ETH_RSS_IPSEC_ESP (1ULL << 27) +#define ETH_RSS_IPSEC_AH (1ULL << 28)Is IPSEC needed in above ESP and AH macros?
WouldETH_RSS_ESPandETH_RSS_AHbe sufficient ?
Quoted 1 line
+1
It sounds good and sufficient, ESP identify the IP Encapsulating Security Payload while AH means IP Authentication Header for IPsec, will modify it in next version.
Quoted 23 lines
Quoted 23 lines
lib/librte_ethdev/rte_ethdev.h struct rte_eth_rss_conf { · line 523
Quoted 5 lines
lib/librte_ethdev/rte_ethdev.h +2
-0+#define ETH_RSS_L2TPV3 (1ULL << 29) +#define ETH_RSS_PFCP (1ULL << 30)/* * We use the following macros to combine with above ETH_RSS_* for @@
Quoted 13 lines
-
524,7 +531,9 @@ structrte_eth_rss_conf{#define ETH_RSS_L3_SRC_ONLY (1ULL << 63) #define ETH_RSS_L3_DST_ONLY (1ULL << 62) #define ETH_RSS_L4_SRC_ONLY (1ULL << 61)lib/librte_ethdev/rte_ethdev.h +3
-2-#define ETH_RSS_L4_DST_ONLY (1ULL << 60) +#define ETH_RSS_L4_DST_ONLY (1ULL << 60) +#define ETH_RSS_ETH_SRC_ONLY (1ULL << 59) +#define ETH_RSS_ETH_DST_ONLY (1ULL << 58)/** * For input set change of hash filter, if SRC_ONLY and DST_ONLY of -- Quoted 1 line
2.20.1
Regards,
Bernard.
PATCH v2 2/4 net/iavf: add RSS configuration for VFs
In reply to Jeff GuoAdd RSS configuration for VFs. The VF must be capable of configuring RSS.
---
v1:
1.add NAT T ESP and refine gtpu down/up
2.reference some fixing patch from pf side.
--- drivers/net/iavf/Makefile | 1 + drivers/net/iavf/iavf.h | 10 + drivers/net/iavf/iavf_hash.c | 1157 +++++++++++++++++++++++++++++++++ drivers/net/iavf/iavf_vchnl.c | 33 +- drivers/net/iavf/meson.build | 1 + 5 files changed, 1197 insertions(+), 5 deletions(-) create mode 100644 drivers/net/iavf/iavf_hash.c
drivers/net/iavf/Makefile +1 -0
@@ -24,6 +24,7 @@ SRCS-$(CONFIG_RTE_LIBRTE_IAVF_PMD) += iavf_ethdev.c SRCS-$(CONFIG_RTE_LIBRTE_IAVF_PMD) += iavf_vchnl.c SRCS-$(CONFIG_RTE_LIBRTE_IAVF_PMD) += iavf_rxtx.c SRCS-$(CONFIG_RTE_LIBRTE_IAVF_PMD) += iavf_generic_flow.c +SRCS-$(CONFIG_RTE_LIBRTE_IAVF_PMD) += iavf_hash.c ifeq ($(CONFIG_RTE_ARCH_X86), y) SRCS-$(CONFIG_RTE_LIBRTE_IAVF_PMD) += iavf_rxtx_vec_sse.c endif
drivers/net/iavf/iavf.h +10 -0
@@ -77,6 +77,13 @@#define IAVF_RX_DESC_EXT_STATUS_FLEXBH_MASK 0x03#define IAVF_RX_DESC_EXT_STATUS_FLEXBH_FD_ID 0x01 +/* DDP package type */ +enum ice_pkg_type { +IAVF_PKG_TYPE_UNKNOWN , +IAVF_PKG_TYPE_OS_DEFAULT , +IAVF_PKG_TYPE_COMMS , +}; +struct iavf_adapter ;struct iavf_rx_queue ;struct iavf_tx_queue ;
@@ -155,6 +162,7 @@ struct iavf_adapter {const uint32_t *ptype_tbl;bool stopped;uint8_t fdir_enabled; +enum ice_pkg_type active_pkg_type;/* loaded ddp package type */ };/* IAVF_DEV_PRIVATE_TO */
@@ -260,4 +268,6 @@ int iavf_config_promisc(struct iavf_adapter *adapter, bool enable_unicast,int iavf_add_del_eth_addr (struct iavf_adapter *adapter,struct rte_ether_addr *addr,bool add);int iavf_add_del_vlan (struct iavf_adapter *adapter,uint16_t vlanid,bool add); +int iavf_add_del_rss_cfg (struct iavf_adapter *adapter, +struct virtchnl_rss_cfg *rss_cfg,bool add);#endif /* _IAVF_ETHDEV_H_ */
drivers/net/iavf/iavf_hash.c new file +1157 -0
1,157 lines not on this page · raw message
drivers/net/iavf/iavf_vchnl.c +28 -5
@@ -336,13 +336,10 @@ iavf_get_vf_resource(struct iavf_adapter *adapter) args.out_buffer = vf->aq_resp; args.out_size =IAVF_AQ_BUF_SZ ; -/* TODO: basic offload capabilities, need to -* add advanced/optional offload capabilities -*/ - caps =IAVF_BASIC_OFFLOAD_CAPS |VIRTCHNL_VF_CAP_ADV_LINK_SPEED |VIRTCHNL_VF_OFFLOAD_QUERY_DDP | -VIRTCHNL_VF_OFFLOAD_RX_FLEX_DESC ; +VIRTCHNL_VF_OFFLOAD_RX_FLEX_DESC | +VIRTCHNL_VF_OFFLOAD_ADV_RSS_PF ; args.in_args = (uint8_t *)∩︀ args.in_args_size =sizeof (caps);
@@ -883,3 +880,29 @@ iavf_add_del_vlan(struct iavf_adapter *adapter, uint16_t vlanid, bool add)return err; } + +int +iavf_add_del_rss_cfg (struct iavf_adapter *adapter, +struct virtchnl_rss_cfg *rss_cfg,bool add) +{ +struct iavf_info *vf =IAVF_DEV_PRIVATE_TO_VF (adapter); +struct iavf_cmd_info args; +int err; + +memset (&args,0 ,sizeof (args)); + args.ops = add ?VIRTCHNL_OP_ADD_RSS_CFG : +VIRTCHNL_OP_DEL_RSS_CFG ; + args.in_args = (u8 *)rss_cfg; + args.in_args_size =sizeof (*rss_cfg); + args.out_buffer = vf->aq_resp; + args.out_size =IAVF_AQ_BUF_SZ ; + + err =iavf_execute_vf_cmd (adapter, &args); +if (err) +PMD_DRV_LOG (ERR , +"Failed to execute command of %s" , + add ?"OP_ADD_RSS_CFG" : +"OP_DEL_RSS_INPUT_CFG" ); + +return err; +}
drivers/net/iavf/meson.build +1 -0
@@ -13,6 +13,7 @@ sources = files( 'iavf_rxtx.c', 'iavf_vchnl.c', 'iavf_generic_flow.c', + 'iavf_hash.c', ) if arch_subdir == 'x86'
Signature · 1 line
2.20.1
PATCH v2 3/4 app/testpmd: support GTP PDU type
In reply to Jeff GuoAdd gtp pdu type configure in the cmdline.
---
v1:
no change
--- app/test-pmd/cmdline_flow.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-)
app/test-pmd/cmdline_flow.c +10 -1
@@ -49,6 +49,7 @@ enum index {PORT_ID ,GROUP_ID ,PRIORITY_LEVEL , +GTP_PSC_PDU_T ,/* Top-level command. */ SET,
@@ -1626,6 +1627,13 @@ static const struct token token_list[] = { .call = parse_int, .comp = comp_none, }, + [GTP_PSC_PDU_T] = { + .name = "{GTPU pdu type}", + .type = "INTEGER", + .help = "gtpu pdu uplink/downlink identifier", + .call = parse_int, + .comp = comp_none, + },/* Top-level command. */ [FLOW] = { .name = "flow",
@@ -2615,7 +2623,8 @@ static const struct token token_list[] = { [ITEM_GTP_PSC_PDU_T] = { .name = "pdu_t", .help = "PDU type", - .next = NEXT(item_gtp_psc, NEXT_ENTRY(UNSIGNED), item_param), + .next =NEXT (item_gtp_psc,NEXT_ENTRY (GTP_PSC_PDU_T ), + item_param), .args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_gtp_psc, pdu_type)), },
Signature · 1 line
2.20.1
Re: [dpdk-dev] [dpdk-dev v2 3/4] app/testpmd: support GTP PDU type
Hi Jeff,
Quoted 9 lines
-----Original Message-----
From: dev <[email protected]> On Behalf Of Jeff Guo
Sent: Thursday, March 26, 2020 6:41 PM
To: [email protected]; [email protected]
Cc: [email protected]; [email protected]; [email protected]; [email protected]; [email protected]
Subject: [dpdk-dev] [dpdk-dev v2 3/4] app/testpmd: support GTP PDU typeAdd gtp pdu type configure in the cmdline.
Why not use ITEM_GTP_PSC_PDU?
Quoted 22 lines
Signed-off-by Jeff Guo <[email protected]>---
v1:
no change--- app/test-pmd/cmdline_flow.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-)app/test-pmd/cmdline_flow.c +1
-0@@ -49,6 +49,7 @@ enum index {PORT_ID ,GROUP_ID ,PRIORITY_LEVEL , +GTP_PSC_PDU_T ,/* Top-level command. */ SET,
app/test-pmd/cmdline_flow.c static const struct token token_list[] = { · line 1636
Quoted 10 lines
app/test-pmd/cmdline_flow.c +7
-0@@ -1626,6 +1627,13 @@ static const struct token token_list[] = { .call = parse_int, .comp = comp_none, }, + [GTP_PSC_PDU_T] = { + .name = "{GTPU pdu type}", + .type = "INTEGER", + .help = "gtpu pdu uplink/downlink identifier", + .call = parse_int, + .comp = comp_none, + },
Why is this created at this level?
This looks like is should be written totally differently.
Quoted 17 lines
app/test-pmd/cmdline_flow.c +2
-1/* Top-level command. */ [FLOW] = { .name = "flow",@@ -2615,7 +2623,8 @@ static const struct token token_list[] = { [ITEM_GTP_PSC_PDU_T ] = { .name ="pdu_t" , .help ="PDU type" , - .next =NEXT (item_gtp_psc,NEXT_ENTRY (UNSIGNED ), item_param), + .next =NEXT (item_gtp_psc,NEXT_ENTRY (GTP_PSC_PDU_T ), + item_param), .args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_gtp_psc,app/test-pmd/cmdline_flow.c +0
-1pdu_type)), }, --2.20.1
Re: [dpdk-dev] [dpdk-dev v2 3/4] app/testpmd: support GTP PDU type
hi, orika
Quoted 11 lines · Ori Kam
Hi Jeff,
Quoted 8 lines
-----Original Message-----
From: dev <[email protected]> On Behalf Of Jeff Guo
Sent: Thursday, March 26, 2020 6:41 PM
To: [email protected]; [email protected]
Cc: [email protected]; [email protected]; [email protected]; [email protected]; [email protected]
Subject: [dpdk-dev] [dpdk-dev v2 3/4] app/testpmd: support GTP PDU type
Quoted 2 lines
Quoted 1 line
Add gtp pdu type configure in the cmdline.
Why not use
ITEM_GTP_PSC_PDU?
I guess you mean ITEM_GTP_PSC_PDU_T, rihgt? We know we have got ITEM_GTP_PSC_QFI/ITEM_GTP_PSC_PDU_T but not define the
spec for them, so what i use is add the spec into the ITEM_GTP_PSC_PDU_T to let the pdu type to be configured.
Quoted 18 lines
Quoted 18 lines
Signed-off-by Jeff Guo <[email protected]>---
v1:
no change--- app/test-pmd/cmdline_flow.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-)app/test-pmd/cmdline_flow.c +1
-0@@ -49,6 +49,7 @@ enum index {PORT_ID ,GROUP_ID ,PRIORITY_LEVEL , + GTP_PSC_PDU_T,
Quoted 15 lines
app/test-pmd/cmdline_flow.c static const struct token token_list[] = { · line 1636
Quoted 13 lines
app/test-pmd/cmdline_flow.c +7
-0/* Top-level command. */ SET,@@ -1626,6 +1627,13 @@ static const struct token token_list[] = { .call = parse_int, .comp = comp_none, }, + [GTP_PSC_PDU_T] = { + .name = "{GTPU pdu type}", + .type = "INTEGER", + .help = "gtpu pdu uplink/downlink identifier", + .call = parse_int, + .comp = comp_none, + },Why is this created at this level?
This looks like is should be written totally differently.
As i said above, the item we got but spec or say next token still need to be added, do you mean it should not in the group of Common tokens? If so, let me think about that, and please explicit your proposal if you already have one.
Quoted 17 lines
Quoted 17 lines
app/test-pmd/cmdline_flow.c +2
-1/* Top-level command. */ [FLOW] = { .name = "flow",@@ -2615,7 +2623,8 @@ static const struct token token_list[] = { [ITEM_GTP_PSC_PDU_T ] = { .name ="pdu_t" , .help ="PDU type" , - .next =NEXT (item_gtp_psc,NEXT_ENTRY (UNSIGNED ), item_param), + .next =NEXT (item_gtp_psc,NEXT_ENTRY (GTP_PSC_PDU_T ), + item_param), .args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_gtp_psc,
pdu_type)),
},
--
2.20.1
Re: [dpdk-dev] [dpdk-dev v2 3/4] app/testpmd: support GTP PDU type
Hi Jeff,
My name is Ori 😊
I'm not an expert in GTP so this is just my thinking and maybe I'm missing something, this is why a good explanation helps 😊
Quoted 25 lines
-----Original Message-----
From: Jeff Guo <[email protected]>
Sent: Monday, March 30, 2020 11:30 AM
To: Ori Kam <[email protected]>; [email protected]; [email protected]
Cc: [email protected]; [email protected]; [email protected]; [email protected]
Subject: Re: [dpdk-dev] [dpdk-dev v2 3/4] app/testpmd: support GTP PDU typehi, orika
Quoted 12 lines · Ori Kam
Hi Jeff,
Quoted 9 lines
-----Original Message-----
From: dev <[email protected]> On Behalf Of Jeff Guo
Sent: Thursday, March 26, 2020 6:41 PM
To: [email protected]; [email protected]
Cc: [email protected]; [email protected]; [email protected]; [email protected]; [email protected]
Subject: [dpdk-dev] [dpdk-dev v2 3/4] app/testpmd: support GTP PDU typeAdd gtp pdu type configure in the cmdline.
Quoted 9 lines
Quoted 1 line
Why not use
ITEM_GTP_PSC_PDU?I guess you mean
ITEM_GTP_PSC_PDU_T, rihgt? We know we have got ITEM_GTP_PSC_QFI/ITEM_GTP_PSC_PDU_T but not define thespec for them, so what i use is add the spec into the
ITEM_GTP_PSC_PDU_Tto let the pdu type to be configured.
Yes you are correct, from rte_flow we have the RTE_FLOW_ITEM_TYPE_GTP_PSC Item that include pdu_type. This is the field you need right?
In testpmd we have the ITEM_GTP_PSC_PDU_T which should support adding the pdu type.
Basically you just need to type the following cmd line:
flow create 0 ingress pattern gtp_psc pdu_t is xxx
if this command is not working we need to understand why.
Quoted 36 lines
Quoted 19 lines
Quoted 19 lines
Signed-off-by Jeff Guo <[email protected]>---
v1:
no change--- app/test-pmd/cmdline_flow.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-)app/test-pmd/cmdline_flow.c +1
-0@@ -49,6 +49,7 @@ enum index {PORT_ID ,GROUP_ID ,PRIORITY_LEVEL , + GTP_PSC_PDU_T,Quoted 15 lines
app/test-pmd/cmdline_flow.c static const struct token token_list[] = { · line 1636
Quoted 13 lines
app/test-pmd/cmdline_flow.c +7
-0/* Top-level command. */ SET,@@ -1626,6 +1627,13 @@ static const struct token token_list[] = { .call = parse_int, .comp = comp_none, }, + [GTP_PSC_PDU_T] = { + .name = "{GTPU pdu type}", + .type = "INTEGER", + .help = "gtpu pdu uplink/downlink identifier", + .call = parse_int, + .comp = comp_none, + },Why is this created at this level?
This looks like is should be written totally differently.
Quoted 5 lines
As i said above, the item we got but spec or say next token still need to be added, do you mean it should not in the group of Common tokens? If so, let me think about that, and please explicit your proposal if you already have one.
Please see above response.
Quoted 18 lines
Quoted 18 lines
Quoted 18 lines
app/test-pmd/cmdline_flow.c +2
-1/* Top-level command. */ [FLOW] = { .name = "flow",@@ -2615,7 +2623,8 @@ static const struct token token_list[] = { [ITEM_GTP_PSC_PDU_T ] = { .name ="pdu_t" , .help ="PDU type" , - .next =NEXT (item_gtp_psc,NEXT_ENTRY (UNSIGNED ), item_param), + .next =NEXT (item_gtp_psc,NEXT_ENTRY (GTP_PSC_PDU_T ), + item_param), .args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_gtp_psc,
pdu_type)),
},
--
2.20.1
Re: [dpdk-dev] [dpdk-dev v2 3/4] app/testpmd: support GTP PDU type
yes, Ori, please check the comment below.
Quoted 40 lines · Ori Kam
Hi Jeff,
My name is Ori 😊
I'm not an expert in GTP so this is just my thinking and maybe I'm missing something, this is why a good explanation helps 😊
Quoted 24 lines
-----Original Message-----
From: Jeff Guo <[email protected]>
Sent: Monday, March 30, 2020 11:30 AM
To: Ori Kam <[email protected]>; [email protected]; [email protected]
Cc: [email protected]; [email protected]; [email protected]; [email protected]
Subject: Re: [dpdk-dev] [dpdk-dev v2 3/4] app/testpmd: support GTP PDU typehi, orika
Quoted 11 lines · Ori Kam
Hi Jeff,
Quoted 8 lines
-----Original Message-----
From: dev <[email protected]> On Behalf Of Jeff Guo
Sent: Thursday, March 26, 2020 6:41 PM
To: [email protected]; [email protected]
Cc: [email protected]; [email protected]; [email protected]; [email protected]; [email protected]
Subject: [dpdk-dev] [dpdk-dev v2 3/4] app/testpmd: support GTP PDU typeQuoted 9 lines
Quoted 2 lines
Quoted 1 line
Add gtp pdu type configure in the cmdline.
Why not use
ITEM_GTP_PSC_PDU?I guess you mean
ITEM_GTP_PSC_PDU_T, rihgt? We know we have got ITEM_GTP_PSC_QFI/ITEM_GTP_PSC_PDU_T but not define thespec for them, so what i use is add the spec into the
ITEM_GTP_PSC_PDU_Tto let the pdu type to be configured.
Quoted 10 lines
Yes you are correct, from
rte_flowwe have theRTE_FLOW_ITEM_TYPE_GTP_PSCItem that includepdu_type. This is the field you need right?In testpmd we have the
ITEM_GTP_PSC_PDU_Twhich should support adding the pdu type.
Basically you just need to type the following cmd line:
flow create 0 ingress patterngtp_pscpdu_tis xxx
if this command is not working we need to understand why.
please check the part before this patch as below:
[ITEM_GTP_PSC_PDU_T] = {
.name = "pdu_t",
.help = "PDU type",
.next = NEXT(item_gtp_psc, NEXT_ENTRY(UNSIGNED), item_param),
sure, we got the ITEM_GTP_PSC_PDU_T at prior but the NEXT_ENTRY is UNSIGNED, that means we still not implement
the spec to let the pdu type to be configurable, so what the patch do is to fix this issue.
Quoted 58 lines
Quoted 34 lines
Quoted 18 lines
Quoted 18 lines
Signed-off-by Jeff Guo <[email protected]>---
v1:
no change--- app/test-pmd/cmdline_flow.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-)app/test-pmd/cmdline_flow.c +1
-0@@ -49,6 +49,7 @@ enum index {PORT_ID ,GROUP_ID ,PRIORITY_LEVEL , + GTP_PSC_PDU_T,Quoted 15 lines
app/test-pmd/cmdline_flow.c static const struct token token_list[] = { · line 1636
Quoted 13 lines
app/test-pmd/cmdline_flow.c +7
-0/* Top-level command. */ SET,@@ -1626,6 +1627,13 @@ static const struct token token_list[] = { .call = parse_int, .comp = comp_none, }, + [GTP_PSC_PDU_T] = { + .name = "{GTPU pdu type}", + .type = "INTEGER", + .help = "gtpu pdu uplink/downlink identifier", + .call = parse_int, + .comp = comp_none, + },Why is this created at this level?
This looks like is should be written totally differently.Quoted 5 lines
As i said above, the item we got but spec or say next token still need to be added, do you mean it should not in the group of Common tokens? If so, let me think about that, and please explicit your proposal if you already have one.
Please see above response.
Quoted 17 lines
Quoted 17 lines
Quoted 17 lines
app/test-pmd/cmdline_flow.c +2
-1/* Top-level command. */ [FLOW] = { .name = "flow",@@ -2615,7 +2623,8 @@ static const struct token token_list[] = { [ITEM_GTP_PSC_PDU_T ] = { .name ="pdu_t" , .help ="PDU type" , - .next =NEXT (item_gtp_psc,NEXT_ENTRY (UNSIGNED ), item_param), + .next =NEXT (item_gtp_psc,NEXT_ENTRY (GTP_PSC_PDU_T ), + item_param), .args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_gtp_psc,pdu_type)), },--
2.20.1
Re: [dpdk-dev] [dpdk-dev v2 3/4] app/testpmd: support GTP PDU type
Hi Jeff,
Quoted 68 lines
-----Original Message-----
From: Jeff Guo <[email protected]>
Sent: Tuesday, March 31, 2020 11:50 AM
To: Ori Kam <[email protected]>; [email protected]; [email protected]
Cc: [email protected]; [email protected]; [email protected]; [email protected]
Subject: Re: [dpdk-dev] [dpdk-dev v2 3/4] app/testpmd: support GTP PDU typeyes, Ori, please check the comment below.
Quoted 15 lines · Ori Kam
Hi Jeff,
My name is Ori 😊
I'm not an expert in GTP so this is just my thinking and maybe I'm missing something, this is why a good explanation helps 😊
Quoted 8 lines
-----Original Message-----
From: Jeff Guo <[email protected]>
Sent: Monday, March 30, 2020 11:30 AM
To: Ori Kam <[email protected]>; [email protected]; [email protected]
Cc: [email protected]; [email protected]; [email protected]; [email protected]
Subject: Re: [dpdk-dev] [dpdk-dev v2 3/4] app/testpmd: support GTP PDUtype
Quoted 19 lines
Quoted 19 lines
hi, orika
Quoted 13 lines · Ori Kam
Hi Jeff,
Quoted 9 lines
-----Original Message-----
From: dev <[email protected]> On Behalf Of Jeff Guo
Sent: Thursday, March 26, 2020 6:41 PM
To: [email protected]; [email protected]
Cc: [email protected]; [email protected]; [email protected]; [email protected]; [email protected]
Subject: [dpdk-dev] [dpdk-dev v2 3/4] app/testpmd: support GTP PDU typeAdd gtp pdu type configure in the cmdline.
Why not use
ITEM_GTP_PSC_PDU?Quoted 7 lines
Quoted 6 lines
I guess you mean
ITEM_GTP_PSC_PDU_T, rihgt? We know we have got ITEM_GTP_PSC_QFI/ITEM_GTP_PSC_PDU_T but not define thespec for them, so what i use is add the spec into the
ITEM_GTP_PSC_PDU_Tto let the pdu type to be configured.Yes you are correct, from
rte_flowwe have the
RTE_FLOW_ITEM_TYPE_GTP_PSCQuoted 9 lines
Item that include
pdu_type. This is the field you need right?In testpmd we have the
ITEM_GTP_PSC_PDU_Twhich should support adding the pdu type.
Basically you just need to type the following cmd line:
flow create 0 ingress patterngtp_pscpdu_tis xxx
if this command is not working we need to understand why.please check the part before this patch as below:
Quoted 9 lines
[
ITEM_GTP_PSC_PDU_T] = {
.name = "pdu_t",
.help = "PDU type",
.next = NEXT(item_gtp_psc,NEXT_ENTRY(UNSIGNED),item_param),sure, we got the
ITEM_GTP_PSC_PDU_Tat prior but theNEXT_ENTRYis UNSIGNED, that means we still not implement
Sorry I don't understand your comment, what do you mean it is not implemented? Yes it means that the parameter is should be unsigned value.
Quoted 2 lines
the spec to let the pdu type to be configurable, so what the patch do is to fix this issue.
What do you mean configurable?
Lets start at the beginning, maybe I'm just missing some key point. What is the PDU type? What values can he hold?
How do you want the command to look like?
Quoted 60 lines
Quoted 60 lines
Quoted 36 lines
Quoted 20 lines
Quoted 20 lines
Signed-off-by Jeff Guo <[email protected]>---
v1:
no change--- app/test-pmd/cmdline_flow.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-)app/test-pmd/cmdline_flow.c +1
-0@@ -49,6 +49,7 @@ enum index {PORT_ID ,GROUP_ID ,PRIORITY_LEVEL , + GTP_PSC_PDU_T,Quoted 15 lines
app/test-pmd/cmdline_flow.c static const struct token token_list[] = { · line 1636
Quoted 13 lines
app/test-pmd/cmdline_flow.c +7
-0/* Top-level command. */ SET,@@ -1626,6 +1627,13 @@ static const struct token token_list[] = { .call = parse_int, .comp = comp_none, }, + [GTP_PSC_PDU_T] = { + .name = "{GTPU pdu type}", + .type = "INTEGER", + .help = "gtpu pdu uplink/downlink identifier", + .call = parse_int, + .comp = comp_none, + },Why is this created at this level?
This looks like is should be written totally differently.Quoted 5 lines
As i said above, the item we got but spec or say next token still need to be added, do you mean it should not in the group of Common tokens? If so, let me think about that, and please explicit your proposal if you already have one.
Please see above response.
Quoted 17 lines
Quoted 17 lines
Quoted 17 lines
app/test-pmd/cmdline_flow.c +2
-1/* Top-level command. */ [FLOW] = { .name = "flow",@@ -2615,7 +2623,8 @@ static const struct token token_list[] = { [ITEM_GTP_PSC_PDU_T ] = { .name ="pdu_t" , .help ="PDU type" , - .next =NEXT (item_gtp_psc,NEXT_ENTRY (UNSIGNED ), item_param), + .next =NEXT (item_gtp_psc,NEXT_ENTRY (GTP_PSC_PDU_T ), + item_param), .args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_gtp_psc,pdu_type)), },--
2.20.1
Re: [dpdk-dev] [dpdk-dev v2 3/4] app/testpmd: support GTP PDU type
hi, Ori
Quoted 73 lines · Ori Kam
Hi Jeff,
Quoted 71 lines
-----Original Message-----
From: Jeff Guo <[email protected]>
Sent: Tuesday, March 31, 2020 11:50 AM
To: Ori Kam <[email protected]>; [email protected]; [email protected]
Cc: [email protected]; [email protected]; [email protected]; [email protected]
Subject: Re: [dpdk-dev] [dpdk-dev v2 3/4] app/testpmd: support GTP PDU typeyes, Ori, please check the comment below.
Quoted 15 lines · Ori Kam
Hi Jeff,
My name is Ori 😊
I'm not an expert in GTP so this is just my thinking and maybe I'm missing something, this is why a good explanation helps 😊
Quoted 8 lines
-----Original Message-----
From: Jeff Guo <[email protected]>
Sent: Monday, March 30, 2020 11:30 AM
To: Ori Kam <[email protected]>; [email protected]; [email protected]
Cc: [email protected]; [email protected]; [email protected]; [email protected]
Subject: Re: [dpdk-dev] [dpdk-dev v2 3/4] app/testpmd: support GTP PDUtype
Quoted 16 lines
Quoted 16 lines
hi, orika
Quoted 12 lines · Ori Kam
Hi Jeff,
Quoted 9 lines
-----Original Message-----
From: dev <[email protected]> On Behalf Of Jeff Guo
Sent: Thursday, March 26, 2020 6:41 PM
To: [email protected]; [email protected]
Cc: [email protected]; [email protected]; [email protected]; [email protected]; [email protected]
Subject: [dpdk-dev] [dpdk-dev v2 3/4] app/testpmd: support GTP PDU typeAdd gtp pdu type configure in the cmdline.
Quoted 8 lines
Quoted 7 lines
Quoted 1 line
Why not use
ITEM_GTP_PSC_PDU?I guess you mean
ITEM_GTP_PSC_PDU_T, rihgt? We know we have got ITEM_GTP_PSC_QFI/ITEM_GTP_PSC_PDU_T but not define thespec for them, so what i use is add the spec into the
ITEM_GTP_PSC_PDU_Tto let the pdu type to be configured.Yes you are correct, from
rte_flowwe have the
RTE_FLOW_ITEM_TYPE_GTP_PSCQuoted 9 lines
Item that include
pdu_type. This is the field you need right?In testpmd we have the
ITEM_GTP_PSC_PDU_Twhich should support adding the pdu type.
Basically you just need to type the following cmd line:
flow create 0 ingress patterngtp_pscpdu_tis xxx
if this command is not working we need to understand why.please check the part before this patch as below:
[
ITEM_GTP_PSC_PDU_T] = {
.name = "pdu_t",
.help = "PDU type",
.next = NEXT(item_gtp_psc,NEXT_ENTRY(UNSIGNED),item_param),
Quoted 5 lines
Quoted 3 lines
sure, we got the
ITEM_GTP_PSC_PDU_Tat prior but theNEXT_ENTRYis UNSIGNED, that means we still not implementSorry I don't understand your comment, what do you mean it is not implemented? Yes it means that the parameter is should be unsigned value.
I mean that if it is a unsigned value, user could not set the pdu_t to be a 0 or 1, or any other we
define for that.
Quoted 7 lines
Quoted 2 lines
the spec to let the pdu type to be configurable, so what the patch do is to fix this issue.
What do you mean configurable?
Lets start at the beginning, maybe I'm just missing some key point. What is the PDU type? What values can he hold?
How do you want the command to look like?
the command should be like as below
flow create 0 ingress pattern eth / ipv4 / udp / gtpu / gtp_psc pdu_t is 0/ ipv4 / end actions rss types ipv4-udp l3-dst-only endkey_len 0queues end / end
It is eventually the same as you described about the command before. User could set pdu_t to be 0 or 1, so what is need is modify
NEXT_ENTRY(UNSIGNED) to be "SIGNED" and defined.
Quoted 58 lines
Quoted 58 lines
Quoted 58 lines
Quoted 34 lines
Quoted 19 lines
Quoted 19 lines
Signed-off-by Jeff Guo <[email protected]>---
v1:
no change--- app/test-pmd/cmdline_flow.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-)app/test-pmd/cmdline_flow.c +1
-0@@ -49,6 +49,7 @@ enum index {PORT_ID ,GROUP_ID ,PRIORITY_LEVEL , + GTP_PSC_PDU_T,Quoted 15 lines
app/test-pmd/cmdline_flow.c static const struct token token_list[] = { · line 1636
Quoted 13 lines
app/test-pmd/cmdline_flow.c +7
-0/* Top-level command. */ SET,@@ -1626,6 +1627,13 @@ static const struct token token_list[] = { .call = parse_int, .comp = comp_none, }, + [GTP_PSC_PDU_T] = { + .name = "{GTPU pdu type}", + .type = "INTEGER", + .help = "gtpu pdu uplink/downlink identifier", + .call = parse_int, + .comp = comp_none, + },Why is this created at this level?
This looks like is should be written totally differently.Quoted 5 lines
As i said above, the item we got but spec or say next token still need to be added, do you mean it should not in the group of Common tokens? If so, let me think about that, and please explicit your proposal if you already have one.
Please see above response.
Quoted 17 lines
Quoted 17 lines
Quoted 17 lines
app/test-pmd/cmdline_flow.c +2
-1/* Top-level command. */ [FLOW] = { .name = "flow",@@ -2615,7 +2623,8 @@ static const struct token token_list[] = { [ITEM_GTP_PSC_PDU_T ] = { .name ="pdu_t" , .help ="PDU type" , - .next =NEXT (item_gtp_psc,NEXT_ENTRY (UNSIGNED ), item_param), + .next =NEXT (item_gtp_psc,NEXT_ENTRY (GTP_PSC_PDU_T ), + item_param), .args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_gtp_psc,pdu_type)), },--
2.20.1
Ori Kam
Acked-by Ori Kam [email protected]Re: [dpdk-dev] [dpdk-dev v2 3/4] app/testpmd: support GTP PDU type
Hi Jeff,
For some reason I got the mail in HTML format
So please see my comments marked by [Ori]
Thanks,
Ori
From: Jeff Guo <[email protected]>
Sent: Tuesday, April 7, 2020 8:37 AM
To: Ori Kam <[email protected]>; [email protected]; [email protected]
Cc: [email protected]; [email protected]; [email protected]; [email protected]
Subject: Re: [dpdk-dev] [dpdk-dev v2 3/4] app/testpmd: support GTP PDU type
hi, Ori
On 4/5/2020 11:56 PM, Ori Kam wrote:
Hi Jeff,
-----Original Message-----
From: Jeff Guo <[email protected]><mailto:[email protected]>
Sent: Tuesday, March 31, 2020 11:50 AM
To: Ori Kam <[email protected]><mailto:[email protected]>; [email protected]<mailto:[email protected]>;
[email protected]<mailto:[email protected]>
[email protected]<mailto:[email protected]>
Subject: Re: [dpdk-dev] [dpdk-dev v2 3/4] app/testpmd: support GTP PDU type
yes, Ori, please check the comment below.
On 3/30/2020 6:18 PM, Ori Kam wrote:
Hi Jeff,
My name is Ori 😊
I'm not an expert in GTP so this is just my thinking and maybe I'm
missing something, this is why a good explanation helps 😊
-----Original Message-----
From: Jeff Guo <[email protected]><mailto:[email protected]>
Sent: Monday, March 30, 2020 11:30 AM
To: Ori Kam <[email protected]><mailto:[email protected]>; [email protected]<mailto:[email protected]>;
[email protected]<mailto:[email protected]>
[email protected]<mailto:[email protected]>
Subject: Re: [dpdk-dev] [dpdk-dev v2 3/4] app/testpmd: support GTP PDU
type
hi, orika
On 3/29/2020 4:44 PM, Ori Kam wrote:
Hi Jeff,
-----Original Message-----
From: dev <[email protected]><mailto:[email protected]> On Behalf Of Jeff Guo
Sent: Thursday, March 26, 2020 6:41 PM
To: [email protected]<mailto:[email protected]>; [email protected]<mailto:[email protected]>
[email protected]<mailto:[email protected]>; [email protected]<mailto:[email protected]>
Subject: [dpdk-dev] [dpdk-dev v2 3/4] app/testpmd: support GTP PDU type
Add gtp pdu type configure in the cmdline.
Why not use ITEM_GTP_PSC_PDU?
I guess you mean ITEM_GTP_PSC_PDU_T, rihgt? We know we have got
ITEM_GTP_PSC_QFI/ITEM_GTP_PSC_PDU_T but not define the
spec for them, so what i use is add the spec into the ITEM_GTP_PSC_PDU_T
to let the pdu type to be configured.
Yes you are correct, from rte_flow we have the
RTE_FLOW_ITEM_TYPE_GTP_PSC
Item that include pdu_type. This is the field you need right?
In testpmd we have the ITEM_GTP_PSC_PDU_T which should support adding
the pdu type.
Basically you just need to type the following cmd line:
flow create 0 ingress pattern gtp_psc pdu_t is xxx
if this command is not working we need to understand why.
please check the part before this patch as below:
[ITEM_GTP_PSC_PDU_T] = {
.name = "pdu_t",
.help = "PDU type",
.next = NEXT(item_gtp_psc, NEXT_ENTRY(UNSIGNED),item_param),
sure, we got the ITEM_GTP_PSC_PDU_T at prior but the NEXT_ENTRY is
UNSIGNED, that means we still not implement
Sorry I don't understand your comment, what do you mean it is not implemented?
Yes it means that the parameter is should be unsigned value.
I mean that if it is a unsigned value, user could not set the pdu_t to be a 0 or 1, or any other we
define for that.
the spec to let the pdu type to be configurable, so what the patch do is
to fix this issue.
What do you mean configurable?
Lets start at the beginning, maybe I'm just missing some key point.
What is the PDU type? What values can he hold?
How do you want the command to look like?
the command should be like as below
flow create 0 ingress pattern eth / ipv4 / udp / gtpu / gtp_psc pdu_t is 0 / ipv4 / end actions rss types ipv4-udp l3-dst-only end key_len 0 queues end / end
It is eventually the same as you described about the command before. User could set pdu_t to be 0 or 1, so what is need is modify
NEXT_ENTRY(UNSIGNED) to be "SIGNED" and defined.
[Ori] I agree about the command look.
Can pdu_t can be only 0 or 1?
Also I don’t understand why you need signed? Even if you add the GTP_PSC_PDU_T as int? and not unsinged?
All other items are unsinged. I also don’t see any reason to create the new type unless, you want the help line.
In any case, I feel that this patch already waste a lot of time. (for both of us)
Please consider again if the new class is necessary, and if it should be signed.
If so you have my ack.
Best,
Ori
---
v1:
no change
---
app/test-pmd/cmdline_flow.c | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
app/test-pmd/cmdline_flow.c +0 -0
index a78154502..c1bd02919 100644
--- a/app/test-pmd/cmdline_flow.c
+++ b/app/test-pmd/cmdline_flow.c
@@ -49,6 +49,7 @@ enum index {
PORT_ID,
GROUP_ID,
PRIORITY_LEVEL,
+ GTP_PSC_PDU_T,
/* Top-level command. */
SET,@@ -1626,6 +1627,13 @@ static const struct token token_list[] = {
.call = parse_int,
.comp = comp_none,
},
+ [GTP_PSC_PDU_T] = {
+ .name = "{GTPU pdu type}",
+ .type = "INTEGER",
+ .help = "gtpu pdu uplink/downlink identifier",
+ .call = parse_int,
+ .comp = comp_none,
+ },
Why is this created at this level?
This looks like is should be written totally differently.
As i said above, the item we got but spec or say next token still need
to be added, do you mean it should not in the group of Common tokens? If
so, let me think about that, and please explicit your proposal if you
already have one.
Please see above response.
/* Top-level command. */
[FLOW] = {
.name = "flow",@@ -2615,7 +2623,8 @@ static const struct token token_list[] = {
[ITEM_GTP_PSC_PDU_T] = {
.name = "pdu_t",
.help = "PDU type",- .next = NEXT(item_gtp_psc, NEXT_ENTRY(UNSIGNED),
item_param),
+ .next = NEXT(item_gtp_psc, NEXT_ENTRY(GTP_PSC_PDU_T),
+ item_param),
.args = ARGS(ARGS_ENTRY_HTON(struct
rte_flow_item_gtp_psc,
pdu_type)),
},--
2.20.1
Re: [dpdk-dev] [dpdk-dev v2 3/4] app/testpmd: support GTP PDU type
hi, Ori
Quoted 172 lines · Ori Kam
Hi Jeff,
For some reason I got the mail in HTML format
So please see my comments marked by [Ori]
Thanks,
Ori
*From:* Jeff Guo <[email protected]>
*Sent:* Tuesday, April 7, 2020 8:37 AM
*To:* Ori Kam <[email protected]>; [email protected]; [email protected] *Cc:* [email protected]; [email protected]; [email protected]; [email protected] *Subject:* Re: [dpdk-dev] [dpdk-dev v2 3/4] app/testpmd: support GTP PDU typehi, Ori
On 4/5/2020 11:56 PM, Ori Kam wrote:
Hi Jeff,
-----Original Message-----
From: Jeff Guo<[email protected]> <mailto:[email protected]>
Sent: Tuesday, March 31, 2020 11:50 AM
To: Ori Kam<[email protected]> <mailto:[email protected]>;[email protected] <mailto:[email protected]>;
[email protected] <mailto:[email protected]>
Cc [email protected] <mailto:[email protected]>;[email protected] <mailto:[email protected]>;[email protected] <mailto:[email protected]>;[email protected] <mailto:[email protected]>
Subject: Re: [dpdk-dev] [dpdk-dev v2 3/4] app/testpmd: support GTP PDU type
yes, Ori, please check the comment below.
On 3/30/2020 6:18 PM, Ori Kam wrote:
Hi Jeff,
My name is Ori😊
I'm not an expert in GTP so this is just my thinking and maybe I'm
missing something, this is why a good explanation helps😊
-----Original Message-----
From: Jeff Guo<[email protected]> <mailto:[email protected]>
Sent: Monday, March 30, 2020 11:30 AM
To: Ori Kam<[email protected]> <mailto:[email protected]>;[email protected] <mailto:[email protected]>;
[email protected] <mailto:[email protected]>
Cc [email protected] <mailto:[email protected]>;[email protected] <mailto:[email protected]>;[email protected] <mailto:[email protected]>;[email protected] <mailto:[email protected]>
Subject: Re: [dpdk-dev] [dpdk-dev v2 3/4] app/testpmd: support GTP PDU
type
hi, orika
On 3/29/2020 4:44 PM, Ori Kam wrote:
Hi Jeff,
-----Original Message-----
From: dev<[email protected]> <mailto:[email protected]> On Behalf Of Jeff Guo
Sent: Thursday, March 26, 2020 6:41 PM
To:[email protected] <mailto:[email protected]>;[email protected] <mailto:[email protected]>
Cc [email protected] <mailto:[email protected]>;[email protected] <mailto:[email protected]>;[email protected] <mailto:[email protected]>;[email protected] <mailto:[email protected]>;[email protected] <mailto:[email protected]>
Subject: [dpdk-dev] [dpdk-dev v2 3/4] app/testpmd: support GTP PDU type
Add gtp pdu type configure in the cmdline.
Why not use
ITEM_GTP_PSC_PDU?I guess you mean
ITEM_GTP_PSC_PDU_T, rihgt? We know we have gotITEM_GTP_PSC_QFI/ITEM_GTP_PSC_PDU_T but not define the
spec for them, so what i use is add the spec into the
ITEM_GTP_PSC_PDU_Tto let the pdu type to be configured.
Yes you are correct, from
rte_flowwe have the
RTE_FLOW_ITEM_TYPE_GTP_PSCItem that include
pdu_type. This is the field you need right?In testpmd we have the
ITEM_GTP_PSC_PDU_Twhich should support addingthe pdu type.
Basically you just need to type the following cmd line:
flow create 0 ingress pattern
gtp_pscpdu_tis xxxif this command is not working we need to understand why.
please check the part before this patch as below:
[
ITEM_GTP_PSC_PDU_T] = {.name = "
pdu_t",.help = "PDU type",
.next = NEXT(item_gtp_psc,
NEXT_ENTRY(UNSIGNED),
item_param),sure, we got the
ITEM_GTP_PSC_PDU_Tat prior but theNEXT_ENTRYisUNSIGNED, that means we still not implement
Sorry I don't understand your comment, what do you mean it is not implemented?
Yes it means that the parameter is should be unsigned value.
I mean that if it is a unsigned value, user could not set the
pdu_tto be a 0 or 1, or any other wedefine for that.
the spec to let the pdu type to be configurable, so what the patch do is
to fix this issue.
What do you mean configurable?
Lets start at the beginning, maybe I'm just missing some key point.
What is the PDU type? What values can he hold?
How do you want the command to look like?
the command should be like as below
flow create 0 ingress pattern eth / ipv4 / udp / gtpu /
gtp_pscpdu_tis 0/ ipv4 / end actions rss types ipv4-udp l3-dst-only endkey_len0queues end / endIt is eventually the same as you described about the command before. User could set
pdu_tto be 0 or 1, so what is need is modify
NEXT_ENTRY(UNSIGNED)to be "SIGNED" and defined.[Ori] I agree about the command look.
Can pdu_t can be only 0 or 1?
Also I don’t understand why you need signed? Even if you add the
GTP_PSC_PDU_Tas int? and not unsinged?All other items are unsinged. I also don’t see any reason to create the new type unless, you want the help line.
In any case, I feel that this patch already waste a lot of time. (for both of us)
Quoted 8 lines
Please consider again if the new class is necessary, and if it should be signed.
If so you have my ack.
Best,
I guess i know your meaning now, and after check it again, what we though is the same but the new class is absolutely not necessary,
you are totally right here Ori, thanks for your targeting it and good review.
Quoted 108 lines
Ori
Signed-off-by: Jeff Guo<[email protected]> <mailto:[email protected]> --- v1: no change --- app/test-pmd/cmdline_flow.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/app/test-pmd/cmdline_flow.c b/app/test-pmd/cmdline_flow.c index a78154502..c1bd02919 100644 --- a/app/test-pmd/cmdline_flow.c +++ b/app/test-pmd/cmdline_flow.c @@ -49,6 +49,7 @@ enum index { PORT_ID, GROUP_ID, PRIORITY_LEVEL, + GTP_PSC_PDU_T, /* Top-level command. */ SET, @@ -1626,6 +1627,13 @@ static const struct token token_list[] = { .call = parse_int, .comp = comp_none, }, + [GTP_PSC_PDU_T] = { + .name = "{GTPU pdu type}", + .type = "INTEGER", + .help = "gtpu pdu uplink/downlink identifier", + .call = parse_int, + .comp = comp_none, + }, Why is this created at this level? This looks like is should be written totally differently. As i said above, the item we got but spec or say next token still need to be added, do you mean it should not in the group of Common tokens? If so, let me think about that, and please explicit your proposal if you already have one. Please see above response. /* Top-level command. */ [FLOW] = { .name = "flow", @@ -2615,7 +2623,8 @@ static const struct token token_list[] = { [ITEM_GTP_PSC_PDU_T] = { .name = "pdu_t", .help = "PDU type", - .next = NEXT(item_gtp_psc, NEXT_ENTRY(UNSIGNED), item_param), + .next = NEXT(item_gtp_psc, NEXT_ENTRY(GTP_PSC_PDU_T), + item_param), .args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_gtp_psc, pdu_type)), }, -- 2.20.1
Ori Kam
Acked-by Ori Kam [email protected]Re: [dpdk-dev] [dpdk-dev v2 3/4] app/testpmd: support GTP PDU type
Hi Jeff,
No problem about the review. I will see v3 right?
From: Jeff Guo <[email protected]>
Sent: Tuesday, April 14, 2020 6:06 AM
To: Ori Kam <[email protected]>; [email protected]; [email protected]
Cc: [email protected]; [email protected]; [email protected]; [email protected]
Subject: Re: [dpdk-dev] [dpdk-dev v2 3/4] app/testpmd: support GTP PDU type
hi, Ori
On 4/12/2020 5:58 PM, Ori Kam wrote:
Hi Jeff,
For some reason I got the mail in HTML format
So please see my comments marked by [Ori]
Thanks,
Ori
From: Jeff Guo <[email protected]><mailto:[email protected]>
Sent: Tuesday, April 7, 2020 8:37 AM
To: Ori Kam <[email protected]><mailto:[email protected]>; [email protected]<mailto:[email protected]>; [email protected]<mailto:[email protected]>
Cc: [email protected]<mailto:[email protected]>; [email protected]<mailto:[email protected]>; [email protected]<mailto:[email protected]>; [email protected]<mailto:[email protected]>
Subject: Re: [dpdk-dev] [dpdk-dev v2 3/4] app/testpmd: support GTP PDU type
hi, Ori
On 4/5/2020 11:56 PM, Ori Kam wrote:
Hi Jeff,
-----Original Message-----
From: Jeff Guo <[email protected]><mailto:[email protected]>
Sent: Tuesday, March 31, 2020 11:50 AM
To: Ori Kam <[email protected]><mailto:[email protected]>; [email protected]<mailto:[email protected]>;
[email protected]<mailto:[email protected]>
[email protected]<mailto:[email protected]>
Subject: Re: [dpdk-dev] [dpdk-dev v2 3/4] app/testpmd: support GTP PDU type
yes, Ori, please check the comment below.
On 3/30/2020 6:18 PM, Ori Kam wrote:
Hi Jeff,
My name is Ori 😊
I'm not an expert in GTP so this is just my thinking and maybe I'm
missing something, this is why a good explanation helps 😊
-----Original Message-----
From: Jeff Guo <[email protected]><mailto:[email protected]>
Sent: Monday, March 30, 2020 11:30 AM
To: Ori Kam <[email protected]><mailto:[email protected]>; [email protected]<mailto:[email protected]>;
[email protected]<mailto:[email protected]>
[email protected]<mailto:[email protected]>
Subject: Re: [dpdk-dev] [dpdk-dev v2 3/4] app/testpmd: support GTP PDU
type
hi, orika
On 3/29/2020 4:44 PM, Ori Kam wrote:
Hi Jeff,
-----Original Message-----
From: dev <[email protected]><mailto:[email protected]> On Behalf Of Jeff Guo
Sent: Thursday, March 26, 2020 6:41 PM
To: [email protected]<mailto:[email protected]>; [email protected]<mailto:[email protected]>
[email protected]<mailto:[email protected]>; [email protected]<mailto:[email protected]>
Subject: [dpdk-dev] [dpdk-dev v2 3/4] app/testpmd: support GTP PDU type
Add gtp pdu type configure in the cmdline.
Why not use ITEM_GTP_PSC_PDU?
I guess you mean ITEM_GTP_PSC_PDU_T, rihgt? We know we have got
ITEM_GTP_PSC_QFI/ITEM_GTP_PSC_PDU_T but not define the
spec for them, so what i use is add the spec into the ITEM_GTP_PSC_PDU_T
to let the pdu type to be configured.
Yes you are correct, from rte_flow we have the
RTE_FLOW_ITEM_TYPE_GTP_PSC
Item that include pdu_type. This is the field you need right?
In testpmd we have the ITEM_GTP_PSC_PDU_T which should support adding
the pdu type.
Basically you just need to type the following cmd line:
flow create 0 ingress pattern gtp_psc pdu_t is xxx
if this command is not working we need to understand why.
please check the part before this patch as below:
[ITEM_GTP_PSC_PDU_T] = {
.name = "pdu_t",
.help = "PDU type",
.next = NEXT(item_gtp_psc, NEXT_ENTRY(UNSIGNED),item_param),
sure, we got the ITEM_GTP_PSC_PDU_T at prior but the NEXT_ENTRY is
UNSIGNED, that means we still not implement
Sorry I don't understand your comment, what do you mean it is not implemented?
Yes it means that the parameter is should be unsigned value.
I mean that if it is a unsigned value, user could not set the pdu_t to be a 0 or 1, or any other we
define for that.
the spec to let the pdu type to be configurable, so what the patch do is
to fix this issue.
What do you mean configurable?
Lets start at the beginning, maybe I'm just missing some key point.
What is the PDU type? What values can he hold?
How do you want the command to look like?
the command should be like as below
flow create 0 ingress pattern eth / ipv4 / udp / gtpu / gtp_psc pdu_t is 0 / ipv4 / end actions rss types ipv4-udp l3-dst-only end key_len 0 queues end / end
It is eventually the same as you described about the command before. User could set pdu_t to be 0 or 1, so what is need is modify
NEXT_ENTRY(UNSIGNED) to be "SIGNED" and defined.
[Ori] I agree about the command look.
Can pdu_t can be only 0 or 1?
Also I don’t understand why you need signed? Even if you add the GTP_PSC_PDU_T as int? and not unsinged?
All other items are unsinged. I also don’t see any reason to create the new type unless, you want the help line.
In any case, I feel that this patch already waste a lot of time. (for both of us)
Please consider again if the new class is necessary, and if it should be signed.
If so you have my ack.
Best,
I guess i know your meaning now, and after check it again, what we though is the same but the new class is absolutely not necessary,
you are totally right here Ori, thanks for your targeting it and good review.
Ori
---
v1:
no change
---
app/test-pmd/cmdline_flow.c | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
app/test-pmd/cmdline_flow.c +0 -0
index a78154502..c1bd02919 100644
--- a/app/test-pmd/cmdline_flow.c
+++ b/app/test-pmd/cmdline_flow.c
@@ -49,6 +49,7 @@ enum index {
PORT_ID,
GROUP_ID,
PRIORITY_LEVEL,
+ GTP_PSC_PDU_T,
/* Top-level command. */
SET,@@ -1626,6 +1627,13 @@ static const struct token token_list[] = {
.call = parse_int,
.comp = comp_none,
},
+ [GTP_PSC_PDU_T] = {
+ .name = "{GTPU pdu type}",
+ .type = "INTEGER",
+ .help = "gtpu pdu uplink/downlink identifier",
+ .call = parse_int,
+ .comp = comp_none,
+ },
Why is this created at this level?
This looks like is should be written totally differently.
As i said above, the item we got but spec or say next token still need
to be added, do you mean it should not in the group of Common tokens? If
so, let me think about that, and please explicit your proposal if you
already have one.
Please see above response.
/* Top-level command. */
[FLOW] = {
.name = "flow",@@ -2615,7 +2623,8 @@ static const struct token token_list[] = {
[ITEM_GTP_PSC_PDU_T] = {
.name = "pdu_t",
.help = "PDU type",- .next = NEXT(item_gtp_psc, NEXT_ENTRY(UNSIGNED),
item_param),
+ .next = NEXT(item_gtp_psc, NEXT_ENTRY(GTP_PSC_PDU_T),
+ item_param),
.args = ARGS(ARGS_ENTRY_HTON(struct
rte_flow_item_gtp_psc,
pdu_type)),
},--
2.20.1
PATCH v2 4/4 app/testpmd: add new types to RSS hash commands
In reply to Jeff GuoAdd some new types, such as eth-src-only/eth-dst-only/svlan/cvlan/ l2tpv3/esp/ah/pfcp types into RSS hash commands, it could be used to configure these rss input set by cmdline.
---
v1:
1.refine some rte eth rss offload types.
--- app/test-pmd/cmdline.c | 24 ++++++++++++++++++++++-- app/test-pmd/config.c | 8 ++++++++ 2 files changed, 30 insertions(+), 2 deletions(-)
app/test-pmd/cmdline.c +22 -2
@@ -2299,6 +2299,22 @@ cmd_config_rss_parsed(void *parsed_result, rss_conf.rss_hf =ETH_RSS_L4_SRC_ONLY ; else if (!strcmp(res->value, "l4-dst-only")) rss_conf.rss_hf =ETH_RSS_L4_DST_ONLY ; + else if (!strcmp(res->value, "eth-src-only")) + rss_conf.rss_hf =ETH_RSS_ETH_SRC_ONLY ; + else if (!strcmp(res->value, "eth-dst-only")) + rss_conf.rss_hf =ETH_RSS_ETH_DST_ONLY ; + else if (!strcmp(res->value, "s-vlan")) + rss_conf.rss_hf =ETH_RSS_S_VLAN ; + else if (!strcmp(res->value, "c-vlan")) + rss_conf.rss_hf =ETH_RSS_C_VLAN ; + else if (!strcmp(res->value, "l2tpv3")) + rss_conf.rss_hf =ETH_RSS_L2TPV3 ; + else if (!strcmp(res->value, "esp")) + rss_conf.rss_hf =ETH_RSS_IPSEC_ESP ; + else if (!strcmp(res->value, "ah")) + rss_conf.rss_hf =ETH_RSS_IPSEC_AH ; + else if (!strcmp(res->value, "pfcp")) + rss_conf.rss_hf =ETH_RSS_PFCP ; else if (!strcmp(res->value, "none")) rss_conf.rss_hf =0 ; else if (!strcmp(res->value, "default"))
@@ -2467,7 +2483,9 @@ cmdline_parse_token_string_t cmd_config_rss_hash_key_rss_type ="ipv4-other#ipv6#ipv6-frag#ipv6-tcp#ipv6-udp#" "ipv6-sctp#ipv6-other#l2-payload#ipv6-ex#" "ipv6-tcp-ex#ipv6-udp-ex#" - "l3-src-only#l3-dst-only#l4-src-only#l4-dst-only"); +"l3-src-only#l3-dst-only#l4-src-only#l4-dst-only#" +"eth-src-only#eth-dst-only#s-vlan#c-vlan#" + "l2tpv3#esp#ah#pfcp");cmdline_parse_token_string_t cmd_config_rss_hash_key_value = TOKEN_STRING_INITIALIZER(struct cmd_config_rss_hash_key, key, NULL);
@@ -2478,7 +2496,9 @@ cmdline_parse_inst_t cmd_config_rss_hash_key = {"ipv4|ipv4-frag|ipv4-tcp|ipv4-udp|ipv4-sctp|ipv4-other|" "ipv6|ipv6-frag|ipv6-tcp|ipv6-udp|ipv6-sctp|ipv6-other|" "l2-payload|ipv6-ex|ipv6-tcp-ex|ipv6-udp-ex|" -"l3-src-only|l3-dst-only|l4-src-only|l4-dst-only " +"l3-src-only|l3-dst-only|l4-src-only|l4-dst-only|" +"eth-src-only|eth-dst-only|s-vlan|c-vlan|" +"l2tpv3|esp|ah|pfcp " "<string of hex digits (variable length, NIC dependent)>", .tokens = { (void *)&cmd_config_rss_hash_key_port,
app/test-pmd/config.c +8 -0
@@ -79,6 +79,10 @@ const struct rss_type_info rss_type_table[] = {ETH_RSS_UDP |ETH_RSS_SCTP | ETH_RSS_L2_PAYLOAD }, { "none", 0 }, + { "eth-src-only", ETH_RSS_ETH_SRC_ONLY }, + { "eth-dst-only", ETH_RSS_ETH_DST_ONLY }, + { "s-vlan", ETH_RSS_S_VLAN }, + { "c-vlan", ETH_RSS_C_VLAN }, { "ipv4", ETH_RSS_IPV4 }, { "ipv4-frag", ETH_RSS_FRAG_IPV4 }, { "ipv4-tcp", ETH_RSS_NONFRAG_IPV4_TCP },
@@ -108,6 +112,10 @@ const struct rss_type_info rss_type_table[] = { { "l3-dst-only", ETH_RSS_L3_DST_ONLY }, { "l4-src-only", ETH_RSS_L4_SRC_ONLY }, { "l4-dst-only", ETH_RSS_L4_DST_ONLY }, + { "l2tpv3", ETH_RSS_L2TPV3 }, + { "esp", ETH_RSS_IPSEC_ESP }, + { "ah", ETH_RSS_IPSEC_AH }, + { "pfcp", ETH_RSS_PFCP }, { NULL, 0 }, };
Signature · 1 line
2.20.1
v3 cover add RSS configuration for iavf
In reply to Jeff GuoBecause the VF must be capable of configuring RSS, so add RSS configuration for iavf. The supported protocol rss input set as below.
eth-src-only/
eth-dst-only/
svlan/
cvlan/
ipv4/
ipv6/
l3_src_only/
l3_dst_only/
l2tpv3/
esp/
ah/
pfcp/
gtpu down/
gtpu up/
udp/
tcp/
sctp/
This patchset depends on below patch sets. (1)http://patches.dpdk.org/project/dpdk/list/?series=8950
add generic filter support for iavf
(2)http://patches.dpdk.org/project/dpdk/list/?series=9280
iavf share code update
(3)http://patches.dpdk.org/project/dpdk/list/?series=9244
framework for advanced iAVF PMD
v3:
1.refince rss offload types.
2.add doc in release note
3.refine some naming base on virtchnl definition. 4.move gtp pdu index from normal to special.
v2:
1.refine some rte eth rss offload types.
2.add NAT T ESP and refine gtpu down/up
3.reference some fixing patch from pf side.
Jeff Guo (4):
ethdev: add new RSS offload types
net/iavf: add RSS configuration for VFs
app/testpmd: support GTP PDU type
app/testpmd: add new types to RSS hash commands
app/test-pmd/cmdline.c | 24 +- app/test-pmd/cmdline_flow.c | 11 +- app/test-pmd/config.c | 8 + doc/guides/rel_notes/release_20_05.rst | 2 + drivers/net/iavf/Makefile | 1 + drivers/net/iavf/iavf.h | 2 + drivers/net/iavf/iavf_hash.c | 1108 ++++++++++++++++++++++++ drivers/net/iavf/iavf_vchnl.c | 33 +- drivers/net/iavf/meson.build | 1 + lib/librte_ethdev/rte_ethdev.h | 11 +- 10 files changed, 1192 insertions(+), 9 deletions(-) create mode 100644 drivers/net/iavf/iavf_hash.c
Signature · 1 line
2.20.1
PATCH v3 1/4 ethdev: add new RSS offload types
Defines some new RSS offload types for ETH/SVLAN/CVLAN/GTPU/L2TPV3/ ESP/AH/PFCP.
---v3->v2:
1.refine rss offload types.
---
lib/librte_ethdev/rte_ethdev.h | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-)
lib/librte_ethdev/rte_ethdev.h +10 -1
@@ -511,6 +511,13 @@ struct rte_eth_rss_conf {#define ETH_RSS_GENEVE (1ULL << 20)#define ETH_RSS_NVGRE (1ULL << 21)#define ETH_RSS_GTPU (1ULL << 23) +#define ETH_RSS_ETH (1ULL << 24) +#define ETH_RSS_S_VLAN (1ULL << 25) +#define ETH_RSS_C_VLAN (1ULL << 26) +#define ETH_RSS_ESP (1ULL << 27) +#define ETH_RSS_AH (1ULL << 28) +#define ETH_RSS_L2TPV3 (1ULL << 29) +#define ETH_RSS_PFCP (1ULL << 30)/* * We use the following macros to combine with above ETH_RSS_* for
@@ -524,7 +531,9 @@ struct rte_eth_rss_conf {#define ETH_RSS_L3_SRC_ONLY (1ULL << 63)#define ETH_RSS_L3_DST_ONLY (1ULL << 62)#define ETH_RSS_L4_SRC_ONLY (1ULL << 61) -#define ETH_RSS_L4_DST_ONLY (1ULL << 60) +#define ETH_RSS_L4_DST_ONLY (1ULL << 60) +#define ETH_RSS_ETH_SRC_ONLY (1ULL << 59) +#define ETH_RSS_ETH_DST_ONLY (1ULL << 58)/** * For input set change of hash filter, if SRC_ONLY and DST_ONLY of
Signature · 1 line
2.20.1
Re: [dpdk-dev] [dpdk-dev v3 1/4] ethdev: add new RSS offload types
Quoted 53 lines
-----Original Message-----
From: Guo, Jia <[email protected]>
Sent: Saturday, April 11, 2020 8:10 AM
To: Ye, Xiaolong <[email protected]>; Zhang, Qi Z <[email protected]>
Cc: [email protected]; Wu, Jingjing <[email protected]>; Cao, Yahui <[email protected]>; Su, Simei <[email protected]>; Guo, Jia <[email protected]>
Subject: [dpdk-dev v3 1/4] ethdev: add new RSS offload typesDefines some new RSS offload types for ETH/SVLAN/CVLAN/GTPU/L2TPV3/ ESP/AH/PFCP.
Signed-off-by Jeff Guo <[email protected]>---
v3->v2:
1.refine rss offload types.
---lib/librte_ethdev/rte_ethdev.h | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-)lib/librte_ethdev/rte_ethdev.h +10
-3@@ -511,6 +511,13 @@ struct rte_eth_rss_conf {#define ETH_RSS_GENEVE (1ULL << 20)#define ETH_RSS_NVGRE (1ULL << 21)#define ETH_RSS_GTPU (1ULL << 23) +#define ETH_RSS_ETH (1ULL << 24) +#define ETH_RSS_S_VLAN (1ULL << 25) +#define ETH_RSS_C_VLAN (1ULL << 26) +#define ETH_RSS_ESP (1ULL << 27) +#define ETH_RSS_AH (1ULL << 28) +#define ETH_RSS_L2TPV3 (1ULL << 29) +#define ETH_RSS_PFCP (1ULL << 30)/* * We use the following macros to combine with above ETH_RSS_* for @@ -524,7 +531,9 @@ struct rte_eth_rss_conf { #define ETH_RSS_L3_SRC_ONLY (1ULL << 63) #define ETH_RSS_L3_DST_ONLY (1ULL << 62) #define ETH_RSS_L4_SRC_ONLY (1ULL << 61) -#define ETH_RSS_L4_DST_ONLY (1ULL << 60) +#define ETH_RSS_L4_DST_ONLY (1ULL << 60) +#define ETH_RSS_ETH_SRC_ONLY (1ULL << 59) +#define ETH_RSS_ETH_DST_ONLY (1ULL << 58) /** * For input set change of hash filter, if SRC_ONLY and DST_ONLY of --
Quoted 1 line
2.20.1
PATCH v3 2/4 net/iavf: add RSS configuration for VFs
In reply to Jeff GuoThe VF must be capable of configuring RSS. Add a virtchnl handler to parse a specific RSS configuration, and process the configuration for VFs, such as add or delete a RSS rule.
---v3->v2:
1.add doc in release note
2.refine some naming base on virtchnl definition.
--- doc/guides/rel_notes/release_20_05.rst | 2 + drivers/net/iavf/Makefile | 1 + drivers/net/iavf/iavf.h | 2 + drivers/net/iavf/iavf_hash.c | 1108 ++++++++++++++++++++++++ drivers/net/iavf/iavf_vchnl.c | 33 +- drivers/net/iavf/meson.build | 1 + 6 files changed, 1142 insertions(+), 5 deletions(-) create mode 100644 drivers/net/iavf/iavf_hash.c
doc/guides/rel_notes/release_20_05.rst +2 -0
@@ -98,6 +98,8 @@ New Features Update the Intel iavf driver with new features and improvements, including: * Added generic filter support. + * Added advanced RSS configuration for VFs. + Removed Items -------------
drivers/net/iavf/Makefile +1 -0
@@ -24,6 +24,7 @@ SRCS-$(CONFIG_RTE_LIBRTE_IAVF_PMD) += iavf_ethdev.c SRCS-$(CONFIG_RTE_LIBRTE_IAVF_PMD) += iavf_vchnl.c SRCS-$(CONFIG_RTE_LIBRTE_IAVF_PMD) += iavf_rxtx.c SRCS-$(CONFIG_RTE_LIBRTE_IAVF_PMD) += iavf_generic_flow.c +SRCS-$(CONFIG_RTE_LIBRTE_IAVF_PMD) += iavf_hash.c ifeq ($(CONFIG_RTE_ARCH_X86), y) SRCS-$(CONFIG_RTE_LIBRTE_IAVF_PMD) += iavf_rxtx_vec_sse.c endif
drivers/net/iavf/iavf.h +2 -0
@@ -252,4 +252,6 @@ int iavf_config_promisc(struct iavf_adapter *adapter, bool enable_unicast,int iavf_add_del_eth_addr (struct iavf_adapter *adapter,struct rte_ether_addr *addr,bool add);int iavf_add_del_vlan (struct iavf_adapter *adapter,uint16_t vlanid,bool add); +int iavf_add_del_rss_cfg (struct iavf_adapter *adapter, +struct virtchnl_rss_cfg *rss_cfg,bool add);#endif /* _IAVF_ETHDEV_H_ */
drivers/net/iavf/iavf_hash.c new file +1108 -0
1,108 lines not on this page · raw message
drivers/net/iavf/iavf_vchnl.c +28 -5
@@ -335,12 +335,9 @@ iavf_get_vf_resource(struct iavf_adapter *adapter) args.out_buffer = vf->aq_resp; args.out_size =IAVF_AQ_BUF_SZ ; -/* TODO: basic offload capabilities, need to -* add advanced/optional offload capabilities -*/ - caps =IAVF_BASIC_OFFLOAD_CAPS |VIRTCHNL_VF_CAP_ADV_LINK_SPEED | -VIRTCHNL_VF_OFFLOAD_RX_FLEX_DESC ; +VIRTCHNL_VF_OFFLOAD_RX_FLEX_DESC | +VIRTCHNL_VF_OFFLOAD_ADV_RSS_PF ; args.in_args = (uint8_t *)∩︀ args.in_args_size =sizeof (caps);
@@ -842,3 +839,29 @@ iavf_add_del_vlan(struct iavf_adapter *adapter, uint16_t vlanid, bool add)return err; } + +int +iavf_add_del_rss_cfg (struct iavf_adapter *adapter, +struct virtchnl_rss_cfg *rss_cfg,bool add) +{ +struct iavf_info *vf =IAVF_DEV_PRIVATE_TO_VF (adapter); +struct iavf_cmd_info args; +int err; + +memset (&args,0 ,sizeof (args)); + args.ops = add ?VIRTCHNL_OP_ADD_RSS_CFG : +VIRTCHNL_OP_DEL_RSS_CFG ; + args.in_args = (u8 *)rss_cfg; + args.in_args_size =sizeof (*rss_cfg); + args.out_buffer = vf->aq_resp; + args.out_size =IAVF_AQ_BUF_SZ ; + + err =iavf_execute_vf_cmd (adapter, &args); +if (err) +PMD_DRV_LOG (ERR , +"Failed to execute command of %s" , + add ?"OP_ADD_RSS_CFG" : +"OP_DEL_RSS_INPUT_CFG" ); + +return err; +}
drivers/net/iavf/meson.build +1 -0
@@ -13,6 +13,7 @@ sources = files( 'iavf_rxtx.c', 'iavf_vchnl.c', 'iavf_generic_flow.c', + 'iavf_hash.c', ) if arch_subdir == 'x86'
Signature · 1 line
2.20.1
Re: [dpdk-dev] [dpdk-dev v3 2/4] net/iavf: add RSS configuration for VFs
Hi Jeff:
Quoted 87 lines
-----Original Message-----
From: Guo, Jia <[email protected]>
Sent: Saturday, April 11, 2020 8:10 AM
To: Ye, Xiaolong <[email protected]>; Zhang, Qi Z <[email protected]>
Cc: [email protected]; Wu, Jingjing <[email protected]>; Cao, Yahui <[email protected]>; Su, Simei <[email protected]>; Guo, Jia <[email protected]>
Subject: [dpdk-dev v3 2/4] net/iavf: add RSS configuration for VFsThe VF must be capable of configuring RSS. Add a virtchnl handler to parse a specific RSS configuration, and process the configuration for VFs, such as add or delete a RSS rule.
Signed-off-by Jeff Guo <[email protected]>---
v3->v2:
1.add doc in release note
2.refine some naming base on virtchnl definition.--- doc/guides/rel_notes/release_20_05.rst | 2 + drivers/net/iavf/Makefile | 1 + drivers/net/iavf/iavf.h | 2 + drivers/net/iavf/iavf_hash.c | 1108 ++++++++++++++++++++++++ drivers/net/iavf/iavf_vchnl.c | 33 +- drivers/net/iavf/meson.build | 1 + 6 files changed, 1142 insertions(+), 5 deletions(-) create mode 100644
drivers/net/iavf/iavf_hash.cdoc/guides/rel_notes/release_20_05.rst +0
-0@@ -98,6 +98,8 @@ New Features Update the Intel iavf driver with new features and improvements,including:
* Added generic filter support.
doc/guides/rel_notes/release_20_05.rst +2
-0+ * Added advanced RSS configuration for VFs. + Removed Items -------------drivers/net/iavf/Makefile index renamed from drivers/net/iavf/Makefile +0
-0
1bf0f26b5..7b0093a3e100644drivers/net/iavf/Makefile +0
-0@@ -24,6 +24,7 @@ SRCS-$(CONFIG_RTE_LIBRTE_IAVF_PMD) +=
iavf_ethdev.c
SRCS-$(CONFIG_RTE_LIBRTE_IAVF_PMD) +=iavf_vchnl.cSRCS-$(CONFIG_RTE_LIBRTE_IAVF_PMD) +=iavf_rxtx.cSRCS-$(CONFIG_RTE_LIBRTE_IAVF_PMD) +=iavf_generic_flow.c
+SRCS-$(CONFIG_RTE_LIBRTE_IAVF_PMD) +=iavf_hash.c
ifeq ($(CONFIG_RTE_ARCH_X86), y) SRCS-$(CONFIG_RTE_LIBRTE_IAVF_PMD) +=iavf_rxtx_vec_sse.cendif diff
--gita/drivers/net/iavf/iavf.hb/drivers/net/iavf/iavf.hindex78bdaff20..d813296d3100644drivers/net/iavf/iavf.h +2
-0@@ -252,4 +252,6 @@ int iavf_config_promisc(struct iavf_adapter *adapter, bool enable_unicast, int iavf_add_del_eth_addr(structiavf_adapter *adapter,struct rte_ether_addr *addr,bool add);int iavf_add_del_vlan (struct iavf_adapter *adapter,uint16_t vlanid,bool add); +int iavf_add_del_rss_cfg (struct iavf_adapter *adapter, +struct virtchnl_rss_cfg *rss_cfg,bool add);#endif /* _IAVF_ETHDEV_H_ */
drivers/net/iavf/iavf_hash.c new renamed from drivers/net/iavf/iavf_hash.c +0
-0file mode 100644 index 000000000..f831738cc
drivers/net/iavf/iavf_hash.c new file +13
-0@@ -0,0 +1,1108 @@ +/* SPDX-License-Identifier: BSD-3-Clause +* Copyright(c) 2020 Intel Corporation +*/ + + +static uint64_t +iavf_rss_hf_refine (uint64_t rss_hf,const struct rte_flow_item pattern[], +const struct rte_flow_action *action, +struct rte_flow_error *error) +{ +const struct rte_flow_item *item; + +for (item = pattern; item->type !=RTE_FLOW_ITEM_TYPE_END ; item++){
drivers/net/iavf/iavf_hash.c line 839
Quoted 6 lines
drivers/net/iavf/iavf_hash.c new file +6
-0+if (item->type ==RTE_FLOW_ITEM_TYPE_GTP_PSC ) { +const struct rte_flow_action_rss *rss = action->conf; +const struct rte_flow_item_gtp_psc *psc = item->spec; + + if (psc && ((psc->pdu_type == GTP_EH_PDU_LINK_UP && + (rss->types & ETH_RSS_L3_SRC_ONLY)) ||
Why we need to check SRC_ONLY here, the purpose of the function is to refine the rss_hf, Should we'd better input set check to the stage " Find matched proto hdrs according to hash type" later
drivers/net/iavf/iavf_hash.c line 840
Quoted 1 line
drivers/net/iavf/iavf_hash.c new file +1
-0+ (!psc->pdu_type &&
Better use GTP_EH_PDU_LINK_DOWN
Quoted 75 lines
drivers/net/iavf/iavf_hash.c new file +17
-0+ (rss->types & ETH_RSS_L3_DST_ONLY)))) { + rss_hf |=ETH_RSS_GTPU ; + }else { +rte_flow_error_set (error,EINVAL , +RTE_FLOW_ERROR_TYPE_ITEM_SPEC , + pattern, +"Invalid input set" ); +return -rte_errno; + } + } + } + +return rss_hf; +} + +static int +iavf_hash_parse_action(struct iavf_pattern_match_item
*pattern_match_item,drivers/net/iavf/iavf_hash.c new file +57
-0+const struct rte_flow_item pattern[], + const struct rte_flow_action actions[], + void **meta, struct rte_flow_error *error) { + struct iavf_rss_meta *rss_meta = (struct iavf_rss_meta *)*meta; +struct rss_type_match_hdr *m = (struct rss_type_match_hdr *) + (pattern_match_item->meta); +uint32_t type_list_len =RTE_DIM (iavf_hash_type_list); +struct iavf_hash_match_type *type_match_item; +enum rte_flow_action_type action_type; +const struct rte_flow_action_rss *rss; +const struct rte_flow_action *action; +uint64_t rss_hf; +uint16_t i; +bool item_found = false; + +/* Supported action is RSS. */ + for (action = actions; action->type != + RTE_FLOW_ACTION_TYPE_END; action++) { + action_type = action->type; + switch (action_type) { + case RTE_FLOW_ACTION_TYPE_RSS: + rss = action->conf; + rss_hf = rss->types; + + /** + * Check simultaneous use of SRC_ONLY and DST_ONLY + * of the same level. + */ + rss_hf = rte_eth_rss_hf_refine(rss_hf); + + /** + * Check the item spec with the rss action and + * refine rss hash field. + */ + rss_hf = iavf_rss_hf_refine(rss_hf, pattern, action, + error); + + /* Check if pattern is empty. */ + if (pattern_match_item->pattern_list != + iavf_pattern_empty && rss->func == + RTE_ETH_HASH_FUNCTION_SIMPLE_XOR) + return rte_flow_error_set(error, ENOTSUP, + RTE_FLOW_ERROR_TYPE_ACTION, action, + "Not supported flow"); + + /* Check if rss types match pattern. */ + if (rss->func != RTE_ETH_HASH_FUNCTION_SIMPLE_XOR) { + if (((rss_hf & ETH_RSS_IPV4) != + m->eth_rss_hint) && + ((rss_hf & ETH_RSS_NONFRAG_IPV4_UDP) != + m->eth_rss_hint) && + ((rss_hf & ETH_RSS_NONFRAG_IPV4_TCP) != + m->eth_rss_hint) && + ((rss_hf & ETH_RSS_NONFRAG_IPV4_SCTP) != + m->eth_rss_hint) && + ((rss_hf & ETH_RSS_IPV6) != + m->eth_rss_hint) &&
drivers/net/iavf/iavf_hash.c line 925
Quoted 10 lines
drivers/net/iavf/iavf_hash.c new file +10
-0+ ((rss_hf & ETH_RSS_NONFRAG_IPV6_UDP) != + m->eth_rss_hint) && + ((rss_hf & ETH_RSS_NONFRAG_IPV6_TCP) != + m->eth_rss_hint) && + ((rss_hf & ETH_RSS_NONFRAG_IPV6_SCTP) != + m->eth_rss_hint)) +return rte_flow_error_set (error, +ENOTSUP ,RTE_FLOW_ERROR_TYPE_ACTION , + action,"Not supported RSS types" ); + }
Why we need above check ? what happens if the input set does not include any IP layer for example session id of PFCP?
......
Quoted 17 lines
drivers/net/iavf/iavf_hash.c new file +17
-0+static int +iavf_hash_create(__rte_unused struct iavf_adapter *ad, + __rte_unused struct rte_flow *flow, void *meta, + __rte_unused struct rte_flow_error *error) { +struct iavf_rss_meta *rss_meta = (struct iavf_rss_meta *)meta; +struct virtchnl_rss_cfg *rss_cfg; +int ret =0 ; + + rss_cfg =rte_zmalloc ("iavf rss rule" , +sizeof (struct virtchnl_rss_cfg ),0 ); +if (!rss_cfg) { +rte_flow_error_set (error,EINVAL , +RTE_FLOW_ERROR_TYPE_HANDLE ,NULL , +"No memory for rss rule" ); +return -ENOMEM ; + } +
drivers/net/iavf/iavf_hash.c line 1076
Quoted 10 lines
drivers/net/iavf/iavf_hash.c new file +10
-0+ rss_cfg->proto_hdrs = *rss_meta->proto_hdrs; + rss_cfg->rss_algorithm = rss_meta->hash_function; + + ret =iavf_add_del_rss_cfg (ad, rss_cfg, true); +if (!ret) { + flow->rule = rss_cfg; + }else { +PMD_DRV_LOG (ERR ,"fail to add RSS configure" ); +rte_free (rss_cfg); + }
The "meta" be created by iavf_hash_parse_pattern_action is assumed to be freed here,
Re: [dpdk-dev] [dpdk-dev v3 2/4] net/iavf: add RSS configuration for VFs
hi, qi
Quoted 89 lines · Qi Z
Hi Jeff:
Quoted 87 lines
-----Original Message-----
From: Guo, Jia <[email protected]>
Sent: Saturday, April 11, 2020 8:10 AM
To: Ye, Xiaolong <[email protected]>; Zhang, Qi Z <[email protected]>
Cc: [email protected]; Wu, Jingjing <[email protected]>; Cao, Yahui <[email protected]>; Su, Simei <[email protected]>; Guo, Jia <[email protected]>
Subject: [dpdk-dev v3 2/4] net/iavf: add RSS configuration for VFsThe VF must be capable of configuring RSS. Add a virtchnl handler to parse a specific RSS configuration, and process the configuration for VFs, such as add or delete a RSS rule.
Signed-off-by Jeff Guo <[email protected]>---
v3->v2:
1.add doc in release note
2.refine some naming base on virtchnl definition.--- doc/guides/rel_notes/release_20_05.rst | 2 + drivers/net/iavf/Makefile | 1 + drivers/net/iavf/iavf.h | 2 + drivers/net/iavf/iavf_hash.c | 1108 ++++++++++++++++++++++++ drivers/net/iavf/iavf_vchnl.c | 33 +- drivers/net/iavf/meson.build | 1 + 6 files changed, 1142 insertions(+), 5 deletions(-) create mode 100644
drivers/net/iavf/iavf_hash.cdoc/guides/rel_notes/release_20_05.rst +0
-0@@ -98,6 +98,8 @@ New Features Update the Intel iavf driver with new features and improvements,including:
* Added generic filter support.
doc/guides/rel_notes/release_20_05.rst +2
-0+ * Added advanced RSS configuration for VFs. + Removed Items -------------drivers/net/iavf/Makefile index renamed from drivers/net/iavf/Makefile +0
-0
1bf0f26b5..7b0093a3e100644drivers/net/iavf/Makefile +0
-0@@ -24,6 +24,7 @@ SRCS-$(CONFIG_RTE_LIBRTE_IAVF_PMD) +=
iavf_ethdev.c
SRCS-$(CONFIG_RTE_LIBRTE_IAVF_PMD) +=iavf_vchnl.cSRCS-$(CONFIG_RTE_LIBRTE_IAVF_PMD) +=iavf_rxtx.cSRCS-$(CONFIG_RTE_LIBRTE_IAVF_PMD) +=iavf_generic_flow.c
+SRCS-$(CONFIG_RTE_LIBRTE_IAVF_PMD) +=iavf_hash.c
ifeq ($(CONFIG_RTE_ARCH_X86), y) SRCS-$(CONFIG_RTE_LIBRTE_IAVF_PMD) +=iavf_rxtx_vec_sse.cendif diff
--gita/drivers/net/iavf/iavf.hb/drivers/net/iavf/iavf.hindex78bdaff20..d813296d3100644drivers/net/iavf/iavf.h +2
-0@@ -252,4 +252,6 @@ int iavf_config_promisc(struct iavf_adapter *adapter, bool enable_unicast, int iavf_add_del_eth_addr(structiavf_adapter *adapter,struct rte_ether_addr *addr,bool add);int iavf_add_del_vlan (struct iavf_adapter *adapter,uint16_t vlanid,bool add); +int iavf_add_del_rss_cfg (struct iavf_adapter *adapter, +struct virtchnl_rss_cfg *rss_cfg,bool add);#endif /* _IAVF_ETHDEV_H_ */drivers/net/iavf/iavf_hash.c new renamed from drivers/net/iavf/iavf_hash.c +0
-0file mode 100644 index 000000000..f831738cc
drivers/net/iavf/iavf_hash.c new file +13
-0@@ -0,0 +1,1108 @@ +/* SPDX-License-Identifier: BSD-3-Clause +* Copyright(c) 2020 Intel Corporation +*/ + + +static uint64_t +iavf_rss_hf_refine (uint64_t rss_hf,const struct rte_flow_item pattern[], +const struct rte_flow_action *action, +struct rte_flow_error *error) +{ +const struct rte_flow_item *item; + +for (item = pattern; item->type !=RTE_FLOW_ITEM_TYPE_END ; item++){
Quoted 8 lines
drivers/net/iavf/iavf_hash.c line 839
Quoted 6 lines
drivers/net/iavf/iavf_hash.c new file +6
-0+if (item->type ==RTE_FLOW_ITEM_TYPE_GTP_PSC ) { +const struct rte_flow_action_rss *rss = action->conf; +const struct rte_flow_item_gtp_psc *psc = item->spec; + + if (psc && ((psc->pdu_type == GTP_EH_PDU_LINK_UP && + (rss->types & ETH_RSS_L3_SRC_ONLY)) ||Why we need to check
SRC_ONLYhere, the purpose of the function is to refine therss_hf, Should we'd better input set check to the stage " Find matched proto hdrs according to hash type" later
agree with you the point that we don't need to check the SRC/DST here, because we could exactly check it later.
Quoted 2 lines
drivers/net/iavf/iavf_hash.c line 840
Quoted 1 line
drivers/net/iavf/iavf_hash.c new file +1
-0+ (!psc->pdu_type &&Better use
GTP_EH_PDU_LINK_DOWN
make sense.
Quoted 87 lines
Quoted 75 lines
drivers/net/iavf/iavf_hash.c new file +17
-0+ (rss->types & ETH_RSS_L3_DST_ONLY)))) { + rss_hf |=ETH_RSS_GTPU ; + }else { +rte_flow_error_set (error,EINVAL , +RTE_FLOW_ERROR_TYPE_ITEM_SPEC , + pattern, +"Invalid input set" ); +return -rte_errno; + } + } + } + +return rss_hf; +} + +static int +iavf_hash_parse_action(struct iavf_pattern_match_item
*pattern_match_item,drivers/net/iavf/iavf_hash.c new file +57
-0+const struct rte_flow_item pattern[], + const struct rte_flow_action actions[], + void **meta, struct rte_flow_error *error) { + struct iavf_rss_meta *rss_meta = (struct iavf_rss_meta *)*meta; +struct rss_type_match_hdr *m = (struct rss_type_match_hdr *) + (pattern_match_item->meta); +uint32_t type_list_len =RTE_DIM (iavf_hash_type_list); +struct iavf_hash_match_type *type_match_item; +enum rte_flow_action_type action_type; +const struct rte_flow_action_rss *rss; +const struct rte_flow_action *action; +uint64_t rss_hf; +uint16_t i; +bool item_found = false; + +/* Supported action is RSS. */ + for (action = actions; action->type != + RTE_FLOW_ACTION_TYPE_END; action++) { + action_type = action->type; + switch (action_type) { + case RTE_FLOW_ACTION_TYPE_RSS: + rss = action->conf; + rss_hf = rss->types; + + /** + * Check simultaneous use of SRC_ONLY and DST_ONLY + * of the same level. + */ + rss_hf = rte_eth_rss_hf_refine(rss_hf); + + /** + * Check the item spec with the rss action and + * refine rss hash field. + */ + rss_hf = iavf_rss_hf_refine(rss_hf, pattern, action, + error); + + /* Check if pattern is empty. */ + if (pattern_match_item->pattern_list != + iavf_pattern_empty && rss->func == + RTE_ETH_HASH_FUNCTION_SIMPLE_XOR) + return rte_flow_error_set(error, ENOTSUP, + RTE_FLOW_ERROR_TYPE_ACTION, action, + "Not supported flow"); + + /* Check if rss types match pattern. */ + if (rss->func != RTE_ETH_HASH_FUNCTION_SIMPLE_XOR) { + if (((rss_hf & ETH_RSS_IPV4) != + m->eth_rss_hint) && + ((rss_hf & ETH_RSS_NONFRAG_IPV4_UDP) != + m->eth_rss_hint) && + ((rss_hf & ETH_RSS_NONFRAG_IPV4_TCP) != + m->eth_rss_hint) && + ((rss_hf & ETH_RSS_NONFRAG_IPV4_SCTP) != + m->eth_rss_hint) && + ((rss_hf & ETH_RSS_IPV6) != + m->eth_rss_hint) &&drivers/net/iavf/iavf_hash.c line 925
Quoted 10 lines
drivers/net/iavf/iavf_hash.c new file +10
-0+ ((rss_hf & ETH_RSS_NONFRAG_IPV6_UDP) != + m->eth_rss_hint) && + ((rss_hf & ETH_RSS_NONFRAG_IPV6_TCP) != + m->eth_rss_hint) && + ((rss_hf & ETH_RSS_NONFRAG_IPV6_SCTP) != + m->eth_rss_hint)) +return rte_flow_error_set (error, +ENOTSUP ,RTE_FLOW_ERROR_TYPE_ACTION , + action,"Not supported RSS types" ); + }Why we need above check ? what happens if the input set does not include any IP layer for example session id of PFCP?
Quoted 1 line
......
PFCP is also include IP later, but yes, it should support for much case case, such as only ether.
Quoted 21 lines
Quoted 21 lines
drivers/net/iavf/iavf_hash.c new file +20
-0+static int +iavf_hash_create(__rte_unused struct iavf_adapter *ad, + __rte_unused struct rte_flow *flow, void *meta, + __rte_unused struct rte_flow_error *error) { +struct iavf_rss_meta *rss_meta = (struct iavf_rss_meta *)meta; +struct virtchnl_rss_cfg *rss_cfg; +int ret =0 ; + + rss_cfg =rte_zmalloc ("iavf rss rule" , +sizeof (struct virtchnl_rss_cfg ),0 ); +if (!rss_cfg) { +rte_flow_error_set (error,EINVAL , +RTE_FLOW_ERROR_TYPE_HANDLE ,NULL , +"No memory for rss rule" ); +return -ENOMEM ; + } + + rss_cfg->proto_hdrs = *rss_meta->proto_hdrs; + rss_cfg->rss_algorithm = rss_meta->hash_function; +
Quoted 9 lines
drivers/net/iavf/iavf_hash.c line 1076
Quoted 7 lines
drivers/net/iavf/iavf_hash.c new file +7
-0+ ret =iavf_add_del_rss_cfg (ad, rss_cfg, true); +if (!ret) { + flow->rule = rss_cfg; + }else { +PMD_DRV_LOG (ERR ,"fail to add RSS configure" ); +rte_free (rss_cfg); + }The "meta" be created by
iavf_hash_parse_pattern_actionis assumed to be freed here,
sure.
PATCH v3 3/4 app/testpmd: support GTP PDU type
In reply to Jeff GuoAdd gtp pdu type configure in the cmdline.
---v3->v2:
1.move gtp pdu index from normal to special.
--- app/test-pmd/cmdline_flow.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-)
app/test-pmd/cmdline_flow.c +10 -1
@@ -49,6 +49,7 @@ enum index {PORT_ID ,GROUP_ID ,PRIORITY_LEVEL , +GTP_PSC_PDU_T ,/* Top-level command. */ SET,
@@ -1529,6 +1530,13 @@ static const struct token token_list[] = { .type = "RETURN", .help = "set command may end here", }, + [GTP_PSC_PDU_T] = { + .name = "{GTPU pdu type}", + .type = "INTEGER", + .help = "gtpu pdu uplink/downlink identifier", + .call = parse_int, + .comp = comp_none, + },/* Common tokens. */ [INTEGER] = { .name = "{int}",
@@ -2622,7 +2630,8 @@ static const struct token token_list[] = { [ITEM_GTP_PSC_PDU_T] = { .name = "pdu_t", .help = "PDU type", - .next = NEXT(item_gtp_psc, NEXT_ENTRY(UNSIGNED), item_param), + .next =NEXT (item_gtp_psc,NEXT_ENTRY (GTP_PSC_PDU_T ), + item_param), .args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_gtp_psc, pdu_type)), },
Signature · 1 line
2.20.1
PATCH v3 4/4 app/testpmd: add new types to RSS hash commands
In reply to Jeff GuoAdd some new types, such as eth-src-only/eth-dst-only/svlan/cvlan/ l2tpv3/esp/ah/pfcp types into RSS hash commands, it could be used to configure these rss input set by cmdline.
---v3->v2:
1:refine some rss offload types
--- app/test-pmd/cmdline.c | 24 ++++++++++++++++++++++-- app/test-pmd/config.c | 8 ++++++++ 2 files changed, 30 insertions(+), 2 deletions(-)
app/test-pmd/cmdline.c +22 -2
@@ -2299,6 +2299,22 @@ cmd_config_rss_parsed(void *parsed_result, rss_conf.rss_hf =ETH_RSS_L4_SRC_ONLY ; else if (!strcmp(res->value, "l4-dst-only")) rss_conf.rss_hf =ETH_RSS_L4_DST_ONLY ; + else if (!strcmp(res->value, "eth-src-only")) + rss_conf.rss_hf =ETH_RSS_ETH_SRC_ONLY ; + else if (!strcmp(res->value, "eth-dst-only")) + rss_conf.rss_hf =ETH_RSS_ETH_DST_ONLY ; + else if (!strcmp(res->value, "s-vlan")) + rss_conf.rss_hf =ETH_RSS_S_VLAN ; + else if (!strcmp(res->value, "c-vlan")) + rss_conf.rss_hf =ETH_RSS_C_VLAN ; + else if (!strcmp(res->value, "l2tpv3")) + rss_conf.rss_hf =ETH_RSS_L2TPV3 ; + else if (!strcmp(res->value, "esp")) + rss_conf.rss_hf =ETH_RSS_ESP ; + else if (!strcmp(res->value, "ah")) + rss_conf.rss_hf =ETH_RSS_AH ; + else if (!strcmp(res->value, "pfcp")) + rss_conf.rss_hf =ETH_RSS_PFCP ; else if (!strcmp(res->value, "none")) rss_conf.rss_hf =0 ; else if (!strcmp(res->value, "default"))
@@ -2467,7 +2483,9 @@ cmdline_parse_token_string_t cmd_config_rss_hash_key_rss_type ="ipv4-other#ipv6#ipv6-frag#ipv6-tcp#ipv6-udp#" "ipv6-sctp#ipv6-other#l2-payload#ipv6-ex#" "ipv6-tcp-ex#ipv6-udp-ex#" - "l3-src-only#l3-dst-only#l4-src-only#l4-dst-only"); +"l3-src-only#l3-dst-only#l4-src-only#l4-dst-only#" +"eth-src-only#eth-dst-only#s-vlan#c-vlan#" + "l2tpv3#esp#ah#pfcp");cmdline_parse_token_string_t cmd_config_rss_hash_key_value = TOKEN_STRING_INITIALIZER(struct cmd_config_rss_hash_key, key, NULL);
@@ -2478,7 +2496,9 @@ cmdline_parse_inst_t cmd_config_rss_hash_key = {"ipv4|ipv4-frag|ipv4-tcp|ipv4-udp|ipv4-sctp|ipv4-other|" "ipv6|ipv6-frag|ipv6-tcp|ipv6-udp|ipv6-sctp|ipv6-other|" "l2-payload|ipv6-ex|ipv6-tcp-ex|ipv6-udp-ex|" -"l3-src-only|l3-dst-only|l4-src-only|l4-dst-only " +"l3-src-only|l3-dst-only|l4-src-only|l4-dst-only|" +"eth-src-only|eth-dst-only|s-vlan|c-vlan|" +"l2tpv3|esp|ah|pfcp " "<string of hex digits (variable length, NIC dependent)>", .tokens = { (void *)&cmd_config_rss_hash_key_port,
app/test-pmd/config.c +8 -0
@@ -79,6 +79,10 @@ const struct rss_type_info rss_type_table[] = {ETH_RSS_UDP |ETH_RSS_SCTP | ETH_RSS_L2_PAYLOAD }, { "none", 0 }, + { "eth-src-only", ETH_RSS_ETH_SRC_ONLY }, + { "eth-dst-only", ETH_RSS_ETH_DST_ONLY }, + { "s-vlan", ETH_RSS_S_VLAN }, + { "c-vlan", ETH_RSS_C_VLAN }, { "ipv4", ETH_RSS_IPV4 }, { "ipv4-frag", ETH_RSS_FRAG_IPV4 }, { "ipv4-tcp", ETH_RSS_NONFRAG_IPV4_TCP },
@@ -108,6 +112,10 @@ const struct rss_type_info rss_type_table[] = { { "l3-dst-only", ETH_RSS_L3_DST_ONLY }, { "l4-src-only", ETH_RSS_L4_SRC_ONLY }, { "l4-dst-only", ETH_RSS_L4_DST_ONLY }, + { "l2tpv3", ETH_RSS_L2TPV3 }, + { "esp", ETH_RSS_ESP }, + { "ah", ETH_RSS_AH }, + { "pfcp", ETH_RSS_PFCP }, { NULL, 0 }, };
Signature · 1 line
2.20.1
v4 cover add RSS configuration for iavf
In reply to Jeff GuoBecause the VF must be capable of configuring RSS, so add RSS configuration for iavf, VFs could add or delete a RSS rule base on the PF's capability. The supported protocol rss input set as below.
eth-src-only/
eth-dst-only/
svlan/
cvlan/
ipv4/
ipv6/
l3_src_only/
l3_dst_only/
l2tpv3/
esp/
ah/
pfcp/
gtpu down/
gtpu up/
udp/
tcp/
sctp/
use tespmd for example:
testpmd> flow create 0 ingress pattern eth / ipv4 / end actions rss types ipv4 l3-src-only end key_len 0 queues end / end
use scapy for example:
Quoted 1 line
sendp(Ether(dst="00:01:23:45:67:01")/IP(src=RandIP())/Raw('x'*20),iface="ens785f1",loop=1,inter=0.3)
the expect result:
the rss hash works and the packets will go to difference queue for load balance.
This patchset depends on below patch sets. (1)http://patches.dpdk.org/project/dpdk/list/?series=8950
add generic filter support for iavf
(2)http://patches.dpdk.org/project/dpdk/list/?series=9280
iavf share code update
(3)http://patches.dpdk.org/project/dpdk/list/?series=9244
framework for advanced iAVF PMD
v4:
1.refine the rss type checking
2.delete unnecessary pdu type item.
v3:
1.refince rss offload types.
2.add doc in release note
3.refine some naming base on virtchnl definition.
4.move gtp pdu index from normal to special.
v2:
1.refine some rte eth rss offload types.
2.add NAT T ESP and refine gtpu down/up
3.reference some fixing patch from pf side.
Jeff Guo (3):
ethdev: add new RSS offload types
net/iavf: add RSS configuration for VFs
app/testpmd: add new types to RSS hash commands
app/test-pmd/cmdline.c | 24 +- app/test-pmd/config.c | 8 + doc/guides/rel_notes/release_20_05.rst | 2 + drivers/net/iavf/Makefile | 1 + drivers/net/iavf/iavf.h | 2 + drivers/net/iavf/iavf_hash.c | 1073 ++++++++++++++++++++++++ drivers/net/iavf/iavf_vchnl.c | 33 +- drivers/net/iavf/meson.build | 1 + lib/librte_ethdev/rte_ethdev.h | 11 +- 9 files changed, 1147 insertions(+), 8 deletions(-) create mode 100644 drivers/net/iavf/iavf_hash.c
Signature · 1 line
2.20.1
PATCH v4 1/3 ethdev: add new RSS offload types
Defines some new RSS offload types for ETH/SVLAN/CVLAN/GTPU/L2TPV3/ ESP/AH/PFCP.
---v4->v3:
no change
--- lib/librte_ethdev/rte_ethdev.h | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-)
lib/librte_ethdev/rte_ethdev.h +10 -1
@@ -511,6 +511,13 @@ struct rte_eth_rss_conf {#define ETH_RSS_GENEVE (1ULL << 20)#define ETH_RSS_NVGRE (1ULL << 21)#define ETH_RSS_GTPU (1ULL << 23) +#define ETH_RSS_ETH (1ULL << 24) +#define ETH_RSS_S_VLAN (1ULL << 25) +#define ETH_RSS_C_VLAN (1ULL << 26) +#define ETH_RSS_ESP (1ULL << 27) +#define ETH_RSS_AH (1ULL << 28) +#define ETH_RSS_L2TPV3 (1ULL << 29) +#define ETH_RSS_PFCP (1ULL << 30)/* * We use the following macros to combine with above ETH_RSS_* for
@@ -524,7 +531,9 @@ struct rte_eth_rss_conf {#define ETH_RSS_L3_SRC_ONLY (1ULL << 63)#define ETH_RSS_L3_DST_ONLY (1ULL << 62)#define ETH_RSS_L4_SRC_ONLY (1ULL << 61) -#define ETH_RSS_L4_DST_ONLY (1ULL << 60) +#define ETH_RSS_L4_DST_ONLY (1ULL << 60) +#define ETH_RSS_ETH_SRC_ONLY (1ULL << 59) +#define ETH_RSS_ETH_DST_ONLY (1ULL << 58)/** * For input set change of hash filter, if SRC_ONLY and DST_ONLY of
Signature · 1 line
2.20.1
Re: [dpdk-dev] [dpdk-dev v4 1/3] ethdev: add new RSS offload types
Hi Jeff,
PSB
Best,
Ori
Quoted 40 lines
-----Original Message-----
From: Jeff Guo <[email protected]>
Sent: Tuesday, April 14, 2020 8:42 PM
To: Ori Kam <[email protected]>; [email protected]; [email protected]; [email protected]
Cc: [email protected]; [email protected]; [email protected]; [email protected]; [email protected]
Subject: [dpdk-dev v4 1/3] ethdev: add new RSS offload typesDefines some new RSS offload types for ETH/SVLAN/CVLAN/GTPU/L2TPV3/ ESP/AH/PFCP.
Signed-off-by Jeff Guo <[email protected]>Reviewed-by Qi Zhang <[email protected]>---
v4->v3:
no change--- lib/librte_ethdev/rte_ethdev.h | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-)lib/librte_ethdev/rte_ethdev.h +7
-0@@ -511,6 +511,13 @@ struct rte_eth_rss_conf {#define ETH_RSS_GENEVE (1ULL << 20)#define ETH_RSS_NVGRE (1ULL << 21)#define ETH_RSS_GTPU (1ULL << 23) +#define ETH_RSS_ETH (1ULL << 24) +#define ETH_RSS_S_VLAN (1ULL << 25) +#define ETH_RSS_C_VLAN (1ULL << 26) +#define ETH_RSS_ESP (1ULL << 27) +#define ETH_RSS_AH (1ULL << 28) +#define ETH_RSS_L2TPV3 (1ULL << 29) +#define ETH_RSS_PFCP (1ULL << 30)/* * We use the following macros to combine with above ETH_RSS_* for
lib/librte_ethdev/rte_ethdev.h struct rte_eth_rss_conf { · line 537
Quoted 8 lines
lib/librte_ethdev/rte_ethdev.h +3
-1@@ -524,7 +531,9 @@ struct rte_eth_rss_conf {#define ETH_RSS_L3_SRC_ONLY (1ULL << 63)#define ETH_RSS_L3_DST_ONLY (1ULL << 62)#define ETH_RSS_L4_SRC_ONLY (1ULL << 61) -#define ETH_RSS_L4_DST_ONLY (1ULL << 60) +#define ETH_RSS_L4_DST_ONLY (1ULL << 60) +#define ETH_RSS_ETH_SRC_ONLY (1ULL << 59) +#define ETH_RSS_ETH_DST_ONLY (1ULL << 58)
Why not change to L2_RSS_SRC_ONLY? Same for DST? Also if it is not ABI/API change I would suggest to move the ETH defines to be 63.
Quoted 4 lines
lib/librte_ethdev/rte_ethdev.h +0
-1/** * For input set change of hash filter, if SRC_ONLY and DST_ONLY of -- 2.20.1
Re: [dpdk-dev] [dpdk-dev v4 1/3] ethdev: add new RSS offload types
Quoted 57 lines
-----Original Message-----
From: Ori Kam <[email protected]>
Sent: Tuesday, April 14, 2020 5:43 PM
To: Guo, Jia <[email protected]>; Iremonger, Bernard <[email protected]>; Ye, Xiaolong <[email protected]>; Zhang, Qi Z <[email protected]>
Cc: [email protected]; Wu, Jingjing <[email protected]>; Cao, Yahui <[email protected]>; Su, Simei <[email protected]>
Subject: RE: [dpdk-dev v4 1/3] ethdev: add new RSS offload typesHi Jeff,
PSBBest,
OriQuoted 29 lines
-----Original Message-----
From: Jeff Guo <[email protected]>
Sent: Tuesday, April 14, 2020 8:42 PM
To: Ori Kam <[email protected]>; [email protected]; [email protected]; [email protected]
Cc: [email protected]; [email protected]; [email protected]; [email protected]; [email protected]
Subject: [dpdk-dev v4 1/3] ethdev: add new RSS offload typesDefines some new RSS offload types for ETH/SVLAN/CVLAN/GTPU/L2TPV3/ ESP/AH/PFCP.
Signed-off-by Jeff Guo <[email protected]>Reviewed-by Qi Zhang <[email protected]>---
v4->v3:
no change--- lib/librte_ethdev/rte_ethdev.h | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-)(quoted diff) +0
-0
b/lib/librte_ethdev/rte_ethdev.hindexd1a593ad1..efe705ff0100644lib/librte_ethdev/rte_ethdev.h +0
-0@@ -511,6 +511,13 @@ struct rte_eth_rss_conf {#define ETH_RSS_GENEVE (1ULL << 20)#define ETH_RSS_NVGRE (1ULL << 21)#define ETH_RSS_GTPU (1ULL << 23)lib/librte_ethdev/rte_ethdev.h struct rte_eth_rss_conf { · line 523
Quoted 10 lines
lib/librte_ethdev/rte_ethdev.h +7
-0+#define ETH_RSS_ETH (1ULL << 24) +#define ETH_RSS_S_VLAN (1ULL << 25) +#define ETH_RSS_C_VLAN (1ULL << 26) +#define ETH_RSS_ESP (1ULL << 27) +#define ETH_RSS_AH (1ULL << 28) +#define ETH_RSS_L2TPV3 (1ULL << 29) +#define ETH_RSS_PFCP (1ULL << 30)/* * We use the following macros to combine with above ETH_RSS_* for @@
Quoted 12 lines
lib/librte_ethdev/rte_ethdev.h struct rte_eth_rss_conf { · line 536
Quoted 9 lines
-524,7 +531,9 @@ struct
rte_eth_rss_conf{#define ETH_RSS_L3_SRC_ONLY (1ULL << 63) #define ETH_RSS_L3_DST_ONLY (1ULL << 62) #define ETH_RSS_L4_SRC_ONLY (1ULL << 61)lib/librte_ethdev/rte_ethdev.h +3
-1-#define ETH_RSS_L4_DST_ONLY (1ULL << 60) +#define ETH_RSS_L4_DST_ONLY (1ULL << 60) +#define ETH_RSS_ETH_SRC_ONLY (1ULL << 59) +#define ETH_RSS_ETH_DST_ONLY (1ULL << 58)Why not change to
L2_RSS_SRC_ONLY? Same for DST?
Also if it is not ABI/API change I would suggest to move the ETH defines to be 63.
I think reorder will break Application which already use 19.11.
Quoted 5 lines
Quoted 5 lines
/**
* For input set change of hash filter, ifSRC_ONLYandDST_ONLYof
--
2.20.1
Re: [dpdk-dev] [dpdk-dev v4 1/3] ethdev: add new RSS offload types
Ori and qi
Quoted 68 lines · Qi Z
Quoted 56 lines
-----Original Message-----
From: Ori Kam <[email protected]>
Sent: Tuesday, April 14, 2020 5:43 PM
To: Guo, Jia <[email protected]>; Iremonger, Bernard <[email protected]>; Ye, Xiaolong <[email protected]>; Zhang, Qi Z <[email protected]>
Cc: [email protected]; Wu, Jingjing <[email protected]>; Cao, Yahui <[email protected]>; Su, Simei <[email protected]>
Subject: RE: [dpdk-dev v4 1/3] ethdev: add new RSS offload typesHi Jeff,
PSBBest,
OriQuoted 29 lines
-----Original Message-----
From: Jeff Guo <[email protected]>
Sent: Tuesday, April 14, 2020 8:42 PM
To: Ori Kam <[email protected]>; [email protected]; [email protected]; [email protected]
Cc: [email protected]; [email protected]; [email protected]; [email protected]; [email protected]
Subject: [dpdk-dev v4 1/3] ethdev: add new RSS offload typesDefines some new RSS offload types for ETH/SVLAN/CVLAN/GTPU/L2TPV3/ ESP/AH/PFCP.
Signed-off-by Jeff Guo <[email protected]>Reviewed-by Qi Zhang <[email protected]>---
v4->v3:
no change--- lib/librte_ethdev/rte_ethdev.h | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-)(quoted diff) +0
-0
b/lib/librte_ethdev/rte_ethdev.hindexd1a593ad1..efe705ff0100644lib/librte_ethdev/rte_ethdev.h +0
-0@@ -511,6 +511,13 @@ struct rte_eth_rss_conf {#define ETH_RSS_GENEVE (1ULL << 20)#define ETH_RSS_NVGRE (1ULL << 21)#define ETH_RSS_GTPU (1ULL << 23)lib/librte_ethdev/rte_ethdev.h struct rte_eth_rss_conf { · line 523
Quoted 10 lines
lib/librte_ethdev/rte_ethdev.h +7
-0+#define ETH_RSS_ETH (1ULL << 24) +#define ETH_RSS_S_VLAN (1ULL << 25) +#define ETH_RSS_C_VLAN (1ULL << 26) +#define ETH_RSS_ESP (1ULL << 27) +#define ETH_RSS_AH (1ULL << 28) +#define ETH_RSS_L2TPV3 (1ULL << 29) +#define ETH_RSS_PFCP (1ULL << 30)/* * We use the following macros to combine with above ETH_RSS_* for @@
Quoted 12 lines
lib/librte_ethdev/rte_ethdev.h struct rte_eth_rss_conf { · line 536
Quoted 9 lines
-524,7 +531,9 @@ struct
rte_eth_rss_conf{#define ETH_RSS_L3_SRC_ONLY (1ULL << 63) #define ETH_RSS_L3_DST_ONLY (1ULL << 62) #define ETH_RSS_L4_SRC_ONLY (1ULL << 61)lib/librte_ethdev/rte_ethdev.h +3
-1-#define ETH_RSS_L4_DST_ONLY (1ULL << 60) +#define ETH_RSS_L4_DST_ONLY (1ULL << 60) +#define ETH_RSS_ETH_SRC_ONLY (1ULL << 59) +#define ETH_RSS_ETH_DST_ONLY (1ULL << 58)Why not change to
L2_RSS_SRC_ONLY? Same for DST?
Also if it is not ABI/API change I would suggest to move the ETH defines to be 63.
Quoted 1 line
I think reorder will break Application which already use 19.11.
Will rename it to ETH_RSS_L2_XXX and keep the order which will not break the ABI/API, if no objection. Thanks.
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
/**
* For input set change of hash filter, ifSRC_ONLYandDST_ONLYof
--
2.20.1
PATCH v4 2/3 net/iavf: add RSS configuration for VFs
In reply to Jeff GuoThe VF must be capable of configuring RSS. Add a virtchnl handler to parse a specific RSS configuration, and process the configuration for VFs, such as add or delete a RSS rule.
---v4->v3:
refine rss type checking
--- doc/guides/rel_notes/release_20_05.rst | 2 + drivers/net/iavf/Makefile | 1 + drivers/net/iavf/iavf.h | 2 + drivers/net/iavf/iavf_hash.c | 1073 ++++++++++++++++++++++++ drivers/net/iavf/iavf_vchnl.c | 33 +- drivers/net/iavf/meson.build | 1 + 6 files changed, 1107 insertions(+), 5 deletions(-) create mode 100644 drivers/net/iavf/iavf_hash.c
doc/guides/rel_notes/release_20_05.rst +2 -0
@@ -98,6 +98,8 @@ New Features Update the Intel iavf driver with new features and improvements, including: * Added generic filter support. + * Added advanced RSS configuration for VFs. + Removed Items -------------
drivers/net/iavf/Makefile +1 -0
@@ -24,6 +24,7 @@ SRCS-$(CONFIG_RTE_LIBRTE_IAVF_PMD) += iavf_ethdev.c SRCS-$(CONFIG_RTE_LIBRTE_IAVF_PMD) += iavf_vchnl.c SRCS-$(CONFIG_RTE_LIBRTE_IAVF_PMD) += iavf_rxtx.c SRCS-$(CONFIG_RTE_LIBRTE_IAVF_PMD) += iavf_generic_flow.c +SRCS-$(CONFIG_RTE_LIBRTE_IAVF_PMD) += iavf_hash.c ifeq ($(CONFIG_RTE_ARCH_X86), y) SRCS-$(CONFIG_RTE_LIBRTE_IAVF_PMD) += iavf_rxtx_vec_sse.c endif
drivers/net/iavf/iavf.h +2 -0
@@ -252,4 +252,6 @@ int iavf_config_promisc(struct iavf_adapter *adapter, bool enable_unicast,int iavf_add_del_eth_addr (struct iavf_adapter *adapter,struct rte_ether_addr *addr,bool add);int iavf_add_del_vlan (struct iavf_adapter *adapter,uint16_t vlanid,bool add); +int iavf_add_del_rss_cfg (struct iavf_adapter *adapter, +struct virtchnl_rss_cfg *rss_cfg,bool add);#endif /* _IAVF_ETHDEV_H_ */
drivers/net/iavf/iavf_hash.c new file +1073 -0
1,073 lines not on this page · raw message
drivers/net/iavf/iavf_vchnl.c +28 -5
@@ -335,12 +335,9 @@ iavf_get_vf_resource(struct iavf_adapter *adapter) args.out_buffer = vf->aq_resp; args.out_size =IAVF_AQ_BUF_SZ ; -/* TODO: basic offload capabilities, need to -* add advanced/optional offload capabilities -*/ - caps =IAVF_BASIC_OFFLOAD_CAPS |VIRTCHNL_VF_CAP_ADV_LINK_SPEED | -VIRTCHNL_VF_OFFLOAD_RX_FLEX_DESC ; +VIRTCHNL_VF_OFFLOAD_RX_FLEX_DESC | +VIRTCHNL_VF_OFFLOAD_ADV_RSS_PF ; args.in_args = (uint8_t *)∩︀ args.in_args_size =sizeof (caps);
@@ -842,3 +839,29 @@ iavf_add_del_vlan(struct iavf_adapter *adapter, uint16_t vlanid, bool add)return err; } + +int +iavf_add_del_rss_cfg (struct iavf_adapter *adapter, +struct virtchnl_rss_cfg *rss_cfg,bool add) +{ +struct iavf_info *vf =IAVF_DEV_PRIVATE_TO_VF (adapter); +struct iavf_cmd_info args; +int err; + +memset (&args,0 ,sizeof (args)); + args.ops = add ?VIRTCHNL_OP_ADD_RSS_CFG : +VIRTCHNL_OP_DEL_RSS_CFG ; + args.in_args = (u8 *)rss_cfg; + args.in_args_size =sizeof (*rss_cfg); + args.out_buffer = vf->aq_resp; + args.out_size =IAVF_AQ_BUF_SZ ; + + err =iavf_execute_vf_cmd (adapter, &args); +if (err) +PMD_DRV_LOG (ERR , +"Failed to execute command of %s" , + add ?"OP_ADD_RSS_CFG" : +"OP_DEL_RSS_INPUT_CFG" ); + +return err; +}
drivers/net/iavf/meson.build +1 -0
@@ -13,6 +13,7 @@ sources = files( 'iavf_rxtx.c', 'iavf_vchnl.c', 'iavf_generic_flow.c', + 'iavf_hash.c', ) if arch_subdir == 'x86'
Signature · 1 line
2.20.1
Re: [dpdk-dev] [dpdk-dev v4 2/3] net/iavf: add RSS configuration for VFs
Quoted 13 lines
-----Original Message-----
From: Guo, Jia <[email protected]>
Sent: Wednesday, April 15, 2020 1:42 AM
To: [email protected]; Iremonger, Bernard <[email protected]>; Ye, Xiaolong <[email protected]>; Zhang, Qi Z <[email protected]>
Cc: [email protected]; Wu, Jingjing <[email protected]>; Cao, Yahui <[email protected]>; Su, Simei <[email protected]>; Guo, Jia <[email protected]>
Subject: [dpdk-dev v4 2/3] net/iavf: add RSS configuration for VFs
Quoted 5 lines
The VF must be capable of configuring RSS. Add a virtchnl handler to parse a specific RSS configuration, and process the configuration for VFs, such as add or delete a RSS rule.
Signed-off-by Jeff Guo <[email protected]>
PATCH v4 3/3 app/testpmd: add new types to RSS hash commands
In reply to Jeff GuoAdd some new types, such as eth-src-only/eth-dst-only/svlan/cvlan/ l2tpv3/esp/ah/pfcp types into RSS hash commands, it could be used to configure these rss input set by cmdline.
---v4->v3:
no change
--- app/test-pmd/cmdline.c | 24 ++++++++++++++++++++++-- app/test-pmd/config.c | 8 ++++++++ 2 files changed, 30 insertions(+), 2 deletions(-)
app/test-pmd/cmdline.c +22 -2
@@ -2299,6 +2299,22 @@ cmd_config_rss_parsed(void *parsed_result, rss_conf.rss_hf =ETH_RSS_L4_SRC_ONLY ; else if (!strcmp(res->value, "l4-dst-only")) rss_conf.rss_hf =ETH_RSS_L4_DST_ONLY ; + else if (!strcmp(res->value, "eth-src-only")) + rss_conf.rss_hf =ETH_RSS_ETH_SRC_ONLY ; + else if (!strcmp(res->value, "eth-dst-only")) + rss_conf.rss_hf =ETH_RSS_ETH_DST_ONLY ; + else if (!strcmp(res->value, "s-vlan")) + rss_conf.rss_hf =ETH_RSS_S_VLAN ; + else if (!strcmp(res->value, "c-vlan")) + rss_conf.rss_hf =ETH_RSS_C_VLAN ; + else if (!strcmp(res->value, "l2tpv3")) + rss_conf.rss_hf =ETH_RSS_L2TPV3 ; + else if (!strcmp(res->value, "esp")) + rss_conf.rss_hf =ETH_RSS_ESP ; + else if (!strcmp(res->value, "ah")) + rss_conf.rss_hf =ETH_RSS_AH ; + else if (!strcmp(res->value, "pfcp")) + rss_conf.rss_hf =ETH_RSS_PFCP ; else if (!strcmp(res->value, "none")) rss_conf.rss_hf =0 ; else if (!strcmp(res->value, "default"))
@@ -2467,7 +2483,9 @@ cmdline_parse_token_string_t cmd_config_rss_hash_key_rss_type ="ipv4-other#ipv6#ipv6-frag#ipv6-tcp#ipv6-udp#" "ipv6-sctp#ipv6-other#l2-payload#ipv6-ex#" "ipv6-tcp-ex#ipv6-udp-ex#" - "l3-src-only#l3-dst-only#l4-src-only#l4-dst-only"); +"l3-src-only#l3-dst-only#l4-src-only#l4-dst-only#" +"eth-src-only#eth-dst-only#s-vlan#c-vlan#" + "l2tpv3#esp#ah#pfcp");cmdline_parse_token_string_t cmd_config_rss_hash_key_value = TOKEN_STRING_INITIALIZER(struct cmd_config_rss_hash_key, key, NULL);
@@ -2478,7 +2496,9 @@ cmdline_parse_inst_t cmd_config_rss_hash_key = {"ipv4|ipv4-frag|ipv4-tcp|ipv4-udp|ipv4-sctp|ipv4-other|" "ipv6|ipv6-frag|ipv6-tcp|ipv6-udp|ipv6-sctp|ipv6-other|" "l2-payload|ipv6-ex|ipv6-tcp-ex|ipv6-udp-ex|" -"l3-src-only|l3-dst-only|l4-src-only|l4-dst-only " +"l3-src-only|l3-dst-only|l4-src-only|l4-dst-only|" +"eth-src-only|eth-dst-only|s-vlan|c-vlan|" +"l2tpv3|esp|ah|pfcp " "<string of hex digits (variable length, NIC dependent)>", .tokens = { (void *)&cmd_config_rss_hash_key_port,
app/test-pmd/config.c +8 -0
@@ -79,6 +79,10 @@ const struct rss_type_info rss_type_table[] = {ETH_RSS_UDP |ETH_RSS_SCTP | ETH_RSS_L2_PAYLOAD }, { "none", 0 }, + { "eth-src-only", ETH_RSS_ETH_SRC_ONLY }, + { "eth-dst-only", ETH_RSS_ETH_DST_ONLY }, + { "s-vlan", ETH_RSS_S_VLAN }, + { "c-vlan", ETH_RSS_C_VLAN }, { "ipv4", ETH_RSS_IPV4 }, { "ipv4-frag", ETH_RSS_FRAG_IPV4 }, { "ipv4-tcp", ETH_RSS_NONFRAG_IPV4_TCP },
@@ -108,6 +112,10 @@ const struct rss_type_info rss_type_table[] = { { "l3-dst-only", ETH_RSS_L3_DST_ONLY }, { "l4-src-only", ETH_RSS_L4_SRC_ONLY }, { "l4-dst-only", ETH_RSS_L4_DST_ONLY }, + { "l2tpv3", ETH_RSS_L2TPV3 }, + { "esp", ETH_RSS_ESP }, + { "ah", ETH_RSS_AH }, + { "pfcp", ETH_RSS_PFCP }, { NULL, 0 }, };
Signature · 1 line
2.20.1
Re: [dpdk-dev] [dpdk-dev v4 3/3] app/testpmd: add new types to RSS hash commands
Hi Jeff,
PSB,
Thanks,
Ori
Quoted 36 lines
-----Original Message-----
From: Jeff Guo <[email protected]>
Sent: Tuesday, April 14, 2020 8:42 PM
To: Ori Kam <[email protected]>; [email protected]; [email protected]; [email protected]
Cc: [email protected]; [email protected]; [email protected]; [email protected]; [email protected]
Subject: [dpdk-dev v4 3/3] app/testpmd: add new types to RSS hash commandsAdd some new types, such as eth-src-only/eth-dst-only/svlan/cvlan/ l2tpv3/esp/ah/pfcp types into RSS hash commands, it could be used to configure these rss input set by cmdline.
Signed-off-by Jeff Guo <[email protected]>---
v4->v3:
no change--- app/test-pmd/cmdline.c | 24 ++++++++++++++++++++++-- app/test-pmd/config.c | 8 ++++++++ 2 files changed, 30 insertions(+), 2 deletions(-)app/test-pmd/cmdline.c +6
-0@@ -2299,6 +2299,22 @@ cmd_config_rss_parsed(void *parsed_result, rss_conf.rss_hf =ETH_RSS_L4_SRC_ONLY ; else if (!strcmp(res->value, "l4-dst-only")) rss_conf.rss_hf =ETH_RSS_L4_DST_ONLY ; + else if (!strcmp(res->value, "eth-src-only")) + rss_conf.rss_hf =ETH_RSS_ETH_SRC_ONLY ; + else if (!strcmp(res->value, "eth-dst-only")) + rss_conf.rss_hf =ETH_RSS_ETH_DST_ONLY ; + else if (!strcmp(res->value, "s-vlan")) + rss_conf.rss_hf =ETH_RSS_S_VLAN ;
app/test-pmd/cmdline.c cmd_config_rss_parsed(void *parsed_result, · line 2317
Quoted 10 lines
app/test-pmd/cmdline.c +10
-0+else if (!strcmp (res->value,"c-vlan" )) + rss_conf.rss_hf =ETH_RSS_C_VLAN ; +else if (!strcmp (res->value,"l2tpv3" )) + rss_conf.rss_hf =ETH_RSS_L2TPV3 ; +else if (!strcmp (res->value,"esp" )) + rss_conf.rss_hf =ETH_RSS_ESP ; +else if (!strcmp (res->value,"ah" )) + rss_conf.rss_hf =ETH_RSS_AH ; +else if (!strcmp (res->value,"pfcp" )) + rss_conf.rss_hf =ETH_RSS_PFCP ;
In patch ethdev: add new RSS offload types, you added a define for ETH_RSS_ETH I don't see any usage for this enum in the code.
Should it be added? Or removed from the first patch?
Quoted 58 lines
app/test-pmd/cmdline.c +0
-0else if (!strcmp (res->value,"none" )) rss_conf.rss_hf =0 ;else if (!strcmp (res->value,"default" ))@@ -2467,7 +2483,9 @@ cmdline_parse_token_string_t
cmd_config_rss_hash_key_rss_type=
"ipv4-other#ipv6#ipv6-frag#ipv6-tcp#ipv6-
udp#"app/test-pmd/cmdline.c +0
-1"ipv6-sctp#ipv6-other#l2-payload#ipv6-ex#" "ipv6-tcp-ex#ipv6-udp-ex#" - "l3-src-only#l3-dst-only#l4-src-only#l4-dst-only");
app/test-pmd/cmdline.c +1
-0+ "l3-src-only#l3-dst-only#l4-src-only#l4-dst-only#"
app/test-pmd/cmdline.c +2
-0+"eth-src-only#eth-dst-only#s-vlan#c-vlan#" + "l2tpv3#esp#ah#pfcp");cmdline_parse_token_string_t cmd_config_rss_hash_key_value = TOKEN_STRING_INITIALIZER(struct cmd_config_rss_hash_key, key,NULL);
app/test-pmd/cmdline.c +3
-1@@ -2478,7 +2496,9 @@ cmdline_parse_inst_t cmd_config_rss_hash_key = {"ipv4|ipv4-frag|ipv4-tcp|ipv4-udp|ipv4-sctp|ipv4-other|" "ipv6|ipv6-frag|ipv6-tcp|ipv6-udp|ipv6-sctp|ipv6-other|" "l2-payload|ipv6-ex|ipv6-tcp-ex|ipv6-udp-ex|" -"l3-src-only|l3-dst-only|l4-src-only|l4-dst-only " +"l3-src-only|l3-dst-only|l4-src-only|l4-dst-only|" +"eth-src-only|eth-dst-only|s-vlan|c-vlan|" +"l2tpv3|esp|ah|pfcp " "<string of hex digits (variable length, NIC dependent)>", .tokens = { (void *)&cmd_config_rss_hash_key_port,app/test-pmd/config.c +8
-1@@ -79,6 +79,10 @@ const struct rss_type_info rss_type_table[] = {ETH_RSS_UDP |ETH_RSS_SCTP | ETH_RSS_L2_PAYLOAD }, { "none", 0 }, + { "eth-src-only", ETH_RSS_ETH_SRC_ONLY }, + { "eth-dst-only", ETH_RSS_ETH_DST_ONLY }, + { "s-vlan", ETH_RSS_S_VLAN }, + { "c-vlan", ETH_RSS_C_VLAN }, { "ipv4", ETH_RSS_IPV4 }, { "ipv4-frag", ETH_RSS_FRAG_IPV4 }, { "ipv4-tcp", ETH_RSS_NONFRAG_IPV4_TCP },@@ -108,6 +112,10 @@ const struct rss_type_info rss_type_table[] = { { "l3-dst-only", ETH_RSS_L3_DST_ONLY }, { "l4-src-only", ETH_RSS_L4_SRC_ONLY }, { "l4-dst-only", ETH_RSS_L4_DST_ONLY }, + { "l2tpv3", ETH_RSS_L2TPV3 }, + { "esp", ETH_RSS_ESP }, + { "ah", ETH_RSS_AH }, + { "pfcp", ETH_RSS_PFCP }, { NULL, 0 }, }; --2.20.1
Re: [dpdk-dev] [dpdk-dev v4 3/3] app/testpmd: add new types to RSS hash commands
hi, Ori
Quoted 48 lines · Ori Kam
Hi Jeff,
PSB,Thanks,
OriQuoted 42 lines
-----Original Message-----
From: Jeff Guo <[email protected]>
Sent: Tuesday, April 14, 2020 8:42 PM
To: Ori Kam <[email protected]>; [email protected]; [email protected]; [email protected]
Cc: [email protected]; [email protected]; [email protected]; [email protected]; [email protected]
Subject: [dpdk-dev v4 3/3] app/testpmd: add new types to RSS hash commandsAdd some new types, such as eth-src-only/eth-dst-only/svlan/cvlan/ l2tpv3/esp/ah/pfcp types into RSS hash commands, it could be used to configure these rss input set by cmdline.
Signed-off-by Jeff Guo <[email protected]>---
v4->v3:
no change--- app/test-pmd/cmdline.c | 24 ++++++++++++++++++++++-- app/test-pmd/config.c | 8 ++++++++ 2 files changed, 30 insertions(+), 2 deletions(-)app/test-pmd/cmdline.c +12
-0@@ -2299,6 +2299,22 @@ cmd_config_rss_parsed(void *parsed_result, rss_conf.rss_hf =ETH_RSS_L4_SRC_ONLY ; else if (!strcmp(res->value, "l4-dst-only")) rss_conf.rss_hf =ETH_RSS_L4_DST_ONLY ; + else if (!strcmp(res->value, "eth-src-only")) + rss_conf.rss_hf =ETH_RSS_ETH_SRC_ONLY ; + else if (!strcmp(res->value, "eth-dst-only")) + rss_conf.rss_hf =ETH_RSS_ETH_DST_ONLY ; + else if (!strcmp(res->value, "s-vlan")) + rss_conf.rss_hf =ETH_RSS_S_VLAN ; + else if (!strcmp(res->value, "c-vlan")) + rss_conf.rss_hf =ETH_RSS_C_VLAN ; + else if (!strcmp(res->value, "l2tpv3")) + rss_conf.rss_hf =ETH_RSS_L2TPV3 ; + else if (!strcmp(res->value, "esp")) + rss_conf.rss_hf =ETH_RSS_ESP ;
Quoted 8 lines
app/test-pmd/cmdline.c cmd_config_rss_parsed(void *parsed_result, · line 2317
Quoted 4 lines
app/test-pmd/cmdline.c +4
-0+else if (!strcmp (res->value,"ah" )) + rss_conf.rss_hf =ETH_RSS_AH ; +else if (!strcmp (res->value,"pfcp" )) + rss_conf.rss_hf =ETH_RSS_PFCP ;In patch ethdev: add new RSS offload types, you added a define for
ETH_RSS_ETHI don't see any usage for this enum in the code.
Should it be added? Or removed from the first patch?
It should be added and please expect it in v5.
Quoted 58 lines
Quoted 58 lines
app/test-pmd/cmdline.c +0
-0else if (!strcmp (res->value,"none" )) rss_conf.rss_hf =0 ;else if (!strcmp (res->value,"default" ))@@ -2467,7 +2483,9 @@ cmdline_parse_token_string_t
cmd_config_rss_hash_key_rss_type=
"ipv4-other#ipv6#ipv6-frag#ipv6-tcp#ipv6-
udp#"
"ipv6-sctp#ipv6-other#l2-payload#ipv6-ex#" "ipv6-tcp-ex#ipv6-udp-ex#"app/test-pmd/cmdline.c +0
-1- "l3-src-only#l3-dst-only#l4-src-only#l4-dst-only");
app/test-pmd/cmdline.c +1
-0+ "l3-src-only#l3-dst-only#l4-src-only#l4-dst-only#"
app/test-pmd/cmdline.c +2
-0+"eth-src-only#eth-dst-only#s-vlan#c-vlan#" + "l2tpv3#esp#ah#pfcp");cmdline_parse_token_string_t cmd_config_rss_hash_key_value = TOKEN_STRING_INITIALIZER(struct cmd_config_rss_hash_key, key,NULL);
app/test-pmd/cmdline.c +3
-1@@ -2478,7 +2496,9 @@ cmdline_parse_inst_t cmd_config_rss_hash_key = {"ipv4|ipv4-frag|ipv4-tcp|ipv4-udp|ipv4-sctp|ipv4-other|" "ipv6|ipv6-frag|ipv6-tcp|ipv6-udp|ipv6-sctp|ipv6-other|" "l2-payload|ipv6-ex|ipv6-tcp-ex|ipv6-udp-ex|" -"l3-src-only|l3-dst-only|l4-src-only|l4-dst-only " +"l3-src-only|l3-dst-only|l4-src-only|l4-dst-only|" +"eth-src-only|eth-dst-only|s-vlan|c-vlan|" +"l2tpv3|esp|ah|pfcp " "<string of hex digits (variable length, NIC dependent)>", .tokens = { (void *)&cmd_config_rss_hash_key_port,app/test-pmd/config.c +8
-1@@ -79,6 +79,10 @@ const struct rss_type_info rss_type_table[] = {ETH_RSS_UDP |ETH_RSS_SCTP | ETH_RSS_L2_PAYLOAD }, { "none", 0 }, + { "eth-src-only", ETH_RSS_ETH_SRC_ONLY }, + { "eth-dst-only", ETH_RSS_ETH_DST_ONLY }, + { "s-vlan", ETH_RSS_S_VLAN }, + { "c-vlan", ETH_RSS_C_VLAN }, { "ipv4", ETH_RSS_IPV4 }, { "ipv4-frag", ETH_RSS_FRAG_IPV4 }, { "ipv4-tcp", ETH_RSS_NONFRAG_IPV4_TCP },@@ -108,6 +112,10 @@ const struct rss_type_info rss_type_table[] = { { "l3-dst-only", ETH_RSS_L3_DST_ONLY }, { "l4-src-only", ETH_RSS_L4_SRC_ONLY }, { "l4-dst-only", ETH_RSS_L4_DST_ONLY }, + { "l2tpv3", ETH_RSS_L2TPV3 }, + { "esp", ETH_RSS_ESP }, + { "ah", ETH_RSS_AH }, + { "pfcp", ETH_RSS_PFCP }, { NULL, 0 }, }; --2.20.1
Re: [dpdk-dev] [dpdk-dev v4 3/3] app/testpmd: add new types to RSS hash commands
In reply to Ori KamQuoted 12 lines · On Tue, 14 Apr 2020 09:48:31 +0000 Ori Kam <[email protected]> wrote:
Quoted 12 lines
app/test-pmd/cmdline.c +8
-0@@ -2299,6 +2299,22 @@ cmd_config_rss_parsed(void *parsed_result, rss_conf.rss_hf =ETH_RSS_L4_SRC_ONLY ; else if (!strcmp(res->value, "l4-dst-only")) rss_conf.rss_hf =ETH_RSS_L4_DST_ONLY ; + else if (!strcmp(res->value, "eth-src-only")) + rss_conf.rss_hf =ETH_RSS_ETH_SRC_ONLY ; + else if (!strcmp(res->value, "eth-dst-only")) + rss_conf.rss_hf =ETH_RSS_ETH_DST_ONLY ; + else if (!strcmp(res->value, "s-vlan")) + rss_conf.rss_hf =ETH_RSS_S_VLAN ; + else if (!strcmp(res->value, "c-vlan")) + rss_conf.rss_hf =ETH_RSS_C_VLAN ;
Quoted 8 lines
app/test-pmd/cmdline.c cmd_config_rss_parsed(void *parsed_result, · line 2317
Quoted 8 lines
app/test-pmd/cmdline.c +8
-0+else if (!strcmp (res->value,"l2tpv3" )) + rss_conf.rss_hf =ETH_RSS_L2TPV3 ; +else if (!strcmp (res->value,"esp" )) + rss_conf.rss_hf =ETH_RSS_ESP ; +else if (!strcmp (res->value,"ah" )) + rss_conf.rss_hf =ETH_RSS_AH ; +else if (!strcmp (res->value,"pfcp" )) + rss_conf.rss_hf =ETH_RSS_PFCP ;
Hasn't this grown big enough that it should be a table with lookup function, versus a cascade of strcmp's.
Re: [dpdk-dev] [dpdk-dev v4 3/3] app/testpmd: add new types to RSS hash commands
hi, stephen
Quoted 17 lines · Stephen Hemminger
Quoted 14 lines · On Tue, 14 Apr 2020 09:48:31 +0000 Ori Kam <[email protected]> wrote:
Quoted 14 lines
app/test-pmd/cmdline.c +10
-0@@ -2299,6 +2299,22 @@ cmd_config_rss_parsed(void *parsed_result, rss_conf.rss_hf =ETH_RSS_L4_SRC_ONLY ; else if (!strcmp(res->value, "l4-dst-only")) rss_conf.rss_hf =ETH_RSS_L4_DST_ONLY ; + else if (!strcmp(res->value, "eth-src-only")) + rss_conf.rss_hf =ETH_RSS_ETH_SRC_ONLY ; + else if (!strcmp(res->value, "eth-dst-only")) + rss_conf.rss_hf =ETH_RSS_ETH_DST_ONLY ; + else if (!strcmp(res->value, "s-vlan")) + rss_conf.rss_hf =ETH_RSS_S_VLAN ; + else if (!strcmp(res->value, "c-vlan")) + rss_conf.rss_hf =ETH_RSS_C_VLAN ; + else if (!strcmp(res->value, "l2tpv3")) + rss_conf.rss_hf =ETH_RSS_L2TPV3 ;
Quoted 8 lines
Quoted 6 lines
app/test-pmd/cmdline.c cmd_config_rss_parsed(void *parsed_result, · line 2317
Quoted 6 lines
app/test-pmd/cmdline.c +6
-0+else if (!strcmp (res->value,"esp" )) + rss_conf.rss_hf =ETH_RSS_ESP ; +else if (!strcmp (res->value,"ah" )) + rss_conf.rss_hf =ETH_RSS_AH ; +else if (!strcmp (res->value,"pfcp" )) + rss_conf.rss_hf =ETH_RSS_PFCP ;Hasn't this grown big enough that it should be a table with lookup function, versus a cascade of strcmp's.
I suppose what you said is make sense, but would you mind if a next coming specific patch to fix it but not involve in this feature patch set?
v5 cover add RSS configuration for iavf
In reply to Jeff GuoBecause the VF must be capable of configuring RSS, so add RSS configuration for iavf, VFs could add or delete a RSS rule base on the PF's capability. The supported protocol rss input set as below.
l2-src-only/
l2-dst-only/
svlan/
cvlan/
ipv4/
ipv6/
l3_src_only/
l3_dst_only/
l2tpv3/
esp/
ah/
pfcp/
gtpu down/
gtpu up/
udp/
tcp/
sctp/
use tespmd for example:
testpmd> flow create 0 ingress pattern eth / ipv4 / end actions rss types ipv4 l3-src-only end key_len 0 queues end / end
use scapy for example:
Quoted 1 line
sendp(Ether(dst="00:01:23:45:67:01")/IP(src=RandIP())/Raw('x'*20),iface="ens785f1",loop=1,inter=0.3)
the expect result:
the rss hash works and the packets will go to difference queue for load balance.
This patchset depends on below patch sets. (1)http://patches.dpdk.org/project/dpdk/list/?series=8950
add generic filter support for iavf
(2)http://patches.dpdk.org/project/dpdk/list/?series=9280
iavf share code update
(3)http://patches.dpdk.org/project/dpdk/list/?series=9244
framework for advanced iAVF PMD
v5:
1.rename ETH_XXX to L2_XXX.
2.NULL checking and commit log refine.
v4:
1.refine the rss type checking
2.delete unnecessary pdu type item.
v3:
1.refince rss offload types.
2.add doc in release note
3.refine some naming base on virtchnl definition.
4.move gtp pdu index from normal to special.
v2:
1.refine some rte eth rss offload types.
2.add NAT T ESP and refine gtpu down/up
3.reference some fixing patch from pf side.
Jeff Guo (3):
ethdev: add new RSS offload types
net/iavf: add RSS configuration for VFs
app/testpmd: add new types to RSS hash commands
app/test-pmd/cmdline.c | 28 +- app/test-pmd/config.c | 9 + doc/guides/rel_notes/release_20_05.rst | 2 + drivers/net/iavf/Makefile | 1 + drivers/net/iavf/iavf.h | 2 + drivers/net/iavf/iavf_hash.c | 1087 ++++++++++++++++++++++++ drivers/net/iavf/iavf_vchnl.c | 33 +- drivers/net/iavf/meson.build | 1 + lib/librte_ethdev/rte_ethdev.h | 11 +- 9 files changed, 1165 insertions(+), 9 deletions(-) create mode 100644 drivers/net/iavf/iavf_hash.c
Signature · 1 line
2.20.1
PATCH v5 1/3 ethdev: add new RSS offload types
Defines some new RSS offload types for ETH/S_VLAN/C_VLAN/L2TPV3/ ESP/AH/PFCP/L2_SRC_ONLY/L2_DST_ONLY.
---v5->v4:
rename ETH_RSS_ETH_XXX to ETH_RSS_L2_XXX.
--- lib/librte_ethdev/rte_ethdev.h | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-)
lib/librte_ethdev/rte_ethdev.h +10 -1
@@ -511,6 +511,13 @@ struct rte_eth_rss_conf {#define ETH_RSS_GENEVE (1ULL << 20)#define ETH_RSS_NVGRE (1ULL << 21)#define ETH_RSS_GTPU (1ULL << 23) +#define ETH_RSS_ETH (1ULL << 24) +#define ETH_RSS_S_VLAN (1ULL << 25) +#define ETH_RSS_C_VLAN (1ULL << 26) +#define ETH_RSS_ESP (1ULL << 27) +#define ETH_RSS_AH (1ULL << 28) +#define ETH_RSS_L2TPV3 (1ULL << 29) +#define ETH_RSS_PFCP (1ULL << 30)/* * We use the following macros to combine with above ETH_RSS_* for
@@ -524,7 +531,9 @@ struct rte_eth_rss_conf {#define ETH_RSS_L3_SRC_ONLY (1ULL << 63)#define ETH_RSS_L3_DST_ONLY (1ULL << 62)#define ETH_RSS_L4_SRC_ONLY (1ULL << 61) -#define ETH_RSS_L4_DST_ONLY (1ULL << 60) +#define ETH_RSS_L4_DST_ONLY (1ULL << 60) +#define ETH_RSS_L2_SRC_ONLY (1ULL << 59) +#define ETH_RSS_L2_DST_ONLY (1ULL << 58)/** * For input set change of hash filter, if SRC_ONLY and DST_ONLY of
Signature · 1 line
2.20.1
Re: [dpdk-dev] [dpdk-dev v5 1/3] ethdev: add new RSS offload types
Hi Jeff,
Quoted 28 lines
-----Original Message-----
From: Guo, Jia <[email protected]>
Sent: Wednesday, April 15, 2020 6:11 PM
To: Iremonger, Bernard <[email protected]>; [email protected]; Ye, Xiaolong <[email protected]>; Zhang, Qi Z <[email protected]>
Cc: [email protected]; Wu, Jingjing <[email protected]>; Cao, Yahui <[email protected]>; Su, Simei <[email protected]>; Guo, Jia <[email protected]>
Subject: [dpdk-dev v5 1/3] ethdev: add new RSS offload typesDefines some new RSS offload types for ETH/S_VLAN/C_VLAN/L2TPV3/ ESP/AH/PFCP/L2_SRC_ONLY/L2_DST_ONLY.
Signed-off-by Jeff Guo <[email protected]>Reviewed-by Qi Zhang <[email protected]>---
v5->v4:
renameETH_RSS_ETH_XXXtoETH_RSS_L2_XXX.--- lib/librte_ethdev/rte_ethdev.h | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-)lib/librte_ethdev/rte_ethdev.h +0
-0
lib/librte_ethdev/rte_ethdev.h struct rte_eth_rss_conf { · line 518
Quoted 8 lines
lib/librte_ethdev/rte_ethdev.h +5
-0@@ -511,6 +511,13 @@ struct rte_eth_rss_conf {#define ETH_RSS_GENEVE (1ULL << 20)#define ETH_RSS_NVGRE (1ULL << 21)#define ETH_RSS_GTPU (1ULL << 23) +#define ETH_RSS_ETH (1ULL << 24) +#define ETH_RSS_S_VLAN (1ULL << 25) +#define ETH_RSS_C_VLAN (1ULL << 26) +#define ETH_RSS_ESP (1ULL << 27) +#define ETH_RSS_AH (1ULL << 28)
I have a patch in flight to add ETH_RSS_ESP and ETH_RSS_AH. I have used the same values as you have used.
http://patches.dpdk.org/patch/68550/
Quoted 17 lines
lib/librte_ethdev/rte_ethdev.h +2
-0+#define ETH_RSS_L2TPV3 (1ULL << 29) +#define ETH_RSS_PFCP (1ULL << 30)/* * We use the following macros to combine with above ETH_RSS_* for @@ - 524,7 +531,9 @@ struct
rte_eth_rss_conf{#define ETH_RSS_L3_SRC_ONLY (1ULL << 63) #define ETH_RSS_L3_DST_ONLY (1ULL << 62) #define ETH_RSS_L4_SRC_ONLY (1ULL << 61)lib/librte_ethdev/rte_ethdev.h +3
-2-#define ETH_RSS_L4_DST_ONLY (1ULL << 60) +#define ETH_RSS_L4_DST_ONLY (1ULL << 60) +#define ETH_RSS_L2_SRC_ONLY (1ULL << 59) +#define ETH_RSS_L2_DST_ONLY (1ULL << 58)/** * For input set change of hash filter, if SRC_ONLY and DST_ONLY of --
Quoted 1 line
2.20.1
Regards,
Bernard.
Re: [dpdk-dev] [dpdk-dev v5 1/3] ethdev: add new RSS offload types
Quoted 35 lines · Bernard
Hi Jeff,
Quoted 32 lines
-----Original Message-----
From: Guo, Jia <[email protected]>
Sent: Wednesday, April 15, 2020 6:11 PM
To: Iremonger, Bernard <[email protected]>; [email protected]; Ye, Xiaolong <[email protected]>; Zhang, Qi Z <[email protected]>
Cc: [email protected]; Wu, Jingjing <[email protected]>; Cao, Yahui <[email protected]>; Su, Simei <[email protected]>; Guo, Jia <[email protected]>
Subject: [dpdk-dev v5 1/3] ethdev: add new RSS offload typesDefines some new RSS offload types for ETH/S_VLAN/C_VLAN/L2TPV3/ ESP/AH/PFCP/L2_SRC_ONLY/L2_DST_ONLY.
Signed-off-by Jeff Guo <[email protected]>Reviewed-by Qi Zhang <[email protected]>---
v5->v4:
renameETH_RSS_ETH_XXXtoETH_RSS_L2_XXX.--- lib/librte_ethdev/rte_ethdev.h | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-)lib/librte_ethdev/rte_ethdev.h +1
-0@@ -511,6 +511,13 @@ struct rte_eth_rss_conf {#define ETH_RSS_GENEVE (1ULL << 20)#define ETH_RSS_NVGRE (1ULL << 21)#define ETH_RSS_GTPU (1ULL << 23) +#define ETH_RSS_ETH (1ULL << 24)
Quoted 8 lines
lib/librte_ethdev/rte_ethdev.h struct rte_eth_rss_conf { · line 518
Quoted 4 lines
lib/librte_ethdev/rte_ethdev.h +4
-0+#define ETH_RSS_S_VLAN (1ULL << 25) +#define ETH_RSS_C_VLAN (1ULL << 26) +#define ETH_RSS_ESP (1ULL << 27) +#define ETH_RSS_AH (1ULL << 28)I have a patch in flight to add
ETH_RSS_ESPandETH_RSS_AH. I have used the same values as you have used.
http://patches.dpdk.org/patch/68550/
Both patch sets touch similar area, both in ethdev and testpmd, and both sets has external dependencies, so not easy to manage.
But since the changes are trivial, I hope it can be resolved while merging, if not one may be required to be rebased, based on merge order.
btw, using same values is good idea, it helps to resolve conflict.
Quoted 24 lines
Quoted 18 lines
lib/librte_ethdev/rte_ethdev.h +2
-0+#define ETH_RSS_L2TPV3 (1ULL << 29) +#define ETH_RSS_PFCP (1ULL << 30)/* * We use the following macros to combine with above ETH_RSS_* for @@ - 524,7 +531,9 @@ struct
rte_eth_rss_conf{#define ETH_RSS_L3_SRC_ONLY (1ULL << 63) #define ETH_RSS_L3_DST_ONLY (1ULL << 62) #define ETH_RSS_L4_SRC_ONLY (1ULL << 61)lib/librte_ethdev/rte_ethdev.h +3
-2-#define ETH_RSS_L4_DST_ONLY (1ULL << 60) +#define ETH_RSS_L4_DST_ONLY (1ULL << 60) +#define ETH_RSS_L2_SRC_ONLY (1ULL << 59) +#define ETH_RSS_L2_DST_ONLY (1ULL << 58)/** * For input set change of hash filter, if SRC_ONLY and DST_ONLY of -- Quoted 1 line
2.20.1
Regards,
Bernard.
Re: [dpdk-dev] [dpdk-dev v5 1/3] ethdev: add new RSS offload types
hi, ferruh and bernard
Quoted 43 lines · Ferruh Yigit
Quoted 26 lines · Bernard
Hi Jeff,
Quoted 23 lines
-----Original Message-----
From: Guo, Jia <[email protected]>
Sent: Wednesday, April 15, 2020 6:11 PM
To: Iremonger, Bernard <[email protected]>; [email protected]; Ye, Xiaolong <[email protected]>; Zhang, Qi Z <[email protected]>
Cc: [email protected]; Wu, Jingjing <[email protected]>; Cao, Yahui <[email protected]>; Su, Simei <[email protected]>; Guo, Jia <[email protected]>
Subject: [dpdk-dev v5 1/3] ethdev: add new RSS offload typesDefines some new RSS offload types for ETH/S_VLAN/C_VLAN/L2TPV3/ ESP/AH/PFCP/L2_SRC_ONLY/L2_DST_ONLY.
Signed-off-by Jeff Guo <[email protected]>Reviewed-by Qi Zhang <[email protected]>---
v5->v4:
renameETH_RSS_ETH_XXXtoETH_RSS_L2_XXX.--- lib/librte_ethdev/rte_ethdev.h | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-)Quoted 16 lines
lib/librte_ethdev/rte_ethdev.h struct rte_eth_rss_conf { · line 518
Quoted 13 lines
lib/librte_ethdev/rte_ethdev.h +5
-0@@ -511,6 +511,13 @@ struct rte_eth_rss_conf {#define ETH_RSS_GENEVE (1ULL << 20)#define ETH_RSS_NVGRE (1ULL << 21)#define ETH_RSS_GTPU (1ULL << 23) +#define ETH_RSS_ETH (1ULL << 24) +#define ETH_RSS_S_VLAN (1ULL << 25) +#define ETH_RSS_C_VLAN (1ULL << 26) +#define ETH_RSS_ESP (1ULL << 27) +#define ETH_RSS_AH (1ULL << 28)I have a patch in flight to add
ETH_RSS_ESPandETH_RSS_AH. I have used the same values as you have used.
http://patches.dpdk.org/patch/68550/
Quoted 5 lines
Both patch sets touch similar area, both in ethdev and testpmd, and both sets has external dependencies, so not easy to manage.
But since the changes are trivial, I hope it can be resolved while merging, if not one may be required to be rebased, based on merge order.
btw, using same values is good idea, it helps to resolve conflict.
Agree and thanks.
Quoted 22 lines
Quoted 22 lines
Quoted 17 lines
lib/librte_ethdev/rte_ethdev.h +2
-0+#define ETH_RSS_L2TPV3 (1ULL << 29) +#define ETH_RSS_PFCP (1ULL << 30)/* * We use the following macros to combine with above ETH_RSS_* for @@ - 524,7 +531,9 @@ struct
rte_eth_rss_conf{#define ETH_RSS_L3_SRC_ONLY (1ULL << 63) #define ETH_RSS_L3_DST_ONLY (1ULL << 62) #define ETH_RSS_L4_SRC_ONLY (1ULL << 61)lib/librte_ethdev/rte_ethdev.h +3
-2-#define ETH_RSS_L4_DST_ONLY (1ULL << 60) +#define ETH_RSS_L4_DST_ONLY (1ULL << 60) +#define ETH_RSS_L2_SRC_ONLY (1ULL << 59) +#define ETH_RSS_L2_DST_ONLY (1ULL << 58)/** * For input set change of hash filter, if SRC_ONLY and DST_ONLY of -- Quoted 1 line
2.20.1
Regards,
Bernard.
Re: [dpdk-dev] [dpdk-dev v5 1/3] ethdev: add new RSS offload types
In reply to Jeff GuoHi Jeff,
Quoted 12 lines
-----Original Message-----
From: Jeff Guo <[email protected]>
Sent: Wednesday, April 15, 2020 8:11 PM
To: [email protected]; Ori Kam <[email protected]>; [email protected]; [email protected]
Cc: [email protected]; [email protected]; [email protected]; [email protected]; [email protected]
Subject: [dpdk-dev v5 1/3] ethdev: add new RSS offload typesDefines some new RSS offload types for ETH/S_VLAN/C_VLAN/L2TPV3/ ESP/AH/PFCP/L2_SRC_ONLY/L2_DST_ONLY.
Quoted 6 lines
Signed-off-by Jeff Guo <[email protected]>Reviewed-by Qi Zhang <[email protected]>---
v5->v4:
renameETH_RSS_ETH_XXXtoETH_RSS_L2_XXX.
---
Thanks,
Ori
Quoted 34 lines
lib/librte_ethdev/rte_ethdev.h | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-)lib/librte_ethdev/rte_ethdev.h +10
-2@@ -511,6 +511,13 @@ struct rte_eth_rss_conf {#define ETH_RSS_GENEVE (1ULL << 20)#define ETH_RSS_NVGRE (1ULL << 21)#define ETH_RSS_GTPU (1ULL << 23) +#define ETH_RSS_ETH (1ULL << 24) +#define ETH_RSS_S_VLAN (1ULL << 25) +#define ETH_RSS_C_VLAN (1ULL << 26) +#define ETH_RSS_ESP (1ULL << 27) +#define ETH_RSS_AH (1ULL << 28) +#define ETH_RSS_L2TPV3 (1ULL << 29) +#define ETH_RSS_PFCP (1ULL << 30)/* * We use the following macros to combine with above ETH_RSS_* for @@ -524,7 +531,9 @@ struct rte_eth_rss_conf {#define ETH_RSS_L3_SRC_ONLY (1ULL << 63)#define ETH_RSS_L3_DST_ONLY (1ULL << 62)#define ETH_RSS_L4_SRC_ONLY (1ULL << 61) -#define ETH_RSS_L4_DST_ONLY (1ULL << 60) +#define ETH_RSS_L4_DST_ONLY (1ULL << 60) +#define ETH_RSS_L2_SRC_ONLY (1ULL << 59) +#define ETH_RSS_L2_DST_ONLY (1ULL << 58)/** * For input set change of hash filter, if SRC_ONLY and DST_ONLY of -- 2.20.1
PATCH v5 2/3 net/iavf: add RSS configuration for VFs
In reply to Jeff GuoThe VF must be capable of configuring RSS. Add a virtchnl handler to parse a specific RSS configuration, and process the configuration for VFs, such as add or delete a RSS rule.
---v5->v4:
rename eth to l2 and add a NUll pointer checking.
--- doc/guides/rel_notes/release_20_05.rst | 2 + drivers/net/iavf/Makefile | 1 + drivers/net/iavf/iavf.h | 2 + drivers/net/iavf/iavf_hash.c | 1087 ++++++++++++++++++++++++ drivers/net/iavf/iavf_vchnl.c | 33 +- drivers/net/iavf/meson.build | 1 + 6 files changed, 1121 insertions(+), 5 deletions(-) create mode 100644 drivers/net/iavf/iavf_hash.c
doc/guides/rel_notes/release_20_05.rst +2 -0
@@ -98,6 +98,8 @@ New Features Update the Intel iavf driver with new features and improvements, including: * Added generic filter support. + * Added advanced RSS configuration for VFs. + Removed Items -------------
drivers/net/iavf/Makefile +1 -0
@@ -24,6 +24,7 @@ SRCS-$(CONFIG_RTE_LIBRTE_IAVF_PMD) += iavf_ethdev.c SRCS-$(CONFIG_RTE_LIBRTE_IAVF_PMD) += iavf_vchnl.c SRCS-$(CONFIG_RTE_LIBRTE_IAVF_PMD) += iavf_rxtx.c SRCS-$(CONFIG_RTE_LIBRTE_IAVF_PMD) += iavf_generic_flow.c +SRCS-$(CONFIG_RTE_LIBRTE_IAVF_PMD) += iavf_hash.c ifeq ($(CONFIG_RTE_ARCH_X86), y) SRCS-$(CONFIG_RTE_LIBRTE_IAVF_PMD) += iavf_rxtx_vec_sse.c endif
drivers/net/iavf/iavf.h +2 -0
@@ -252,4 +252,6 @@ int iavf_config_promisc(struct iavf_adapter *adapter, bool enable_unicast,int iavf_add_del_eth_addr (struct iavf_adapter *adapter,struct rte_ether_addr *addr,bool add);int iavf_add_del_vlan (struct iavf_adapter *adapter,uint16_t vlanid,bool add); +int iavf_add_del_rss_cfg (struct iavf_adapter *adapter, +struct virtchnl_rss_cfg *rss_cfg,bool add);#endif /* _IAVF_ETHDEV_H_ */
drivers/net/iavf/iavf_hash.c new file +1087 -0
1,087 lines not on this page · raw message
drivers/net/iavf/iavf_vchnl.c +28 -5
@@ -335,12 +335,9 @@ iavf_get_vf_resource(struct iavf_adapter *adapter) args.out_buffer = vf->aq_resp; args.out_size =IAVF_AQ_BUF_SZ ; -/* TODO: basic offload capabilities, need to -* add advanced/optional offload capabilities -*/ - caps =IAVF_BASIC_OFFLOAD_CAPS |VIRTCHNL_VF_CAP_ADV_LINK_SPEED | -VIRTCHNL_VF_OFFLOAD_RX_FLEX_DESC ; +VIRTCHNL_VF_OFFLOAD_RX_FLEX_DESC | +VIRTCHNL_VF_OFFLOAD_ADV_RSS_PF ; args.in_args = (uint8_t *)∩︀ args.in_args_size =sizeof (caps);
@@ -842,3 +839,29 @@ iavf_add_del_vlan(struct iavf_adapter *adapter, uint16_t vlanid, bool add)return err; } + +int +iavf_add_del_rss_cfg (struct iavf_adapter *adapter, +struct virtchnl_rss_cfg *rss_cfg,bool add) +{ +struct iavf_info *vf =IAVF_DEV_PRIVATE_TO_VF (adapter); +struct iavf_cmd_info args; +int err; + +memset (&args,0 ,sizeof (args)); + args.ops = add ?VIRTCHNL_OP_ADD_RSS_CFG : +VIRTCHNL_OP_DEL_RSS_CFG ; + args.in_args = (u8 *)rss_cfg; + args.in_args_size =sizeof (*rss_cfg); + args.out_buffer = vf->aq_resp; + args.out_size =IAVF_AQ_BUF_SZ ; + + err =iavf_execute_vf_cmd (adapter, &args); +if (err) +PMD_DRV_LOG (ERR , +"Failed to execute command of %s" , + add ?"OP_ADD_RSS_CFG" : +"OP_DEL_RSS_INPUT_CFG" ); + +return err; +}
drivers/net/iavf/meson.build +1 -0
@@ -13,6 +13,7 @@ sources = files( 'iavf_rxtx.c', 'iavf_vchnl.c', 'iavf_generic_flow.c', + 'iavf_hash.c', ) if arch_subdir == 'x86'
Signature · 1 line
2.20.1
PATCH v5 3/3 app/testpmd: add new types to RSS hash commands
In reply to Jeff GuoAdd some new types, such as eth/l2-src-only/l2-dst-only/svlan/cvlan/ l2tpv3/esp/ah/pfcp types into RSS hash commands, it could be used to configure these rss input set by cmdline.
Example testpmd commands are:
Eth:
testpmd>flow create 0 ingress pattern eth / ipv4 / end actions rss \
types eth l2-src-only end key_len 0 queues end / end
testpmd>flow create 0 ingress pattern eth / ipv4 / end actions rss \
types eth l2-dst-only end key_len 0 queues end / end
testpmd>flow create 0 ingress pattern eth / ipv4 / end actions rss \
types eth end key_len 0 queues end / end
s-vlan:
testpmd>flow create 0 ingress pattern eth / ipv4 / end actions rss \
types c-vlan end key_len 0 queues end / end
c-vlan:
testpmd>flow create 0 ingress pattern eth / ipv4 / end actions rss \
types c-vlan end key_len 0 queues end / end
l2tpv3:
testpmd>flow create 0 ingress pattern eth / ipv4 / l2tpv3oip / end \
actions rss types ipv4 l2tpv3 end key_len 0 queues end / end
esp:
testpmd>flow create 0 ingress pattern eth / ipv4 / esp / end actions \
rss types ipv4 esp end key_len 0 queues end / end
ah:
testpmd>flow create 0 ingress pattern eth / ipv4 / ah / end actions \
rss types ipv4 ah end key_len 0 queues end / end
pfcp:
testpmd>flow create 0 ingress pattern eth / ipv4 / udp / pfcp / end \
actions rss types ipv4-udp pfcp end key_len 0 queues end / end
---v5->v4:
rename eth to l2 and refine commit log
--- app/test-pmd/cmdline.c | 28 +++++++++++++++++++++++++--- app/test-pmd/config.c | 9 +++++++++ 2 files changed, 34 insertions(+), 3 deletions(-)
app/test-pmd/cmdline.c +25 -3
@@ -2270,9 +2270,11 @@ cmd_config_rss_parsed(void *parsed_result,int ret;if (!strcmp (res->value,"all" )) - rss_conf.rss_hf =ETH_RSS_IP |ETH_RSS_TCP | + rss_conf.rss_hf =ETH_RSS_ETH |ETH_RSS_IP |ETH_RSS_TCP |ETH_RSS_UDP |ETH_RSS_SCTP |ETH_RSS_L2_PAYLOAD ; +else if (!strcmp (res->value,"eth" )) + rss_conf.rss_hf =ETH_RSS_ETH ;else if (!strcmp (res->value,"ip" )) rss_conf.rss_hf =ETH_RSS_IP ;else if (!strcmp (res->value,"udp" ))
@@ -2299,6 +2301,22 @@ cmd_config_rss_parsed(void *parsed_result, rss_conf.rss_hf =ETH_RSS_L4_SRC_ONLY ; else if (!strcmp(res->value, "l4-dst-only")) rss_conf.rss_hf =ETH_RSS_L4_DST_ONLY ; + else if (!strcmp(res->value, "l2-src-only")) + rss_conf.rss_hf =ETH_RSS_L2_SRC_ONLY ; + else if (!strcmp(res->value, "l2-dst-only")) + rss_conf.rss_hf =ETH_RSS_L2_DST_ONLY ; + else if (!strcmp(res->value, "s-vlan")) + rss_conf.rss_hf =ETH_RSS_S_VLAN ; + else if (!strcmp(res->value, "c-vlan")) + rss_conf.rss_hf =ETH_RSS_C_VLAN ; + else if (!strcmp(res->value, "l2tpv3")) + rss_conf.rss_hf =ETH_RSS_L2TPV3 ; + else if (!strcmp(res->value, "esp")) + rss_conf.rss_hf =ETH_RSS_ESP ; + else if (!strcmp(res->value, "ah")) + rss_conf.rss_hf =ETH_RSS_AH ; + else if (!strcmp(res->value, "pfcp")) + rss_conf.rss_hf =ETH_RSS_PFCP ; else if (!strcmp(res->value, "none")) rss_conf.rss_hf =0 ; else if (!strcmp(res->value, "default"))
@@ -2467,7 +2485,9 @@ cmdline_parse_token_string_t cmd_config_rss_hash_key_rss_type ="ipv4-other#ipv6#ipv6-frag#ipv6-tcp#ipv6-udp#" "ipv6-sctp#ipv6-other#l2-payload#ipv6-ex#" "ipv6-tcp-ex#ipv6-udp-ex#" - "l3-src-only#l3-dst-only#l4-src-only#l4-dst-only"); +"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");cmdline_parse_token_string_t cmd_config_rss_hash_key_value = TOKEN_STRING_INITIALIZER(struct cmd_config_rss_hash_key, key, NULL);
@@ -2478,7 +2498,9 @@ cmdline_parse_inst_t cmd_config_rss_hash_key = {"ipv4|ipv4-frag|ipv4-tcp|ipv4-udp|ipv4-sctp|ipv4-other|" "ipv6|ipv6-frag|ipv6-tcp|ipv6-udp|ipv6-sctp|ipv6-other|" "l2-payload|ipv6-ex|ipv6-tcp-ex|ipv6-udp-ex|" -"l3-src-only|l3-dst-only|l4-src-only|l4-dst-only " +"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 " "<string of hex digits (variable length, NIC dependent)>", .tokens = { (void *)&cmd_config_rss_hash_key_port,
app/test-pmd/config.c +9 -0
@@ -79,6 +79,11 @@ const struct rss_type_info rss_type_table[] = {ETH_RSS_UDP |ETH_RSS_SCTP | ETH_RSS_L2_PAYLOAD }, { "none", 0 }, + { "eth", ETH_RSS_ETH }, + { "l2-src-only", ETH_RSS_L2_SRC_ONLY }, + { "l2-dst-only", ETH_RSS_L2_DST_ONLY }, + { "s-vlan", ETH_RSS_S_VLAN }, + { "c-vlan", ETH_RSS_C_VLAN }, { "ipv4", ETH_RSS_IPV4 }, { "ipv4-frag", ETH_RSS_FRAG_IPV4 }, { "ipv4-tcp", ETH_RSS_NONFRAG_IPV4_TCP },
@@ -108,6 +113,10 @@ const struct rss_type_info rss_type_table[] = { { "l3-dst-only", ETH_RSS_L3_DST_ONLY }, { "l4-src-only", ETH_RSS_L4_SRC_ONLY }, { "l4-dst-only", ETH_RSS_L4_DST_ONLY }, + { "l2tpv3", ETH_RSS_L2TPV3 }, + { "esp", ETH_RSS_ESP }, + { "ah", ETH_RSS_AH }, + { "pfcp", ETH_RSS_PFCP }, { NULL, 0 }, };
Signature · 1 line
2.20.1
Re: [dpdk-dev] [dpdk-dev v5 3/3] app/testpmd: add new types to RSS hash commands
Hi Jeff,
Quoted 35 lines
-----Original Message-----
From: Guo, Jia <[email protected]>
Sent: Wednesday, April 15, 2020 6:11 PM
To: Iremonger, Bernard <[email protected]>; [email protected]; Ye, Xiaolong <[email protected]>; Zhang, Qi Z <[email protected]>
Cc: [email protected]; Wu, Jingjing <[email protected]>; Cao, Yahui <[email protected]>; Su, Simei <[email protected]>; Guo, Jia <[email protected]>
Subject: [dpdk-dev v5 3/3] app/testpmd: add new types to RSS hash commandsAdd some new types, such as eth/l2-src-only/l2-dst-only/svlan/cvlan/ l2tpv3/esp/ah/pfcp types into RSS hash commands, it could be used to configure these rss input set by cmdline.
Example testpmd commands are:
Eth:
testpmd>flow create 0 ingress pattern eth / ipv4 / end actions rss \
types eth l2-src-only endkey_len0 queues end / endtestpmd>flow create 0 ingress pattern eth / ipv4 / end actions rss \
types eth l2-dst-only endkey_len0 queues end / endtestpmd>flow create 0 ingress pattern eth / ipv4 / end actions rss \
types eth endkey_len0 queues end / ends-vlan:
testpmd>flow create 0 ingress pattern eth / ipv4 / end actions rss \
types c-vlan endkey_len0 queues end / endc-vlan:
testpmd>flow create 0 ingress pattern eth / ipv4 / end actions rss \
types c-vlan endkey_len0 queues end / end
Quoted 7 lines
l2tpv3:
testpmd>flow create 0 ingress pattern eth / ipv4 / l2tpv3oip / end \
actions rss types ipv4 l2tpv3 endkey_len0 queues end / endesp:
testpmd>flow create 0 ingress pattern eth / ipv4 / esp / end actions \
rss types ipv4 esp endkey_len0 queues end / end
Should "rss types ipv4 esp" be "rss types esp" ?
Quoted 5 lines
ah:
testpmd>flow create 0 ingress pattern eth / ipv4 / ah / end actions \
rss types ipv4 ah endkey_len0 queues end / end
Should "rss types ah" be "rss types ah" ?
Quoted 3 lines
pfcp:
testpmd>flow create 0 ingress pattern eth / ipv4 / udp / pfcp / end \
actions rss types ipv4-udp pfcp endkey_len0 queues end / end
The above sample commands might be better in a doc file, rather than in the commit message. For example doc/guides/howto/rte_flow.rst
The flow create/validate commands are normally parsed in app/testpmd/cmdline_flow.c This patch is updating the following commands:
"port config all rss all"
"port config <port_id> rss-hash-key "
Quoted 85 lines
Signed-off-by Jeff Guo <[email protected]>---
v5->v4:
rename eth to l2 and refine commit log
---
app/test-pmd/cmdline.c| 28 +++++++++++++++++++++++++--- app/test-pmd/config.c| 9 +++++++++2 files changed, 34 insertions(+), 3 deletions(-)app/test-pmd/cmdline.c index renamed from app/test-pmd/cmdline.c +0
-0
863b567c1..6b688ab66100644app/test-pmd/cmdline.c +1
-1@@ -2270,9 +2270,11 @@ cmd_config_rss_parsed(void *parsed_result,int ret;if (!strcmp (res->value,"all" )) - rss_conf.rss_hf = ETH_RSS_IP | ETH_RSS_TCP | + rss_conf.rss_hf = ETH_RSS_ETH | ETH_RSS_IP |
ETH_RSS_TCP|app/test-pmd/cmdline.c +18
-0ETH_RSS_UDP |ETH_RSS_SCTP |ETH_RSS_L2_PAYLOAD ; + else if (!strcmp(res->value, "eth")) + rss_conf.rss_hf =ETH_RSS_ETH ; else if (!strcmp(res->value, "ip")) rss_conf.rss_hf =ETH_RSS_IP ; else if (!strcmp(res->value, "udp"))@@ -2299,6 +2301,22 @@ cmd_config_rss_parsed(void *parsed_result, rss_conf.rss_hf =ETH_RSS_L4_SRC_ONLY ; else if (!strcmp(res->value, "l4-dst-only")) rss_conf.rss_hf =ETH_RSS_L4_DST_ONLY ; + else if (!strcmp(res->value, "l2-src-only")) + rss_conf.rss_hf =ETH_RSS_L2_SRC_ONLY ; + else if (!strcmp(res->value, "l2-dst-only")) + rss_conf.rss_hf =ETH_RSS_L2_DST_ONLY ; + else if (!strcmp(res->value, "s-vlan")) + rss_conf.rss_hf =ETH_RSS_S_VLAN ; + else if (!strcmp(res->value, "c-vlan")) + rss_conf.rss_hf =ETH_RSS_C_VLAN ; + else if (!strcmp(res->value, "l2tpv3")) + rss_conf.rss_hf =ETH_RSS_L2TPV3 ; + else if (!strcmp(res->value, "esp")) + rss_conf.rss_hf =ETH_RSS_ESP ; + else if (!strcmp(res->value, "ah")) + rss_conf.rss_hf =ETH_RSS_AH ; + else if (!strcmp(res->value, "pfcp")) + rss_conf.rss_hf =ETH_RSS_PFCP ; else if (!strcmp(res->value, "none")) rss_conf.rss_hf =0 ; else if (!strcmp(res->value, "default")) @@ -2467,7 +2485,9 @@
cmdline_parse_token_string_tcmd_config_rss_hash_key_rss_type=
"ipv4-other#ipv6#ipv6-frag#ipv6-tcp#ipv6-
udp#"app/test-pmd/cmdline.c +0
-1"ipv6-sctp#ipv6-other#l2-payload#ipv6-ex#" "ipv6-tcp-ex#ipv6-udp-ex#" - "l3-src-only#l3-dst-only#l4-src-only#l4-dst-only");
app/test-pmd/cmdline.c +1
-0+ "l3-src-only#l3-dst-only#l4-src-only#l4-dst-only#"
app/test-pmd/cmdline.c +2
-0+"l2-src-only#l2-dst-only#s-vlan#c-vlan#" + "l2tpv3#esp#ah#pfcp");cmdline_parse_token_string_t cmd_config_rss_hash_key_value = TOKEN_STRING_INITIALIZER(struct cmd_config_rss_hash_key, key,NULL);
app/test-pmd/cmdline.c +3
-1@@ -2478,7 +2498,9 @@ cmdline_parse_inst_t cmd_config_rss_hash_key = {"ipv4|ipv4-frag|ipv4-tcp|ipv4-udp|ipv4-sctp|ipv4-other|" "ipv6|ipv6-frag|ipv6-tcp|ipv6-udp|ipv6-sctp|ipv6-other|" "l2-payload|ipv6-ex|ipv6-tcp-ex|ipv6-udp-ex|" -"l3-src-only|l3-dst-only|l4-src-only|l4-dst-only " +"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 " "<string of hex digits (variable length, NIC dependent)>", .tokens = {(void *)&cmd_config_rss_hash_key_port, diff --git
a/app/test-pmd/config.cb/app/test-pmd/config.cindex71aeb5413..e4a97388b100644
app/test-pmd/config.c const struct rss_type_info rss_type_table[] = { · line 86
Quoted 8 lines
app/test-pmd/config.c +5
-0@@ -79,6 +79,11 @@ const struct rss_type_info rss_type_table[] = {ETH_RSS_UDP |ETH_RSS_SCTP | ETH_RSS_L2_PAYLOAD }, { "none", 0 }, + { "eth", ETH_RSS_ETH }, + { "l2-src-only", ETH_RSS_L2_SRC_ONLY }, + { "l2-dst-only", ETH_RSS_L2_DST_ONLY }, + { "s-vlan", ETH_RSS_S_VLAN }, + { "c-vlan", ETH_RSS_C_VLAN },
Should these additions be at the bottom of the array with the other additions ?
Quoted 16 lines
app/test-pmd/config.c +0
-0{ "ipv4", ETH_RSS_IPV4 }, { "ipv4-frag", ETH_RSS_FRAG_IPV4 }, { "ipv4-tcp", ETH_RSS_NONFRAG_IPV4_TCP }, @@ -108,6 +113,10@@ const struct
rss_type_inforss_type_table[] = {app/test-pmd/config.c +4
-1{ "l3-dst-only", ETH_RSS_L3_DST_ONLY }, { "l4-src-only", ETH_RSS_L4_SRC_ONLY }, { "l4-dst-only", ETH_RSS_L4_DST_ONLY }, + { "l2tpv3", ETH_RSS_L2TPV3 }, + { "esp", ETH_RSS_ESP }, + { "ah", ETH_RSS_AH }, + { "pfcp", ETH_RSS_PFCP }, { NULL, 0 }, }; --2.20.1
Re: [dpdk-dev] [dpdk-dev v5 3/3] app/testpmd: add new types to RSS hash commands
hi, bernard
Quoted 37 lines · Bernard
Hi Jeff,
Quoted 35 lines
-----Original Message-----
From: Guo, Jia <[email protected]>
Sent: Wednesday, April 15, 2020 6:11 PM
To: Iremonger, Bernard <[email protected]>; [email protected]; Ye, Xiaolong <[email protected]>; Zhang, Qi Z <[email protected]>
Cc: [email protected]; Wu, Jingjing <[email protected]>; Cao, Yahui <[email protected]>; Su, Simei <[email protected]>; Guo, Jia <[email protected]>
Subject: [dpdk-dev v5 3/3] app/testpmd: add new types to RSS hash commandsAdd some new types, such as eth/l2-src-only/l2-dst-only/svlan/cvlan/ l2tpv3/esp/ah/pfcp types into RSS hash commands, it could be used to configure these rss input set by cmdline.
Example testpmd commands are:
Eth:
testpmd>flow create 0 ingress pattern eth / ipv4 / end actions rss \
types eth l2-src-only endkey_len0 queues end / endtestpmd>flow create 0 ingress pattern eth / ipv4 / end actions rss \
types eth l2-dst-only endkey_len0 queues end / endtestpmd>flow create 0 ingress pattern eth / ipv4 / end actions rss \
types eth endkey_len0 queues end / ends-vlan:
testpmd>flow create 0 ingress pattern eth / ipv4 / end actions rss \
types c-vlan endkey_len0 queues end / endc-vlan:
testpmd>flow create 0 ingress pattern eth / ipv4 / end actions rss \
types c-vlan endkey_len0 queues end / end
Quoted 8 lines
Quoted 7 lines
l2tpv3:
testpmd>flow create 0 ingress pattern eth / ipv4 / l2tpv3oip / end \
actions rss types ipv4 l2tpv3 endkey_len0 queues end / endesp:
testpmd>flow create 0 ingress pattern eth / ipv4 / esp / end actions \
rss types ipv4 esp endkey_len0 queues end / endShould "rss types ipv4 esp" be "rss types esp" ?
yes, it should be.
Quoted 5 lines
Quoted 4 lines
ah:
testpmd>flow create 0 ingress pattern eth / ipv4 / ah / end actions \
rss types ipv4 ah endkey_len0 queues end / endShould "rss types ah" be "rss types ah" ?
yes, the same as above and i think you are right, all action should be specific, i think the parse logic should be modify to use pattern to distinguish the ipv4 ah or ipv6 ah but not use rss type.
Quoted 10 lines
Quoted 3 lines
pfcp:
testpmd>flow create 0 ingress pattern eth / ipv4 / udp / pfcp / end \
actions rss types ipv4-udp pfcp endkey_len0 queues end / endThe above sample commands might be better in a doc file, rather than in the commit message. For example
doc/guides/howto/rte_flow.rstThe flow create/validate commands are normally parsed in
app/testpmd/cmdline_flow.cThis patch is updating the following commands:
"port config all rss all"
"port config <port_id> rss-hash-key"
Since this is not the command initial and just leverage the command which is already exist, so i think i would suppose that no need to modify the doc if no change, only change
the part if the change bring in, and i could briefly introduce a example only in commit log for simplify.
Quoted 83 lines
Quoted 83 lines
Signed-off-by Jeff Guo <[email protected]>---
v5->v4:
rename eth to l2 and refine commit log
---
app/test-pmd/cmdline.c| 28 +++++++++++++++++++++++++--- app/test-pmd/config.c| 9 +++++++++2 files changed, 34 insertions(+), 3 deletions(-)app/test-pmd/cmdline.c index renamed from app/test-pmd/cmdline.c +0
-0
863b567c1..6b688ab66100644app/test-pmd/cmdline.c +1
-1@@ -2270,9 +2270,11 @@ cmd_config_rss_parsed(void *parsed_result,int ret;if (!strcmp (res->value,"all" )) -rss_conf.rss_hf = ETH_RSS_IP | ETH_RSS_TCP | +rss_conf.rss_hf = ETH_RSS_ETH | ETH_RSS_IP |
ETH_RSS_TCP|
ETH_RSS_UDP|ETH_RSS_SCTP|
ETH_RSS_L2_PAYLOAD;app/test-pmd/cmdline.c +18
-0+else if (!strcmp (res->value,"eth" )) +rss_conf.rss_hf =ETH_RSS_ETH ;else if (!strcmp (res->value,"ip" )) rss_conf.rss_hf =ETH_RSS_IP ;else if (!strcmp (res->value,"udp" ))@@ -2299,6 +2301,22 @@ cmd_config_rss_parsed(void *parsed_result, rss_conf.rss_hf =ETH_RSS_L4_SRC_ONLY ; else if (!strcmp(res->value, "l4-dst-only")) rss_conf.rss_hf =ETH_RSS_L4_DST_ONLY ; +else if (!strcmp(res->value, "l2-src-only")) +rss_conf.rss_hf =ETH_RSS_L2_SRC_ONLY ; +else if (!strcmp(res->value, "l2-dst-only")) +rss_conf.rss_hf =ETH_RSS_L2_DST_ONLY ; +else if (!strcmp(res->value, "s-vlan")) +rss_conf.rss_hf =ETH_RSS_S_VLAN ; +else if (!strcmp(res->value, "c-vlan")) +rss_conf.rss_hf =ETH_RSS_C_VLAN ; +else if (!strcmp(res->value, "l2tpv3")) +rss_conf.rss_hf =ETH_RSS_L2TPV3 ; +else if (!strcmp(res->value, "esp")) +rss_conf.rss_hf =ETH_RSS_ESP ; +else if (!strcmp(res->value, "ah")) +rss_conf.rss_hf =ETH_RSS_AH ; +else if (!strcmp(res->value, "pfcp")) +rss_conf.rss_hf =ETH_RSS_PFCP ; else if (!strcmp(res->value, "none")) rss_conf.rss_hf =0 ; else if (!strcmp(res->value, "default")) @@ -2467,7 +2485,9 @@
cmdline_parse_token_string_tcmd_config_rss_hash_key_rss_type=
"ipv4-other#ipv6#ipv6-frag#ipv6-tcp#ipv6-
udp#"
"ipv6-sctp#ipv6-other#l2-payload#ipv6-ex#" "ipv6-tcp-ex#ipv6-udp-ex#"
- "l3-src-only#l3-dst-only#l4-src-only#l4-dst- only");
+ "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");
cmdline_parse_token_string_tcmd_config_rss_hash_key_value= TOKEN_STRING_INITIALIZER(structcmd_config_rss_hash_key, key,
NULL);app/test-pmd/cmdline.c +3
-1@@ -2478,7 +2498,9 @@ cmdline_parse_inst_t cmd_config_rss_hash_key = {"ipv4|ipv4-frag|ipv4-tcp|ipv4-udp|ipv4-sctp|ipv4-other|" "ipv6|ipv6-frag|ipv6-tcp|ipv6-udp|ipv6-sctp|ipv6-other|" "l2-payload|ipv6-ex|ipv6-tcp-ex|ipv6-udp-ex|" -"l3-src-only|l3-dst-only|l4-src-only|l4-dst-only " +"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 " "<string of hex digits (variable length, NIC dependent)>", .tokens = {(void *)&cmd_config_rss_hash_key_port, diff --git
a/app/test-pmd/config.cb/app/test-pmd/config.cindex71aeb5413..e4a97388b100644app/test-pmd/config.c +0
-0@@ -79,6 +79,11 @@ const struct rss_type_info rss_type_table[] = { ETH_RSS_UDP | ETH_RSS_SCTP |
Quoted 8 lines
app/test-pmd/config.c const struct rss_type_info rss_type_table[] = { · line 86
Quoted 7 lines
app/test-pmd/config.c +5
-0ETH_RSS_L2_PAYLOAD }, { "none", 0 }, +{ "eth", ETH_RSS_ETH }, +{ "l2-src-only", ETH_RSS_L2_SRC_ONLY }, +{ "l2-dst-only", ETH_RSS_L2_DST_ONLY }, +{ "s-vlan", ETH_RSS_S_VLAN }, +{ "c-vlan", ETH_RSS_C_VLAN },Should these additions be at the bottom of the array with the other additions ?
I suppose this is not in a library code or application binary interface, so it would not break ABI/API, and re-order it as up-down layer must be better.
Quoted 16 lines
Quoted 16 lines
app/test-pmd/config.c +0
-0{ "ipv4", ETH_RSS_IPV4 }, { "ipv4-frag", ETH_RSS_FRAG_IPV4 }, { "ipv4-tcp", ETH_RSS_NONFRAG_IPV4_TCP }, @@ -108,6 +113,10@@ const struct
rss_type_inforss_type_table[] = {
{ "l3-dst-only",ETH_RSS_L3_DST_ONLY}, { "l4-src-only",ETH_RSS_L4_SRC_ONLY}, { "l4-dst-only",ETH_RSS_L4_DST_ONLY},app/test-pmd/config.c +4
-1+{ "l2tpv3", ETH_RSS_L2TPV3 }, +{ "esp", ETH_RSS_ESP }, +{ "ah", ETH_RSS_AH }, +{ "pfcp", ETH_RSS_PFCP }, { NULL, 0 }, }; --2.20.1
Re: [dpdk-dev] [dpdk-dev v5 3/3] app/testpmd: add new types to RSS hash commands
Hi Jeff,
Quoted 92 lines
-----Original Message-----
From: Guo, Jia <[email protected]>
Sent: Thursday, April 16, 2020 8:52 AM
To: Iremonger, Bernard <[email protected]>; [email protected]; Ye, Xiaolong <[email protected]>; Zhang, Qi Z <[email protected]>
Cc: [email protected]; Wu, Jingjing <[email protected]>; Cao, Yahui <[email protected]>; Su, Simei <[email protected]>
Subject: Re: [dpdk-dev v5 3/3] app/testpmd: add new types to RSS hash commandshi, bernard
Quoted 41 lines · Bernard
Hi Jeff,
Quoted 39 lines
-----Original Message-----
From: Guo, Jia <[email protected]>
Sent: Wednesday, April 15, 2020 6:11 PM
To: Iremonger, Bernard <[email protected]>; [email protected]; Ye, Xiaolong <[email protected]>; Zhang, Qi Z <[email protected]>
Cc: [email protected]; Wu, Jingjing <[email protected]>; Cao, Yahui <[email protected]>; Su, Simei <[email protected]>; Guo, Jia <[email protected]>
Subject: [dpdk-dev v5 3/3] app/testpmd: add new types to RSS hash commandsAdd some new types, such as eth/l2-src-only/l2-dst-only/svlan/cvlan/ l2tpv3/esp/ah/pfcp types into RSS hash commands, it could be used to configure these rss input set by cmdline.
Example testpmd commands are:
Eth:
testpmd>flow create 0 ingress pattern eth / ipv4 / end actions rss \
types eth l2-src-only endkey_len0 queues end / endtestpmd>flow create 0 ingress pattern eth / ipv4 / end actions rss \
types eth l2-dst-only endkey_len0 queues end / endtestpmd>flow create 0 ingress pattern eth / ipv4 / end actions rss \
types eth endkey_len0 queues end / ends-vlan:
testpmd>flow create 0 ingress pattern eth / ipv4 / end actions rss \
types c-vlan endkey_len0 queues end / endc-vlan:
testpmd>flow create 0 ingress pattern eth / ipv4 / end actions rss \
types c-vlan endkey_len0 queues end / endl2tpv3:
testpmd>flow create 0 ingress pattern eth / ipv4 / l2tpv3oip / end \
actions rss types ipv4 l2tpv3 endkey_len0 queues end / endQuoted 5 lines
Quoted 4 lines
esp:
testpmd>flow create 0 ingress pattern eth / ipv4 / esp / end actions testpmd>\
rss types ipv4 esp endkey_len0 queues end / endShould "rss types ipv4 esp" be "rss types esp" ?
yes, it should be.
Quoted 5 lines
Quoted 4 lines
ah:
testpmd>flow create 0 ingress pattern eth / ipv4 / ah / end actions \
rss types ipv4 ah endkey_len0 queues end / endShould "rss types ah" be "rss types ah" ?
yes, the same as above and i think you are right, all action should be specific, i think the parse logic should be modify to use pattern to distinguish the ipv4 ah or ipv6 ah but not use rss type.
Quoted 4 lines
Quoted 3 lines
pfcp:
testpmd>flow create 0 ingress pattern eth / ipv4 / udp / pfcp / end \
actions rss types ipv4-udp pfcp endkey_len0 queues end / endThe above sample commands might be better in a doc file, rather than in
the commit message.
Quoted 4 lines
For example
doc/guides/howto/rte_flow.rstThe flow create/validate commands are normally parsed in
app/testpmd/cmdline_flow.cThis patch is updating the followingcommands:
Quoted 2 lines
"port config all rss all"
"port config <port_id> rss-hash-key"
Quoted 6 lines
Since this is not the command initial and just leverage the command which is already exist, so i think i would suppose that no need to modify the doc if no change, only change
the part if the change bring in, and i could briefly introduce a example only in commit log for simplify.
I still think it would be useful to add the examples above to the doc/guides/howto/rte_flow.rst file which contains other rte_flow examples.
Quoted 95 lines
Quoted 8 lines
Quoted 8 lines
Signed-off-by Jeff Guo <[email protected]>---
v5->v4:
rename eth to l2 and refine commit log--- app/test-pmd/cmdline.c | 28 +++++++++++++++++++++++++---app/test-
Quoted 59 lines
Quoted 59 lines
pmd/config.c| 9 +++++++++2 files changed, 34 insertions(+), 3 deletions(-)app/test-pmd/cmdline.c index renamed from app/test-pmd/cmdline.c +0
-0
863b567c1..6b688ab66100644app/test-pmd/cmdline.c +1
-1@@ -2270,9 +2270,11 @@ cmd_config_rss_parsed(void *parsed_result,int ret;if (!strcmp (res->value,"all" )) -rss_conf.rss_hf = ETH_RSS_IP | ETH_RSS_TCP | +rss_conf.rss_hf = ETH_RSS_ETH | ETH_RSS_IP |
ETH_RSS_TCP|
ETH_RSS_UDP|ETH_RSS_SCTP|
ETH_RSS_L2_PAYLOAD;app/test-pmd/cmdline.c +18
-0+else if (!strcmp (res->value,"eth" )) +rss_conf.rss_hf =ETH_RSS_ETH ;else if (!strcmp (res->value,"ip" )) rss_conf.rss_hf =ETH_RSS_IP ;else if (!strcmp (res->value,"udp" ))@@ -2299,6 +2301,22 @@ cmd_config_rss_parsed(void *parsed_result, rss_conf.rss_hf =ETH_RSS_L4_SRC_ONLY ; else if (!strcmp(res->value, "l4-dst-only")) rss_conf.rss_hf =ETH_RSS_L4_DST_ONLY ; +else if (!strcmp(res->value, "l2-src-only")) +rss_conf.rss_hf =ETH_RSS_L2_SRC_ONLY ; +else if (!strcmp(res->value, "l2-dst-only")) +rss_conf.rss_hf =ETH_RSS_L2_DST_ONLY ; +else if (!strcmp(res->value, "s-vlan")) +rss_conf.rss_hf =ETH_RSS_S_VLAN ; +else if (!strcmp(res->value, "c-vlan")) +rss_conf.rss_hf =ETH_RSS_C_VLAN ; +else if (!strcmp(res->value, "l2tpv3")) +rss_conf.rss_hf =ETH_RSS_L2TPV3 ; +else if (!strcmp(res->value, "esp")) +rss_conf.rss_hf =ETH_RSS_ESP ; +else if (!strcmp(res->value, "ah")) +rss_conf.rss_hf =ETH_RSS_AH ; +else if (!strcmp(res->value, "pfcp")) +rss_conf.rss_hf =ETH_RSS_PFCP ; else if (!strcmp(res->value, "none")) rss_conf.rss_hf =0 ; else if (!strcmp(res->value, "default")) @@ -2467,7 +2485,9 @@
cmdline_parse_token_string_tcmd_config_rss_hash_key_rss_type=
"ipv4-other#ipv6#ipv6-frag#ipv6-tcp#ipv6-
udp#"
"ipv6-sctp#ipv6-other#l2-payload#ipv6-ex#" "ipv6-tcp-ex#ipv6-udp-ex#"
- "l3-src-only#l3-dst-only#l4-src-only#l4-dst- only");
+ "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");
cmdline_parse_token_string_tcmd_config_rss_hash_key_value= TOKEN_STRING_INITIALIZER(structcmd_config_rss_hash_key, key,
NULL);Quoted 1 line
app/test-pmd/cmdline.c cmdline_parse_inst_t
Quoted 1 line
app/test-pmd/cmdline.c +0
-0@@ -2478,7 +2498,9 @@ cmdline_parse_inst_t
cmd_config_rss_hash_key=Quoted 17 lines
Quoted 17 lines
app/test-pmd/cmdline.c +3
-1{"ipv4|ipv4-frag|ipv4-tcp|ipv4-udp|ipv4-sctp|ipv4-other|" "ipv6|ipv6-frag|ipv6-tcp|ipv6-udp|ipv6-sctp|ipv6-other|" "l2-payload|ipv6-ex|ipv6-tcp-ex|ipv6-udp-ex|" -"l3-src-only|l3-dst-only|l4-src-only|l4-dst-only " +"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 " "<string of hex digits (variable length, NIC dependent)>", .tokens = {(void *)&cmd_config_rss_hash_key_port, diff --git
a/app/test-pmd/config.cb/app/test-pmd/config.cindex71aeb5413..e4a97388b100644app/test-pmd/config.c +0
-0@@ -79,6 +79,11 @@ const struct rss_type_info rss_type_table[] = { ETH_RSS_UDP | ETH_RSS_SCTP |Quoted 8 lines
app/test-pmd/config.c const struct rss_type_info rss_type_table[] = { · line 86
Quoted 7 lines
app/test-pmd/config.c +5
-0ETH_RSS_L2_PAYLOAD }, { "none", 0 }, +{ "eth", ETH_RSS_ETH }, +{ "l2-src-only", ETH_RSS_L2_SRC_ONLY }, +{ "l2-dst-only", ETH_RSS_L2_DST_ONLY }, +{ "s-vlan", ETH_RSS_S_VLAN }, +{ "c-vlan", ETH_RSS_C_VLAN },Should these additions be at the bottom of the array with the other
Quoted 6 lines
additions ?
I suppose this is not in a library code or application binary interface, so it would not break ABI/API, and re-order it as up-down layer must be better.
Ok.
Quoted 16 lines
Quoted 16 lines
Quoted 16 lines
app/test-pmd/config.c +0
-0{ "ipv4", ETH_RSS_IPV4 }, { "ipv4-frag", ETH_RSS_FRAG_IPV4 }, { "ipv4-tcp", ETH_RSS_NONFRAG_IPV4_TCP }, @@ -108,6 +113,10@@ const struct
rss_type_inforss_type_table[] = {
{ "l3-dst-only",ETH_RSS_L3_DST_ONLY}, { "l4-src-only",ETH_RSS_L4_SRC_ONLY}, { "l4-dst-only",ETH_RSS_L4_DST_ONLY},app/test-pmd/config.c +4
-0+{ "l2tpv3", ETH_RSS_L2TPV3 }, +{ "esp", ETH_RSS_ESP }, +{ "ah", ETH_RSS_AH }, +{ "pfcp", ETH_RSS_PFCP }, { NULL, 0 }, };
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
--
2.20.1
Regards,
Bernard.
Re: [dpdk-dev] [dpdk-dev v5 3/3] app/testpmd: add new types to RSS hash commands
hi, bernard
Quoted 91 lines · Bernard
Hi Jeff,
Quoted 89 lines
-----Original Message-----
From: Guo, Jia <[email protected]>
Sent: Thursday, April 16, 2020 8:52 AM
To: Iremonger, Bernard <[email protected]>; [email protected]; Ye, Xiaolong <[email protected]>; Zhang, Qi Z <[email protected]>
Cc: [email protected]; Wu, Jingjing <[email protected]>; Cao, Yahui <[email protected]>; Su, Simei <[email protected]>
Subject: Re: [dpdk-dev v5 3/3] app/testpmd: add new types to RSS hash commandshi, bernard
Quoted 41 lines · Bernard
Hi Jeff,
Quoted 39 lines
-----Original Message-----
From: Guo, Jia <[email protected]>
Sent: Wednesday, April 15, 2020 6:11 PM
To: Iremonger, Bernard <[email protected]>; [email protected]; Ye, Xiaolong <[email protected]>; Zhang, Qi Z <[email protected]>
Cc: [email protected]; Wu, Jingjing <[email protected]>; Cao, Yahui <[email protected]>; Su, Simei <[email protected]>; Guo, Jia <[email protected]>
Subject: [dpdk-dev v5 3/3] app/testpmd: add new types to RSS hash commandsAdd some new types, such as eth/l2-src-only/l2-dst-only/svlan/cvlan/ l2tpv3/esp/ah/pfcp types into RSS hash commands, it could be used to configure these rss input set by cmdline.
Example testpmd commands are:
Eth:
testpmd>flow create 0 ingress pattern eth / ipv4 / end actions rss \
types eth l2-src-only endkey_len0 queues end / endtestpmd>flow create 0 ingress pattern eth / ipv4 / end actions rss \
types eth l2-dst-only endkey_len0 queues end / endtestpmd>flow create 0 ingress pattern eth / ipv4 / end actions rss \
types eth endkey_len0 queues end / ends-vlan:
testpmd>flow create 0 ingress pattern eth / ipv4 / end actions rss \
types c-vlan endkey_len0 queues end / endc-vlan:
testpmd>flow create 0 ingress pattern eth / ipv4 / end actions rss \
types c-vlan endkey_len0 queues end / endl2tpv3:
testpmd>flow create 0 ingress pattern eth / ipv4 / l2tpv3oip / end \
actions rss types ipv4 l2tpv3 endkey_len0 queues end / endQuoted 5 lines
Quoted 4 lines
esp:
testpmd>flow create 0 ingress pattern eth / ipv4 / esp / end actions testpmd>\
rss types ipv4 esp endkey_len0 queues end / endShould "rss types ipv4 esp" be "rss types esp" ?
yes, it should be.
Quoted 5 lines
Quoted 4 lines
ah:
testpmd>flow create 0 ingress pattern eth / ipv4 / ah / end actions \
rss types ipv4 ah endkey_len0 queues end / endShould "rss types ah" be "rss types ah" ?
yes, the same as above and i think you are right, all action should be specific, i think the parse logic should be modify to use pattern to distinguish the ipv4 ah or ipv6 ah but not use rss type.
Quoted 4 lines
Quoted 3 lines
pfcp:
testpmd>flow create 0 ingress pattern eth / ipv4 / udp / pfcp / end \
actions rss types ipv4-udp pfcp endkey_len0 queues end / endThe above sample commands might be better in a doc file, rather than in
the commit message.
Quoted 4 lines
For example
doc/guides/howto/rte_flow.rstThe flow create/validate commands are normally parsed in
app/testpmd/cmdline_flow.cThis patch is updating the followingcommands:
Quoted 2 lines
"port config all rss all"
"port config <port_id> rss-hash-key"
Quoted 8 lines
Quoted 6 lines
Since this is not the command initial and just leverage the command which is already exist, so i think i would suppose that no need to modify the doc if no change, only change
the part if the change bring in, and i could briefly introduce a example only in commit log for simplify.
I still think it would be useful to add the examples above to the
doc/guides/howto/rte_flow.rstfile which contains otherrte_flowexamples.
I think what your suppose is that there is lack of an doc to describe this rss rule feature what ever pf and vf in the history, so i suppose to add it in a separate patch next
after leverage all pf and vf about that, what is your or other guys opinion, i think i am both ok for that.
Quoted 121 lines
Quoted 93 lines
Quoted 7 lines
Quoted 7 lines
Signed-off-by Jeff Guo <[email protected]>---
v5->v4:
rename eth to l2 and refine commit log--- app/test-pmd/cmdline.c | 28 +++++++++++++++++++++++++---app/test-
Quoted 58 lines
Quoted 58 lines
pmd/config.c| 9 +++++++++2 files changed, 34 insertions(+), 3 deletions(-)app/test-pmd/cmdline.c index renamed from app/test-pmd/cmdline.c +0
-0
863b567c1..6b688ab66100644app/test-pmd/cmdline.c +1
-1@@ -2270,9 +2270,11 @@ cmd_config_rss_parsed(void *parsed_result,int ret;if (!strcmp (res->value,"all" )) -rss_conf.rss_hf = ETH_RSS_IP | ETH_RSS_TCP | +rss_conf.rss_hf = ETH_RSS_ETH | ETH_RSS_IP |
ETH_RSS_TCP|
ETH_RSS_UDP|ETH_RSS_SCTP|
ETH_RSS_L2_PAYLOAD;app/test-pmd/cmdline.c +18
-0+else if (!strcmp (res->value,"eth" )) +rss_conf.rss_hf =ETH_RSS_ETH ;else if (!strcmp (res->value,"ip" )) rss_conf.rss_hf =ETH_RSS_IP ;else if (!strcmp (res->value,"udp" ))@@ -2299,6 +2301,22 @@ cmd_config_rss_parsed(void *parsed_result, rss_conf.rss_hf =ETH_RSS_L4_SRC_ONLY ; else if (!strcmp(res->value, "l4-dst-only")) rss_conf.rss_hf =ETH_RSS_L4_DST_ONLY ; +else if (!strcmp(res->value, "l2-src-only")) +rss_conf.rss_hf =ETH_RSS_L2_SRC_ONLY ; +else if (!strcmp(res->value, "l2-dst-only")) +rss_conf.rss_hf =ETH_RSS_L2_DST_ONLY ; +else if (!strcmp(res->value, "s-vlan")) +rss_conf.rss_hf =ETH_RSS_S_VLAN ; +else if (!strcmp(res->value, "c-vlan")) +rss_conf.rss_hf =ETH_RSS_C_VLAN ; +else if (!strcmp(res->value, "l2tpv3")) +rss_conf.rss_hf =ETH_RSS_L2TPV3 ; +else if (!strcmp(res->value, "esp")) +rss_conf.rss_hf =ETH_RSS_ESP ; +else if (!strcmp(res->value, "ah")) +rss_conf.rss_hf =ETH_RSS_AH ; +else if (!strcmp(res->value, "pfcp")) +rss_conf.rss_hf =ETH_RSS_PFCP ; else if (!strcmp(res->value, "none")) rss_conf.rss_hf =0 ; else if (!strcmp(res->value, "default")) @@ -2467,7 +2485,9 @@
cmdline_parse_token_string_tcmd_config_rss_hash_key_rss_type="ipv4-other#ipv6#ipv6-frag#ipv6-tcp#ipv6- udp#" "ipv6-sctp#ipv6-other#l2-payload#ipv6-ex#" "ipv6-tcp-ex#ipv6-udp-ex#"- "l3-src-only#l3-dst-only#l4-src-only#l4-dst-
only");
+ "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");
cmdline_parse_token_string_tcmd_config_rss_hash_key_value= TOKEN_STRING_INITIALIZER(structcmd_config_rss_hash_key, key,
NULL);Quoted 1 line
app/test-pmd/cmdline.c cmdline_parse_inst_t
Quoted 1 line
app/test-pmd/cmdline.c +0
-0@@ -2478,7 +2498,9 @@ cmdline_parse_inst_t
cmd_config_rss_hash_key=Quoted 17 lines
Quoted 17 lines
app/test-pmd/cmdline.c +3
-1{"ipv4|ipv4-frag|ipv4-tcp|ipv4-udp|ipv4-sctp|ipv4-other|" "ipv6|ipv6-frag|ipv6-tcp|ipv6-udp|ipv6-sctp|ipv6-other|" "l2-payload|ipv6-ex|ipv6-tcp-ex|ipv6-udp-ex|" -"l3-src-only|l3-dst-only|l4-src-only|l4-dst-only " +"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 " "<string of hex digits (variable length, NIC dependent)>", .tokens = {(void *)&cmd_config_rss_hash_key_port, diff --git
a/app/test-pmd/config.cb/app/test-pmd/config.cindex71aeb5413..e4a97388b100644app/test-pmd/config.c +0
-0@@ -79,6 +79,11 @@ const struct rss_type_info rss_type_table[] = { ETH_RSS_UDP | ETH_RSS_SCTP |Quoted 8 lines
app/test-pmd/config.c const struct rss_type_info rss_type_table[] = { · line 86
Quoted 7 lines
app/test-pmd/config.c +5
-0ETH_RSS_L2_PAYLOAD }, { "none", 0 }, +{ "eth", ETH_RSS_ETH }, +{ "l2-src-only", ETH_RSS_L2_SRC_ONLY }, +{ "l2-dst-only", ETH_RSS_L2_DST_ONLY }, +{ "s-vlan", ETH_RSS_S_VLAN }, +{ "c-vlan", ETH_RSS_C_VLAN },Should these additions be at the bottom of the array with the other
Quoted 6 lines
additions ?
I suppose this is not in a library code or application binary interface, so it would not break ABI/API, and re-order it as up-down layer must be better.
Ok.
Quoted 15 lines
Quoted 15 lines
Quoted 15 lines
app/test-pmd/config.c +0
-0{ "ipv4", ETH_RSS_IPV4 }, { "ipv4-frag", ETH_RSS_FRAG_IPV4 }, { "ipv4-tcp", ETH_RSS_NONFRAG_IPV4_TCP }, @@ -108,6 +113,10@@ const struct rss_type_info rss_type_table[] = { { "l3-dst-only", ETH_RSS_L3_DST_ONLY }, { "l4-src-only", ETH_RSS_L4_SRC_ONLY }, { "l4-dst-only", ETH_RSS_L4_DST_ONLY },app/test-pmd/config.c +4
-0+{ "l2tpv3", ETH_RSS_L2TPV3 }, +{ "esp", ETH_RSS_ESP }, +{ "ah", ETH_RSS_AH }, +{ "pfcp", ETH_RSS_PFCP }, { NULL, 0 }, };Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
--
2.20.1Regards,
Bernard.
v6 cover add RSS configuration for iavf
In reply to Jeff GuoBecause the VF must be capable of configuring RSS, so add RSS configuration for iavf, VFs could add or delete a RSS rule base on the PF's capability. The supported protocol rss input set as below.
l2-src-only/
l2-dst-only/
svlan/
cvlan/
ipv4/
ipv6/
l3_src_only/
l3_dst_only/
l2tpv3/
esp/
ah/
pfcp/
gtpu down/
gtpu up/
udp/
tcp/
sctp/
use tespmd for example:
testpmd> flow create 0 ingress pattern eth / ipv4 / end actions rss types l3-src-only end key_len 0 queues end / end
use scapy for example:
Quoted 1 line
sendp(Ether(dst="00:01:23:45:67:01")/IP(src=RandIP())/Raw('x'*20),iface="ens785f1",loop=1,inter=0.3)
the expect result:
the rss hash works and the packets will go to difference queue for load balance.
This patchset depends on below patch sets. (1)http://patches.dpdk.org/project/dpdk/list/?series=8950
add generic filter support for iavf
(2)http://patches.dpdk.org/project/dpdk/list/?series=9280
iavf share code update
(3)http://patches.dpdk.org/project/dpdk/list/?series=9244
framework for advanced iAVF PMD
v6:
1.rename some struct and type
2.use pattern hint to distingush different layer for hash 3.add some missing part and refine commit log
v5:
1.rename ETH_XXX to L2_XXX.
2.NULL checking and commit log refine.
v4:
1.refine the rss type checking
2.delete unnecessary pdu type item.
v3:
1.refince rss offload types.
2.add doc in release note
3.refine some naming base on virtchnl definition.
4.move gtp pdu index from normal to special.
v2:
1.refine some rte eth rss offload types.
2.add NAT T ESP and refine gtpu down/up
3.reference some fixing patch from pf side.
Jeff Guo (3):
ethdev: add new RSS offload types
net/iavf: add RSS configuration for VFs
app/testpmd: add new types to RSS hash commands
app/test-pmd/cmdline.c | 28 +- app/test-pmd/config.c | 9 + doc/guides/rel_notes/release_20_05.rst | 2 + drivers/net/iavf/Makefile | 1 + drivers/net/iavf/iavf.h | 2 + drivers/net/iavf/iavf_hash.c | 1053 ++++++++++++++++++++++++ drivers/net/iavf/iavf_vchnl.c | 33 +- drivers/net/iavf/meson.build | 1 + lib/librte_ethdev/rte_ethdev.h | 11 +- 9 files changed, 1131 insertions(+), 9 deletions(-) create mode 100644 drivers/net/iavf/iavf_hash.c
Signature · 1 line
2.20.1
PATCH v6 1/3 ethdev: add new RSS offload types
Defines some new RSS offload types for ETH/S_VLAN/C_VLAN/L2TPV3/ ESP/AH/PFCP/L2_SRC_ONLY/L2_DST_ONLY.
---v6->v5:
no change.
--- lib/librte_ethdev/rte_ethdev.h | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-)
lib/librte_ethdev/rte_ethdev.h +10 -1
@@ -511,6 +511,13 @@ struct rte_eth_rss_conf {#define ETH_RSS_GENEVE (1ULL << 20)#define ETH_RSS_NVGRE (1ULL << 21)#define ETH_RSS_GTPU (1ULL << 23) +#define ETH_RSS_ETH (1ULL << 24) +#define ETH_RSS_S_VLAN (1ULL << 25) +#define ETH_RSS_C_VLAN (1ULL << 26) +#define ETH_RSS_ESP (1ULL << 27) +#define ETH_RSS_AH (1ULL << 28) +#define ETH_RSS_L2TPV3 (1ULL << 29) +#define ETH_RSS_PFCP (1ULL << 30)/* * We use the following macros to combine with above ETH_RSS_* for
@@ -524,7 +531,9 @@ struct rte_eth_rss_conf {#define ETH_RSS_L3_SRC_ONLY (1ULL << 63)#define ETH_RSS_L3_DST_ONLY (1ULL << 62)#define ETH_RSS_L4_SRC_ONLY (1ULL << 61) -#define ETH_RSS_L4_DST_ONLY (1ULL << 60) +#define ETH_RSS_L4_DST_ONLY (1ULL << 60) +#define ETH_RSS_L2_SRC_ONLY (1ULL << 59) +#define ETH_RSS_L2_DST_ONLY (1ULL << 58)/** * For input set change of hash filter, if SRC_ONLY and DST_ONLY of
Signature · 1 line
2.20.1
PATCH v6 2/3 net/iavf: add RSS configuration for VFs
In reply to Jeff GuoThe VF must be capable of configuring RSS. Add a virtchnl handler to parse a specific RSS configuration, and process the configuration for VFs, such as add or delete a RSS rule.
---v6->v5:
rename some struct and type
use pattern hint to distingush different layer for hash
--- doc/guides/rel_notes/release_20_05.rst | 2 + drivers/net/iavf/Makefile | 1 + drivers/net/iavf/iavf.h | 2 + drivers/net/iavf/iavf_hash.c | 1053 ++++++++++++++++++++++++ drivers/net/iavf/iavf_vchnl.c | 33 +- drivers/net/iavf/meson.build | 1 + 6 files changed, 1087 insertions(+), 5 deletions(-) create mode 100644 drivers/net/iavf/iavf_hash.c
doc/guides/rel_notes/release_20_05.rst +2 -0
@@ -98,6 +98,8 @@ New Features Update the Intel iavf driver with new features and improvements, including: * Added generic filter support. + * Added advanced RSS configuration for VFs. + Removed Items -------------
drivers/net/iavf/Makefile +1 -0
@@ -24,6 +24,7 @@ SRCS-$(CONFIG_RTE_LIBRTE_IAVF_PMD) += iavf_ethdev.c SRCS-$(CONFIG_RTE_LIBRTE_IAVF_PMD) += iavf_vchnl.c SRCS-$(CONFIG_RTE_LIBRTE_IAVF_PMD) += iavf_rxtx.c SRCS-$(CONFIG_RTE_LIBRTE_IAVF_PMD) += iavf_generic_flow.c +SRCS-$(CONFIG_RTE_LIBRTE_IAVF_PMD) += iavf_hash.c ifeq ($(CONFIG_RTE_ARCH_X86), y) SRCS-$(CONFIG_RTE_LIBRTE_IAVF_PMD) += iavf_rxtx_vec_sse.c endif
drivers/net/iavf/iavf.h +2 -0
@@ -252,4 +252,6 @@ int iavf_config_promisc(struct iavf_adapter *adapter, bool enable_unicast,int iavf_add_del_eth_addr (struct iavf_adapter *adapter,struct rte_ether_addr *addr,bool add);int iavf_add_del_vlan (struct iavf_adapter *adapter,uint16_t vlanid,bool add); +int iavf_add_del_rss_cfg (struct iavf_adapter *adapter, +struct virtchnl_rss_cfg *rss_cfg,bool add);#endif /* _IAVF_ETHDEV_H_ */
drivers/net/iavf/iavf_hash.c new file +1053 -0
1,053 lines not on this page · raw message
drivers/net/iavf/iavf_vchnl.c +28 -5
@@ -335,12 +335,9 @@ iavf_get_vf_resource(struct iavf_adapter *adapter) args.out_buffer = vf->aq_resp; args.out_size =IAVF_AQ_BUF_SZ ; -/* TODO: basic offload capabilities, need to -* add advanced/optional offload capabilities -*/ - caps =IAVF_BASIC_OFFLOAD_CAPS |VIRTCHNL_VF_CAP_ADV_LINK_SPEED | -VIRTCHNL_VF_OFFLOAD_RX_FLEX_DESC ; +VIRTCHNL_VF_OFFLOAD_RX_FLEX_DESC | +VIRTCHNL_VF_OFFLOAD_ADV_RSS_PF ; args.in_args = (uint8_t *)∩︀ args.in_args_size =sizeof (caps);
@@ -842,3 +839,29 @@ iavf_add_del_vlan(struct iavf_adapter *adapter, uint16_t vlanid, bool add)return err; } + +int +iavf_add_del_rss_cfg (struct iavf_adapter *adapter, +struct virtchnl_rss_cfg *rss_cfg,bool add) +{ +struct iavf_info *vf =IAVF_DEV_PRIVATE_TO_VF (adapter); +struct iavf_cmd_info args; +int err; + +memset (&args,0 ,sizeof (args)); + args.ops = add ?VIRTCHNL_OP_ADD_RSS_CFG : +VIRTCHNL_OP_DEL_RSS_CFG ; + args.in_args = (u8 *)rss_cfg; + args.in_args_size =sizeof (*rss_cfg); + args.out_buffer = vf->aq_resp; + args.out_size =IAVF_AQ_BUF_SZ ; + + err =iavf_execute_vf_cmd (adapter, &args); +if (err) +PMD_DRV_LOG (ERR , +"Failed to execute command of %s" , + add ?"OP_ADD_RSS_CFG" : +"OP_DEL_RSS_INPUT_CFG" ); + +return err; +}
drivers/net/iavf/meson.build +1 -0
@@ -13,6 +13,7 @@ sources = files( 'iavf_rxtx.c', 'iavf_vchnl.c', 'iavf_generic_flow.c', + 'iavf_hash.c', ) if arch_subdir == 'x86'
Signature · 1 line
2.20.1
PATCH v6 3/3 app/testpmd: add new types to RSS hash commands
In reply to Jeff GuoAdd some new types, such as eth/l2-src-only/l2-dst-only/svlan/cvlan/ l2tpv3/esp/ah/pfcp types into RSS hash commands, it could be used to configure these rss input set by cmdline.
Example testpmd commands was:
testpmd>flow create 0 ingress pattern eth / ipv4 / l2tpv3oip / end \
actions rss types l2tpv3 end key_len 0 queues end / end
---v6->v5:
add some missing part and refine commit log
--- app/test-pmd/cmdline.c | 34 +++++++++++++++++++++++++++++----- app/test-pmd/config.c | 15 ++++++++++++--- 2 files changed, 41 insertions(+), 8 deletions(-)
app/test-pmd/cmdline.c +29 -5
@@ -2270,9 +2270,13 @@ cmd_config_rss_parsed(void *parsed_result,int ret;if (!strcmp (res->value,"all" )) - rss_conf.rss_hf =ETH_RSS_IP |ETH_RSS_TCP | -ETH_RSS_UDP |ETH_RSS_SCTP | -ETH_RSS_L2_PAYLOAD ; + rss_conf.rss_hf =ETH_RSS_ETH |ETH_RSS_S_VLAN | +ETH_RSS_C_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 ; +else if (!strcmp (res->value,"eth" )) + rss_conf.rss_hf =ETH_RSS_ETH ;else if (!strcmp (res->value,"ip" )) rss_conf.rss_hf =ETH_RSS_IP ;else if (!strcmp (res->value,"udp" ))
@@ -2299,6 +2303,22 @@ cmd_config_rss_parsed(void *parsed_result, rss_conf.rss_hf =ETH_RSS_L4_SRC_ONLY ; else if (!strcmp(res->value, "l4-dst-only")) rss_conf.rss_hf =ETH_RSS_L4_DST_ONLY ; + else if (!strcmp(res->value, "l2-src-only")) + rss_conf.rss_hf =ETH_RSS_L2_SRC_ONLY ; + else if (!strcmp(res->value, "l2-dst-only")) + rss_conf.rss_hf =ETH_RSS_L2_DST_ONLY ; + else if (!strcmp(res->value, "s-vlan")) + rss_conf.rss_hf =ETH_RSS_S_VLAN ; + else if (!strcmp(res->value, "c-vlan")) + rss_conf.rss_hf =ETH_RSS_C_VLAN ; + else if (!strcmp(res->value, "l2tpv3")) + rss_conf.rss_hf =ETH_RSS_L2TPV3 ; + else if (!strcmp(res->value, "esp")) + rss_conf.rss_hf =ETH_RSS_ESP ; + else if (!strcmp(res->value, "ah")) + rss_conf.rss_hf =ETH_RSS_AH ; + else if (!strcmp(res->value, "pfcp")) + rss_conf.rss_hf =ETH_RSS_PFCP ; else if (!strcmp(res->value, "none")) rss_conf.rss_hf =0 ; else if (!strcmp(res->value, "default"))
@@ -2467,7 +2487,9 @@ cmdline_parse_token_string_t cmd_config_rss_hash_key_rss_type ="ipv4-other#ipv6#ipv6-frag#ipv6-tcp#ipv6-udp#" "ipv6-sctp#ipv6-other#l2-payload#ipv6-ex#" "ipv6-tcp-ex#ipv6-udp-ex#" - "l3-src-only#l3-dst-only#l4-src-only#l4-dst-only"); +"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");cmdline_parse_token_string_t cmd_config_rss_hash_key_value = TOKEN_STRING_INITIALIZER(struct cmd_config_rss_hash_key, key, NULL);
@@ -2478,7 +2500,9 @@ cmdline_parse_inst_t cmd_config_rss_hash_key = {"ipv4|ipv4-frag|ipv4-tcp|ipv4-udp|ipv4-sctp|ipv4-other|" "ipv6|ipv6-frag|ipv6-tcp|ipv6-udp|ipv6-sctp|ipv6-other|" "l2-payload|ipv6-ex|ipv6-tcp-ex|ipv6-udp-ex|" -"l3-src-only|l3-dst-only|l4-src-only|l4-dst-only " +"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 " "<string of hex digits (variable length, NIC dependent)>", .tokens = { (void *)&cmd_config_rss_hash_key_port,
app/test-pmd/config.c +12 -3
@@ -75,10 +75,15 @@ static const struct { };const struct rss_type_info rss_type_table[] = { - {"all" ,ETH_RSS_IP |ETH_RSS_TCP | -ETH_RSS_UDP |ETH_RSS_SCTP | -ETH_RSS_L2_PAYLOAD }, + {"all" ,ETH_RSS_ETH |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 }, {"none" ,0 }, + {"eth" ,ETH_RSS_ETH }, + {"l2-src-only" ,ETH_RSS_L2_SRC_ONLY }, + {"l2-dst-only" ,ETH_RSS_L2_DST_ONLY }, + {"s-vlan" ,ETH_RSS_S_VLAN }, + {"c-vlan" ,ETH_RSS_C_VLAN }, {"ipv4" ,ETH_RSS_IPV4 }, {"ipv4-frag" ,ETH_RSS_FRAG_IPV4 }, {"ipv4-tcp" ,ETH_RSS_NONFRAG_IPV4_TCP },
@@ -108,6 +113,10 @@ const struct rss_type_info rss_type_table[] = { { "l3-dst-only", ETH_RSS_L3_DST_ONLY }, { "l4-src-only", ETH_RSS_L4_SRC_ONLY }, { "l4-dst-only", ETH_RSS_L4_DST_ONLY }, + { "l2tpv3", ETH_RSS_L2TPV3 }, + { "esp", ETH_RSS_ESP }, + { "ah", ETH_RSS_AH }, + { "pfcp", ETH_RSS_PFCP }, { NULL, 0 }, };
Signature · 1 line
2.20.1
Re: [dpdk-dev] [dpdk-dev v6 3/3] app/testpmd: add new types to RSS hash commands
Hi Jeff,
Quoted 88 lines
-----Original Message-----
From: Jeff Guo <[email protected]>
Sent: Thursday, April 16, 2020 10:20 PM
To: [email protected]; Ori Kam <[email protected]>; [email protected]; [email protected]
Cc: [email protected]; [email protected]; [email protected]; [email protected]; [email protected]
Subject: [dpdk-dev v6 3/3] app/testpmd: add new types to RSS hash commandsAdd some new types, such as eth/l2-src-only/l2-dst-only/svlan/cvlan/ l2tpv3/esp/ah/pfcp types into RSS hash commands, it could be used to configure these rss input set by cmdline.
Example testpmd commands was:
testpmd>flow create 0 ingress pattern eth / ipv4 / l2tpv3oip / end \
actions rss types l2tpv3 endkey_len0 queues end / endSigned-off-by Jeff Guo <[email protected]>---
v6->v5:
add some missing part and refine commit log--- app/test-pmd/cmdline.c | 34 +++++++++++++++++++++++++++++----- app/test-pmd/config.c | 15 ++++++++++++--- 2 files changed, 41 insertions(+), 8 deletions(-)app/test-pmd/cmdline.c +3
-3@@ -2270,9 +2270,13 @@ cmd_config_rss_parsed(void *parsed_result,int ret;if (!strcmp (res->value,"all" )) - rss_conf.rss_hf =ETH_RSS_IP |ETH_RSS_TCP | -ETH_RSS_UDP |ETH_RSS_SCTP | -ETH_RSS_L2_PAYLOAD ; + rss_conf.rss_hf =ETH_RSS_ETH |ETH_RSS_S_VLAN | +ETH_RSS_C_VLAN |ETH_RSS_IP |ETH_RSS_TCP | + ETH_RSS_UDP | ETH_RSS_SCTP |
ETH_RSS_L2_PAYLOAD|app/test-pmd/cmdline.c +20
-0+ETH_RSS_L2TPV3 |ETH_RSS_ESP |ETH_RSS_AH | +ETH_RSS_PFCP ; + else if (!strcmp(res->value, "eth")) + rss_conf.rss_hf =ETH_RSS_ETH ; else if (!strcmp(res->value, "ip")) rss_conf.rss_hf =ETH_RSS_IP ; else if (!strcmp(res->value, "udp"))@@ -2299,6 +2303,22 @@ cmd_config_rss_parsed(void *parsed_result, rss_conf.rss_hf =ETH_RSS_L4_SRC_ONLY ; else if (!strcmp(res->value, "l4-dst-only")) rss_conf.rss_hf =ETH_RSS_L4_DST_ONLY ; + else if (!strcmp(res->value, "l2-src-only")) + rss_conf.rss_hf =ETH_RSS_L2_SRC_ONLY ; + else if (!strcmp(res->value, "l2-dst-only")) + rss_conf.rss_hf =ETH_RSS_L2_DST_ONLY ; + else if (!strcmp(res->value, "s-vlan")) + rss_conf.rss_hf =ETH_RSS_S_VLAN ; + else if (!strcmp(res->value, "c-vlan")) + rss_conf.rss_hf =ETH_RSS_C_VLAN ; + else if (!strcmp(res->value, "l2tpv3")) + rss_conf.rss_hf =ETH_RSS_L2TPV3 ; + else if (!strcmp(res->value, "esp")) + rss_conf.rss_hf =ETH_RSS_ESP ; + else if (!strcmp(res->value, "ah")) + rss_conf.rss_hf =ETH_RSS_AH ; + else if (!strcmp(res->value, "pfcp")) + rss_conf.rss_hf =ETH_RSS_PFCP ; else if (!strcmp(res->value, "none")) rss_conf.rss_hf =0 ; else if (!strcmp(res->value, "default"))@@ -2467,7 +2487,9 @@ cmdline_parse_token_string_t
cmd_config_rss_hash_key_rss_type=
"ipv4-other#ipv6#ipv6-frag#ipv6-tcp#ipv6-
udp#"app/test-pmd/cmdline.c +0
-1"ipv6-sctp#ipv6-other#l2-payload#ipv6-ex#" "ipv6-tcp-ex#ipv6-udp-ex#" - "l3-src-only#l3-dst-only#l4-src-only#l4-dst-only");
app/test-pmd/cmdline.c +1
-0+ "l3-src-only#l3-dst-only#l4-src-only#l4-dst-only#"
app/test-pmd/cmdline.c +2
-0+"l2-src-only#l2-dst-only#s-vlan#c-vlan#" + "l2tpv3#esp#ah#pfcp");cmdline_parse_token_string_t cmd_config_rss_hash_key_value = TOKEN_STRING_INITIALIZER(struct cmd_config_rss_hash_key, key,NULL);
app/test-pmd/cmdline.c cmdline_parse_inst_t cmd_config_rss_hash_key = { · line 2505
Quoted 7 lines
app/test-pmd/cmdline.c +3
-1@@ -2478,7 +2500,9 @@ cmdline_parse_inst_t cmd_config_rss_hash_key = {"ipv4|ipv4-frag|ipv4-tcp|ipv4-udp|ipv4-sctp|ipv4-other|" "ipv6|ipv6-frag|ipv6-tcp|ipv6-udp|ipv6-sctp|ipv6-other|" "l2-payload|ipv6-ex|ipv6-tcp-ex|ipv6-udp-ex|" -"l3-src-only|l3-dst-only|l4-src-only|l4-dst-only " +"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 "
I think you are missing the eth only.
Best,
Ori
Quoted 39 lines
app/test-pmd/cmdline.c +0
-0"<string of hex digits (variable length, NIC dependent)>", .tokens = { (void *)&cmd_config_rss_hash_key_port,app/test-pmd/config.c +12
-4@@ -75,10 +75,15 @@ static const struct { };const struct rss_type_info rss_type_table[] = { - {"all" ,ETH_RSS_IP |ETH_RSS_TCP | -ETH_RSS_UDP |ETH_RSS_SCTP | -ETH_RSS_L2_PAYLOAD }, + {"all" ,ETH_RSS_ETH |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 }, {"none" ,0 }, + {"eth" ,ETH_RSS_ETH }, + {"l2-src-only" ,ETH_RSS_L2_SRC_ONLY }, + {"l2-dst-only" ,ETH_RSS_L2_DST_ONLY }, + {"s-vlan" ,ETH_RSS_S_VLAN }, + {"c-vlan" ,ETH_RSS_C_VLAN }, {"ipv4" ,ETH_RSS_IPV4 }, {"ipv4-frag" ,ETH_RSS_FRAG_IPV4 }, {"ipv4-tcp" ,ETH_RSS_NONFRAG_IPV4_TCP },@@ -108,6 +113,10 @@ const struct rss_type_info rss_type_table[] = { { "l3-dst-only", ETH_RSS_L3_DST_ONLY }, { "l4-src-only", ETH_RSS_L4_SRC_ONLY }, { "l4-dst-only", ETH_RSS_L4_DST_ONLY }, + { "l2tpv3", ETH_RSS_L2TPV3 }, + { "esp", ETH_RSS_ESP }, + { "ah", ETH_RSS_AH }, + { "pfcp", ETH_RSS_PFCP }, { NULL, 0 }, }; --2.20.1
Re: [dpdk-dev] [dpdk-dev v6 3/3] app/testpmd: add new types to RSS hash commands
hi, Ori
Quoted 89 lines · Ori Kam
Hi Jeff,
Quoted 87 lines
-----Original Message-----
From: Jeff Guo <[email protected]>
Sent: Thursday, April 16, 2020 10:20 PM
To: [email protected]; Ori Kam <[email protected]>; [email protected]; [email protected]
Cc: [email protected]; [email protected]; [email protected]; [email protected]; [email protected]
Subject: [dpdk-dev v6 3/3] app/testpmd: add new types to RSS hash commandsAdd some new types, such as eth/l2-src-only/l2-dst-only/svlan/cvlan/ l2tpv3/esp/ah/pfcp types into RSS hash commands, it could be used to configure these rss input set by cmdline.
Example testpmd commands was:
testpmd>flow create 0 ingress pattern eth / ipv4 / l2tpv3oip / end \
actions rss types l2tpv3 endkey_len0 queues end / endSigned-off-by Jeff Guo <[email protected]>---
v6->v5:
add some missing part and refine commit log--- app/test-pmd/cmdline.c | 34 +++++++++++++++++++++++++++++----- app/test-pmd/config.c | 15 ++++++++++++--- 2 files changed, 41 insertions(+), 8 deletions(-)app/test-pmd/cmdline.c +3
-3@@ -2270,9 +2270,13 @@ cmd_config_rss_parsed(void *parsed_result,int ret;if (!strcmp (res->value,"all" )) - rss_conf.rss_hf =ETH_RSS_IP |ETH_RSS_TCP | -ETH_RSS_UDP |ETH_RSS_SCTP | -ETH_RSS_L2_PAYLOAD ; + rss_conf.rss_hf =ETH_RSS_ETH |ETH_RSS_S_VLAN | +ETH_RSS_C_VLAN |ETH_RSS_IP |ETH_RSS_TCP | + ETH_RSS_UDP | ETH_RSS_SCTP |
ETH_RSS_L2_PAYLOAD|app/test-pmd/cmdline.c +20
-0+ETH_RSS_L2TPV3 |ETH_RSS_ESP |ETH_RSS_AH | +ETH_RSS_PFCP ; + else if (!strcmp(res->value, "eth")) + rss_conf.rss_hf =ETH_RSS_ETH ; else if (!strcmp(res->value, "ip")) rss_conf.rss_hf =ETH_RSS_IP ; else if (!strcmp(res->value, "udp"))@@ -2299,6 +2303,22 @@ cmd_config_rss_parsed(void *parsed_result, rss_conf.rss_hf =ETH_RSS_L4_SRC_ONLY ; else if (!strcmp(res->value, "l4-dst-only")) rss_conf.rss_hf =ETH_RSS_L4_DST_ONLY ; + else if (!strcmp(res->value, "l2-src-only")) + rss_conf.rss_hf =ETH_RSS_L2_SRC_ONLY ; + else if (!strcmp(res->value, "l2-dst-only")) + rss_conf.rss_hf =ETH_RSS_L2_DST_ONLY ; + else if (!strcmp(res->value, "s-vlan")) + rss_conf.rss_hf =ETH_RSS_S_VLAN ; + else if (!strcmp(res->value, "c-vlan")) + rss_conf.rss_hf =ETH_RSS_C_VLAN ; + else if (!strcmp(res->value, "l2tpv3")) + rss_conf.rss_hf =ETH_RSS_L2TPV3 ; + else if (!strcmp(res->value, "esp")) + rss_conf.rss_hf =ETH_RSS_ESP ; + else if (!strcmp(res->value, "ah")) + rss_conf.rss_hf =ETH_RSS_AH ; + else if (!strcmp(res->value, "pfcp")) + rss_conf.rss_hf =ETH_RSS_PFCP ; else if (!strcmp(res->value, "none")) rss_conf.rss_hf =0 ; else if (!strcmp(res->value, "default"))@@ -2467,7 +2487,9 @@ cmdline_parse_token_string_t
cmd_config_rss_hash_key_rss_type=
"ipv4-other#ipv6#ipv6-frag#ipv6-tcp#ipv6-
udp#"
"ipv6-sctp#ipv6-other#l2-payload#ipv6-ex#" "ipv6-tcp-ex#ipv6-udp-ex#"app/test-pmd/cmdline.c +0
-1- "l3-src-only#l3-dst-only#l4-src-only#l4-dst-only");
app/test-pmd/cmdline.c +1
-0+ "l3-src-only#l3-dst-only#l4-src-only#l4-dst-only#"
app/test-pmd/cmdline.c +2
-0+"l2-src-only#l2-dst-only#s-vlan#c-vlan#" + "l2tpv3#esp#ah#pfcp");cmdline_parse_token_string_t cmd_config_rss_hash_key_value = TOKEN_STRING_INITIALIZER(struct cmd_config_rss_hash_key, key,NULL);
Quoted 9 lines
app/test-pmd/cmdline.c cmdline_parse_inst_t cmd_config_rss_hash_key = { · line 2505
Quoted 8 lines
app/test-pmd/cmdline.c +3
-1@@ -2478,7 +2500,9 @@ cmdline_parse_inst_t cmd_config_rss_hash_key = {"ipv4|ipv4-frag|ipv4-tcp|ipv4-udp|ipv4-sctp|ipv4-other|" "ipv6|ipv6-frag|ipv6-tcp|ipv6-udp|ipv6-sctp|ipv6-other|" "l2-payload|ipv6-ex|ipv6-tcp-ex|ipv6-udp-ex|" -"l3-src-only|l3-dst-only|l4-src-only|l4-dst-only " +"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 " I think you are missing the eth only.
oh, a missing one here, thanks Ori.
Quoted 43 lines
Best,
OriQuoted 39 lines
app/test-pmd/cmdline.c +0
-0"<string of hex digits (variable length, NIC dependent)>", .tokens = { (void *)&cmd_config_rss_hash_key_port,app/test-pmd/config.c +12
-4@@ -75,10 +75,15 @@ static const struct { };const struct rss_type_info rss_type_table[] = { - {"all" ,ETH_RSS_IP |ETH_RSS_TCP | -ETH_RSS_UDP |ETH_RSS_SCTP | -ETH_RSS_L2_PAYLOAD }, + {"all" ,ETH_RSS_ETH |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 }, {"none" ,0 }, + {"eth" ,ETH_RSS_ETH }, + {"l2-src-only" ,ETH_RSS_L2_SRC_ONLY }, + {"l2-dst-only" ,ETH_RSS_L2_DST_ONLY }, + {"s-vlan" ,ETH_RSS_S_VLAN }, + {"c-vlan" ,ETH_RSS_C_VLAN }, {"ipv4" ,ETH_RSS_IPV4 }, {"ipv4-frag" ,ETH_RSS_FRAG_IPV4 }, {"ipv4-tcp" ,ETH_RSS_NONFRAG_IPV4_TCP },@@ -108,6 +113,10 @@ const struct rss_type_info rss_type_table[] = { { "l3-dst-only", ETH_RSS_L3_DST_ONLY }, { "l4-src-only", ETH_RSS_L4_SRC_ONLY }, { "l4-dst-only", ETH_RSS_L4_DST_ONLY }, + { "l2tpv3", ETH_RSS_L2TPV3 }, + { "esp", ETH_RSS_ESP }, + { "ah", ETH_RSS_AH }, + { "pfcp", ETH_RSS_PFCP }, { NULL, 0 }, }; --2.20.1
Re: [dpdk-dev] [dpdk-dev v6 3/3] app/testpmd: add new types to RSS hash commands
In reply to Jeff GuoHi Jeff,
Quoted 20 lines
-----Original Message-----
From: Guo, Jia <[email protected]>
Sent: Thursday, April 16, 2020 8:20 PM
To: Iremonger, Bernard <[email protected]>; [email protected]; Ye, Xiaolong <[email protected]>; Zhang, Qi Z <[email protected]>
Cc: [email protected]; Wu, Jingjing <[email protected]>; Cao, Yahui <[email protected]>; Su, Simei <[email protected]>; Guo, Jia <[email protected]>
Subject: [dpdk-dev v6 3/3] app/testpmd: add new types to RSS hash commandsAdd some new types, such as eth/l2-src-only/l2-dst-only/svlan/cvlan/ l2tpv3/esp/ah/pfcp types into RSS hash commands, it could be used to configure these rss input set by cmdline.
Example testpmd commands was:
testpmd>flow create 0 ingress pattern eth / ipv4 / l2tpv3oip / end \
actions rss types l2tpv3 endkey_len0 queues end / end
Quoted 9 lines
Signed-off-by Jeff Guo <[email protected]>---
v6->v5:
add some missing part and refine commit log--- app/test-pmd/cmdline.c | 34 +++++++++++++++++++++++++++++----- app/test-pmd/config.c | 15 ++++++++++++--- 2 files changed, 41 insertions(+), 8 deletions(-)
The dpdk/doc/guides/testpmd_app_ug/testpmd_funcs.rst file needs to be updated for the new RSS values. Section 4.6.16. port config -RSS
Quoted 106 lines
app/test-pmd/cmdline.c index renamed from app/test-pmd/cmdline.c +0
-0
863b567c1..4164767b8100644app/test-pmd/cmdline.c +3
-3@@ -2270,9 +2270,13 @@ cmd_config_rss_parsed(void *parsed_result,int ret;if (!strcmp (res->value,"all" )) - rss_conf.rss_hf =ETH_RSS_IP |ETH_RSS_TCP | -ETH_RSS_UDP |ETH_RSS_SCTP | -ETH_RSS_L2_PAYLOAD ; + rss_conf.rss_hf =ETH_RSS_ETH |ETH_RSS_S_VLAN | +ETH_RSS_C_VLAN |ETH_RSS_IP |ETH_RSS_TCP | + ETH_RSS_UDP | ETH_RSS_SCTP |
ETH_RSS_L2_PAYLOAD|app/test-pmd/cmdline.c +20
-0+ETH_RSS_L2TPV3 |ETH_RSS_ESP |ETH_RSS_AH | +ETH_RSS_PFCP ; + else if (!strcmp(res->value, "eth")) + rss_conf.rss_hf =ETH_RSS_ETH ; else if (!strcmp(res->value, "ip")) rss_conf.rss_hf =ETH_RSS_IP ; else if (!strcmp(res->value, "udp"))@@ -2299,6 +2303,22 @@ cmd_config_rss_parsed(void *parsed_result, rss_conf.rss_hf =ETH_RSS_L4_SRC_ONLY ; else if (!strcmp(res->value, "l4-dst-only")) rss_conf.rss_hf =ETH_RSS_L4_DST_ONLY ; + else if (!strcmp(res->value, "l2-src-only")) + rss_conf.rss_hf =ETH_RSS_L2_SRC_ONLY ; + else if (!strcmp(res->value, "l2-dst-only")) + rss_conf.rss_hf =ETH_RSS_L2_DST_ONLY ; + else if (!strcmp(res->value, "s-vlan")) + rss_conf.rss_hf =ETH_RSS_S_VLAN ; + else if (!strcmp(res->value, "c-vlan")) + rss_conf.rss_hf =ETH_RSS_C_VLAN ; + else if (!strcmp(res->value, "l2tpv3")) + rss_conf.rss_hf =ETH_RSS_L2TPV3 ; + else if (!strcmp(res->value, "esp")) + rss_conf.rss_hf =ETH_RSS_ESP ; + else if (!strcmp(res->value, "ah")) + rss_conf.rss_hf =ETH_RSS_AH ; + else if (!strcmp(res->value, "pfcp")) + rss_conf.rss_hf =ETH_RSS_PFCP ; else if (!strcmp(res->value, "none")) rss_conf.rss_hf =0 ; else if (!strcmp(res->value, "default")) @@ -2467,7 +2487,9 @@
cmdline_parse_token_string_tcmd_config_rss_hash_key_rss_type=
"ipv4-other#ipv6#ipv6-frag#ipv6-tcp#ipv6-
udp#"app/test-pmd/cmdline.c +0
-1"ipv6-sctp#ipv6-other#l2-payload#ipv6-ex#" "ipv6-tcp-ex#ipv6-udp-ex#" - "l3-src-only#l3-dst-only#l4-src-only#l4-dst-only");
app/test-pmd/cmdline.c +1
-0+ "l3-src-only#l3-dst-only#l4-src-only#l4-dst-only#"
app/test-pmd/cmdline.c +2
-0+"l2-src-only#l2-dst-only#s-vlan#c-vlan#" + "l2tpv3#esp#ah#pfcp");cmdline_parse_token_string_t cmd_config_rss_hash_key_value = TOKEN_STRING_INITIALIZER(struct cmd_config_rss_hash_key, key,NULL);
app/test-pmd/cmdline.c +3
-1@@ -2478,7 +2500,9 @@ cmdline_parse_inst_t cmd_config_rss_hash_key = {"ipv4|ipv4-frag|ipv4-tcp|ipv4-udp|ipv4-sctp|ipv4-other|" "ipv6|ipv6-frag|ipv6-tcp|ipv6-udp|ipv6-sctp|ipv6-other|" "l2-payload|ipv6-ex|ipv6-tcp-ex|ipv6-udp-ex|" -"l3-src-only|l3-dst-only|l4-src-only|l4-dst-only " +"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 " "<string of hex digits (variable length, NIC dependent)>", .tokens = {(void *)&cmd_config_rss_hash_key_port, diff --git
a/app/test-pmd/config.cb/app/test-pmd/config.cindex71aeb5413..c8196e47a100644app/test-pmd/config.c +8
-3@@ -75,10 +75,15 @@ static const struct { }; const struct rss_type_info rss_type_table[] = { - { "all", ETH_RSS_IP | ETH_RSS_TCP | - ETH_RSS_UDP | ETH_RSS_SCTP | - ETH_RSS_L2_PAYLOAD }, + { "all", ETH_RSS_ETH | 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}, { "none", 0 }, + { "eth", ETH_RSS_ETH }, + { "l2-src-only", ETH_RSS_L2_SRC_ONLY }, + { "l2-dst-only", ETH_RSS_L2_DST_ONLY }, + { "s-vlan", ETH_RSS_S_VLAN }, + { "c-vlan", ETH_RSS_C_VLAN }, { "ipv4", ETH_RSS_IPV4 }, { "ipv4-frag", ETH_RSS_FRAG_IPV4 }, { "ipv4-tcp", ETH_RSS_NONFRAG_IPV4_TCP }, @@ -108,6 +113,10 @@ const struct rss_type_info rss_type_table[] = {app/test-pmd/config.c +4
-1{ "l3-dst-only", ETH_RSS_L3_DST_ONLY }, { "l4-src-only", ETH_RSS_L4_SRC_ONLY }, { "l4-dst-only", ETH_RSS_L4_DST_ONLY }, + { "l2tpv3", ETH_RSS_L2TPV3 }, + { "esp", ETH_RSS_ESP }, + { "ah", ETH_RSS_AH }, + { "pfcp", ETH_RSS_PFCP }, { NULL, 0 }, }; --
Quoted 1 line
2.20.1
Regards,
Bernard.
Re: [dpdk-dev] [dpdk-dev v6 3/3] app/testpmd: add new types to RSS hash commands
hi, bernard
Quoted 31 lines · Bernard
Hi Jeff,
Quoted 20 lines
-----Original Message-----
From: Guo, Jia <[email protected]>
Sent: Thursday, April 16, 2020 8:20 PM
To: Iremonger, Bernard <[email protected]>; [email protected]; Ye, Xiaolong <[email protected]>; Zhang, Qi Z <[email protected]>
Cc: [email protected]; Wu, Jingjing <[email protected]>; Cao, Yahui <[email protected]>; Su, Simei <[email protected]>; Guo, Jia <[email protected]>
Subject: [dpdk-dev v6 3/3] app/testpmd: add new types to RSS hash commandsAdd some new types, such as eth/l2-src-only/l2-dst-only/svlan/cvlan/ l2tpv3/esp/ah/pfcp types into RSS hash commands, it could be used to configure these rss input set by cmdline.
Example testpmd commands was:
testpmd>flow create 0 ingress pattern eth / ipv4 / l2tpv3oip / end \
actions rss types l2tpv3 endkey_len0 queues end / endQuoted 9 lines
Signed-off-by Jeff Guo <[email protected]>---
v6->v5:
add some missing part and refine commit log--- app/test-pmd/cmdline.c | 34 +++++++++++++++++++++++++++++----- app/test-pmd/config.c | 15 ++++++++++++--- 2 files changed, 41 insertions(+), 8 deletions(-)
Quoted 2 lines
The
dpdk/doc/guides/testpmd_app_ug/testpmd_funcs.rstfile needs to be updated for the new RSS values. Section 4.6.16. port config -RSS
ok, i think the doc is definitely need, and also the rss rule flow setting. please expect it in the next version. Thanks.
Quoted 110 lines
Quoted 106 lines
app/test-pmd/cmdline.c index renamed from app/test-pmd/cmdline.c +0
-0
863b567c1..4164767b8100644app/test-pmd/cmdline.c +3
-3@@ -2270,9 +2270,13 @@ cmd_config_rss_parsed(void *parsed_result,int ret;if (!strcmp (res->value,"all" )) -rss_conf.rss_hf =ETH_RSS_IP |ETH_RSS_TCP | -ETH_RSS_UDP |ETH_RSS_SCTP | -ETH_RSS_L2_PAYLOAD ; +rss_conf.rss_hf =ETH_RSS_ETH |ETH_RSS_S_VLAN | +ETH_RSS_C_VLAN |ETH_RSS_IP |ETH_RSS_TCP | +ETH_RSS_UDP | ETH_RSS_SCTP |
ETH_RSS_L2_PAYLOAD|app/test-pmd/cmdline.c +20
-0+ETH_RSS_L2TPV3 |ETH_RSS_ESP |ETH_RSS_AH | +ETH_RSS_PFCP ; +else if (!strcmp(res->value, "eth")) +rss_conf.rss_hf =ETH_RSS_ETH ; else if (!strcmp(res->value, "ip")) rss_conf.rss_hf =ETH_RSS_IP ; else if (!strcmp(res->value, "udp"))@@ -2299,6 +2303,22 @@ cmd_config_rss_parsed(void *parsed_result, rss_conf.rss_hf =ETH_RSS_L4_SRC_ONLY ; else if (!strcmp(res->value, "l4-dst-only")) rss_conf.rss_hf =ETH_RSS_L4_DST_ONLY ; +else if (!strcmp(res->value, "l2-src-only")) +rss_conf.rss_hf =ETH_RSS_L2_SRC_ONLY ; +else if (!strcmp(res->value, "l2-dst-only")) +rss_conf.rss_hf =ETH_RSS_L2_DST_ONLY ; +else if (!strcmp(res->value, "s-vlan")) +rss_conf.rss_hf =ETH_RSS_S_VLAN ; +else if (!strcmp(res->value, "c-vlan")) +rss_conf.rss_hf =ETH_RSS_C_VLAN ; +else if (!strcmp(res->value, "l2tpv3")) +rss_conf.rss_hf =ETH_RSS_L2TPV3 ; +else if (!strcmp(res->value, "esp")) +rss_conf.rss_hf =ETH_RSS_ESP ; +else if (!strcmp(res->value, "ah")) +rss_conf.rss_hf =ETH_RSS_AH ; +else if (!strcmp(res->value, "pfcp")) +rss_conf.rss_hf =ETH_RSS_PFCP ; else if (!strcmp(res->value, "none")) rss_conf.rss_hf =0 ; else if (!strcmp(res->value, "default")) @@ -2467,7 +2487,9 @@
cmdline_parse_token_string_tcmd_config_rss_hash_key_rss_type=
"ipv4-other#ipv6#ipv6-frag#ipv6-tcp#ipv6-
udp#"
"ipv6-sctp#ipv6-other#l2-payload#ipv6-ex#" "ipv6-tcp-ex#ipv6-udp-ex#"
- "l3-src-only#l3-dst-only#l4-src-only#l4-dst- only");
+ "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");
cmdline_parse_token_string_tcmd_config_rss_hash_key_value= TOKEN_STRING_INITIALIZER(structcmd_config_rss_hash_key, key,
NULL);app/test-pmd/cmdline.c +3
-1@@ -2478,7 +2500,9 @@ cmdline_parse_inst_t cmd_config_rss_hash_key = {"ipv4|ipv4-frag|ipv4-tcp|ipv4-udp|ipv4-sctp|ipv4-other|" "ipv6|ipv6-frag|ipv6-tcp|ipv6-udp|ipv6-sctp|ipv6-other|" "l2-payload|ipv6-ex|ipv6-tcp-ex|ipv6-udp-ex|" -"l3-src-only|l3-dst-only|l4-src-only|l4-dst-only " +"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 " "<string of hex digits (variable length, NIC dependent)>", .tokens = {(void *)&cmd_config_rss_hash_key_port, diff --git
a/app/test-pmd/config.cb/app/test-pmd/config.cindex71aeb5413..c8196e47a100644app/test-pmd/config.c +8
-3@@ -75,10 +75,15 @@ static const struct { }; const struct rss_type_info rss_type_table[] = { -{ "all", ETH_RSS_IP | ETH_RSS_TCP | -ETH_RSS_UDP | ETH_RSS_SCTP | -ETH_RSS_L2_PAYLOAD }, +{ "all", ETH_RSS_ETH | 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}, { "none", 0 }, +{ "eth", ETH_RSS_ETH }, +{ "l2-src-only", ETH_RSS_L2_SRC_ONLY }, +{ "l2-dst-only", ETH_RSS_L2_DST_ONLY }, +{ "s-vlan", ETH_RSS_S_VLAN }, +{ "c-vlan", ETH_RSS_C_VLAN }, { "ipv4", ETH_RSS_IPV4 }, { "ipv4-frag", ETH_RSS_FRAG_IPV4 }, { "ipv4-tcp", ETH_RSS_NONFRAG_IPV4_TCP }, @@ -108,6 +113,10 @@ const struct rss_type_info rss_type_table[] = {{ "l3-dst-only",
ETH_RSS_L3_DST_ONLY},
{ "l4-src-only",ETH_RSS_L4_SRC_ONLY},
{ "l4-dst-only",ETH_RSS_L4_DST_ONLY},app/test-pmd/config.c +4
-1+{ "l2tpv3", ETH_RSS_L2TPV3 }, +{ "esp", ETH_RSS_ESP }, +{ "ah", ETH_RSS_AH }, +{ "pfcp", ETH_RSS_PFCP }, { NULL, 0 }, }; --Quoted 1 line
2.20.1
Regards,
Bernard.
Re: [dpdk-dev] [dpdk-dev v6 3/3] app/testpmd: add new types to RSS hash commands
Quoted 35 lines · Jeff Guo
hi, bernard
Quoted 31 lines · Bernard
Hi Jeff,
Quoted 29 lines
-----Original Message-----
From: Guo, Jia <[email protected]>
Sent: Thursday, April 16, 2020 8:20 PM
To: Iremonger, Bernard <[email protected]>; [email protected]; Ye, Xiaolong <[email protected]>; Zhang, Qi Z <[email protected]>
Cc: [email protected]; Wu, Jingjing <[email protected]>; Cao, Yahui <[email protected]>; Su, Simei <[email protected]>; Guo, Jia <[email protected]>
Subject: [dpdk-dev v6 3/3] app/testpmd: add new types to RSS hash commandsAdd some new types, such as eth/l2-src-only/l2-dst-only/svlan/cvlan/ l2tpv3/esp/ah/pfcp types into RSS hash commands, it could be used to configure these rss input set by cmdline.
Example testpmd commands was:
testpmd>flow create 0 ingress pattern eth / ipv4 / l2tpv3oip / end \
actions rss types l2tpv3 endkey_len0 queues end / endSigned-off-by Jeff Guo <[email protected]>---
v6->v5:
add some missing part and refine commit log--- app/test-pmd/cmdline.c | 34 +++++++++++++++++++++++++++++----- app/test-pmd/config.c | 15 ++++++++++++--- 2 files changed, 41 insertions(+), 8 deletions(-)
Quoted 6 lines
Quoted 2 lines
The
dpdk/doc/guides/testpmd_app_ug/testpmd_funcs.rstfile needs to be updated for the new RSS values. Section 4.6.16. port config -RSSok, i think the doc is definitely need, and also the rss rule flow setting. please expect it in the next version. Thanks.
Hi Jeff,
I have merged Bernard's "configure RSS hash" patch already to next-net, when sending next version, can you please rebase on top of latest next-net?
Thanks,
ferruh
Quoted 112 lines
Quoted 112 lines
Quoted 108 lines
app/test-pmd/cmdline.c index renamed from app/test-pmd/cmdline.c +0
-0
863b567c1..4164767b8100644app/test-pmd/cmdline.c +3
-3@@ -2270,9 +2270,13 @@ cmd_config_rss_parsed(void *parsed_result,int ret;if (!strcmp (res->value,"all" )) -rss_conf.rss_hf =ETH_RSS_IP |ETH_RSS_TCP | -ETH_RSS_UDP |ETH_RSS_SCTP | -ETH_RSS_L2_PAYLOAD ; +rss_conf.rss_hf =ETH_RSS_ETH |ETH_RSS_S_VLAN | +ETH_RSS_C_VLAN |ETH_RSS_IP |ETH_RSS_TCP | +ETH_RSS_UDP | ETH_RSS_SCTP |
ETH_RSS_L2_PAYLOAD|app/test-pmd/cmdline.c +20
-0+ETH_RSS_L2TPV3 |ETH_RSS_ESP |ETH_RSS_AH | +ETH_RSS_PFCP ; +else if (!strcmp(res->value, "eth")) +rss_conf.rss_hf =ETH_RSS_ETH ; else if (!strcmp(res->value, "ip")) rss_conf.rss_hf =ETH_RSS_IP ; else if (!strcmp(res->value, "udp"))@@ -2299,6 +2303,22 @@ cmd_config_rss_parsed(void *parsed_result, rss_conf.rss_hf =ETH_RSS_L4_SRC_ONLY ; else if (!strcmp(res->value, "l4-dst-only")) rss_conf.rss_hf =ETH_RSS_L4_DST_ONLY ; +else if (!strcmp(res->value, "l2-src-only")) +rss_conf.rss_hf =ETH_RSS_L2_SRC_ONLY ; +else if (!strcmp(res->value, "l2-dst-only")) +rss_conf.rss_hf =ETH_RSS_L2_DST_ONLY ; +else if (!strcmp(res->value, "s-vlan")) +rss_conf.rss_hf =ETH_RSS_S_VLAN ; +else if (!strcmp(res->value, "c-vlan")) +rss_conf.rss_hf =ETH_RSS_C_VLAN ; +else if (!strcmp(res->value, "l2tpv3")) +rss_conf.rss_hf =ETH_RSS_L2TPV3 ; +else if (!strcmp(res->value, "esp")) +rss_conf.rss_hf =ETH_RSS_ESP ; +else if (!strcmp(res->value, "ah")) +rss_conf.rss_hf =ETH_RSS_AH ; +else if (!strcmp(res->value, "pfcp")) +rss_conf.rss_hf =ETH_RSS_PFCP ; else if (!strcmp(res->value, "none")) rss_conf.rss_hf =0 ; else if (!strcmp(res->value, "default")) @@ -2467,7 +2487,9 @@
cmdline_parse_token_string_tcmd_config_rss_hash_key_rss_type=
"ipv4-other#ipv6#ipv6-frag#ipv6-tcp#ipv6-
udp#"
"ipv6-sctp#ipv6-other#l2-payload#ipv6-ex#" "ipv6-tcp-ex#ipv6-udp-ex#"
- "l3-src-only#l3-dst-only#l4-src-only#l4-dst- only");
+ "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");
cmdline_parse_token_string_tcmd_config_rss_hash_key_value= TOKEN_STRING_INITIALIZER(structcmd_config_rss_hash_key, key,
NULL);app/test-pmd/cmdline.c +3
-1@@ -2478,7 +2500,9 @@ cmdline_parse_inst_t cmd_config_rss_hash_key = {"ipv4|ipv4-frag|ipv4-tcp|ipv4-udp|ipv4-sctp|ipv4-other|" "ipv6|ipv6-frag|ipv6-tcp|ipv6-udp|ipv6-sctp|ipv6-other|" "l2-payload|ipv6-ex|ipv6-tcp-ex|ipv6-udp-ex|" -"l3-src-only|l3-dst-only|l4-src-only|l4-dst-only " +"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 " "<string of hex digits (variable length, NIC dependent)>", .tokens = {(void *)&cmd_config_rss_hash_key_port, diff --git
a/app/test-pmd/config.cb/app/test-pmd/config.cindex71aeb5413..c8196e47a100644app/test-pmd/config.c +8
-3@@ -75,10 +75,15 @@ static const struct { }; const struct rss_type_info rss_type_table[] = { -{ "all", ETH_RSS_IP | ETH_RSS_TCP | -ETH_RSS_UDP | ETH_RSS_SCTP | -ETH_RSS_L2_PAYLOAD }, +{ "all", ETH_RSS_ETH | 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}, { "none", 0 }, +{ "eth", ETH_RSS_ETH }, +{ "l2-src-only", ETH_RSS_L2_SRC_ONLY }, +{ "l2-dst-only", ETH_RSS_L2_DST_ONLY }, +{ "s-vlan", ETH_RSS_S_VLAN }, +{ "c-vlan", ETH_RSS_C_VLAN }, { "ipv4", ETH_RSS_IPV4 }, { "ipv4-frag", ETH_RSS_FRAG_IPV4 }, { "ipv4-tcp", ETH_RSS_NONFRAG_IPV4_TCP }, @@ -108,6 +113,10 @@ const struct rss_type_info rss_type_table[] = {{ "l3-dst-only",
ETH_RSS_L3_DST_ONLY},
{ "l4-src-only",ETH_RSS_L4_SRC_ONLY},
{ "l4-dst-only",ETH_RSS_L4_DST_ONLY},app/test-pmd/config.c +4
-1+{ "l2tpv3", ETH_RSS_L2TPV3 }, +{ "esp", ETH_RSS_ESP }, +{ "ah", ETH_RSS_AH }, +{ "pfcp", ETH_RSS_PFCP }, { NULL, 0 }, }; --Quoted 1 line
2.20.1
Regards,
Bernard.
Re: [dpdk-dev] [dpdk-dev v6 3/3] app/testpmd: add new types to RSS hash commands
hi, ferruh
Quoted 41 lines · Ferruh Yigit
Quoted 35 lines · Jeff Guo
hi, bernard
Quoted 31 lines · Bernard
Hi Jeff,
Quoted 29 lines
-----Original Message-----
From: Guo, Jia <[email protected]>
Sent: Thursday, April 16, 2020 8:20 PM
To: Iremonger, Bernard <[email protected]>; [email protected]; Ye, Xiaolong <[email protected]>; Zhang, Qi Z <[email protected]>
Cc: [email protected]; Wu, Jingjing <[email protected]>; Cao, Yahui <[email protected]>; Su, Simei <[email protected]>; Guo, Jia <[email protected]>
Subject: [dpdk-dev v6 3/3] app/testpmd: add new types to RSS hash commandsAdd some new types, such as eth/l2-src-only/l2-dst-only/svlan/cvlan/ l2tpv3/esp/ah/pfcp types into RSS hash commands, it could be used to configure these rss input set by cmdline.
Example testpmd commands was:
testpmd>flow create 0 ingress pattern eth / ipv4 / l2tpv3oip / end \
actions rss types l2tpv3 endkey_len0 queues end / endSigned-off-by Jeff Guo <[email protected]>---
v6->v5:
add some missing part and refine commit log--- app/test-pmd/cmdline.c | 34 +++++++++++++++++++++++++++++----- app/test-pmd/config.c | 15 ++++++++++++--- 2 files changed, 41 insertions(+), 8 deletions(-)Quoted 5 lines
Quoted 2 lines
The
dpdk/doc/guides/testpmd_app_ug/testpmd_funcs.rstfile needs to be updated for the new RSS values. Section 4.6.16. port config -RSSok, i think the doc is definitely need, and also the rss rule flow setting. please expect it in the next version. Thanks.
Quoted 7 lines
Hi Jeff,
I have merged Bernard's "configure RSS hash" patch already to next-net, when sending next version, can you please rebase on top of latest next-net?
Thanks,
ferruh
Sure. Thanks.
Quoted 111 lines
Quoted 111 lines
Quoted 111 lines
Quoted 107 lines
app/test-pmd/cmdline.c index renamed from app/test-pmd/cmdline.c +0
-0
863b567c1..4164767b8100644app/test-pmd/cmdline.c +3
-3@@ -2270,9 +2270,13 @@ cmd_config_rss_parsed(void *parsed_result,int ret;if (!strcmp (res->value,"all" )) -rss_conf.rss_hf =ETH_RSS_IP |ETH_RSS_TCP | -ETH_RSS_UDP |ETH_RSS_SCTP | -ETH_RSS_L2_PAYLOAD ; +rss_conf.rss_hf =ETH_RSS_ETH |ETH_RSS_S_VLAN | +ETH_RSS_C_VLAN |ETH_RSS_IP |ETH_RSS_TCP | +ETH_RSS_UDP | ETH_RSS_SCTP |
ETH_RSS_L2_PAYLOAD|app/test-pmd/cmdline.c +20
-0+ETH_RSS_L2TPV3 |ETH_RSS_ESP |ETH_RSS_AH | +ETH_RSS_PFCP ; +else if (!strcmp(res->value, "eth")) +rss_conf.rss_hf =ETH_RSS_ETH ; else if (!strcmp(res->value, "ip")) rss_conf.rss_hf =ETH_RSS_IP ; else if (!strcmp(res->value, "udp"))@@ -2299,6 +2303,22 @@ cmd_config_rss_parsed(void *parsed_result, rss_conf.rss_hf =ETH_RSS_L4_SRC_ONLY ; else if (!strcmp(res->value, "l4-dst-only")) rss_conf.rss_hf =ETH_RSS_L4_DST_ONLY ; +else if (!strcmp(res->value, "l2-src-only")) +rss_conf.rss_hf =ETH_RSS_L2_SRC_ONLY ; +else if (!strcmp(res->value, "l2-dst-only")) +rss_conf.rss_hf =ETH_RSS_L2_DST_ONLY ; +else if (!strcmp(res->value, "s-vlan")) +rss_conf.rss_hf =ETH_RSS_S_VLAN ; +else if (!strcmp(res->value, "c-vlan")) +rss_conf.rss_hf =ETH_RSS_C_VLAN ; +else if (!strcmp(res->value, "l2tpv3")) +rss_conf.rss_hf =ETH_RSS_L2TPV3 ; +else if (!strcmp(res->value, "esp")) +rss_conf.rss_hf =ETH_RSS_ESP ; +else if (!strcmp(res->value, "ah")) +rss_conf.rss_hf =ETH_RSS_AH ; +else if (!strcmp(res->value, "pfcp")) +rss_conf.rss_hf =ETH_RSS_PFCP ; else if (!strcmp(res->value, "none")) rss_conf.rss_hf =0 ; else if (!strcmp(res->value, "default")) @@ -2467,7 +2487,9 @@
cmdline_parse_token_string_tcmd_config_rss_hash_key_rss_type="ipv4-other#ipv6#ipv6-frag#ipv6-tcp#ipv6- udp#" "ipv6-sctp#ipv6-other#l2-payload#ipv6-ex#" "ipv6-tcp-ex#ipv6-udp-ex#"- "l3-src-only#l3-dst-only#l4-src-only#l4-dst-
only");
+ "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");
cmdline_parse_token_string_tcmd_config_rss_hash_key_value= TOKEN_STRING_INITIALIZER(structcmd_config_rss_hash_key, key,
NULL);app/test-pmd/cmdline.c +3
-1@@ -2478,7 +2500,9 @@ cmdline_parse_inst_t cmd_config_rss_hash_key = {"ipv4|ipv4-frag|ipv4-tcp|ipv4-udp|ipv4-sctp|ipv4-other|" "ipv6|ipv6-frag|ipv6-tcp|ipv6-udp|ipv6-sctp|ipv6-other|" "l2-payload|ipv6-ex|ipv6-tcp-ex|ipv6-udp-ex|" -"l3-src-only|l3-dst-only|l4-src-only|l4-dst-only " +"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 " "<string of hex digits (variable length, NIC dependent)>", .tokens = {(void *)&cmd_config_rss_hash_key_port, diff --git
a/app/test-pmd/config.cb/app/test-pmd/config.cindex71aeb5413..c8196e47a100644app/test-pmd/config.c +8
-3@@ -75,10 +75,15 @@ static const struct { }; const struct rss_type_info rss_type_table[] = { -{ "all", ETH_RSS_IP | ETH_RSS_TCP | -ETH_RSS_UDP | ETH_RSS_SCTP | -ETH_RSS_L2_PAYLOAD }, +{ "all", ETH_RSS_ETH | 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}, { "none", 0 }, +{ "eth", ETH_RSS_ETH }, +{ "l2-src-only", ETH_RSS_L2_SRC_ONLY }, +{ "l2-dst-only", ETH_RSS_L2_DST_ONLY }, +{ "s-vlan", ETH_RSS_S_VLAN }, +{ "c-vlan", ETH_RSS_C_VLAN }, { "ipv4", ETH_RSS_IPV4 }, { "ipv4-frag", ETH_RSS_FRAG_IPV4 }, { "ipv4-tcp", ETH_RSS_NONFRAG_IPV4_TCP }, @@ -108,6 +113,10 @@ const struct rss_type_info rss_type_table[] = {{ "l3-dst-only", ETH_RSS_L3_DST_ONLY }, { "l4-src-only", ETH_RSS_L4_SRC_ONLY }, { "l4-dst-only", ETH_RSS_L4_DST_ONLY },app/test-pmd/config.c +4
-1+{ "l2tpv3", ETH_RSS_L2TPV3 }, +{ "esp", ETH_RSS_ESP }, +{ "ah", ETH_RSS_AH }, +{ "pfcp", ETH_RSS_PFCP }, { NULL, 0 }, }; --Quoted 1 line
2.20.1
Regards,
Bernard.
v7 cover add RSS configuration for iavf
In reply to Jeff GuoBecause the VF must be capable of configuring RSS, so add RSS configuration for iavf, VFs could add or delete a RSS rule base on the PF's capability. The supported protocol rss input set as below.
l2-src-only/
l2-dst-only/
svlan/
cvlan/
ipv4/
ipv6/
l3_src_only/
l3_dst_only/
l2tpv3/
esp/
ah/
pfcp/
gtpu down/
gtpu up/
udp/
tcp/
sctp/
use tespmd for example:
testpmd> flow create 0 ingress pattern eth / ipv4 / end actions rss types l3-src-only end key_len 0 queues end / end
use scapy for example:
Quoted 1 line
sendp(Ether(dst="00:01:23:45:67:01")/IP(src=RandIP())/Raw('x'*20),iface="ens785f1",loop=1,inter=0.3)
the expect result:
the rss hash works and the packets will go to difference queue for load balance.
This patchset depends on below patch sets. (1)http://patches.dpdk.org/project/dpdk/list/?series=8950
add generic filter support for iavf
(2)http://patches.dpdk.org/project/dpdk/list/?series=9280
iavf share code update
(3)http://patches.dpdk.org/project/dpdk/list/?series=9244
framework for advanced iAVF PMD
v7:
1.rebase and add ETH_RSS_VLAN to cover ETH_RSS_S_VLAN and ETH_RSS_C_VLAN 2.add misssing type and add change in doc for port rss configure.
v6:
1.rename some struct and type
2.use pattern hint to distingush different layer for hash 3.add some missing part and refine commit log
v5:
1.rename ETH_XXX to L2_XXX.
2.NULL checking and commit log refine.
v4:
1.refine the rss type checking
2.delete unnecessary pdu type item.
v3:
1.refince rss offload types.
2.add doc in release note
3.refine some naming base on virtchnl definition.
4.move gtp pdu index from normal to special.
v2:
1.refine some rte eth rss offload types.
2.add NAT T ESP and refine gtpu down/up
3.reference some fixing patch from pf side.
Jeff Guo (3):
ethdev: add new RSS offload types
net/iavf: add RSS configuration for VFs
app/testpmd: add new types to RSS hash commands
app/test-pmd/cmdline.c | 34 +- app/test-pmd/config.c | 14 +- doc/guides/rel_notes/release_20_05.rst | 2 + doc/guides/testpmd_app_ug/testpmd_funcs.rst | 2 +- drivers/net/iavf/Makefile | 1 + drivers/net/iavf/iavf.h | 2 + drivers/net/iavf/iavf_hash.c | 1053 +++++++++++++++++++ drivers/net/iavf/iavf_vchnl.c | 33 +- drivers/net/iavf/meson.build | 1 + lib/librte_ethdev/rte_ethdev.h | 17 +- 10 files changed, 1141 insertions(+), 18 deletions(-) create mode 100644 drivers/net/iavf/iavf_hash.c
Signature · 1 line
2.20.1
PATCH v7 1/3 ethdev: add new RSS offload types
Defines some new RSS offload types for ETH/S_VLAN/C_VLAN/L2TPV3/ /PFCP/L2_SRC_ONLY/L2_DST_ONLY.
---v7->v6:
rebase and add ETH_RSS_VLAN to cover ETH_RSS_S_VLAN and ETH_RSS_C_VLAN
--- lib/librte_ethdev/rte_ethdev.h | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-)
lib/librte_ethdev/rte_ethdev.h +14 -3
@@ -511,8 +511,13 @@ struct rte_eth_rss_conf {#define ETH_RSS_GENEVE (1ULL << 20)#define ETH_RSS_NVGRE (1ULL << 21)#define ETH_RSS_GTPU (1ULL << 23) -#define ETH_RSS_ESP (1ULL << 27) -#define ETH_RSS_AH (1ULL << 28) +#define ETH_RSS_ETH (1ULL << 24) +#define ETH_RSS_S_VLAN (1ULL << 25) +#define ETH_RSS_C_VLAN (1ULL << 26) +#define ETH_RSS_ESP (1ULL << 27) +#define ETH_RSS_AH (1ULL << 28) +#define ETH_RSS_L2TPV3 (1ULL << 29) +#define ETH_RSS_PFCP (1ULL << 30)/*
@@ -527,7 +532,9 @@ struct rte_eth_rss_conf {#define ETH_RSS_L3_SRC_ONLY (1ULL << 63)#define ETH_RSS_L3_DST_ONLY (1ULL << 62)#define ETH_RSS_L4_SRC_ONLY (1ULL << 61) -#define ETH_RSS_L4_DST_ONLY (1ULL << 60) +#define ETH_RSS_L4_DST_ONLY (1ULL << 60) +#define ETH_RSS_L2_SRC_ONLY (1ULL << 59) +#define ETH_RSS_L2_DST_ONLY (1ULL << 58)/** * For input set change of hash filter, if SRC_ONLY and DST_ONLY of
@@ -579,6 +586,10 @@ rte_eth_rss_hf_refine(uint64_t rss_hf) ETH_RSS_GENEVE | \ ETH_RSS_NVGRE) +#define ETH_RSS_VLAN ( \ + ETH_RSS_S_VLAN | \ + ETH_RSS_C_VLAN) +/**< Mask of valid RSS hash protocols */ #define ETH_RSS_PROTO_MASK ( \ ETH_RSS_IPV4 | \
Signature · 1 line
2.20.1
Re: [dpdk-dev] [dpdk-dev v7 1/3] ethdev: add new RSS offload types
Quoted 13 lines
-----Original Message-----
From: Guo, Jia <[email protected]>
Sent: Friday, April 17, 2020 7:32 PM
To: Iremonger, Bernard <[email protected]>; [email protected]; Ye, Xiaolong <[email protected]>; Zhang, Qi Z <[email protected]>
Cc: [email protected]; Wu, Jingjing <[email protected]>; Cao, Yahui <[email protected]>; Su, Simei <[email protected]>; Guo, Jia <[email protected]>
Subject: [dpdk-dev v7 1/3] ethdev: add new RSS offload types
Quoted 6 lines
Defines some new RSS offload types for ETH/S_VLAN/C_VLAN/L2TPV3/ /PFCP/L2_SRC_ONLY/L2_DST_ONLY.
Signed-off-by Jeff Guo <[email protected]>Reviewed-by Qi Zhang <[email protected]>Acked-by Ori Kam <[email protected]>
PATCH v7 2/3 net/iavf: add RSS configuration for VFs
In reply to Jeff GuoThe VF must be capable of configuring RSS. Add a virtchnl handler to parse a specific RSS configuration, and process the configuration for VFs, such as add or delete a RSS rule.
---v7->v6:
refine eth and vlan process
--- doc/guides/rel_notes/release_20_05.rst | 2 + drivers/net/iavf/Makefile | 1 + drivers/net/iavf/iavf.h | 2 + drivers/net/iavf/iavf_hash.c | 1053 ++++++++++++++++++++++++ drivers/net/iavf/iavf_vchnl.c | 33 +- drivers/net/iavf/meson.build | 1 + 6 files changed, 1087 insertions(+), 5 deletions(-) create mode 100644 drivers/net/iavf/iavf_hash.c
doc/guides/rel_notes/release_20_05.rst +2 -0
@@ -111,6 +111,8 @@ New Features Update the Intel iavf driver with new features and improvements, including: * Added generic filter support. + * Added advanced RSS configuration for VFs. + * **Added a new driver for Intel Foxville I225 devices.**
drivers/net/iavf/Makefile +1 -0
@@ -24,6 +24,7 @@ SRCS-$(CONFIG_RTE_LIBRTE_IAVF_PMD) += iavf_ethdev.c SRCS-$(CONFIG_RTE_LIBRTE_IAVF_PMD) += iavf_vchnl.c SRCS-$(CONFIG_RTE_LIBRTE_IAVF_PMD) += iavf_rxtx.c SRCS-$(CONFIG_RTE_LIBRTE_IAVF_PMD) += iavf_generic_flow.c +SRCS-$(CONFIG_RTE_LIBRTE_IAVF_PMD) += iavf_hash.c ifeq ($(CONFIG_RTE_ARCH_X86), y) SRCS-$(CONFIG_RTE_LIBRTE_IAVF_PMD) += iavf_rxtx_vec_sse.c endif
drivers/net/iavf/iavf.h +2 -0
@@ -252,4 +252,6 @@ int iavf_config_promisc(struct iavf_adapter *adapter, bool enable_unicast,int iavf_add_del_eth_addr (struct iavf_adapter *adapter,struct rte_ether_addr *addr,bool add);int iavf_add_del_vlan (struct iavf_adapter *adapter,uint16_t vlanid,bool add); +int iavf_add_del_rss_cfg (struct iavf_adapter *adapter, +struct virtchnl_rss_cfg *rss_cfg,bool add);#endif /* _IAVF_ETHDEV_H_ */
drivers/net/iavf/iavf_hash.c new file +1053 -0
1,053 lines not on this page · raw message
drivers/net/iavf/iavf_vchnl.c +28 -5
@@ -335,12 +335,9 @@ iavf_get_vf_resource(struct iavf_adapter *adapter) args.out_buffer = vf->aq_resp; args.out_size =IAVF_AQ_BUF_SZ ; -/* TODO: basic offload capabilities, need to -* add advanced/optional offload capabilities -*/ - caps =IAVF_BASIC_OFFLOAD_CAPS |VIRTCHNL_VF_CAP_ADV_LINK_SPEED | -VIRTCHNL_VF_OFFLOAD_RX_FLEX_DESC ; +VIRTCHNL_VF_OFFLOAD_RX_FLEX_DESC | +VIRTCHNL_VF_OFFLOAD_ADV_RSS_PF ; args.in_args = (uint8_t *)∩︀ args.in_args_size =sizeof (caps);
@@ -855,3 +852,29 @@ iavf_add_del_vlan(struct iavf_adapter *adapter, uint16_t vlanid, bool add)return err; } + +int +iavf_add_del_rss_cfg (struct iavf_adapter *adapter, +struct virtchnl_rss_cfg *rss_cfg,bool add) +{ +struct iavf_info *vf =IAVF_DEV_PRIVATE_TO_VF (adapter); +struct iavf_cmd_info args; +int err; + +memset (&args,0 ,sizeof (args)); + args.ops = add ?VIRTCHNL_OP_ADD_RSS_CFG : +VIRTCHNL_OP_DEL_RSS_CFG ; + args.in_args = (u8 *)rss_cfg; + args.in_args_size =sizeof (*rss_cfg); + args.out_buffer = vf->aq_resp; + args.out_size =IAVF_AQ_BUF_SZ ; + + err =iavf_execute_vf_cmd (adapter, &args); +if (err) +PMD_DRV_LOG (ERR , +"Failed to execute command of %s" , + add ?"OP_ADD_RSS_CFG" : +"OP_DEL_RSS_INPUT_CFG" ); + +return err; +}
drivers/net/iavf/meson.build +1 -0
@@ -11,6 +11,7 @@ sources = files( 'iavf_rxtx.c', 'iavf_vchnl.c', 'iavf_generic_flow.c', + 'iavf_hash.c', ) if arch_subdir == 'x86'
Signature · 1 line
2.20.1
PATCH v7 3/3 app/testpmd: add new types to RSS hash commands
In reply to Jeff GuoAdd some new types, such as eth/l2-src-only/l2-dst-only/svlan/cvlan/ l2tpv3/esp/ah/pfcp types into RSS hash commands, it could be used to configure these rss input set by cmdline.
Example flow commands was:
testpmd>flow create 0 ingress pattern eth / ipv4 / l2tpv3oip / end \
actions rss types l2tpv3 end key_len 0 queues end / end
port config commands was:
testpmd>port config all rss l2tpv3
---v7->v6:
add missing type
add change in doc for port rss configure
--- app/test-pmd/cmdline.c | 34 +++++++++++++++++---- app/test-pmd/config.c | 14 +++++++-- doc/guides/testpmd_app_ug/testpmd_funcs.rst | 2 +- 3 files changed, 40 insertions(+), 10 deletions(-)
app/test-pmd/cmdline.c +28 -6
@@ -2270,9 +2270,14 @@ cmd_config_rss_parsed(void *parsed_result,int ret;if (!strcmp (res->value,"all" )) - rss_conf.rss_hf =ETH_RSS_IP |ETH_RSS_TCP | -ETH_RSS_UDP |ETH_RSS_SCTP | -ETH_RSS_L2_PAYLOAD ; + 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 ; +else if (!strcmp (res->value,"eth" )) + rss_conf.rss_hf =ETH_RSS_ETH ; +else if (!strcmp (res->value,"vlan" )) + rss_conf.rss_hf =ETH_RSS_VLAN ;else if (!strcmp (res->value,"ip" )) rss_conf.rss_hf =ETH_RSS_IP ;else if (!strcmp (res->value,"udp" ))
@@ -2299,6 +2304,18 @@ cmd_config_rss_parsed(void *parsed_result, rss_conf.rss_hf =ETH_RSS_L4_SRC_ONLY ; else if (!strcmp(res->value, "l4-dst-only")) rss_conf.rss_hf =ETH_RSS_L4_DST_ONLY ; + else if (!strcmp(res->value, "l2-src-only")) + rss_conf.rss_hf =ETH_RSS_L2_SRC_ONLY ; + else if (!strcmp(res->value, "l2-dst-only")) + rss_conf.rss_hf =ETH_RSS_L2_DST_ONLY ; + else if (!strcmp(res->value, "l2tpv3")) + rss_conf.rss_hf =ETH_RSS_L2TPV3 ; + else if (!strcmp(res->value, "esp")) + rss_conf.rss_hf =ETH_RSS_ESP ; + else if (!strcmp(res->value, "ah")) + rss_conf.rss_hf =ETH_RSS_AH ; + else if (!strcmp(res->value, "pfcp")) + rss_conf.rss_hf =ETH_RSS_PFCP ; else if (!strcmp(res->value, "none")) rss_conf.rss_hf =0 ; else if (!strcmp(res->value, "default"))
@@ -2359,7 +2376,8 @@ cmdline_parse_inst_t cmd_config_rss = { .f = cmd_config_rss_parsed, .data = NULL, .help_str = "port config all rss " - "all|default|ip|tcp|udp|sctp|ether|port|vxlan|geneve|nvgre|vxlan-gpe|none|<flowtype_id>", + "all|default|eth|vlan|ip|tcp|udp|sctp|ether|port|vxlan|geneve|" + "nvgre|vxlan-gpe|l2tpv3|esp|ah|pfcp|none|<flowtype_id>", .tokens = { (void *)&cmd_config_rss_port, (void *)&cmd_config_rss_keyword,
@@ -2469,7 +2487,9 @@ cmdline_parse_token_string_t cmd_config_rss_hash_key_rss_type ="ipv4-other#ipv6#ipv6-frag#ipv6-tcp#ipv6-udp#" "ipv6-sctp#ipv6-other#l2-payload#ipv6-ex#" "ipv6-tcp-ex#ipv6-udp-ex#" - "l3-src-only#l3-dst-only#l4-src-only#l4-dst-only"); +"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");cmdline_parse_token_string_t cmd_config_rss_hash_key_value = TOKEN_STRING_INITIALIZER(struct cmd_config_rss_hash_key, key, NULL);
@@ -2480,7 +2500,9 @@ cmdline_parse_inst_t cmd_config_rss_hash_key = {"ipv4|ipv4-frag|ipv4-tcp|ipv4-udp|ipv4-sctp|ipv4-other|" "ipv6|ipv6-frag|ipv6-tcp|ipv6-udp|ipv6-sctp|ipv6-other|" "l2-payload|ipv6-ex|ipv6-tcp-ex|ipv6-udp-ex|" -"l3-src-only|l3-dst-only|l4-src-only|l4-dst-only " +"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 " "<string of hex digits (variable length, NIC dependent)>", .tokens = { (void *)&cmd_config_rss_hash_key_port,
app/test-pmd/config.c +11 -3
@@ -75,10 +75,16 @@ static const struct { };const struct rss_type_info rss_type_table[] = { - {"all" ,ETH_RSS_IP |ETH_RSS_TCP | -ETH_RSS_UDP |ETH_RSS_SCTP | -ETH_RSS_L2_PAYLOAD }, + {"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 }, {"none" ,0 }, + {"eth" ,ETH_RSS_ETH }, + {"l2-src-only" ,ETH_RSS_L2_SRC_ONLY }, + {"l2-dst-only" ,ETH_RSS_L2_DST_ONLY }, + {"vlan" ,ETH_RSS_VLAN }, + {"s-vlan" ,ETH_RSS_S_VLAN }, + {"c-vlan" ,ETH_RSS_C_VLAN }, {"ipv4" ,ETH_RSS_IPV4 }, {"ipv4-frag" ,ETH_RSS_FRAG_IPV4 }, {"ipv4-tcp" ,ETH_RSS_NONFRAG_IPV4_TCP },
@@ -110,6 +116,8 @@ const struct rss_type_info rss_type_table[] = { { "l4-dst-only", ETH_RSS_L4_DST_ONLY }, { "esp", ETH_RSS_ESP }, { "ah", ETH_RSS_AH }, + { "l2tpv3", ETH_RSS_L2TPV3 }, + { "pfcp", ETH_RSS_PFCP }, { NULL, 0 }, };
doc/guides/testpmd_app_ug/testpmd_funcs.rst +1 -1
@@ -2199,7 +2199,7 @@ port config - RSS Set the RSS (Receive Side Scaling) mode on or off:: - testpmd> port config all rss (all|default|ip|tcp|udp|sctp|ether|port|vxlan|geneve|nvgre|vxlan-gpe|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|none) RSS is on by default.
Signature · 1 line
2.20.1
Re: [dpdk-dev] [dpdk-dev v7 3/3] app/testpmd: add new types to RSS hash commands
Quoted 22 lines
-----Original Message-----
From: Jeff Guo <[email protected]>
Sent: Friday, April 17, 2020 9:32 PM
To: [email protected]; Ori Kam <[email protected]>; [email protected]; [email protected]
Cc: [email protected]; [email protected]; [email protected]; [email protected]; [email protected]
Subject: [dpdk-dev v7 3/3] app/testpmd: add new types to RSS hash commandsAdd some new types, such as eth/l2-src-only/l2-dst-only/svlan/cvlan/ l2tpv3/esp/ah/pfcp types into RSS hash commands, it could be used to configure these rss input set by cmdline.
Example flow commands was:
testpmd>flow create 0 ingress pattern eth / ipv4 / l2tpv3oip / end \
actions rss types l2tpv3 endkey_len0 queues end / endport config commands was:
testpmd>port config all rss l2tpv3
Quoted 6 lines
Signed-off-by Jeff Guo <[email protected]>---
v7->v6:
add missing type
add change in doc for port rss configure
---
Thanks,
Ori
Quoted 141 lines
app/test-pmd/cmdline.c | 34 +++++++++++++++++---- app/test-pmd/config.c | 14 +++++++-- doc/guides/testpmd_app_ug/testpmd_funcs.rst | 2 +- 3 files changed, 40 insertions(+), 10 deletions(-)app/test-pmd/cmdline.c +1
-3@@ -2270,9 +2270,14 @@ cmd_config_rss_parsed(void *parsed_result,int ret;if (!strcmp (res->value,"all" )) - rss_conf.rss_hf =ETH_RSS_IP |ETH_RSS_TCP | -ETH_RSS_UDP |ETH_RSS_SCTP | -ETH_RSS_L2_PAYLOAD ; + rss_conf.rss_hf =ETH_RSS_ETH |ETH_RSS_VLAN |ETH_RSS_IP |
app/test-pmd/cmdline.c +2
-0+ETH_RSS_TCP |ETH_RSS_UDP |ETH_RSS_SCTP | + ETH_RSS_L2_PAYLOAD | ETH_RSS_L2TPV3 |
ETH_RSS_ESP|app/test-pmd/cmdline.c +19
-1+ETH_RSS_AH |ETH_RSS_PFCP ; + else if (!strcmp(res->value, "eth")) + rss_conf.rss_hf =ETH_RSS_ETH ; + else if (!strcmp(res->value, "vlan")) + rss_conf.rss_hf =ETH_RSS_VLAN ; else if (!strcmp(res->value, "ip")) rss_conf.rss_hf =ETH_RSS_IP ; else if (!strcmp(res->value, "udp"))@@ -2299,6 +2304,18 @@ cmd_config_rss_parsed(void *parsed_result, rss_conf.rss_hf =ETH_RSS_L4_SRC_ONLY ; else if (!strcmp(res->value, "l4-dst-only")) rss_conf.rss_hf =ETH_RSS_L4_DST_ONLY ; + else if (!strcmp(res->value, "l2-src-only")) + rss_conf.rss_hf =ETH_RSS_L2_SRC_ONLY ; + else if (!strcmp(res->value, "l2-dst-only")) + rss_conf.rss_hf =ETH_RSS_L2_DST_ONLY ; + else if (!strcmp(res->value, "l2tpv3")) + rss_conf.rss_hf =ETH_RSS_L2TPV3 ; + else if (!strcmp(res->value, "esp")) + rss_conf.rss_hf =ETH_RSS_ESP ; + else if (!strcmp(res->value, "ah")) + rss_conf.rss_hf =ETH_RSS_AH ; + else if (!strcmp(res->value, "pfcp")) + rss_conf.rss_hf =ETH_RSS_PFCP ; else if (!strcmp(res->value, "none")) rss_conf.rss_hf =0 ; else if (!strcmp(res->value, "default"))@@ -2359,7 +2376,8 @@ cmdline_parse_inst_t cmd_config_rss = { .f = cmd_config_rss_parsed, .data = NULL, .help_str ="port config all rss " - "all|default|ip|tcp|udp|sctp|ether|port|vxlan|geneve|nvgre|vxlan- gpe|none|<flowtype_id>", +" all|default|eth|vlan|ip|tcp|udp|sctp|ether|port|vxlan|geneve|" + "nvgre|vxlan-gpe|l2tpv3|esp|ah|pfcp|none|<flowtype_id>",app/test-pmd/cmdline.c +0
-0.tokens = { (void *)&cmd_config_rss_port, (void *)&cmd_config_rss_keyword,@@ -2469,7 +2487,9 @@ cmdline_parse_token_string_t
cmd_config_rss_hash_key_rss_type=
"ipv4-other#ipv6#ipv6-frag#ipv6-tcp#ipv6-
udp#"app/test-pmd/cmdline.c +0
-1"ipv6-sctp#ipv6-other#l2-payload#ipv6-ex#" "ipv6-tcp-ex#ipv6-udp-ex#" - "l3-src-only#l3-dst-only#l4-src-only#l4-dst-only");
app/test-pmd/cmdline.c +1
-0+ "l3-src-only#l3-dst-only#l4-src-only#l4-dst-only#"
app/test-pmd/cmdline.c +2
-0+"l2-src-only#l2-dst-only#s-vlan#c-vlan#" + "l2tpv3#esp#ah#pfcp");cmdline_parse_token_string_t cmd_config_rss_hash_key_value = TOKEN_STRING_INITIALIZER(struct cmd_config_rss_hash_key, key,NULL);
app/test-pmd/cmdline.c +3
-1@@ -2480,7 +2500,9 @@ cmdline_parse_inst_t cmd_config_rss_hash_key = {"ipv4|ipv4-frag|ipv4-tcp|ipv4-udp|ipv4-sctp|ipv4-other|" "ipv6|ipv6-frag|ipv6-tcp|ipv6-udp|ipv6-sctp|ipv6-other|" "l2-payload|ipv6-ex|ipv6-tcp-ex|ipv6-udp-ex|" -"l3-src-only|l3-dst-only|l4-src-only|l4-dst-only " +"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 " "<string of hex digits (variable length, NIC dependent)>", .tokens = { (void *)&cmd_config_rss_hash_key_port,app/test-pmd/config.c +9
-3@@ -75,10 +75,16 @@ static const struct { };const struct rss_type_info rss_type_table[] = { - {"all" ,ETH_RSS_IP |ETH_RSS_TCP | -ETH_RSS_UDP |ETH_RSS_SCTP | -ETH_RSS_L2_PAYLOAD }, + {"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 }, {"none" ,0 }, + {"eth" ,ETH_RSS_ETH }, + {"l2-src-only" ,ETH_RSS_L2_SRC_ONLY }, + {"l2-dst-only" ,ETH_RSS_L2_DST_ONLY }, + {"vlan" ,ETH_RSS_VLAN }, + {"s-vlan" ,ETH_RSS_S_VLAN }, + {"c-vlan" ,ETH_RSS_C_VLAN }, {"ipv4" ,ETH_RSS_IPV4 }, {"ipv4-frag" ,ETH_RSS_FRAG_IPV4 },app/test-pmd/config.c +2
-0{ "ipv4-tcp", ETH_RSS_NONFRAG_IPV4_TCP },@@ -110,6 +116,8 @@ const struct rss_type_info rss_type_table[] = { { "l4-dst-only", ETH_RSS_L4_DST_ONLY }, { "esp", ETH_RSS_ESP }, { "ah", ETH_RSS_AH }, + { "l2tpv3", ETH_RSS_L2TPV3 }, + { "pfcp", ETH_RSS_PFCP }, { NULL, 0 }, };doc/guides/testpmd_app_ug/testpmd_funcs.rst +1
-1@@ -2199,7 +2199,7 @@ port config - RSS Set the RSS (Receive Side Scaling) mode on or off:: - testpmd> port config all rss (all|default|ip|tcp|udp|sctp|ether|port|vxlan|geneve|nvgre|vxlan-gpe|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|none)
RSS is on by default.
--
2.20.1
Re: [dpdk-dev] [dpdk-dev v7 3/3] app/testpmd: add new types to RSS hash commands
In reply to Jeff GuoHi Jeff,
Quoted 170 lines
-----Original Message-----
From: Guo, Jia <[email protected]>
Sent: Friday, April 17, 2020 7:32 PM
To: Iremonger, Bernard <[email protected]>; [email protected]; Ye, Xiaolong <[email protected]>; Zhang, Qi Z <[email protected]>
Cc: [email protected]; Wu, Jingjing <[email protected]>; Cao, Yahui <[email protected]>; Su, Simei <[email protected]>; Guo, Jia <[email protected]>
Subject: [dpdk-dev v7 3/3] app/testpmd: add new types to RSS hash commandsAdd some new types, such as eth/l2-src-only/l2-dst-only/svlan/cvlan/ l2tpv3/esp/ah/pfcp types into RSS hash commands, it could be used to configure these rss input set by cmdline.
Example flow commands was:
testpmd>flow create 0 ingress pattern eth / ipv4 / l2tpv3oip / end \
actions rss types l2tpv3 endkey_len0 queues end / endport config commands was:
testpmd>port config all rss l2tpv3Signed-off-by Jeff Guo <[email protected]>---
v7->v6:
add missing type
add change in doc for port rss configure--- app/test-pmd/cmdline.c | 34 +++++++++++++++++---- app/test-pmd/config.c | 14 +++++++-- doc/guides/testpmd_app_ug/testpmd_funcs.rst | 2 +- 3 files changed, 40 insertions(+), 10 deletions(-)app/test-pmd/cmdline.c index renamed from app/test-pmd/cmdline.c +0
-0
982322c35..97cf6ee35100644app/test-pmd/cmdline.c +1
-3@@ -2270,9 +2270,14 @@ cmd_config_rss_parsed(void *parsed_result,int ret;if (!strcmp (res->value,"all" )) - rss_conf.rss_hf =ETH_RSS_IP |ETH_RSS_TCP | -ETH_RSS_UDP |ETH_RSS_SCTP | -ETH_RSS_L2_PAYLOAD ; + rss_conf.rss_hf = ETH_RSS_ETH | ETH_RSS_VLAN |
ETH_RSS_IP|app/test-pmd/cmdline.c +2
-0+ETH_RSS_TCP |ETH_RSS_UDP |ETH_RSS_SCTP | + ETH_RSS_L2_PAYLOAD | ETH_RSS_L2TPV3 |
ETH_RSS_ESP|app/test-pmd/cmdline.c +17
-0+ETH_RSS_AH |ETH_RSS_PFCP ; + else if (!strcmp(res->value, "eth")) + rss_conf.rss_hf =ETH_RSS_ETH ; + else if (!strcmp(res->value, "vlan")) + rss_conf.rss_hf =ETH_RSS_VLAN ; else if (!strcmp(res->value, "ip")) rss_conf.rss_hf =ETH_RSS_IP ; else if (!strcmp(res->value, "udp"))@@ -2299,6 +2304,18 @@ cmd_config_rss_parsed(void *parsed_result, rss_conf.rss_hf =ETH_RSS_L4_SRC_ONLY ; else if (!strcmp(res->value, "l4-dst-only")) rss_conf.rss_hf =ETH_RSS_L4_DST_ONLY ; + else if (!strcmp(res->value, "l2-src-only")) + rss_conf.rss_hf =ETH_RSS_L2_SRC_ONLY ; + else if (!strcmp(res->value, "l2-dst-only")) + rss_conf.rss_hf =ETH_RSS_L2_DST_ONLY ; + else if (!strcmp(res->value, "l2tpv3")) + rss_conf.rss_hf =ETH_RSS_L2TPV3 ; + else if (!strcmp(res->value, "esp")) + rss_conf.rss_hf =ETH_RSS_ESP ; + else if (!strcmp(res->value, "ah")) + rss_conf.rss_hf =ETH_RSS_AH ; + else if (!strcmp(res->value, "pfcp")) + rss_conf.rss_hf =ETH_RSS_PFCP ; else if (!strcmp(res->value, "none")) rss_conf.rss_hf =0 ; else if (!strcmp(res->value, "default")) @@ -2359,7 +2376,8 @@
cmdline_parse_inst_tcmd_config_rss= {app/test-pmd/cmdline.c +0
-1.f = cmd_config_rss_parsed, .data =NULL , .help_str = "port config all rss " -"all|default|ip|tcp|udp|sctp|ether|port|vxlan|geneve|nvgre|vxla
n-gpe|none|<flowtype_id>",
+
"all|default|eth|vlan|ip|tcp|udp|sctp|ether|port|vxlan|geneve|"app/test-pmd/cmdline.c +1
-0+ "nvgre|vxlan-gpe|l2tpv3|esp|ah|pfcp|none|<flowtype_id>",
app/test-pmd/cmdline.c +0
-0.tokens = { (void *)&cmd_config_rss_port, (void *)&cmd_config_rss_keyword,@@ -2469,7 +2487,9 @@ cmdline_parse_token_string_t
cmd_config_rss_hash_key_rss_type=
"ipv4-other#ipv6#ipv6-frag#ipv6-tcp#ipv6-
udp#"app/test-pmd/cmdline.c +0
-1"ipv6-sctp#ipv6-other#l2-payload#ipv6-ex#" "ipv6-tcp-ex#ipv6-udp-ex#" - "l3-src-only#l3-dst-only#l4-src-only#l4-dst-only");
app/test-pmd/cmdline.c +1
-0+ "l3-src-only#l3-dst-only#l4-src-only#l4-dst-only#"
app/test-pmd/cmdline.c +2
-0+"l2-src-only#l2-dst-only#s-vlan#c-vlan#" + "l2tpv3#esp#ah#pfcp");cmdline_parse_token_string_t cmd_config_rss_hash_key_value = TOKEN_STRING_INITIALIZER(struct cmd_config_rss_hash_key, key,NULL);
app/test-pmd/cmdline.c +3
-1@@ -2480,7 +2500,9 @@ cmdline_parse_inst_t cmd_config_rss_hash_key = {"ipv4|ipv4-frag|ipv4-tcp|ipv4-udp|ipv4-sctp|ipv4-other|" "ipv6|ipv6-frag|ipv6-tcp|ipv6-udp|ipv6-sctp|ipv6-other|" "l2-payload|ipv6-ex|ipv6-tcp-ex|ipv6-udp-ex|" -"l3-src-only|l3-dst-only|l4-src-only|l4-dst-only " +"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 " "<string of hex digits (variable length, NIC dependent)>", .tokens = {(void *)&cmd_config_rss_hash_key_port, diff --git
a/app/test-pmd/config.cb/app/test-pmd/config.cindex69c5633e8..72f25d152100644app/test-pmd/config.c +1
-3@@ -75,10 +75,16 @@ static const struct { };const struct rss_type_info rss_type_table[] = { - {"all" ,ETH_RSS_IP |ETH_RSS_TCP | -ETH_RSS_UDP |ETH_RSS_SCTP | -ETH_RSS_L2_PAYLOAD }, + {"all" ,ETH_RSS_ETH |ETH_RSS_VLAN |ETH_RSS_IP |ETH_RSS_TCP |
app/test-pmd/config.c +2
-0+ETH_RSS_UDP |ETH_RSS_SCTP |ETH_RSS_L2_PAYLOAD | + ETH_RSS_L2TPV3 | ETH_RSS_ESP | ETH_RSS_AH |
ETH_RSS_PFCP},app/test-pmd/config.c +6
-0{ "none", 0 }, + { "eth", ETH_RSS_ETH }, + { "l2-src-only", ETH_RSS_L2_SRC_ONLY }, + { "l2-dst-only", ETH_RSS_L2_DST_ONLY }, + { "vlan", ETH_RSS_VLAN }, + { "s-vlan", ETH_RSS_S_VLAN }, + { "c-vlan", ETH_RSS_C_VLAN }, { "ipv4", ETH_RSS_IPV4 }, { "ipv4-frag", ETH_RSS_FRAG_IPV4 }, { "ipv4-tcp", ETH_RSS_NONFRAG_IPV4_TCP }, @@ -110,6 +116,8 @@const struct
rss_type_inforss_type_table[] = {app/test-pmd/config.c +2
-0{ "l4-dst-only", ETH_RSS_L4_DST_ONLY }, { "esp", ETH_RSS_ESP }, { "ah", ETH_RSS_AH }, + { "l2tpv3", ETH_RSS_L2TPV3 }, + { "pfcp", ETH_RSS_PFCP }, { NULL, 0 }, };doc/guides/testpmd_app_ug/testpmd_funcs.rst +0
-1@@ -2199,7 +2199,7 @@ port config - RSS Set the RSS (Receive Side Scaling) mode on or off:: - testpmd> port config all rss(all|default|ip|tcp|udp|sctp|ether|port|vxlan|geneve|nvgre|vxlan- gpe|none)
doc/guides/testpmd_app_ug/testpmd_funcs.rst +2
-0+ testpmd> port config all rss +(all|default|eth|vlan|ip|tcp|udp|sctp|ether|port|vxlan|geneve|nvgre|vx + lan-gpe|l2tpv3|esp|ah|pfcp|none)
Quoted 1 line
RSS is on by default.
The "all" option needs to be updated with the latest "all" values.
It would also be good to reformat the text so that the "all", "none" and "default" options are on separate lines.
Quoted 3 lines
--
2.20.1
Regards,
Bernard.
Re: [dpdk-dev] [dpdk-dev v7 3/3] app/testpmd: add new types to RSS hash commands
hi, bernard
Quoted 172 lines · Bernard
Hi Jeff,
Quoted 170 lines
-----Original Message-----
From: Guo, Jia <[email protected]>
Sent: Friday, April 17, 2020 7:32 PM
To: Iremonger, Bernard <[email protected]>; [email protected]; Ye, Xiaolong <[email protected]>; Zhang, Qi Z <[email protected]>
Cc: [email protected]; Wu, Jingjing <[email protected]>; Cao, Yahui <[email protected]>; Su, Simei <[email protected]>; Guo, Jia <[email protected]>
Subject: [dpdk-dev v7 3/3] app/testpmd: add new types to RSS hash commandsAdd some new types, such as eth/l2-src-only/l2-dst-only/svlan/cvlan/ l2tpv3/esp/ah/pfcp types into RSS hash commands, it could be used to configure these rss input set by cmdline.
Example flow commands was:
testpmd>flow create 0 ingress pattern eth / ipv4 / l2tpv3oip / end \
actions rss types l2tpv3 endkey_len0 queues end / endport config commands was:
testpmd>port config all rss l2tpv3Signed-off-by Jeff Guo <[email protected]>---
v7->v6:
add missing type
add change in doc for port rss configure--- app/test-pmd/cmdline.c | 34 +++++++++++++++++---- app/test-pmd/config.c | 14 +++++++-- doc/guides/testpmd_app_ug/testpmd_funcs.rst | 2 +- 3 files changed, 40 insertions(+), 10 deletions(-)app/test-pmd/cmdline.c index renamed from app/test-pmd/cmdline.c +0
-0
982322c35..97cf6ee35100644app/test-pmd/cmdline.c +1
-3@@ -2270,9 +2270,14 @@ cmd_config_rss_parsed(void *parsed_result,int ret;if (!strcmp (res->value,"all" )) -rss_conf.rss_hf =ETH_RSS_IP |ETH_RSS_TCP | -ETH_RSS_UDP |ETH_RSS_SCTP | -ETH_RSS_L2_PAYLOAD ; +rss_conf.rss_hf = ETH_RSS_ETH | ETH_RSS_VLAN |
ETH_RSS_IP|app/test-pmd/cmdline.c +2
-0+ETH_RSS_TCP |ETH_RSS_UDP |ETH_RSS_SCTP | +ETH_RSS_L2_PAYLOAD | ETH_RSS_L2TPV3 |
ETH_RSS_ESP|app/test-pmd/cmdline.c +17
-0+ETH_RSS_AH |ETH_RSS_PFCP ; +else if (!strcmp(res->value, "eth")) +rss_conf.rss_hf =ETH_RSS_ETH ; +else if (!strcmp(res->value, "vlan")) +rss_conf.rss_hf =ETH_RSS_VLAN ; else if (!strcmp(res->value, "ip")) rss_conf.rss_hf =ETH_RSS_IP ; else if (!strcmp(res->value, "udp"))@@ -2299,6 +2304,18 @@ cmd_config_rss_parsed(void *parsed_result, rss_conf.rss_hf =ETH_RSS_L4_SRC_ONLY ; else if (!strcmp(res->value, "l4-dst-only")) rss_conf.rss_hf =ETH_RSS_L4_DST_ONLY ; +else if (!strcmp(res->value, "l2-src-only")) +rss_conf.rss_hf =ETH_RSS_L2_SRC_ONLY ; +else if (!strcmp(res->value, "l2-dst-only")) +rss_conf.rss_hf =ETH_RSS_L2_DST_ONLY ; +else if (!strcmp(res->value, "l2tpv3")) +rss_conf.rss_hf =ETH_RSS_L2TPV3 ; +else if (!strcmp(res->value, "esp")) +rss_conf.rss_hf =ETH_RSS_ESP ; +else if (!strcmp(res->value, "ah")) +rss_conf.rss_hf =ETH_RSS_AH ; +else if (!strcmp(res->value, "pfcp")) +rss_conf.rss_hf =ETH_RSS_PFCP ; else if (!strcmp(res->value, "none")) rss_conf.rss_hf =0 ; else if (!strcmp(res->value, "default")) @@ -2359,7 +2376,8 @@
cmdline_parse_inst_tcmd_config_rss= {
.f =cmd_config_rss_parsed,
.data = NULL,
.help_str = "port config all rss "
- "all|default|ip|tcp|udp|sctp|ether|port|vxlan|geneve|nvgre|vxla n-gpe|none|<flowtype_id>",
+ "all|default|eth|vlan|ip|tcp|udp|sctp|ether|port|vxlan|geneve|" +"nvgre|vxlan- gpe|l2tpv3|esp|ah|pfcp|none|<flowtype_id>",
.tokens = {
(void *)&cmd_config_rss_port,
(void *)&cmd_config_rss_keyword,app/test-pmd/cmdline.c +0
-0@@ -2469,7 +2487,9 @@ cmdline_parse_token_string_t
cmd_config_rss_hash_key_rss_type=
"ipv4-other#ipv6#ipv6-frag#ipv6-tcp#ipv6-
udp#"
"ipv6-sctp#ipv6-other#l2-payload#ipv6-ex#" "ipv6-tcp-ex#ipv6-udp-ex#"
- "l3-src-only#l3-dst-only#l4-src-only#l4-dst- only");
+ "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");
cmdline_parse_token_string_tcmd_config_rss_hash_key_value= TOKEN_STRING_INITIALIZER(structcmd_config_rss_hash_key, key,
NULL);app/test-pmd/cmdline.c +3
-1@@ -2480,7 +2500,9 @@ cmdline_parse_inst_t cmd_config_rss_hash_key = {"ipv4|ipv4-frag|ipv4-tcp|ipv4-udp|ipv4-sctp|ipv4-other|" "ipv6|ipv6-frag|ipv6-tcp|ipv6-udp|ipv6-sctp|ipv6-other|" "l2-payload|ipv6-ex|ipv6-tcp-ex|ipv6-udp-ex|" -"l3-src-only|l3-dst-only|l4-src-only|l4-dst-only " +"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 " "<string of hex digits (variable length, NIC dependent)>", .tokens = {(void *)&cmd_config_rss_hash_key_port, diff --git
a/app/test-pmd/config.cb/app/test-pmd/config.cindex69c5633e8..72f25d152100644app/test-pmd/config.c +1
-3@@ -75,10 +75,16 @@ static const struct { };const struct rss_type_info rss_type_table[] = { -{"all" ,ETH_RSS_IP |ETH_RSS_TCP | -ETH_RSS_UDP |ETH_RSS_SCTP | -ETH_RSS_L2_PAYLOAD }, +{"all" ,ETH_RSS_ETH |ETH_RSS_VLAN |ETH_RSS_IP |ETH_RSS_TCP |
app/test-pmd/config.c +2
-0+ETH_RSS_UDP |ETH_RSS_SCTP |ETH_RSS_L2_PAYLOAD | +ETH_RSS_L2TPV3 | ETH_RSS_ESP | ETH_RSS_AH |
ETH_RSS_PFCP},
{ "none", 0 },app/test-pmd/config.c +6
-0+{ "eth", ETH_RSS_ETH }, +{ "l2-src-only", ETH_RSS_L2_SRC_ONLY }, +{ "l2-dst-only", ETH_RSS_L2_DST_ONLY }, +{ "vlan", ETH_RSS_VLAN }, +{ "s-vlan", ETH_RSS_S_VLAN }, +{ "c-vlan", ETH_RSS_C_VLAN }, { "ipv4", ETH_RSS_IPV4 }, { "ipv4-frag", ETH_RSS_FRAG_IPV4 }, { "ipv4-tcp", ETH_RSS_NONFRAG_IPV4_TCP }, @@ -110,6 +116,8 @@const struct
rss_type_inforss_type_table[] = {
{ "l4-dst-only",ETH_RSS_L4_DST_ONLY},
{ "esp",ETH_RSS_ESP},
{ "ah",ETH_RSS_AH},app/test-pmd/config.c +2
-0+{ "l2tpv3", ETH_RSS_L2TPV3 }, +{ "pfcp", ETH_RSS_PFCP }, { NULL, 0 }, };doc/guides/testpmd_app_ug/testpmd_funcs.rst +0
-1@@ -2199,7 +2199,7 @@ port config - RSS Set the RSS (Receive Side Scaling) mode on or off:: - testpmd> port config all rss(all|default|ip|tcp|udp|sctp|ether|port|vxlan|geneve|nvgre|vxlan- gpe|none)
doc/guides/testpmd_app_ug/testpmd_funcs.rst +2
-0+ testpmd> port config all rss +(all|default|eth|vlan|ip|tcp|udp|sctp|ether|port|vxlan|geneve|nvgre|vx + lan-gpe|l2tpv3|esp|ah|pfcp|none)
Quoted 3 lines
Quoted 1 line
RSS is on by default.
The "all" option needs to be updated with the latest "all" values.
It would also be good to reformat the text so that the "all", "none" and "default" options are on separate lines.
you are right here, bernard, will refine in next version.
Quoted 7 lines
Quoted 2 lines
--
2.20.1Regards,
Bernard.
v8 cover add RSS configuration for iavf
In reply to Jeff GuoBecause the VF must be capable of configuring RSS, so add RSS configuration for iavf, VFs could add or delete a RSS rule base on the PF's capability. The supported protocol rss input set as below.
l2-src-only/
l2-dst-only/
svlan/
cvlan/
ipv4/
ipv6/
l3_src_only/
l3_dst_only/
l2tpv3/
esp/
ah/
pfcp/
gtpu down/
gtpu up/
udp/
tcp/
sctp/
use tespmd for example:
testpmd> flow create 0 ingress pattern eth / ipv4 / end actions rss types l3-src-only end key_len 0 queues end / end
use scapy for example:
Quoted 1 line
sendp(Ether(dst="00:01:23:45:67:01")/IP(src=RandIP())/Raw('x'*20),iface="ens785f1",loop=1,inter=0.3)
the expect result:
the rss hash works and the packets will go to difference queue for load balance.
This patchset depends on below patch sets. (1)http://patches.dpdk.org/project/dpdk/list/?series=8950
add generic filter support for iavf
(2)http://patches.dpdk.org/project/dpdk/list/?series=9280
iavf share code update
(3)http://patches.dpdk.org/project/dpdk/list/?series=9244
framework for advanced iAVF PMD
v8:
1.rebase patch and refine guide doc
v7:
1.rebase and add ETH_RSS_VLAN to cover ETH_RSS_S_VLAN and ETH_RSS_C_VLAN 2.add misssing type and add change in doc for port rss configure.
v6:
1.rename some struct and type
2.use pattern hint to distingush different layer for hash 3.add some missing part and refine commit log
v5:
1.rename ETH_XXX to L2_XXX.
2.NULL checking and commit log refine.
v4:
1.refine the rss type checking
2.delete unnecessary pdu type item.
v3:
1.refince rss offload types.
2.add doc in release note
3.refine some naming base on virtchnl definition.
4.move gtp pdu index from normal to special.
v2:
1.refine some rte eth rss offload types.
2.add NAT T ESP and refine gtpu down/up
3.reference some fixing patch from pf side.
Jeff Guo (3):
ethdev: add new RSS offload types
net/iavf: add RSS configuration for VFs
app/testpmd: add new types to RSS hash commands
app/test-pmd/cmdline.c | 34 +- app/test-pmd/config.c | 14 +- doc/guides/rel_notes/release_20_05.rst | 1 + doc/guides/testpmd_app_ug/testpmd_funcs.rst | 6 +- drivers/net/iavf/Makefile | 1 + drivers/net/iavf/iavf.h | 2 + drivers/net/iavf/iavf_hash.c | 1053 +++++++++++++++++++ drivers/net/iavf/iavf_vchnl.c | 33 +- drivers/net/iavf/meson.build | 1 + lib/librte_ethdev/rte_ethdev.h | 17 +- 10 files changed, 1143 insertions(+), 19 deletions(-) create mode 100644 drivers/net/iavf/iavf_hash.c
Signature · 1 line
2.20.1
PATCH v8 1/3 ethdev: add new RSS offload types
Defines some new RSS offload types for ETH/S_VLAN/C_VLAN/L2TPV3/ /PFCP/L2_SRC_ONLY/L2_DST_ONLY.
---v8->v7:
no change.
--- lib/librte_ethdev/rte_ethdev.h | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-)
lib/librte_ethdev/rte_ethdev.h +14 -3
@@ -511,8 +511,13 @@ struct rte_eth_rss_conf {#define ETH_RSS_GENEVE (1ULL << 20)#define ETH_RSS_NVGRE (1ULL << 21)#define ETH_RSS_GTPU (1ULL << 23) -#define ETH_RSS_ESP (1ULL << 27) -#define ETH_RSS_AH (1ULL << 28) +#define ETH_RSS_ETH (1ULL << 24) +#define ETH_RSS_S_VLAN (1ULL << 25) +#define ETH_RSS_C_VLAN (1ULL << 26) +#define ETH_RSS_ESP (1ULL << 27) +#define ETH_RSS_AH (1ULL << 28) +#define ETH_RSS_L2TPV3 (1ULL << 29) +#define ETH_RSS_PFCP (1ULL << 30)/*
@@ -527,7 +532,9 @@ struct rte_eth_rss_conf {#define ETH_RSS_L3_SRC_ONLY (1ULL << 63)#define ETH_RSS_L3_DST_ONLY (1ULL << 62)#define ETH_RSS_L4_SRC_ONLY (1ULL << 61) -#define ETH_RSS_L4_DST_ONLY (1ULL << 60) +#define ETH_RSS_L4_DST_ONLY (1ULL << 60) +#define ETH_RSS_L2_SRC_ONLY (1ULL << 59) +#define ETH_RSS_L2_DST_ONLY (1ULL << 58)/** * For input set change of hash filter, if SRC_ONLY and DST_ONLY of
@@ -579,6 +586,10 @@ rte_eth_rss_hf_refine(uint64_t rss_hf) ETH_RSS_GENEVE | \ ETH_RSS_NVGRE) +#define ETH_RSS_VLAN ( \ + ETH_RSS_S_VLAN | \ + ETH_RSS_C_VLAN) +/**< Mask of valid RSS hash protocols */ #define ETH_RSS_PROTO_MASK ( \ ETH_RSS_IPV4 | \
Signature · 1 line
2.20.1
Re: [dpdk-dev] [dpdk-dev v8 1/3] ethdev: add new RSS offload types
Quoted 7 lines · Jeff Guo
Defines some new RSS offload types for ETH/S_VLAN/C_VLAN/L2TPV3/ /PFCP/L2_SRC_ONLY/L2_DST_ONLY.
Signed-off-by Jeff Guo <[email protected]>Reviewed-by Qi Zhang <[email protected]>Reviewed-by Bernard Iremonger <[email protected]>Acked-by Ori Kam <[email protected]>
PATCH v8 2/3 net/iavf: add RSS configuration for VFs
In reply to Jeff GuoThe VF must be capable of configuring RSS. Add a virtchnl handler to parse a specific RSS configuration, and process the configuration for VFs, such as add or delete a RSS rule.
---v8->v7:
no change.
--- doc/guides/rel_notes/release_20_05.rst | 1 + drivers/net/iavf/Makefile | 1 + drivers/net/iavf/iavf.h | 2 + drivers/net/iavf/iavf_hash.c | 1053 ++++++++++++++++++++++++ drivers/net/iavf/iavf_vchnl.c | 33 +- drivers/net/iavf/meson.build | 1 + 6 files changed, 1086 insertions(+), 5 deletions(-) create mode 100644 drivers/net/iavf/iavf_hash.c
doc/guides/rel_notes/release_20_05.rst +1 -0
@@ -103,6 +103,7 @@ New Features * Added generic filter support. * Added advanced iavf with FDIR capability. + * Added advanced RSS configuration for VFs. * **Added a new driver for Intel Foxville I225 devices.**
drivers/net/iavf/Makefile +1 -0
@@ -25,6 +25,7 @@ SRCS-$(CONFIG_RTE_LIBRTE_IAVF_PMD) += iavf_vchnl.c SRCS-$(CONFIG_RTE_LIBRTE_IAVF_PMD) += iavf_rxtx.c SRCS-$(CONFIG_RTE_LIBRTE_IAVF_PMD) += iavf_generic_flow.c SRCS-$(CONFIG_RTE_LIBRTE_IAVF_PMD) += iavf_fdir.c +SRCS-$(CONFIG_RTE_LIBRTE_IAVF_PMD) += iavf_hash.c ifeq ($(CONFIG_RTE_ARCH_X86), y) SRCS-$(CONFIG_RTE_LIBRTE_IAVF_PMD) += iavf_rxtx_vec_sse.c endif
drivers/net/iavf/iavf.h +2 -0
@@ -270,4 +270,6 @@ int iavf_fdir_add(struct iavf_adapter *adapter, struct iavf_fdir_conf *filter);int iavf_fdir_del (struct iavf_adapter *adapter,struct iavf_fdir_conf *filter);int iavf_fdir_check (struct iavf_adapter *adapter,struct iavf_fdir_conf *filter); +int iavf_add_del_rss_cfg (struct iavf_adapter *adapter, +struct virtchnl_rss_cfg *rss_cfg,bool add);#endif /* _IAVF_ETHDEV_H_ */
drivers/net/iavf/iavf_hash.c new file +1053 -0
1,053 lines not on this page · raw message
drivers/net/iavf/iavf_vchnl.c +28 -5
@@ -335,13 +335,10 @@ iavf_get_vf_resource(struct iavf_adapter *adapter) args.out_buffer = vf->aq_resp; args.out_size =IAVF_AQ_BUF_SZ ; -/* TODO: basic offload capabilities, need to -* add advanced/optional offload capabilities -*/ - caps =IAVF_BASIC_OFFLOAD_CAPS |VIRTCHNL_VF_CAP_ADV_LINK_SPEED |VIRTCHNL_VF_OFFLOAD_RX_FLEX_DESC | -VIRTCHNL_VF_OFFLOAD_FDIR_PF ; +VIRTCHNL_VF_OFFLOAD_FDIR_PF | +VIRTCHNL_VF_OFFLOAD_ADV_RSS_PF ; args.in_args = (uint8_t *)∩︀ args.in_args_size =sizeof (caps);
@@ -1007,3 +1004,29 @@ iavf_fdir_check(struct iavf_adapter *adapter,return 0 ; } + +int +iavf_add_del_rss_cfg (struct iavf_adapter *adapter, +struct virtchnl_rss_cfg *rss_cfg,bool add) +{ +struct iavf_info *vf =IAVF_DEV_PRIVATE_TO_VF (adapter); +struct iavf_cmd_info args; +int err; + +memset (&args,0 ,sizeof (args)); + args.ops = add ?VIRTCHNL_OP_ADD_RSS_CFG : +VIRTCHNL_OP_DEL_RSS_CFG ; + args.in_args = (u8 *)rss_cfg; + args.in_args_size =sizeof (*rss_cfg); + args.out_buffer = vf->aq_resp; + args.out_size =IAVF_AQ_BUF_SZ ; + + err =iavf_execute_vf_cmd (adapter, &args); +if (err) +PMD_DRV_LOG (ERR , +"Failed to execute command of %s" , + add ?"OP_ADD_RSS_CFG" : +"OP_DEL_RSS_INPUT_CFG" ); + +return err; +}
drivers/net/iavf/meson.build +1 -0
@@ -12,6 +12,7 @@ sources = files( 'iavf_vchnl.c', 'iavf_generic_flow.c', 'iavf_fdir.c', + 'iavf_hash.c', ) if arch_subdir == 'x86'
Signature · 1 line
2.20.1
PATCH v8 3/3 app/testpmd: add new types to RSS hash commands
In reply to Jeff GuoAdd some new types, such as eth/l2-src-only/l2-dst-only/svlan/cvlan/ l2tpv3/esp/ah/pfcp types into RSS hash commands, it could be used to configure these rss input set by cmdline.
Example flow commands was:
testpmd>flow create 0 ingress pattern eth / ipv4 / l2tpv3oip / end \
actions rss types l2tpv3 end key_len 0 queues end / end
port config commands was:
testpmd>port config all rss l2tpv3
---v8->v7:
refine guide doc.
--- app/test-pmd/cmdline.c | 34 +++++++++++++++++---- app/test-pmd/config.c | 14 +++++++-- doc/guides/testpmd_app_ug/testpmd_funcs.rst | 6 ++-- 3 files changed, 43 insertions(+), 11 deletions(-)
app/test-pmd/cmdline.c +28 -6
@@ -2270,9 +2270,14 @@ cmd_config_rss_parsed(void *parsed_result,int ret;if (!strcmp (res->value,"all" )) - rss_conf.rss_hf =ETH_RSS_IP |ETH_RSS_TCP | -ETH_RSS_UDP |ETH_RSS_SCTP | -ETH_RSS_L2_PAYLOAD ; + 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 ; +else if (!strcmp (res->value,"eth" )) + rss_conf.rss_hf =ETH_RSS_ETH ; +else if (!strcmp (res->value,"vlan" )) + rss_conf.rss_hf =ETH_RSS_VLAN ;else if (!strcmp (res->value,"ip" )) rss_conf.rss_hf =ETH_RSS_IP ;else if (!strcmp (res->value,"udp" ))
@@ -2299,6 +2304,18 @@ cmd_config_rss_parsed(void *parsed_result, rss_conf.rss_hf =ETH_RSS_L4_SRC_ONLY ; else if (!strcmp(res->value, "l4-dst-only")) rss_conf.rss_hf =ETH_RSS_L4_DST_ONLY ; + else if (!strcmp(res->value, "l2-src-only")) + rss_conf.rss_hf =ETH_RSS_L2_SRC_ONLY ; + else if (!strcmp(res->value, "l2-dst-only")) + rss_conf.rss_hf =ETH_RSS_L2_DST_ONLY ; + else if (!strcmp(res->value, "l2tpv3")) + rss_conf.rss_hf =ETH_RSS_L2TPV3 ; + else if (!strcmp(res->value, "esp")) + rss_conf.rss_hf =ETH_RSS_ESP ; + else if (!strcmp(res->value, "ah")) + rss_conf.rss_hf =ETH_RSS_AH ; + else if (!strcmp(res->value, "pfcp")) + rss_conf.rss_hf =ETH_RSS_PFCP ; else if (!strcmp(res->value, "none")) rss_conf.rss_hf =0 ; else if (!strcmp(res->value, "default"))
@@ -2359,7 +2376,8 @@ cmdline_parse_inst_t cmd_config_rss = { .f = cmd_config_rss_parsed, .data = NULL, .help_str = "port config all rss " - "all|default|ip|tcp|udp|sctp|ether|port|vxlan|geneve|nvgre|vxlan-gpe|none|<flowtype_id>", + "all|default|eth|vlan|ip|tcp|udp|sctp|ether|port|vxlan|geneve|" + "nvgre|vxlan-gpe|l2tpv3|esp|ah|pfcp|none|<flowtype_id>", .tokens = { (void *)&cmd_config_rss_port, (void *)&cmd_config_rss_keyword,
@@ -2469,7 +2487,9 @@ cmdline_parse_token_string_t cmd_config_rss_hash_key_rss_type ="ipv4-other#ipv6#ipv6-frag#ipv6-tcp#ipv6-udp#" "ipv6-sctp#ipv6-other#l2-payload#ipv6-ex#" "ipv6-tcp-ex#ipv6-udp-ex#" - "l3-src-only#l3-dst-only#l4-src-only#l4-dst-only"); +"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");cmdline_parse_token_string_t cmd_config_rss_hash_key_value = TOKEN_STRING_INITIALIZER(struct cmd_config_rss_hash_key, key, NULL);
@@ -2480,7 +2500,9 @@ cmdline_parse_inst_t cmd_config_rss_hash_key = {"ipv4|ipv4-frag|ipv4-tcp|ipv4-udp|ipv4-sctp|ipv4-other|" "ipv6|ipv6-frag|ipv6-tcp|ipv6-udp|ipv6-sctp|ipv6-other|" "l2-payload|ipv6-ex|ipv6-tcp-ex|ipv6-udp-ex|" -"l3-src-only|l3-dst-only|l4-src-only|l4-dst-only " +"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 " "<string of hex digits (variable length, NIC dependent)>", .tokens = { (void *)&cmd_config_rss_hash_key_port,
app/test-pmd/config.c +11 -3
@@ -75,10 +75,16 @@ static const struct { };const struct rss_type_info rss_type_table[] = { - {"all" ,ETH_RSS_IP |ETH_RSS_TCP | -ETH_RSS_UDP |ETH_RSS_SCTP | -ETH_RSS_L2_PAYLOAD }, + {"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 }, {"none" ,0 }, + {"eth" ,ETH_RSS_ETH }, + {"l2-src-only" ,ETH_RSS_L2_SRC_ONLY }, + {"l2-dst-only" ,ETH_RSS_L2_DST_ONLY }, + {"vlan" ,ETH_RSS_VLAN }, + {"s-vlan" ,ETH_RSS_S_VLAN }, + {"c-vlan" ,ETH_RSS_C_VLAN }, {"ipv4" ,ETH_RSS_IPV4 }, {"ipv4-frag" ,ETH_RSS_FRAG_IPV4 }, {"ipv4-tcp" ,ETH_RSS_NONFRAG_IPV4_TCP },
@@ -110,6 +116,8 @@ const struct rss_type_info rss_type_table[] = { { "l4-dst-only", ETH_RSS_L4_DST_ONLY }, { "esp", ETH_RSS_ESP }, { "ah", ETH_RSS_AH }, + { "l2tpv3", ETH_RSS_L2TPV3 }, + { "pfcp", ETH_RSS_PFCP }, { NULL, 0 }, };
doc/guides/testpmd_app_ug/testpmd_funcs.rst +4 -2
@@ -2199,12 +2199,14 @@ port config - RSS Set the RSS (Receive Side Scaling) mode on or off:: - testpmd> port config all rss (all|default|ip|tcp|udp|sctp|ether|port|vxlan|geneve|nvgre|vxlan-gpe|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|none) RSS is on by default. -The ``all`` option is equivalent to ip|tcp|udp|sctp|ether. +The ``all`` option is equivalent to eth|vlan|ip|tcp|udp|sctp|ether|l2tpv3|esp|ah|pfcp. + The ``default`` option enables all supported RSS types reported by device info. + The ``none`` option is equivalent to the ``--disable-rss`` command-line option. port config - RSS Reta
Signature · 1 line
2.20.1
Re: [dpdk-dev] [dpdk-dev v8 3/3] app/testpmd: add new types to RSS hash commands
Quoted 22 lines
-----Original Message-----
From: Guo, Jia <[email protected]>
Sent: Wednesday, April 22, 2020 2:03 AM
To: Iremonger, Bernard <[email protected]>; [email protected]; Lu, Wenzhuo <[email protected]>; [email protected]; Zhang, Qi Z <[email protected]>; Wu, Jingjing <[email protected]>
Cc: Xing, Beilei <[email protected]>; Ye, Xiaolong <[email protected]>; [email protected]; Cao, Yahui <[email protected]>; Su, Simei <[email protected]>; Guo, Jia <[email protected]>
Subject: [dpdk-dev v8 3/3] app/testpmd: add new types to RSS hash commandsAdd some new types, such as eth/l2-src-only/l2-dst-only/svlan/cvlan/ l2tpv3/esp/ah/pfcp types into RSS hash commands, it could be used to configure these rss input set by cmdline.
Example flow commands was:
testpmd>flow create 0 ingress pattern eth / ipv4 / l2tpv3oip / end \
actions rss types l2tpv3 endkey_len0 queues end / end
Quoted 5 lines
port config commands was:
testpmd>port config all rss l2tpv3Signed-off-by Jeff Guo <[email protected]>Acked-by Ori Kam <[email protected]>
Quoted 70 lines · Jeff Guo
Because the VF must be capable of configuring RSS, so add RSS configuration for iavf, VFs could add or delete a RSS rule base on the PF's capability. The supported protocol rss input set as below.
l2-src-only/
l2-dst-only/
svlan/
cvlan/
ipv4/
ipv6/
l3_src_only/
l3_dst_only/
l2tpv3/
esp/
ah/
pfcp/
gtpu down/
gtpu up/
udp/
tcp/
sctp/use tespmd for example:
testpmd> flow create 0 ingress pattern eth / ipv4 / end actions rss types l3-src-only endkey_len0 queues end / enduse scapy for example:
Quoted 1 line
sendp(Ether(dst="00:01:23:45:67:01")/IP(src=RandIP())/Raw('x'*20),iface="ens785f1",loop=1,inter=0.3)
the expect result:
the rss hash works and the packets will go to difference queue for load balance.This patchset depends on below patch sets. (1)http://patches.dpdk.org/project/dpdk/list/?series=8950
add generic filter support for iavf
(2)http://patches.dpdk.org/project/dpdk/list/?series=9280
iavf share code update
(3)http://patches.dpdk.org/project/dpdk/list/?series=9244
framework for advanced iAVF PMDv8:
1.rebase patch and refine guide docv7:
1.rebase and addETH_RSS_VLANto coverETH_RSS_S_VLANandETH_RSS_C_VLAN2.add misssing type and add change in doc for port rss configure.v6:
1.rename some struct and type
2.use pattern hint to distingush different layer for hash 3.add some missing part and refine commit logv5:
1.renameETH_XXXtoL2_XXX.
2.NULL checking and commit log refine.v4:
1.refine the rss type checking
2.delete unnecessary pdu type item.v3:
1.refince rss offload types.
2.add doc in release note
3.refine some naming base on virtchnl definition.
4.move gtp pdu index from normal to special.v2:
1.refine some rte eth rss offload types.
2.add NAT T ESP and refine gtpu down/up
3.reference some fixing patch from pf side.
Quoted 5 lines
Jeff Guo (3):
ethdev: add new RSS offload types
net/iavf: add RSS configuration for VFs
app/testpmd: add new types to RSS hash commands
Series applied to dpdk-next-net/master, thanks.