net/hns3: fix configuring device with RSS enabled
Currently, when running the following commands in the CLI of testpmd
application, the driver reports an -EINVAL error when performing the No.3
step.
1) flow create 0 ingress pattern end actions rss key <key> func simple_xor
types all end / end
2) flow flush 0
3) port config dcb vt off pfc off
The root cause as below:
In the No.2 step, when RSS rules is flushed, we set the the flag
hw->rss_dis_flag with true to indicate RSS id disabled. And in the No.3
step, calling rte_eth_dev_configure API function, the internal function
named hns3_dev_rss_hash_update check hw->rss_dis_flag is true and return
-EINVAL.
When user calls the rte_eth_dev_configure API function with the input
parameter dev_conf->rxmode.mq_mode having ETH_MQ_RX_RSS_FLAG to enable RSS,
driver should set internal flag hw->rss_dis_flag with false to indicate RSS
is enabled in the '.dev_configure' ops implementation function named
hns3_dev_configure and hns3vf_dev_configure.
Fixes: 5e782bc257
("net/hns3: fix configuring RSS hash when rules are flushed")
Cc: stable@dpdk.org
Signed-off-by: Lijun Ou <oulijun@huawei.com>
Signed-off-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
This commit is contained in:
parent
ec674cb742
commit
fd81968387
@ -2326,6 +2326,7 @@ hns3_dev_configure(struct rte_eth_dev *dev)
|
||||
if ((uint32_t)mq_mode & ETH_MQ_RX_RSS_FLAG) {
|
||||
conf->rxmode.offloads |= DEV_RX_OFFLOAD_RSS_HASH;
|
||||
rss_conf = conf->rx_adv_conf.rss_conf;
|
||||
hw->rss_dis_flag = false;
|
||||
if (rss_conf.rss_key == NULL) {
|
||||
rss_conf.rss_key = rss_cfg->key;
|
||||
rss_conf.rss_key_len = HNS3_RSS_KEY_SIZE;
|
||||
|
@ -783,6 +783,7 @@ hns3vf_dev_configure(struct rte_eth_dev *dev)
|
||||
/* When RSS is not configured, redirect the packet queue 0 */
|
||||
if ((uint32_t)mq_mode & ETH_MQ_RX_RSS_FLAG) {
|
||||
conf->rxmode.offloads |= DEV_RX_OFFLOAD_RSS_HASH;
|
||||
hw->rss_dis_flag = false;
|
||||
rss_conf = conf->rx_adv_conf.rss_conf;
|
||||
if (rss_conf.rss_key == NULL) {
|
||||
rss_conf.rss_key = rss_cfg->key;
|
||||
|
Loading…
Reference in New Issue
Block a user