From b81a2f05658192464916c0d4f5cc1349d9d3aca4 Mon Sep 17 00:00:00 2001 From: Huisong Li Date: Tue, 31 Jan 2023 21:02:55 +0800 Subject: net/hns3: fix clearing RSS configuration [ upstream commit 1aa5222454725001939ff571e685225f6cf85653 ] When a RSS rule has an unsupported action, the RSS configuration is cleared by mistake. Remove clearing RSS configuration in this case. Fixes: c37ca66f2b27 ("net/hns3: support RSS") Cc: stable@dpdk.org Signed-off-by: Huisong Li Signed-off-by: Dongdong Liu --- drivers/net/hns3/hns3_flow.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) 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; } -- 2.23.0