net/hns3: fix flushing RSS rule
authorLijun Ou <oulijun@huawei.com>
Tue, 22 Sep 2020 12:03:27 +0000 (20:03 +0800)
committerFerruh Yigit <ferruh.yigit@intel.com>
Wed, 30 Sep 2020 17:19:11 +0000 (19:19 +0200)
commitec674cb742e5a756b9e4c7623c486220a718c885
tree4b7418ff8a7e528f75541c9a15b0ff4b26902ecc
parentb03ddaadc0e9776a05b73de14701f0cf2730885e
net/hns3: fix flushing RSS rule

When user create a flow without RSS by calling rte_flow_create API and then
destroy it by calling rte_flow_flush API, driver should not clear RSS rule.

A reasonable handling method is that when user creates an RSS rule, the
driver should clear the created RSS rule when flushing destroy all flow
rules. Also, hw->rss_info should save the RSS config of the last success
RSS rule. When create n RSS rules, the RSS should not be disabled before
the last RSS rule destroyed.

Fixes: c37ca66f2b27 ("net/hns3: support RSS")
Cc: stable@dpdk.org
Signed-off-by: Lijun Ou <oulijun@huawei.com>
Signed-off-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
drivers/net/hns3/hns3_flow.c
drivers/net/hns3/hns3_rss.h