[05/10] net/hns3: fix misclearing RSS configuration

Message ID 20230129105140.29921-6-liudongdong3@huawei.com (mailing list archive)
State Superseded, archived
Delegated to: Ferruh Yigit
Headers
Series net/hns3: some bugfixes for rss |

Checks

Context Check Description
ci/checkpatch success coding style OK

Commit Message

Dongdong Liu Jan. 29, 2023, 10:51 a.m. UTC
  From: Huisong Li <lihuisong@huawei.com>

The RSS configuration will be miscleared when driver receives a RSS rule
which has more one RSS action.

Fixes: c37ca66f2b27 ("net/hns3: support RSS")
Cc: stable@dpdk.org

Signed-off-by: Huisong Li <lihuisong@huawei.com>
Signed-off-by: Dongdong Liu <liudongdong3@huawei.com>
---
 drivers/net/hns3/hns3_flow.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
  

Patch

diff --git a/drivers/net/hns3/hns3_flow.c b/drivers/net/hns3/hns3_flow.c
index a18ec7650d..c338eab049 100644
--- a/drivers/net/hns3/hns3_flow.c
+++ b/drivers/net/hns3/hns3_flow.c
@@ -1421,12 +1421,10 @@  hns3_parse_rss_filter(struct rte_eth_dev *dev,
 
 	/* Check if the next not void action is END */
 	NEXT_ITEM_OF_ACTION(act, actions, act_index);
-	if (act->type != RTE_FLOW_ACTION_TYPE_END) {
-		memset(rss_conf, 0, sizeof(struct hns3_rss_conf));
+	if (act->type != RTE_FLOW_ACTION_TYPE_END)
 		return rte_flow_error_set(error, EINVAL,
 					  RTE_FLOW_ERROR_TYPE_ACTION,
 					  act, "Not supported action.");
-	}
 
 	return 0;
 }