net/ice: support show RSS hash configuration
From: Zhu Tao <[email protected]>
Implement interface 'ice_rss_hash_conf_get' to support show RSS hash configuration.
Note:
Not support the same time set RSS with RTE and classify API.
--- drivers/net/ice/ice_ethdev.c | 15 +++++++++++++-- drivers/net/ice/ice_ethdev.h | 1 + 2 files changed, 14 insertions(+), 2 deletions(-)
drivers/net/ice/ice_ethdev.c +13 -2
@@ -2923,6 +2923,16 @@ ice_rss_hash_set(struct ice_pf *pf, uint64_t rss_hf)struct ice_vsi *vsi = pf->main_vsi;int ret; +#define ICE_RSS_HF_ALL ( \ + ETH_RSS_IPV4 | \ + ETH_RSS_IPV6 | \ + ETH_RSS_NONFRAG_IPV4_UDP | \ + ETH_RSS_NONFRAG_IPV6_UDP | \ + ETH_RSS_NONFRAG_IPV4_TCP | \ + ETH_RSS_NONFRAG_IPV6_TCP | \ + ETH_RSS_NONFRAG_IPV4_SCTP | \ + ETH_RSS_NONFRAG_IPV6_SCTP) +/* Configure RSS for IPv4 with src/dst addr as input set */ if (rss_hf Ð_RSS_IPV4 ) { ret = ice_add_rss_cfg_wrap(pf, vsi->idx, ICE_FLOW_HASH_IPV4,
@@ -3216,6 +3226,8 @@ ice_rss_hash_set(struct ice_pf *pf, uint64_t rss_hf)PMD_DRV_LOG (ERR ,"%s GTPU_EH_IPV6_SCTP rss flow fail %d" , __func__, ret); } + + pf->rss_hf = rss_hf &ICE_RSS_HF_ALL ; }static int ice_init_rss (struct ice_pf *pf)
@@ -4439,8 +4451,7 @@ ice_rss_hash_conf_get(struct rte_eth_dev *dev,ice_get_rss_key (vsi, rss_conf->rss_key, &rss_conf->rss_key_len); -/* TODO: default set to 0 as hf config is not supported now */ - rss_conf->rss_hf =0 ; + rss_conf->rss_hf = pf->rss_hf;return 0 ; }
drivers/net/ice/ice_ethdev.h +1 -0
@@ -457,6 +457,7 @@ struct ice_pf {uint64_t old_rx_bytes;uint64_t old_tx_bytes;uint64_t supported_rxdid;/* bitmap for supported RXDID */ +uint64_t rss_hf; };#define ICE_MAX_QUEUE_NUM 2048
Signature · 1 line
2.18.4
PATCH v2 1/1 net/ice: support show RSS hash configuration
From: Zhu Tao <[email protected]>
Implement interface 'ice_rss_hash_conf_get' to support show RSS hash configuration.
Note:
Not support the same time setting RSS with RTE and classify API.
--- drivers/net/ice/ice_ethdev.c | 15 +++++++++++++-- drivers/net/ice/ice_ethdev.h | 1 + 2 files changed, 14 insertions(+), 2 deletions(-)
v2 changes:
Committed log.
drivers/net/ice/ice_ethdev.c +13 -2
@@ -2923,6 +2923,16 @@ ice_rss_hash_set(struct ice_pf *pf, uint64_t rss_hf)struct ice_vsi *vsi = pf->main_vsi;int ret; +#define ICE_RSS_HF_ALL ( \ + ETH_RSS_IPV4 | \ + ETH_RSS_IPV6 | \ + ETH_RSS_NONFRAG_IPV4_UDP | \ + ETH_RSS_NONFRAG_IPV6_UDP | \ + ETH_RSS_NONFRAG_IPV4_TCP | \ + ETH_RSS_NONFRAG_IPV6_TCP | \ + ETH_RSS_NONFRAG_IPV4_SCTP | \ + ETH_RSS_NONFRAG_IPV6_SCTP) +/* Configure RSS for IPv4 with src/dst addr as input set */ if (rss_hf Ð_RSS_IPV4 ) { ret = ice_add_rss_cfg_wrap(pf, vsi->idx, ICE_FLOW_HASH_IPV4,
@@ -3216,6 +3226,8 @@ ice_rss_hash_set(struct ice_pf *pf, uint64_t rss_hf)PMD_DRV_LOG (ERR ,"%s GTPU_EH_IPV6_SCTP rss flow fail %d" , __func__, ret); } + + pf->rss_hf = rss_hf &ICE_RSS_HF_ALL ; }static int ice_init_rss (struct ice_pf *pf)
@@ -4439,8 +4451,7 @@ ice_rss_hash_conf_get(struct rte_eth_dev *dev,ice_get_rss_key (vsi, rss_conf->rss_key, &rss_conf->rss_key_len); -/* TODO: default set to 0 as hf config is not supported now */ - rss_conf->rss_hf =0 ; + rss_conf->rss_hf = pf->rss_hf;return 0 ; }
drivers/net/ice/ice_ethdev.h +1 -0
@@ -457,6 +457,7 @@ struct ice_pf {uint64_t old_rx_bytes;uint64_t old_tx_bytes;uint64_t supported_rxdid;/* bitmap for supported RXDID */ +uint64_t rss_hf; };#define ICE_MAX_QUEUE_NUM 2048
Signature · 1 line
2.18.4
Quoted 10 lines
-----Original Message-----
From: [email protected] <[email protected]>
Sent: Thursday, October 29, 2020 1:11 PM
To: Yang, Qiming <[email protected]>; Zhang, Qi Z <[email protected]>
Cc: [email protected]; Zhu, TaoX <[email protected]>
Subject: [PATCH v2] net/ice: support show RSS hash configuration
Quoted 7 lines
From: Zhu Tao <[email protected]>
Implement interface '
ice_rss_hash_conf_get' to support show RSS hash configuration.Note:
Not support the same time setting RSS with RTE and classify API.
Only return rss_hf from latest dev_configure or dev_rss_hash_update. All configures from rte_flow are ignored.
And better to add above notes in ice_rss_hash_conf_get also.
Otherwise
Quoted 64 lines
Signed-off-by Zhu Tao <[email protected]>--- drivers/net/ice/ice_ethdev.c | 15 +++++++++++++-- drivers/net/ice/ice_ethdev.h | 1 + 2 files changed, 14 insertions(+), 2 deletions(-)v2 changes:
Committed log.drivers/net/ice/ice_ethdev.c index renamed from drivers/net/ice/ice_ethdev.c +0
-0
d51f3faba..ff8106317100644drivers/net/ice/ice_ethdev.c +12
-1@@ -2923,6 +2923,16 @@ ice_rss_hash_set(struct ice_pf *pf, uint64_t rss_hf)struct ice_vsi *vsi = pf->main_vsi;int ret; +#define ICE_RSS_HF_ALL ( \ + ETH_RSS_IPV4 | \ + ETH_RSS_IPV6 | \ + ETH_RSS_NONFRAG_IPV4_UDP | \ + ETH_RSS_NONFRAG_IPV6_UDP | \ + ETH_RSS_NONFRAG_IPV4_TCP | \ + ETH_RSS_NONFRAG_IPV6_TCP | \ + ETH_RSS_NONFRAG_IPV4_SCTP | \ + ETH_RSS_NONFRAG_IPV6_SCTP) +/* Configure RSS for IPv4 with src/dst addr as input set */ if (rss_hf Ð_RSS_IPV4 ) { ret = ice_add_rss_cfg_wrap(pf, vsi->idx, ICE_FLOW_HASH_IPV4, @@ -3216,6 +3226,8 @@ ice_rss_hash_set(struct ice_pf *pf, uint64_t rss_hf)PMD_DRV_LOG (ERR ,"%s GTPU_EH_IPV6_SCTP rss flow fail %d" , __func__, ret); } + + pf->rss_hf = rss_hf &ICE_RSS_HF_ALL ; } static int ice_init_rss(struct ice_pf *pf) @@ -4439,8 +4451,7 @@ice_rss_hash_conf_get(struct
rte_eth_dev*dev,drivers/net/ice/ice_ethdev.c +1
-2ice_get_rss_key (vsi, rss_conf->rss_key, &rss_conf->rss_key_len); -/* TODO: default set to 0 as hf config is not supported now */ - rss_conf->rss_hf =0 ; + rss_conf->rss_hf = pf->rss_hf;return 0 ; }drivers/net/ice/ice_ethdev.h index renamed from drivers/net/ice/ice_ethdev.h +0
-0
05218af05..452fd9050100644drivers/net/ice/ice_ethdev.h +1
-1@@ -457,6 +457,7 @@ struct ice_pf {uint64_t old_rx_bytes;uint64_t old_tx_bytes;uint64_t supported_rxdid;/* bitmap for supported RXDID */ +uint64_t rss_hf; };#define ICE_MAX_QUEUE_NUM 2048 --2.18.4
Zhu, TaoX
Acked-by Qi ZhangThanks, Qi
I'll send v3 patch according to your comments.
BRs,
Zhu Tao
-----Original Message-----
From: Zhang, Qi Z <[email protected]>
Sent: Thursday, October 29, 2020 1:53 PM
To: Zhu, TaoX <[email protected]>; Yang, Qiming <[email protected]>
Cc: [email protected]; Zhu, TaoX <[email protected]>
Subject: RE: [PATCH v2] net/ice: support show RSS hash configuration
Quoted 8 lines
-----Original Message-----
From: [email protected] <[email protected]>
Sent: Thursday, October 29, 2020 1:11 PM
To: Yang, Qiming <[email protected]>; Zhang, Qi Z <[email protected]>
Cc: [email protected]; Zhu, TaoX <[email protected]>
Subject: [PATCH v2] net/ice: support show RSS hash configuration
Quoted 7 lines
From: Zhu Tao <[email protected]>
Implement interface '
ice_rss_hash_conf_get' to support show RSS hash configuration.Note:
Not support the same time setting RSS with RTE and classify API.
Only return rss_hf from latest dev_configure or dev_rss_hash_update. All configures from rte_flow are ignored.
And better to add above notes in ice_rss_hash_conf_get also.
Otherwise
Quoted 64 lines
Signed-off-by Zhu Tao <[email protected]>--- drivers/net/ice/ice_ethdev.c | 15 +++++++++++++-- drivers/net/ice/ice_ethdev.h | 1 + 2 files changed, 14 insertions(+), 2 deletions(-)v2 changes:
Committed log.(quoted diff) +0
-0
b/drivers/net/ice/ice_ethdev.cindexd51f3faba..ff8106317100644drivers/net/ice/ice_ethdev.c +10
-0@@ -2923,6 +2923,16 @@ ice_rss_hash_set(struct ice_pf *pf, uint64_t rss_hf) struct ice_vsi *vsi = pf->main_vsi; int ret; +#define ICE_RSS_HF_ALL ( \ +ETH_RSS_IPV4 | \ +ETH_RSS_IPV6 | \ +ETH_RSS_NONFRAG_IPV4_UDP | \ +ETH_RSS_NONFRAG_IPV6_UDP | \ +ETH_RSS_NONFRAG_IPV4_TCP | \ +ETH_RSS_NONFRAG_IPV6_TCP | \ +ETH_RSS_NONFRAG_IPV4_SCTP | \ +ETH_RSS_NONFRAG_IPV6_SCTP) +/* Configure RSS for IPv4 with src/dst addr as input set */ if (rss_hf & ETH_RSS_IPV4) { ret = ice_add_rss_cfg_wrap(pf, vsi->idx,
ICE_FLOW_HASH_IPV4, @@
-3216,6 +3226,8 @@ice_rss_hash_set(struct ice_pf *pf, uint64_t rss_hf)PMD_DRV_LOG(ERR, "%sGTPU_EH_IPV6_SCTPrss flow fail %d",__func__, ret);}
drivers/net/ice/ice_ethdev.c +2
-0+ +pf->rss_hf = rss_hf &ICE_RSS_HF_ALL ; } static int ice_init_rss(struct ice_pf *pf) @@ -4439,8 +4451,7 @@ice_rss_hash_conf_get(struct
rte_eth_dev*dev,ice_get_rss_key(vsi, rss_conf->rss_key, &rss_conf->rss_key_len);drivers/net/ice/ice_ethdev.c +1
-2-/* TODO: default set to 0 as hf config is not supported now */ -rss_conf->rss_hf =0 ; +rss_conf->rss_hf = pf->rss_hf;return 0 ; }(quoted diff) +0
-0
b/drivers/net/ice/ice_ethdev.hindex05218af05..452fd9050100644drivers/net/ice/ice_ethdev.h +1
-1@@ -457,6 +457,7 @@ struct ice_pf {uint64_t old_rx_bytes;uint64_t old_tx_bytes;uint64_t supported_rxdid;/* bitmap for supported RXDID */ +uint64_t rss_hf; };#define ICE_MAX_QUEUE_NUM 2048 --2.18.4
PATCH v3 1/1 net/ice: support show RSS hash configuration
In reply to [email protected]From: Zhu Tao <[email protected]>
Implement interface 'ice_rss_hash_conf_get' to support show RSS hash configuration.
Note:
Not support the same time setting RSS with RTE and classify API. Only return rss_hf from latest dev_configure or dev_rss_hash_update. All configures from rte_flow are ignored.
--- drivers/net/ice/ice_ethdev.c | 15 +++++++++++++-- drivers/net/ice/ice_ethdev.h | 1 + 2 files changed, 14 insertions(+), 2 deletions(-)
v2, v3 changes:
Committed log.
drivers/net/ice/ice_ethdev.c +13 -2
@@ -2923,6 +2923,16 @@ ice_rss_hash_set(struct ice_pf *pf, uint64_t rss_hf)struct ice_vsi *vsi = pf->main_vsi;int ret; +#define ICE_RSS_HF_ALL ( \ + ETH_RSS_IPV4 | \ + ETH_RSS_IPV6 | \ + ETH_RSS_NONFRAG_IPV4_UDP | \ + ETH_RSS_NONFRAG_IPV6_UDP | \ + ETH_RSS_NONFRAG_IPV4_TCP | \ + ETH_RSS_NONFRAG_IPV6_TCP | \ + ETH_RSS_NONFRAG_IPV4_SCTP | \ + ETH_RSS_NONFRAG_IPV6_SCTP) +/* Configure RSS for IPv4 with src/dst addr as input set */ if (rss_hf Ð_RSS_IPV4 ) { ret = ice_add_rss_cfg_wrap(pf, vsi->idx, ICE_FLOW_HASH_IPV4,
@@ -3216,6 +3226,8 @@ ice_rss_hash_set(struct ice_pf *pf, uint64_t rss_hf)PMD_DRV_LOG (ERR ,"%s GTPU_EH_IPV6_SCTP rss flow fail %d" , __func__, ret); } + + pf->rss_hf = rss_hf &ICE_RSS_HF_ALL ; }static int ice_init_rss (struct ice_pf *pf)
@@ -4439,8 +4451,7 @@ ice_rss_hash_conf_get(struct rte_eth_dev *dev,ice_get_rss_key (vsi, rss_conf->rss_key, &rss_conf->rss_key_len); -/* TODO: default set to 0 as hf config is not supported now */ - rss_conf->rss_hf =0 ; + rss_conf->rss_hf = pf->rss_hf;return 0 ; }
drivers/net/ice/ice_ethdev.h +1 -0
@@ -457,6 +457,7 @@ struct ice_pf {uint64_t old_rx_bytes;uint64_t old_tx_bytes;uint64_t supported_rxdid;/* bitmap for supported RXDID */ +uint64_t rss_hf; };#define ICE_MAX_QUEUE_NUM 2048
Signature · 1 line
2.18.4
Zhang, Qi Z
AppliedQuoted 15 lines
-----Original Message-----
From: [email protected] <[email protected]>
Sent: Thursday, October 29, 2020 2:38 PM
To: Yang, Qiming <[email protected]>; Zhang, Qi Z <[email protected]>
Cc: [email protected]; Zhu, TaoX <[email protected]>
Subject: [PATCH v3] net/ice: support show RSS hash configurationFrom: Zhu Tao <[email protected]>
Implement interface '
ice_rss_hash_conf_get' to support show RSS hash configuration.
Quoted 7 lines
Note:
Not support the same time setting RSS with RTE and classify API. Only returnrss_hffrom latestdev_configureordev_rss_hash_update. All configures fromrte_floware ignored.Signed-off-by Zhu Tao <[email protected]>Acked-by Qi Zhang <[email protected]>
Applied to dpdk-next-net-intel.
Thanks
Qi