patches for DPDK stable branches
 help / color / mirror / Atom feed
From: Xueming Li <xuemingl@nvidia.com>
To: Huisong Li <lihuisong@huawei.com>
Cc: Dongdong Liu <liudongdong3@huawei.com>, dpdk stable <stable@dpdk.org>
Subject: patch 'net/hns3: reimplement hash flow function' has been queued to stable release 22.11.2
Date: Sun, 9 Apr 2023 23:24:34 +0800	[thread overview]
Message-ID: <20230409152529.5308-87-xuemingl@nvidia.com> (raw)
In-Reply-To: <20230409152529.5308-1-xuemingl@nvidia.com>

Hi,

FYI, your patch has been queued to stable release 22.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 04/11/23. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=22.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/log/?h=22.11-staging/commit/3a5105f1de819eed82a669824012f6d7dd556994

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 3a5105f1de819eed82a669824012f6d7dd556994 Mon Sep 17 00:00:00 2001
From: Huisong Li <lihuisong@huawei.com>
Date: Fri, 10 Mar 2023 17:35:17 +0800
Subject: [PATCH] net/hns3: reimplement hash flow function
Cc: Xueming Li <xuemingl@nvidia.com>

[ upstream commit e3069658da9ffb6f83a0d972ff2776c405eb6a8f ]

Currently, hns3 driver supports setting multiple rte flow RSS rule,
but only the last is valid. This implementation is different from
the mainstream usage of rte flow hash in the community. Please see
the discussion threads [1] and [2].

This patch sets RSS hash feature completely based on the request of
the flow rule so that multiple hash rules can take effect at the same
time. Please notice that:
1. For hns3, 'func' has only one hardware. 'key' and 'queue' have only
   one entry in hardware.
2. the overlapping part of the old rule will be overridden if the
   configuration items of a new rule overlap with those of an old rule.

The hns3_flow_validate() verifies and parses RSS or Fdir rules from
user, and saves them to a local variable at the same time. The local
variable is directly used to create RSS or Fdir rules. In this way,
we save one parsing and saving process.

[1] https://lore.kernel.org/all/DM5PR12MB46648085D7CABF1AFF2D75CDD60A9@DM5PR12MB4664.namprd12.prod.outlook.com/
[2] https://lore.kernel.org/all/f7de4db4-1b88-622f-4e03-acd3eee8a72c@oktetlabs.ru/

Fixes: c37ca66f2b27 ("net/hns3: support RSS")

Signed-off-by: Huisong Li <lihuisong@huawei.com>
Signed-off-by: Dongdong Liu <liudongdong3@huawei.com>
---
 drivers/net/hns3/hns3_ethdev.h |   9 -
 drivers/net/hns3/hns3_flow.c   | 966 +++++++++++++++++++++++----------
 drivers/net/hns3/hns3_flow.h   |  15 +-
 drivers/net/hns3/hns3_rss.c    | 144 ++---
 drivers/net/hns3/hns3_rss.h    | 117 +++-
 5 files changed, 855 insertions(+), 396 deletions(-)

diff --git a/drivers/net/hns3/hns3_ethdev.h b/drivers/net/hns3/hns3_ethdev.h
index 2457754b3d..9acc5a3d7e 100644
--- a/drivers/net/hns3/hns3_ethdev.h
+++ b/drivers/net/hns3/hns3_ethdev.h
@@ -996,15 +996,6 @@ static inline uint32_t hns3_read_reg(void *base, uint32_t reg)
 #define hns3_read_dev(a, reg) \
 	hns3_read_reg((a)->io_base, (reg))
 
-#define NEXT_ITEM_OF_ACTION(act, actions, index)                        \
-	do {								\
-		(act) = (actions) + (index);				\
-		while ((act)->type == RTE_FLOW_ACTION_TYPE_VOID) {	\
-			(index)++;					\
-			(act) = (actions) + (index);				\
-		}							\
-	} while (0)
-
 static inline uint64_t
 hns3_atomic_test_bit(unsigned int nr, volatile uint64_t *addr)
 {
diff --git a/drivers/net/hns3/hns3_flow.c b/drivers/net/hns3/hns3_flow.c
index b1189455ec..c38bd9dd8b 100644
--- a/drivers/net/hns3/hns3_flow.c
+++ b/drivers/net/hns3/hns3_flow.c
@@ -10,6 +10,125 @@
 #include "hns3_logs.h"
 #include "hns3_flow.h"
 
+#define NEXT_ITEM_OF_ACTION(act, actions, index) \
+	do { \
+		(act) = (actions) + (index); \
+		while ((act)->type == RTE_FLOW_ACTION_TYPE_VOID) { \
+			(index)++; \
+			(act) = (actions) + (index); \
+		} \
+	} while (0)
+
+#define NEXT_ITEM_OF_PATTERN(item, pattern, index) \
+	do { \
+		(item) = (pattern) + (index); \
+		while ((item)->type == RTE_FLOW_ITEM_TYPE_VOID) { \
+			(index)++; \
+			(item) = (pattern) + (index); \
+		} \
+	} while (0)
+
+#define HNS3_HASH_HDR_ETH	RTE_BIT64(0)
+#define HNS3_HASH_HDR_IPV4	RTE_BIT64(1)
+#define HNS3_HASH_HDR_IPV6	RTE_BIT64(2)
+#define HNS3_HASH_HDR_TCP	RTE_BIT64(3)
+#define HNS3_HASH_HDR_UDP	RTE_BIT64(4)
+#define HNS3_HASH_HDR_SCTP	RTE_BIT64(5)
+
+#define HNS3_HASH_VOID_NEXT_ALLOW	BIT_ULL(RTE_FLOW_ITEM_TYPE_ETH)
+
+#define HNS3_HASH_ETH_NEXT_ALLOW	(BIT_ULL(RTE_FLOW_ITEM_TYPE_IPV4) | \
+					 BIT_ULL(RTE_FLOW_ITEM_TYPE_IPV6))
+
+#define HNS3_HASH_IP_NEXT_ALLOW		(BIT_ULL(RTE_FLOW_ITEM_TYPE_TCP) | \
+					 BIT_ULL(RTE_FLOW_ITEM_TYPE_UDP) | \
+					 BIT_ULL(RTE_FLOW_ITEM_TYPE_SCTP))
+
+static const uint64_t hash_pattern_next_allow_items[] = {
+	[RTE_FLOW_ITEM_TYPE_VOID] = HNS3_HASH_VOID_NEXT_ALLOW,
+	[RTE_FLOW_ITEM_TYPE_ETH]  = HNS3_HASH_ETH_NEXT_ALLOW,
+	[RTE_FLOW_ITEM_TYPE_IPV4] = HNS3_HASH_IP_NEXT_ALLOW,
+	[RTE_FLOW_ITEM_TYPE_IPV6] = HNS3_HASH_IP_NEXT_ALLOW,
+};
+
+static const uint64_t hash_pattern_item_header[] = {
+	[RTE_FLOW_ITEM_TYPE_ETH]  = HNS3_HASH_HDR_ETH,
+	[RTE_FLOW_ITEM_TYPE_IPV4] = HNS3_HASH_HDR_IPV4,
+	[RTE_FLOW_ITEM_TYPE_IPV6] = HNS3_HASH_HDR_IPV6,
+	[RTE_FLOW_ITEM_TYPE_TCP]  = HNS3_HASH_HDR_TCP,
+	[RTE_FLOW_ITEM_TYPE_UDP]  = HNS3_HASH_HDR_UDP,
+	[RTE_FLOW_ITEM_TYPE_SCTP] = HNS3_HASH_HDR_SCTP,
+};
+
+#define HNS3_HASH_IPV4		(HNS3_HASH_HDR_ETH | HNS3_HASH_HDR_IPV4)
+#define HNS3_HASH_IPV4_TCP	(HNS3_HASH_HDR_ETH | \
+				 HNS3_HASH_HDR_IPV4 | \
+				 HNS3_HASH_HDR_TCP)
+#define HNS3_HASH_IPV4_UDP	(HNS3_HASH_HDR_ETH | \
+				 HNS3_HASH_HDR_IPV4 | \
+				 HNS3_HASH_HDR_UDP)
+#define HNS3_HASH_IPV4_SCTP	(HNS3_HASH_HDR_ETH | \
+				 HNS3_HASH_HDR_IPV4 | \
+				 HNS3_HASH_HDR_SCTP)
+#define HNS3_HASH_IPV6		(HNS3_HASH_HDR_ETH | HNS3_HASH_HDR_IPV6)
+#define HNS3_HASH_IPV6_TCP	(HNS3_HASH_HDR_ETH | \
+				 HNS3_HASH_HDR_IPV6 | \
+				 HNS3_HASH_HDR_TCP)
+#define HNS3_HASH_IPV6_UDP	(HNS3_HASH_HDR_ETH | \
+				 HNS3_HASH_HDR_IPV6 | \
+				 HNS3_HASH_HDR_UDP)
+#define HNS3_HASH_IPV6_SCTP	(HNS3_HASH_HDR_ETH | \
+				 HNS3_HASH_HDR_IPV6 | \
+				 HNS3_HASH_HDR_SCTP)
+
+static const struct hns3_hash_map_info {
+	/* flow type specified, zero means action works for all flow types. */
+	uint64_t pattern_type;
+	uint64_t rss_pctype; /* packet type with prefix RTE_ETH_RSS_xxx */
+	uint64_t l3l4_types; /* Supported L3/L4 RSS types for this packet type */
+	uint64_t hw_pctype; /* packet type in driver */
+	uint64_t tuple_mask; /* full tuples of the hw_pctype */
+} hash_map_table[] = {
+	/* IPV4 */
+	{ HNS3_HASH_IPV4,
+	  RTE_ETH_RSS_IPV4, HNS3_RSS_SUPPORT_L3_SRC_DST,
+	  HNS3_RSS_PCTYPE_IPV4_NONF, HNS3_RSS_TUPLE_IPV4_NONF_M },
+	{ HNS3_HASH_IPV4,
+	  RTE_ETH_RSS_NONFRAG_IPV4_OTHER, HNS3_RSS_SUPPORT_L3_SRC_DST,
+	  HNS3_RSS_PCTYPE_IPV4_NONF, HNS3_RSS_TUPLE_IPV4_NONF_M },
+	{ HNS3_HASH_IPV4,
+	  RTE_ETH_RSS_FRAG_IPV4, HNS3_RSS_SUPPORT_L3_SRC_DST,
+	  HNS3_RSS_PCTYPE_IPV4_FLAG, HNS3_RSS_TUPLE_IPV4_FLAG_M },
+	{ HNS3_HASH_IPV4_TCP,
+	  RTE_ETH_RSS_NONFRAG_IPV4_TCP, HNS3_RSS_SUPPORT_L3L4,
+	  HNS3_RSS_PCTYPE_IPV4_TCP, HNS3_RSS_TUPLE_IPV4_TCP_M },
+	{ HNS3_HASH_IPV4_UDP,
+	  RTE_ETH_RSS_NONFRAG_IPV4_UDP, HNS3_RSS_SUPPORT_L3L4,
+	  HNS3_RSS_PCTYPE_IPV4_UDP, HNS3_RSS_TUPLE_IPV4_UDP_M },
+	{ HNS3_HASH_IPV4_SCTP,
+	  RTE_ETH_RSS_NONFRAG_IPV4_SCTP, HNS3_RSS_SUPPORT_L3L4,
+	  HNS3_RSS_PCTYPE_IPV4_SCTP, HNS3_RSS_TUPLE_IPV4_SCTP_M },
+	/* IPV6 */
+	{ HNS3_HASH_IPV6,
+	  RTE_ETH_RSS_IPV6, HNS3_RSS_SUPPORT_L3_SRC_DST,
+	  HNS3_RSS_PCTYPE_IPV6_NONF, HNS3_RSS_TUPLE_IPV6_NONF_M },
+	{ HNS3_HASH_IPV6,
+	  RTE_ETH_RSS_NONFRAG_IPV6_OTHER, HNS3_RSS_SUPPORT_L3_SRC_DST,
+	  HNS3_RSS_PCTYPE_IPV6_NONF, HNS3_RSS_TUPLE_IPV6_NONF_M },
+	{ HNS3_HASH_IPV6,
+	  RTE_ETH_RSS_FRAG_IPV6, HNS3_RSS_SUPPORT_L3_SRC_DST,
+	  HNS3_RSS_PCTYPE_IPV6_FLAG, HNS3_RSS_TUPLE_IPV6_FLAG_M },
+	{ HNS3_HASH_IPV6_TCP,
+	  RTE_ETH_RSS_NONFRAG_IPV6_TCP, HNS3_RSS_SUPPORT_L3L4,
+	  HNS3_RSS_PCTYPE_IPV6_TCP, HNS3_RSS_TUPLE_IPV6_TCP_M },
+	{ HNS3_HASH_IPV6_UDP,
+	  RTE_ETH_RSS_NONFRAG_IPV6_UDP, HNS3_RSS_SUPPORT_L3L4,
+	  HNS3_RSS_PCTYPE_IPV6_UDP, HNS3_RSS_TUPLE_IPV6_UDP_M },
+	{ HNS3_HASH_IPV6_SCTP,
+	  RTE_ETH_RSS_NONFRAG_IPV6_SCTP, HNS3_RSS_SUPPORT_L3L4,
+	  HNS3_RSS_PCTYPE_IPV6_SCTP, HNS3_RSS_TUPLE_IPV6_SCTP_M },
+};
+
 static const uint8_t full_mask[VNI_OR_TNI_LEN] = { 0xFF, 0xFF, 0xFF };
 static const uint8_t zero_mask[VNI_OR_TNI_LEN] = { 0x00, 0x00, 0x00 };
 
@@ -79,7 +198,7 @@ net_addr_to_host(uint32_t *dst, const rte_be32_t *src, size_t len)
 }
 
 /*
- * This function is used to find rss general action.
+ * This function is used to parse filter type.
  * 1. As we know RSS is used to spread packets among several queues, the flow
  *    API provide the struct rte_flow_action_rss, user could config its field
  *    sush as: func/level/types/key/queue to control RSS function.
@@ -87,16 +206,18 @@ net_addr_to_host(uint32_t *dst, const rte_be32_t *src, size_t len)
  *    implemented by FDIR + RSS in hns3 hardware, user can create one FDIR rule
  *    which action is RSS queues region.
  * 3. When action is RSS, we use the following rule to distinguish:
- *    Case 1: pattern have ETH and action's queue_num > 0, indicate it is queue
- *            region configuration.
+ *    Case 1: pattern has ETH and all fields in RSS action except 'queues' are
+ *            zero or default, indicate it is queue region configuration.
  *    Case other: an rss general action.
  */
-static const struct rte_flow_action *
-hns3_find_rss_general_action(const struct rte_flow_item pattern[],
-			     const struct rte_flow_action actions[])
+static void
+hns3_parse_filter_type(const struct rte_flow_item pattern[],
+		       const struct rte_flow_action actions[],
+		       struct hns3_filter_info *filter_info)
 {
 	const struct rte_flow_action_rss *rss_act;
 	const struct rte_flow_action *act = NULL;
+	bool only_has_queues = false;
 	bool have_eth = false;
 
 	for (; actions->type != RTE_FLOW_ACTION_TYPE_END; actions++) {
@@ -105,8 +226,10 @@ hns3_find_rss_general_action(const struct rte_flow_item pattern[],
 			break;
 		}
 	}
-	if (!act)
-		return NULL;
+	if (act == NULL) {
+		filter_info->type = RTE_ETH_FILTER_FDIR;
+		return;
+	}
 
 	for (; pattern->type != RTE_FLOW_ITEM_TYPE_END; pattern++) {
 		if (pattern->type == RTE_FLOW_ITEM_TYPE_ETH) {
@@ -116,18 +239,20 @@ hns3_find_rss_general_action(const struct rte_flow_item pattern[],
 	}
 
 	rss_act = act->conf;
-	if (have_eth && rss_act->queue_num) {
+	only_has_queues = (rss_act->queue_num > 0) &&
+			  (rss_act->func == RTE_ETH_HASH_FUNCTION_DEFAULT &&
+			   rss_act->types == 0 && rss_act->key_len == 0);
+	if (have_eth && only_has_queues) {
 		/*
-		 * Pattern have ETH and action's queue_num > 0, indicate this is
-		 * queue region configuration.
-		 * Because queue region is implemented by FDIR + RSS in hns3
-		 * hardware, it needs to enter FDIR process, so here return NULL
-		 * to avoid enter RSS process.
+		 * Pattern has ETH and all fields in RSS action except 'queues'
+		 * are zero or default, which indicates this is queue region
+		 * configuration.
 		 */
-		return NULL;
+		filter_info->type = RTE_ETH_FILTER_FDIR;
+		return;
 	}
 
-	return act;
+	filter_info->type = RTE_ETH_FILTER_HASH;
 }
 
 static inline struct hns3_flow_counter *
@@ -1246,7 +1371,6 @@ hns3_filterlist_flush(struct rte_eth_dev *dev)
 {
 	struct hns3_hw *hw = HNS3_DEV_PRIVATE_TO_HW(dev->data->dev_private);
 	struct hns3_fdir_rule_ele *fdir_rule_ptr;
-	struct hns3_rss_conf_ele *rss_filter_ptr;
 	struct hns3_flow_mem *flow_node;
 
 	fdir_rule_ptr = TAILQ_FIRST(&hw->flow_fdir_list);
@@ -1256,13 +1380,6 @@ hns3_filterlist_flush(struct rte_eth_dev *dev)
 		fdir_rule_ptr = TAILQ_FIRST(&hw->flow_fdir_list);
 	}
 
-	rss_filter_ptr = TAILQ_FIRST(&hw->flow_rss_list);
-	while (rss_filter_ptr) {
-		TAILQ_REMOVE(&hw->flow_rss_list, rss_filter_ptr, entries);
-		rte_free(rss_filter_ptr);
-		rss_filter_ptr = TAILQ_FIRST(&hw->flow_rss_list);
-	}
-
 	flow_node = TAILQ_FIRST(&hw->flow_list);
 	while (flow_node) {
 		TAILQ_REMOVE(&hw->flow_list, flow_node, entries);
@@ -1328,196 +1445,422 @@ hns3_action_rss_same(const struct rte_flow_action_rss *comp,
 }
 
 static bool
-hns3_rss_input_tuple_supported(struct hns3_hw *hw,
-			       const struct rte_flow_action_rss *rss)
+hns3_valid_ipv6_sctp_rss_types(struct hns3_hw *hw, uint64_t types)
 {
 	/*
-	 * For IP packet, it is not supported to use src/dst port fields to RSS
-	 * hash for the following packet types.
-	 * - IPV4 FRAG | IPV4 NONFRAG | IPV6 FRAG | IPV6 NONFRAG
-	 * Besides, for Kunpeng920, the NIC HW is not supported to use src/dst
-	 * port fields to RSS hash for IPV6 SCTP packet type. However, the
-	 * Kunpeng930 and future kunpeng series support to use src/dst port
-	 * fields to RSS hash for IPv6 SCTP packet type.
+	 * Some hardware don't support to use src/dst port fields to hash
+	 * for IPV6 SCTP packet type.
 	 */
-	if (rss->types & (RTE_ETH_RSS_L4_DST_ONLY | RTE_ETH_RSS_L4_SRC_ONLY) &&
-	    (rss->types & RTE_ETH_RSS_IP ||
-	    (!hw->rss_info.ipv6_sctp_offload_supported &&
-	    rss->types & RTE_ETH_RSS_NONFRAG_IPV6_SCTP)))
+	if (types & RTE_ETH_RSS_NONFRAG_IPV6_SCTP &&
+	    types & HNS3_RSS_SUPPORT_L4_SRC_DST &&
+	    !hw->rss_info.ipv6_sctp_offload_supported)
 		return false;
 
 	return true;
 }
 
-/*
- * This function is used to parse rss action validation.
- */
 static int
-hns3_parse_rss_filter(struct rte_eth_dev *dev,
-		      const struct rte_flow_action *actions,
-		      struct rte_flow_error *error)
+hns3_flow_parse_hash_func(const struct rte_flow_action_rss *rss_act,
+			  struct hns3_flow_rss_conf *rss_conf,
+			  struct rte_flow_error *error)
 {
-	struct hns3_adapter *hns = dev->data->dev_private;
-	struct hns3_hw *hw = &hns->hw;
-	const struct rte_flow_action_rss *rss;
-	const struct rte_flow_action *act;
-	uint32_t act_index = 0;
-	uint16_t n;
+	if (rss_act->func >= RTE_ETH_HASH_FUNCTION_MAX)
+		return rte_flow_error_set(error, ENOTSUP,
+					  RTE_FLOW_ERROR_TYPE_ACTION_CONF,
+					  NULL, "RSS hash func are not supported");
 
-	NEXT_ITEM_OF_ACTION(act, actions, act_index);
-	rss = act->conf;
+	rss_conf->conf.func = rss_act->func;
+	return 0;
+}
 
-	if (rss == NULL) {
+static int
+hns3_flow_parse_hash_key(struct hns3_hw *hw,
+			 const struct rte_flow_action_rss *rss_act,
+			 struct hns3_flow_rss_conf *rss_conf,
+			 struct rte_flow_error *error)
+{
+	if (rss_act->key_len != hw->rss_key_size)
 		return rte_flow_error_set(error, EINVAL,
 					  RTE_FLOW_ERROR_TYPE_ACTION_CONF,
-					  act, "no valid queues");
-	}
+					  NULL, "invalid RSS key length");
+
+	if (rss_act->key != NULL)
+		memcpy(rss_conf->key, rss_act->key, rss_act->key_len);
+	else
+		memcpy(rss_conf->key, hns3_hash_key,
+			RTE_MIN(sizeof(hns3_hash_key), rss_act->key_len));
+	/* Need to record if user sets hash key. */
+	rss_conf->conf.key = rss_act->key;
+	rss_conf->conf.key_len = rss_act->key_len;
 
-	if (rss->queue_num > HNS3_RSS_QUEUES_BUFFER_NUM)
+	return 0;
+}
+
+static int
+hns3_flow_parse_queues(struct hns3_hw *hw,
+		       const struct rte_flow_action_rss *rss_act,
+		       struct hns3_flow_rss_conf *rss_conf,
+		       struct rte_flow_error *error)
+{
+	uint16_t i;
+
+	if (rss_act->queue_num > hw->rss_ind_tbl_size)
 		return rte_flow_error_set(error, ENOTSUP,
-					  RTE_FLOW_ERROR_TYPE_ACTION_CONF, act,
-					  "queue number configured exceeds "
-					  "queue buffer size driver supported");
+					  RTE_FLOW_ERROR_TYPE_ACTION_CONF,
+					  NULL,
+					  "queue number can not exceed RSS indirection table.");
 
-	for (n = 0; n < rss->queue_num; n++) {
-		if (rss->queue[n] < hw->alloc_rss_size)
-			continue;
-		return rte_flow_error_set(error, EINVAL,
-					  RTE_FLOW_ERROR_TYPE_ACTION_CONF, act,
-					  "queue id must be less than queue number allocated to a TC");
+	if (rss_act->queue_num > HNS3_RSS_QUEUES_BUFFER_NUM)
+		return rte_flow_error_set(error, ENOTSUP,
+					  RTE_FLOW_ERROR_TYPE_ACTION_CONF,
+					  NULL,
+					  "queue number configured exceeds queue buffer size driver supported");
+
+	for (i = 0; i < rss_act->queue_num; i++) {
+		if (rss_act->queue[i] >= hw->alloc_rss_size)
+			return rte_flow_error_set(error, EINVAL,
+						RTE_FLOW_ERROR_TYPE_ACTION_CONF,
+						NULL,
+						"queue id must be less than queue number allocated to a TC");
 	}
 
-	if (!(rss->types & HNS3_ETH_RSS_SUPPORT) && rss->types)
+	memcpy(rss_conf->queue, rss_act->queue,
+	       rss_act->queue_num * sizeof(rss_conf->queue[0]));
+	rss_conf->conf.queue = rss_conf->queue;
+	rss_conf->conf.queue_num = rss_act->queue_num;
+
+	return 0;
+}
+
+static int
+hns3_flow_get_hw_pctype(struct hns3_hw *hw,
+			const struct rte_flow_action_rss *rss_act,
+			const struct hns3_hash_map_info *map,
+			struct hns3_flow_rss_conf *rss_conf,
+			struct rte_flow_error *error)
+{
+	uint64_t l3l4_src_dst, l3l4_refine, left_types;
+
+	if (rss_act->types == 0) {
+		/* Disable RSS hash of this packet type if types is zero. */
+		rss_conf->hw_pctypes |= map->hw_pctype;
+		return 0;
+	}
+
+	/*
+	 * Can not have extra types except rss_pctype and l3l4_type in this map.
+	 */
+	left_types = ~map->rss_pctype & rss_act->types;
+	if (left_types & ~map->l3l4_types)
 		return rte_flow_error_set(error, EINVAL,
-					  RTE_FLOW_ERROR_TYPE_ACTION_CONF,
-					  act,
-					  "Flow types is unsupported by "
-					  "hns3's RSS");
-	if (rss->func >= RTE_ETH_HASH_FUNCTION_MAX)
-		return rte_flow_error_set(error, ENOTSUP,
-					  RTE_FLOW_ERROR_TYPE_ACTION_CONF, act,
-					  "RSS hash func are not supported");
-	if (rss->level)
+					  RTE_FLOW_ERROR_TYPE_ACTION_CONF, NULL,
+					  "cannot set extra types.");
+
+	l3l4_src_dst = left_types;
+	/* L3/L4 SRC and DST shouldn't be specified at the same time. */
+	l3l4_refine = rte_eth_rss_hf_refine(l3l4_src_dst);
+	if (l3l4_refine != l3l4_src_dst)
 		return rte_flow_error_set(error, ENOTSUP,
-					  RTE_FLOW_ERROR_TYPE_ACTION_CONF, act,
-					  "a nonzero RSS encapsulation level is not supported");
-	if (rss->key_len && rss->key_len != hw->rss_key_size)
+					  RTE_FLOW_ERROR_TYPE_ACTION_CONF, NULL,
+					  "cannot specify L3_SRC/DST_ONLY or L4_SRC/DST_ONLY at the same.");
+
+	if (!hns3_valid_ipv6_sctp_rss_types(hw, rss_act->types))
 		return rte_flow_error_set(error, ENOTSUP,
-					  RTE_FLOW_ERROR_TYPE_ACTION_CONF, act,
-					  "invalid RSS key length");
+					  RTE_FLOW_ERROR_TYPE_ACTION_CONF, NULL,
+					  "hardware doesn't support to use L4 src/dst to hash for IPV6-SCTP.");
 
-	if (!hns3_rss_input_tuple_supported(hw, rss))
-		return rte_flow_error_set(error, EINVAL,
+	rss_conf->hw_pctypes |= map->hw_pctype;
+
+	return 0;
+}
+
+static int
+hns3_flow_parse_rss_types_by_ptype(struct hns3_hw *hw,
+				   const struct rte_flow_action_rss *rss_act,
+				   uint64_t pattern_type,
+				   struct hns3_flow_rss_conf *rss_conf,
+				   struct rte_flow_error *error)
+{
+	const struct hns3_hash_map_info *map;
+	bool matched = false;
+	uint16_t i;
+	int ret;
+
+	for (i = 0; i < RTE_DIM(hash_map_table); i++) {
+		map = &hash_map_table[i];
+		if (map->pattern_type != pattern_type) {
+			/*
+			 * If the target pattern type is already matched with
+			 * the one before this pattern in the hash map table,
+			 * no need to continue walk.
+			 */
+			if (matched)
+				break;
+			continue;
+		}
+		matched = true;
+
+		/*
+		 * If pattern type is matched and the 'types' is zero, all packet flow
+		 * types related to this pattern type disable RSS hash.
+		 * Otherwise, RSS types must match the pattern type and cannot have no
+		 * extra or unsupported types.
+		 */
+		if (rss_act->types != 0 && !(map->rss_pctype & rss_act->types))
+			continue;
+
+		ret = hns3_flow_get_hw_pctype(hw, rss_act, map, rss_conf, error);
+		if (ret != 0)
+			return ret;
+	}
+
+	if (rss_conf->hw_pctypes != 0)
+		return 0;
+
+	if (matched)
+		return rte_flow_error_set(error, ENOTSUP,
 					  RTE_FLOW_ERROR_TYPE_ACTION_CONF,
-					  &rss->types,
-					  "input RSS types are not supported");
+					  NULL, "RSS types are unsupported");
 
-	act_index++;
+	return rte_flow_error_set(error, ENOTSUP,
+				  RTE_FLOW_ERROR_TYPE_ACTION_CONF,
+				  NULL, "Pattern specified is unsupported");
+}
 
-	/* 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)
-		return rte_flow_error_set(error, EINVAL,
-					  RTE_FLOW_ERROR_TYPE_ACTION,
-					  act, "Not supported action.");
+static uint64_t
+hns3_flow_get_all_hw_pctypes(uint64_t types)
+{
+	uint64_t hw_pctypes = 0;
+	uint16_t i;
 
-	return 0;
+	for (i = 0; i < RTE_DIM(hash_map_table); i++) {
+		if (types & hash_map_table[i].rss_pctype)
+			hw_pctypes |= hash_map_table[i].hw_pctype;
+	}
+
+	return hw_pctypes;
 }
 
 static int
-hns3_disable_rss(struct hns3_hw *hw)
+hns3_flow_parse_rss_types(struct hns3_hw *hw,
+			  const struct rte_flow_action_rss *rss_act,
+			  uint64_t pattern_type,
+			  struct hns3_flow_rss_conf *rss_conf,
+			  struct rte_flow_error *error)
+{
+	rss_conf->conf.types = rss_act->types;
+
+	/* no pattern specified to set global RSS types. */
+	if (pattern_type == 0) {
+		if (rss_act->types & ~HNS3_ETH_RSS_SUPPORT)
+			hns3_warn(hw, "some types in the requested RSS types (0x%" PRIx64 ") aren't supported, they are ignored.",
+				  rss_act->types);
+		rss_conf->hw_pctypes =
+				hns3_flow_get_all_hw_pctypes(rss_act->types);
+		return 0;
+	}
+
+	return hns3_flow_parse_rss_types_by_ptype(hw, rss_act, pattern_type,
+						  rss_conf, error);
+}
+
+static int
+hns3_flow_parse_hash_global_conf(struct rte_eth_dev *dev,
+				 const struct rte_flow_action_rss *rss_act,
+				 struct hns3_flow_rss_conf *rss_conf,
+				 struct rte_flow_error *error)
 {
+	struct hns3_hw *hw = HNS3_DEV_PRIVATE_TO_HW(dev->data->dev_private);
 	int ret;
 
-	ret = hns3_set_rss_tuple_by_rss_hf(hw, 0);
-	if (ret)
+	ret = hns3_flow_parse_hash_func(rss_act, rss_conf, error);
+	if (ret != 0)
 		return ret;
-	hw->rss_info.rss_hf = 0;
 
-	return 0;
+	if (rss_act->queue_num > 0) {
+		ret = hns3_flow_parse_queues(hw, rss_act, rss_conf, error);
+		if (ret != 0)
+			return ret;
+	}
+
+	if (rss_act->key_len > 0) {
+		ret = hns3_flow_parse_hash_key(hw, rss_act, rss_conf, error);
+		if (ret != 0)
+			return ret;
+	}
+
+	return hns3_flow_parse_rss_types(hw, rss_act, rss_conf->pattern_type,
+					 rss_conf, error);
 }
 
 static int
-hns3_parse_rss_algorithm(struct hns3_hw *hw, struct hns3_flow_rss_conf *rss_conf,
-			 uint8_t *hash_algo)
-{
-	const uint8_t hash_func_map[] = {
-		[RTE_ETH_HASH_FUNCTION_DEFAULT] = HNS3_RSS_HASH_ALGO_TOEPLITZ,
-		[RTE_ETH_HASH_FUNCTION_TOEPLITZ] = HNS3_RSS_HASH_ALGO_TOEPLITZ,
-		[RTE_ETH_HASH_FUNCTION_SIMPLE_XOR] = HNS3_RSS_HASH_ALGO_SIMPLE,
-		[RTE_ETH_HASH_FUNCTION_SYMMETRIC_TOEPLITZ] = HNS3_RSS_HASH_ALGO_SYMMETRIC_TOEP,
-	};
-	uint8_t key[HNS3_RSS_KEY_SIZE_MAX] = {0};
-	int ret;
+hns3_flow_parse_pattern_type(const struct rte_flow_item pattern[],
+			     uint64_t *ptype, struct rte_flow_error *error)
+{
+	enum rte_flow_item_type pre_type = RTE_FLOW_ITEM_TYPE_VOID;
+	const char *message = "Pattern specified isn't supported";
+	uint64_t item_hdr, pattern_hdrs = 0;
+	enum rte_flow_item_type cur_type;
 
-	if (rss_conf->conf.func == RTE_ETH_HASH_FUNCTION_DEFAULT) {
-		ret = hns3_rss_get_algo_key(hw, hash_algo, key,
-					    hw->rss_key_size);
-		if (ret != 0) {
-			hns3_err(hw, "fail to get current RSS hash algorithm, ret = %d",
-				 ret);
-			return ret;
+	for (; pattern->type != RTE_FLOW_ITEM_TYPE_END; pattern++) {
+		if (pattern->type == RTE_FLOW_ITEM_TYPE_VOID)
+			continue;
+		if (pattern->mask || pattern->spec || pattern->last) {
+			message = "Header info shouldn't be specified";
+			goto unsup;
 		}
 
-		/*
-		 * During the phase of reset recovery, the hash algorithm
-		 * obtained from hardware may not be the one used(saved in
-		 * rte_flow_hash_algo) when this rule is delivered.
-		 */
-		if (__atomic_load_n(&hw->reset.resetting, __ATOMIC_RELAXED) &&
-		    *hash_algo != rss_conf->hash_algo)
-			*hash_algo = rss_conf->hash_algo;
+		/* Check the sub-item allowed by the previous item . */
+		if (pre_type >= RTE_DIM(hash_pattern_next_allow_items) ||
+		    !(hash_pattern_next_allow_items[pre_type] &
+				BIT_ULL(pattern->type)))
+			goto unsup;
+
+		cur_type = pattern->type;
+		/* Unsupported for current type being greater than array size. */
+		if (cur_type >= RTE_DIM(hash_pattern_item_header))
+			goto unsup;
+
+		/* The value is zero, which means unsupported current header. */
+		item_hdr = hash_pattern_item_header[cur_type];
+		if (item_hdr == 0)
+			goto unsup;
+
+		/* Have duplicate pattern header. */
+		if (item_hdr & pattern_hdrs)
+			goto unsup;
+		pre_type = cur_type;
+		pattern_hdrs |= item_hdr;
+	}
 
+	if (pattern_hdrs != 0) {
+		*ptype = pattern_hdrs;
 		return 0;
 	}
 
-	*hash_algo = hash_func_map[rss_conf->conf.func];
+unsup:
+	return rte_flow_error_set(error, ENOTSUP, RTE_FLOW_ERROR_TYPE_ITEM,
+				  pattern, message);
+}
+
+static int
+hns3_flow_parse_pattern_act(struct rte_eth_dev *dev,
+			    const struct rte_flow_item pattern[],
+			    const struct rte_flow_action_rss *rss_act,
+			    struct hns3_flow_rss_conf *rss_conf,
+			    struct rte_flow_error *error)
+{
+	struct hns3_hw *hw = HNS3_DEV_PRIVATE_TO_HW(dev->data->dev_private);
+	int ret;
+
+	ret = hns3_flow_parse_hash_func(rss_act, rss_conf, error);
+	if (ret != 0)
+		return ret;
+
+	if (rss_act->key_len > 0) {
+		ret = hns3_flow_parse_hash_key(hw, rss_act, rss_conf, error);
+		if (ret != 0)
+			return ret;
+	}
+
+	if (rss_act->queue_num > 0) {
+		ret = hns3_flow_parse_queues(hw, rss_act, rss_conf, error);
+		if (ret != 0)
+			return ret;
+	}
+
+	ret = hns3_flow_parse_pattern_type(pattern, &rss_conf->pattern_type,
+					   error);
+	if (ret != 0)
+		return ret;
+
+	ret = hns3_flow_parse_rss_types(hw, rss_act, rss_conf->pattern_type,
+					rss_conf, error);
+	if (ret != 0)
+		return ret;
+
+	if (rss_act->func != RTE_ETH_HASH_FUNCTION_DEFAULT ||
+	    rss_act->key_len > 0 || rss_act->queue_num > 0)
+		hns3_warn(hw, "hash func, key and queues are global config, which work for all flow types. "
+			  "Recommend: don't set them together with pattern.");
 
 	return 0;
 }
 
+static bool
+hns3_rss_action_is_dup(struct hns3_hw *hw,
+		       const struct hns3_flow_rss_conf *conf)
+{
+	struct hns3_rss_conf_ele *filter;
+
+	TAILQ_FOREACH(filter, &hw->flow_rss_list, entries) {
+		if (conf->pattern_type != filter->filter_info.pattern_type)
+			continue;
+
+		if (hns3_action_rss_same(&filter->filter_info.conf, &conf->conf))
+			return true;
+	}
+
+	return false;
+}
+
+/*
+ * This function is used to parse rss action validation.
+ */
 static int
-hns3_hw_rss_hash_set(struct hns3_hw *hw, struct hns3_flow_rss_conf *conf)
+hns3_parse_rss_filter(struct rte_eth_dev *dev,
+		      const struct rte_flow_item pattern[],
+		      const struct rte_flow_action *actions,
+		      struct hns3_flow_rss_conf *rss_conf,
+		      struct rte_flow_error *error)
 {
-	struct rte_flow_action_rss *rss_config = &conf->conf;
-	uint8_t rss_key[HNS3_RSS_KEY_SIZE_MAX] = {0};
-	bool use_default_key = false;
-	uint64_t flow_types;
-	uint8_t hash_algo;
+	struct hns3_adapter *hns = dev->data->dev_private;
+	const struct rte_flow_action_rss *rss_act;
+	const struct rte_flow_action *act;
+	const struct rte_flow_item *pat;
+	struct hns3_hw *hw = &hns->hw;
+	uint32_t index = 0;
 	int ret;
 
-	if (rss_config->key == NULL || rss_config->key_len != hw->rss_key_size) {
-		hns3_warn(hw, "Default RSS hash key to be set");
-		memcpy(rss_key, hns3_hash_key,
-			RTE_MIN(sizeof(hns3_hash_key), hw->rss_key_size));
-		use_default_key = true;
+	NEXT_ITEM_OF_ACTION(act, actions, index);
+	if (actions[1].type != RTE_FLOW_ACTION_TYPE_END)
+		return rte_flow_error_set(error, EINVAL,
+					  RTE_FLOW_ERROR_TYPE_ACTION,
+					  &actions[1],
+					  "Only support one action for RSS.");
+
+	rss_act = (const struct rte_flow_action_rss *)act->conf;
+	if (rss_act == NULL) {
+		return rte_flow_error_set(error, EINVAL,
+					  RTE_FLOW_ERROR_TYPE_ACTION_CONF,
+					  act, "lost RSS action configuration");
 	}
 
-	ret = hns3_parse_rss_algorithm(hw, conf, &hash_algo);
-	if (ret)
+	if (rss_act->level != 0)
+		return rte_flow_error_set(error, ENOTSUP,
+					  RTE_FLOW_ERROR_TYPE_ACTION_CONF,
+					  act,
+					  "RSS level is not supported");
+
+	index = 0;
+	NEXT_ITEM_OF_PATTERN(pat, pattern, index);
+	if (pat[0].type == RTE_FLOW_ITEM_TYPE_END) {
+		rss_conf->pattern_type = 0;
+		ret = hns3_flow_parse_hash_global_conf(dev, rss_act,
+						       rss_conf, error);
+	} else {
+		ret = hns3_flow_parse_pattern_act(dev, pat, rss_act,
+						  rss_conf, error);
+	}
+	if (ret != 0)
 		return ret;
 
-	ret = hns3_rss_set_algo_key(hw, hash_algo,
-				    use_default_key ? rss_key : rss_config->key,
-				    hw->rss_key_size);
-	if (ret)
-		return ret;
-	conf->hash_algo = hash_algo;
-
-	/* Filter the unsupported flow types */
-	flow_types = rss_config->types ?
-		     rss_config->types & HNS3_ETH_RSS_SUPPORT :
-		     hw->rss_info.rss_hf;
-	if (flow_types != rss_config->types)
-		hns3_warn(hw, "modified RSS types based on hardware support,"
-			  " requested:0x%" PRIx64 " configured:0x%" PRIx64,
-			  rss_config->types, flow_types);
-
-	ret = hns3_set_rss_tuple_by_rss_hf(hw, flow_types);
-	if (ret)
-		hns3_err(hw, "Update RSS tuples by rss hf failed %d", ret);
+	if (hns3_rss_action_is_dup(hw, rss_conf))
+		return rte_flow_error_set(error, EINVAL,
+					  RTE_FLOW_ERROR_TYPE_ACTION_CONF,
+					  act, "duplicate RSS rule");
 
-	return ret;
+	return 0;
 }
 
 static int
@@ -1543,44 +1886,106 @@ hns3_update_indir_table(struct hns3_hw *hw,
 	return hns3_set_rss_indir_table(hw, indir_tbl, hw->rss_ind_tbl_size);
 }
 
+static uint64_t
+hns3_flow_get_pctype_tuple_mask(uint64_t hw_pctype)
+{
+	uint64_t tuple_mask = 0;
+	uint16_t i;
+
+	for (i = 0; i < RTE_DIM(hash_map_table); i++) {
+		if (hw_pctype == hash_map_table[i].hw_pctype) {
+			tuple_mask = hash_map_table[i].tuple_mask;
+			break;
+		}
+	}
+
+	return tuple_mask;
+}
+
 static int
-hns3_reset_rss_filter(struct hns3_hw *hw,
-		      const struct hns3_flow_rss_conf *conf)
+hns3_flow_set_rss_ptype_tuple(struct hns3_hw *hw,
+			      struct hns3_flow_rss_conf *rss_conf)
 {
+	uint64_t old_tuple_fields, new_tuple_fields;
+	uint64_t hw_pctypes, tuples, tuple_mask = 0;
+	bool cfg_global_tuple;
 	int ret;
 
-	if (!conf->valid)
-		return 0;
+	cfg_global_tuple = (rss_conf->pattern_type == 0);
+	if (!cfg_global_tuple) {
+		/*
+		 * To ensure that different packets do not affect each other,
+		 * we have to first read all tuple fields, and then only modify
+		 * the tuples for the specified packet type.
+		 */
+		ret = hns3_get_rss_tuple_field(hw, &old_tuple_fields);
+		if (ret != 0)
+			return ret;
 
-	ret = hns3_disable_rss(hw);
-	if (ret)
-		hns3_err(hw, "RSS disable failed(%d)", ret);
+		new_tuple_fields = old_tuple_fields;
+		hw_pctypes = rss_conf->hw_pctypes;
+		while (hw_pctypes > 0) {
+			uint32_t idx = rte_bsf64(hw_pctypes);
+			uint64_t pctype = BIT_ULL(idx);
+
+			tuple_mask = hns3_flow_get_pctype_tuple_mask(pctype);
+			tuples = hns3_rss_calc_tuple_filed(hw,
+							rss_conf->conf.types);
+			new_tuple_fields &= ~tuple_mask;
+			new_tuple_fields |= tuples;
+			hw_pctypes &= ~pctype;
+		}
+	} else {
+		new_tuple_fields =
+			hns3_rss_calc_tuple_filed(hw, rss_conf->conf.types);
+	}
 
-	return ret;
+	ret = hns3_set_rss_tuple_field(hw, new_tuple_fields);
+	if (ret != 0)
+		return ret;
+
+	hns3_info(hw, "RSS tuple fields changed from 0x%" PRIx64 " to 0x%" PRIx64,
+		  old_tuple_fields, new_tuple_fields);
+
+	return 0;
 }
 
 static int
-hns3_config_rss_filter(struct hns3_hw *hw, struct hns3_flow_rss_conf *conf)
+hns3_config_rss_filter(struct hns3_hw *hw,
+		       struct hns3_flow_rss_conf *rss_conf)
 {
 	struct rte_flow_action_rss *rss_act;
-	uint16_t num;
 	int ret;
 
-	rss_act = &conf->conf;
-	/* Set rx queues to use */
-	num = RTE_MIN(hw->data->nb_rx_queues, rss_act->queue_num);
-	if (rss_act->queue_num > num)
-		hns3_warn(hw, "Config queue numbers %u are beyond the scope of truncated",
-			  rss_act->queue_num);
-	hns3_info(hw, "Max of contiguous %u PF queues are configured", num);
-	if (num) {
-		ret = hns3_update_indir_table(hw, rss_act, num);
-		if (ret)
+	rss_act = &rss_conf->conf;
+	if (rss_act->queue_num > 0) {
+		ret = hns3_update_indir_table(hw, rss_act, rss_act->queue_num);
+		if (ret) {
+			hns3_err(hw, "set queues action failed, ret = %d", ret);
+			return ret;
+		}
+	}
+
+	if (rss_act->key_len > 0 ||
+	    rss_act->func != RTE_ETH_HASH_FUNCTION_DEFAULT) {
+		ret = hns3_update_rss_algo_key(hw, rss_act->func, rss_conf->key,
+					       rss_act->key_len);
+		if (ret != 0) {
+			hns3_err(hw, "set func or hash key action failed, ret = %d",
+				 ret);
 			return ret;
+		}
+	}
+
+	if (rss_conf->hw_pctypes > 0) {
+		ret = hns3_flow_set_rss_ptype_tuple(hw, rss_conf);
+		if (ret != 0) {
+			hns3_err(hw, "set types action failed, ret = %d", ret);
+			return ret;
+		}
 	}
 
-	/* Set hash algorithm and flow types by the user's config */
-	return hns3_hw_rss_hash_set(hw, conf);
+	return 0;
 }
 
 static int
@@ -1589,50 +1994,44 @@ hns3_clear_rss_filter(struct rte_eth_dev *dev)
 	struct hns3_adapter *hns = dev->data->dev_private;
 	struct hns3_rss_conf_ele *rss_filter_ptr;
 	struct hns3_hw *hw = &hns->hw;
-	int rss_rule_succ_cnt = 0; /* count for success of clearing RSS rules */
-	int rss_rule_fail_cnt = 0; /* count for failure of clearing RSS rules */
-	int ret = 0;
 
 	rss_filter_ptr = TAILQ_FIRST(&hw->flow_rss_list);
 	while (rss_filter_ptr) {
 		TAILQ_REMOVE(&hw->flow_rss_list, rss_filter_ptr, entries);
-		ret = hns3_reset_rss_filter(hw, &rss_filter_ptr->filter_info);
-		if (ret)
-			rss_rule_fail_cnt++;
-		else
-			rss_rule_succ_cnt++;
 		rte_free(rss_filter_ptr);
 		rss_filter_ptr = TAILQ_FIRST(&hw->flow_rss_list);
 	}
 
-	if (rss_rule_fail_cnt) {
-		hns3_err(hw, "fail to delete all RSS filters, success num = %d fail num = %d",
-			 rss_rule_succ_cnt, rss_rule_fail_cnt);
-		ret = -EIO;
-	}
-
-	return ret;
+	return hns3_config_rss(hns);
 }
 
 static int
-hns3_restore_rss_filter(struct hns3_hw *hw)
+hns3_reconfig_all_rss_filter(struct hns3_hw *hw)
 {
 	struct hns3_rss_conf_ele *filter;
-	int ret = 0;
+	uint32_t rule_no = 0;
+	int ret;
 
-	pthread_mutex_lock(&hw->flows_lock);
 	TAILQ_FOREACH(filter, &hw->flow_rss_list, entries) {
-		if (!filter->filter_info.valid)
-			continue;
-
 		ret = hns3_config_rss_filter(hw, &filter->filter_info);
 		if (ret != 0) {
-			hns3_err(hw, "restore RSS filter failed, ret=%d", ret);
-			goto out;
+			hns3_err(hw, "config %uth RSS filter failed, ret = %d",
+				 rule_no, ret);
+			return ret;
 		}
+		rule_no++;
 	}
 
-out:
+	return 0;
+}
+
+static int
+hns3_restore_rss_filter(struct hns3_hw *hw)
+{
+	int ret;
+
+	pthread_mutex_lock(&hw->flows_lock);
+	ret = hns3_reconfig_all_rss_filter(hw);
 	pthread_mutex_unlock(&hw->flows_lock);
 
 	return ret;
@@ -1651,38 +2050,6 @@ hns3_restore_filter(struct hns3_adapter *hns)
 	return hns3_restore_rss_filter(hw);
 }
 
-static bool
-hns3_rss_action_is_dup(struct hns3_hw *hw,
-		       const struct rte_flow_action_rss *act)
-{
-	struct hns3_rss_conf_ele *filter;
-
-	TAILQ_FOREACH(filter, &hw->flow_rss_list, entries) {
-		if (!filter->filter_info.valid)
-			continue;
-
-		if (hns3_action_rss_same(&filter->filter_info.conf, act))
-			return true;
-	}
-
-	return false;
-}
-
-static int
-hns3_flow_parse_rss(struct rte_eth_dev *dev,
-		    struct hns3_flow_rss_conf *conf)
-{
-	struct hns3_adapter *hns = dev->data->dev_private;
-	struct hns3_hw *hw = &hns->hw;
-
-	if (hns3_rss_action_is_dup(hw, &conf->conf)) {
-		hns3_err(hw, "duplicate RSS configuration");
-		return -EINVAL;
-	}
-
-	return hns3_config_rss_filter(hw, conf);
-}
-
 static int
 hns3_flow_args_check(const struct rte_flow_attr *attr,
 		     const struct rte_flow_item pattern[],
@@ -1716,32 +2083,55 @@ static int
 hns3_flow_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
 		   const struct rte_flow_item pattern[],
 		   const struct rte_flow_action actions[],
-		   struct rte_flow_error *error)
+		   struct rte_flow_error *error,
+		   struct hns3_filter_info *filter_info)
 {
-	struct hns3_fdir_rule fdir_rule;
+	union hns3_filter_conf *conf;
 	int ret;
 
 	ret = hns3_flow_args_check(attr, pattern, actions, error);
 	if (ret)
 		return ret;
 
-	if (hns3_find_rss_general_action(pattern, actions))
-		return hns3_parse_rss_filter(dev, actions, error);
+	hns3_parse_filter_type(pattern, actions, filter_info);
+	conf = &filter_info->conf;
+	if (filter_info->type == RTE_ETH_FILTER_HASH)
+		return hns3_parse_rss_filter(dev, pattern, actions,
+					     &conf->rss_conf, error);
 
-	memset(&fdir_rule, 0, sizeof(struct hns3_fdir_rule));
-	return hns3_parse_fdir_filter(dev, pattern, actions, &fdir_rule, error);
+	return hns3_parse_fdir_filter(dev, pattern, actions,
+				      &conf->fdir_conf, error);
+}
+
+static int
+hns3_flow_rebuild_all_rss_filter(struct hns3_adapter *hns)
+{
+	struct hns3_hw *hw = &hns->hw;
+	int ret;
+
+	ret = hns3_config_rss(hns);
+	if (ret != 0) {
+		hns3_err(hw, "restore original RSS configuration failed, ret = %d.",
+			 ret);
+		return ret;
+	}
+	ret = hns3_reconfig_all_rss_filter(hw);
+	if (ret != 0)
+		hns3_err(hw, "rebuild all RSS filter failed, ret = %d.", ret);
+
+	return ret;
 }
 
 static int
 hns3_flow_create_rss_rule(struct rte_eth_dev *dev,
-			  const struct rte_flow_action *act,
+			  struct hns3_flow_rss_conf *rss_conf,
 			  struct rte_flow *flow)
 {
 	struct hns3_hw *hw = HNS3_DEV_PRIVATE_TO_HW(dev->data->dev_private);
-	const struct rte_flow_action_rss *rss_act;
+	struct hns3_adapter *hns = HNS3_DEV_HW_TO_ADAPTER(hw);
 	struct hns3_rss_conf_ele *rss_filter_ptr;
 	struct hns3_flow_rss_conf *new_conf;
-	struct hns3_rss_conf_ele *filter_ptr;
+	struct rte_flow_action_rss *rss_act;
 	int ret;
 
 	rss_filter_ptr = rte_zmalloc("hns3 rss filter",
@@ -1751,35 +2141,28 @@ hns3_flow_create_rss_rule(struct rte_eth_dev *dev,
 		return -ENOMEM;
 	}
 
-	rss_act = (const struct rte_flow_action_rss *)act->conf;
 	new_conf = &rss_filter_ptr->filter_info;
-	memcpy(&new_conf->conf, rss_act, sizeof(*rss_act));
-	if (rss_act->queue_num > 0) {
-		memcpy(new_conf->queue, rss_act->queue,
-		       rss_act->queue_num * sizeof(new_conf->queue[0]));
+	memcpy(new_conf, rss_conf, sizeof(*new_conf));
+	rss_act = &new_conf->conf;
+	if (rss_act->queue_num > 0)
 		new_conf->conf.queue = new_conf->queue;
-	}
-	if (rss_act->key_len > 0) {
-		if (rss_act->key != NULL) {
-			memcpy(new_conf->key, rss_act->key,
-			       rss_act->key_len * sizeof(new_conf->key[0]));
-			new_conf->conf.key = new_conf->key;
-		}
-	}
+	/*
+	 * There are two ways to deliver hash key action:
+	 * 1> 'key_len' is greater than zero and 'key' isn't NULL.
+	 * 2> 'key_len' is greater than zero, but 'key' is NULL.
+	 * For case 2, we need to keep 'key' of the new_conf is NULL so as to
+	 * inherit the configuration from user in case of failing to verify
+	 * duplicate rule later.
+	 */
+	if (rss_act->key_len > 0 && rss_act->key != NULL)
+		new_conf->conf.key = new_conf->key;
 
-	ret = hns3_flow_parse_rss(dev, new_conf);
+	ret = hns3_config_rss_filter(hw, new_conf);
 	if (ret != 0) {
 		rte_free(rss_filter_ptr);
+		(void)hns3_flow_rebuild_all_rss_filter(hns);
 		return ret;
 	}
-	rss_filter_ptr->filter_info.valid = true;
-
-	/*
-	 * When create a new RSS rule, the old rule will be overlaid and set
-	 * invalid.
-	 */
-	TAILQ_FOREACH(filter_ptr, &hw->flow_rss_list, entries)
-		filter_ptr->filter_info.valid = false;
 
 	TAILQ_INSERT_TAIL(&hw->flow_rss_list, rss_filter_ptr, entries);
 	flow->rule = rss_filter_ptr;
@@ -1790,31 +2173,24 @@ hns3_flow_create_rss_rule(struct rte_eth_dev *dev,
 
 static int
 hns3_flow_create_fdir_rule(struct rte_eth_dev *dev,
-			   const struct rte_flow_item pattern[],
-			   const struct rte_flow_action actions[],
+			   struct hns3_fdir_rule *fdir_rule,
 			   struct rte_flow_error *error,
 			   struct rte_flow *flow)
 {
 	struct hns3_hw *hw = HNS3_DEV_PRIVATE_TO_HW(dev->data->dev_private);
 	struct hns3_adapter *hns = HNS3_DEV_HW_TO_ADAPTER(hw);
 	struct hns3_fdir_rule_ele *fdir_rule_ptr;
-	struct hns3_fdir_rule fdir_rule;
 	bool indir;
 	int ret;
 
-	memset(&fdir_rule, 0, sizeof(struct hns3_fdir_rule));
-	ret = hns3_parse_fdir_filter(dev, pattern, actions, &fdir_rule, error);
-	if (ret != 0)
-		return ret;
-
-	indir = !!(fdir_rule.flags & HNS3_RULE_FLAG_COUNTER_INDIR);
-	if (fdir_rule.flags & HNS3_RULE_FLAG_COUNTER) {
-		ret = hns3_counter_new(dev, indir, fdir_rule.act_cnt.id,
+	indir = !!(fdir_rule->flags & HNS3_RULE_FLAG_COUNTER_INDIR);
+	if (fdir_rule->flags & HNS3_RULE_FLAG_COUNTER) {
+		ret = hns3_counter_new(dev, indir, fdir_rule->act_cnt.id,
 				       error);
 		if (ret != 0)
 			return ret;
 
-		flow->counter_id = fdir_rule.act_cnt.id;
+		flow->counter_id = fdir_rule->act_cnt.id;
 	}
 
 	fdir_rule_ptr = rte_zmalloc("hns3 fdir rule",
@@ -1830,11 +2206,11 @@ hns3_flow_create_fdir_rule(struct rte_eth_dev *dev,
 	 * rules to the hardware to simplify the rollback of rules in the
 	 * hardware.
 	 */
-	ret = hns3_fdir_filter_program(hns, &fdir_rule, false);
+	ret = hns3_fdir_filter_program(hns, fdir_rule, false);
 	if (ret != 0)
 		goto err_fdir_filter;
 
-	memcpy(&fdir_rule_ptr->fdir_conf, &fdir_rule,
+	memcpy(&fdir_rule_ptr->fdir_conf, fdir_rule,
 		sizeof(struct hns3_fdir_rule));
 	TAILQ_INSERT_TAIL(&hw->flow_fdir_list, fdir_rule_ptr, entries);
 	flow->rule = fdir_rule_ptr;
@@ -1845,8 +2221,8 @@ hns3_flow_create_fdir_rule(struct rte_eth_dev *dev,
 err_fdir_filter:
 	rte_free(fdir_rule_ptr);
 err_malloc:
-	if (fdir_rule.flags & HNS3_RULE_FLAG_COUNTER)
-		hns3_counter_release(dev, fdir_rule.act_cnt.id);
+	if (fdir_rule->flags & HNS3_RULE_FLAG_COUNTER)
+		hns3_counter_release(dev, fdir_rule->act_cnt.id);
 
 	return ret;
 }
@@ -1864,13 +2240,15 @@ hns3_flow_create(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
 		 struct rte_flow_error *error)
 {
 	struct hns3_adapter *hns = dev->data->dev_private;
-	struct hns3_hw *hw = &hns->hw;
+	struct hns3_filter_info filter_info = {0};
 	struct hns3_flow_mem *flow_node;
-	const struct rte_flow_action *act;
+	struct hns3_hw *hw = &hns->hw;
+	union hns3_filter_conf *conf;
 	struct rte_flow *flow;
 	int ret;
 
-	ret = hns3_flow_validate(dev, attr, pattern, actions, error);
+	ret = hns3_flow_validate(dev, attr, pattern, actions, error,
+				 &filter_info);
 	if (ret)
 		return NULL;
 
@@ -1890,13 +2268,12 @@ hns3_flow_create(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
 	}
 
 	flow_node->flow = flow;
+	conf = &filter_info.conf;
 	TAILQ_INSERT_TAIL(&hw->flow_list, flow_node, entries);
-
-	act = hns3_find_rss_general_action(pattern, actions);
-	if (act)
-		ret = hns3_flow_create_rss_rule(dev, act, flow);
+	if (filter_info.type == RTE_ETH_FILTER_HASH)
+		ret = hns3_flow_create_rss_rule(dev, &conf->rss_conf, flow);
 	else
-		ret = hns3_flow_create_fdir_rule(dev, pattern, actions,
+		ret = hns3_flow_create_fdir_rule(dev, &conf->fdir_conf,
 						 error, flow);
 	if (ret == 0)
 		return flow;
@@ -1950,15 +2327,10 @@ hns3_flow_destroy(struct rte_eth_dev *dev, struct rte_flow *flow,
 		break;
 	case RTE_ETH_FILTER_HASH:
 		rss_filter_ptr = (struct hns3_rss_conf_ele *)flow->rule;
-		ret = hns3_reset_rss_filter(hw, &rss_filter_ptr->filter_info);
-		if (ret)
-			return rte_flow_error_set(error, EIO,
-						  RTE_FLOW_ERROR_TYPE_HANDLE,
-						  flow,
-						  "Destroy RSS fail.Try again");
 		TAILQ_REMOVE(&hw->flow_rss_list, rss_filter_ptr, entries);
 		rte_free(rss_filter_ptr);
 		rss_filter_ptr = NULL;
+		(void)hns3_flow_rebuild_all_rss_filter(hns);
 		break;
 	default:
 		return rte_flow_error_set(error, EINVAL,
@@ -2064,10 +2436,12 @@ hns3_flow_validate_wrap(struct rte_eth_dev *dev,
 			struct rte_flow_error *error)
 {
 	struct hns3_hw *hw = HNS3_DEV_PRIVATE_TO_HW(dev->data->dev_private);
+	struct hns3_filter_info filter_info = {0};
 	int ret;
 
 	pthread_mutex_lock(&hw->flows_lock);
-	ret = hns3_flow_validate(dev, attr, pattern, actions, error);
+	ret = hns3_flow_validate(dev, attr, pattern, actions, error,
+				 &filter_info);
 	pthread_mutex_unlock(&hw->flows_lock);
 
 	return ret;
diff --git a/drivers/net/hns3/hns3_flow.h b/drivers/net/hns3/hns3_flow.h
index 90126f2b6e..1b49673f11 100644
--- a/drivers/net/hns3/hns3_flow.h
+++ b/drivers/net/hns3/hns3_flow.h
@@ -9,6 +9,7 @@
 #include <ethdev_driver.h>
 
 #include "hns3_rss.h"
+#include "hns3_fdir.h"
 
 struct hns3_flow_counter {
 	LIST_ENTRY(hns3_flow_counter) next; /* Pointer to the next counter. */
@@ -26,10 +27,10 @@ struct rte_flow {
 
 struct hns3_flow_rss_conf {
 	struct rte_flow_action_rss conf;
-	uint8_t hash_algo;
 	uint8_t key[HNS3_RSS_KEY_SIZE_MAX];  /* Hash key */
 	uint16_t queue[HNS3_RSS_QUEUES_BUFFER_NUM]; /* Queues indices to use */
-	bool valid; /* check if RSS rule is valid */
+	uint64_t pattern_type;
+	uint64_t hw_pctypes; /* packet types in driver */
 };
 
 /* rss filter list structure */
@@ -53,6 +54,16 @@ struct rte_flow_action_handle {
 	uint32_t counter_id;
 };
 
+union hns3_filter_conf {
+	struct hns3_fdir_rule fdir_conf;
+	struct hns3_flow_rss_conf rss_conf;
+};
+
+struct hns3_filter_info {
+	enum rte_filter_type type;
+	union hns3_filter_conf conf;
+};
+
 TAILQ_HEAD(hns3_rss_filter_list, hns3_rss_conf_ele);
 TAILQ_HEAD(hns3_flow_mem_list, hns3_flow_mem);
 
diff --git a/drivers/net/hns3/hns3_rss.c b/drivers/net/hns3/hns3_rss.c
index f51d70a8e5..dfa2901ae3 100644
--- a/drivers/net/hns3/hns3_rss.c
+++ b/drivers/net/hns3/hns3_rss.c
@@ -18,69 +18,13 @@ const uint8_t hns3_hash_key[HNS3_RSS_KEY_SIZE] = {
 	0x6A, 0x42, 0xB7, 0x3B, 0xBE, 0xAC, 0x01, 0xFA
 };
 
-enum hns3_tuple_field {
-	/* IPV4_TCP ENABLE FIELD */
-	HNS3_RSS_FIELD_IPV4_TCP_EN_TCP_D = 0,
-	HNS3_RSS_FIELD_IPV4_TCP_EN_TCP_S,
-	HNS3_RSS_FIELD_IPV4_TCP_EN_IP_D,
-	HNS3_RSS_FIELD_IPV4_TCP_EN_IP_S,
-
-	/* IPV4_UDP ENABLE FIELD */
-	HNS3_RSS_FIELD_IPV4_UDP_EN_UDP_D = 8,
-	HNS3_RSS_FIELD_IPV4_UDP_EN_UDP_S,
-	HNS3_RSS_FIELD_IPV4_UDP_EN_IP_D,
-	HNS3_RSS_FIELD_IPV4_UDP_EN_IP_S,
-
-	/* IPV4_SCTP ENABLE FIELD */
-	HNS3_RSS_FIELD_IPV4_SCTP_EN_SCTP_D = 16,
-	HNS3_RSS_FIELD_IPV4_SCTP_EN_SCTP_S,
-	HNS3_RSS_FIELD_IPV4_SCTP_EN_IP_D,
-	HNS3_RSS_FIELD_IPV4_SCTP_EN_IP_S,
-	HNS3_RSS_FIELD_IPV4_SCTP_EN_SCTP_VER,
-
-	/* IPV4 ENABLE FIELD */
-	HNS3_RSS_FIELD_IPV4_EN_NONFRAG_IP_D = 24,
-	HNS3_RSS_FIELD_IPV4_EN_NONFRAG_IP_S,
-	HNS3_RSS_FIELD_IPV4_EN_FRAG_IP_D,
-	HNS3_RSS_FIELD_IPV4_EN_FRAG_IP_S,
-
-	/* IPV6_TCP ENABLE FIELD */
-	HNS3_RSS_FIELD_IPV6_TCP_EN_TCP_D = 32,
-	HNS3_RSS_FIELD_IPV6_TCP_EN_TCP_S,
-	HNS3_RSS_FIELD_IPV6_TCP_EN_IP_D,
-	HNS3_RSS_FIELD_IPV6_TCP_EN_IP_S,
-
-	/* IPV6_UDP ENABLE FIELD */
-	HNS3_RSS_FIELD_IPV6_UDP_EN_UDP_D = 40,
-	HNS3_RSS_FIELD_IPV6_UDP_EN_UDP_S,
-	HNS3_RSS_FIELD_IPV6_UDP_EN_IP_D,
-	HNS3_RSS_FIELD_IPV6_UDP_EN_IP_S,
-
-	/* IPV6_SCTP ENABLE FIELD */
-	HNS3_RSS_FIELD_IPV6_SCTP_EN_SCTP_D = 48,
-	HNS3_RSS_FIELD_IPV6_SCTP_EN_SCTP_S,
-	HNS3_RSS_FIELD_IPV6_SCTP_EN_IP_D,
-	HNS3_RSS_FIELD_IPV6_SCTP_EN_IP_S,
-	HNS3_RSS_FIELD_IPV6_SCTP_EN_SCTP_VER,
-
-	/* IPV6 ENABLE FIELD */
-	HNS3_RSS_FIELD_IPV6_NONFRAG_IP_D = 56,
-	HNS3_RSS_FIELD_IPV6_NONFRAG_IP_S,
-	HNS3_RSS_FIELD_IPV6_FRAG_IP_D,
-	HNS3_RSS_FIELD_IPV6_FRAG_IP_S
+const uint8_t hns3_hash_func_map[] = {
+	[RTE_ETH_HASH_FUNCTION_DEFAULT] = HNS3_RSS_HASH_ALGO_TOEPLITZ,
+	[RTE_ETH_HASH_FUNCTION_TOEPLITZ] = HNS3_RSS_HASH_ALGO_TOEPLITZ,
+	[RTE_ETH_HASH_FUNCTION_SIMPLE_XOR] = HNS3_RSS_HASH_ALGO_SIMPLE,
+	[RTE_ETH_HASH_FUNCTION_SYMMETRIC_TOEPLITZ] = HNS3_RSS_HASH_ALGO_SYMMETRIC_TOEP,
 };
 
-#define HNS3_RSS_TUPLE_IPV4_TCP_M	GENMASK(3, 0)
-#define HNS3_RSS_TUPLE_IPV4_UDP_M	GENMASK(11, 8)
-#define HNS3_RSS_TUPLE_IPV4_SCTP_M	GENMASK(20, 16)
-#define HNS3_RSS_TUPLE_IPV4_NONF_M	GENMASK(25, 24)
-#define HNS3_RSS_TUPLE_IPV4_FLAG_M	GENMASK(27, 26)
-#define HNS3_RSS_TUPLE_IPV6_TCP_M	GENMASK(35, 32)
-#define HNS3_RSS_TUPLE_IPV6_UDP_M	GENMASK(43, 40)
-#define HNS3_RSS_TUPLE_IPV6_SCTP_M	GENMASK(52, 48)
-#define HNS3_RSS_TUPLE_IPV6_NONF_M	GENMASK(57, 56)
-#define HNS3_RSS_TUPLE_IPV6_FLAG_M	GENMASK(59, 58)
-
 enum hns3_rss_tuple_type {
 	HNS3_RSS_IP_TUPLE,
 	HNS3_RSS_IP_L4_TUPLE,
@@ -574,7 +518,7 @@ hns3_rss_check_l3l4_types(struct hns3_hw *hw, uint64_t rss_hf)
 		hns3_warn(hw, "packet type isn't specified, L4_SRC/DST_ONLY is ignored.");
 }
 
-static uint64_t
+uint64_t
 hns3_rss_calc_tuple_filed(struct hns3_hw *hw, uint64_t rss_hf)
 {
 	uint64_t l3_only_mask = RTE_ETH_RSS_L3_SRC_ONLY |
@@ -610,25 +554,35 @@ hns3_rss_calc_tuple_filed(struct hns3_hw *hw, uint64_t rss_hf)
 }
 
 int
-hns3_set_rss_tuple_by_rss_hf(struct hns3_hw *hw, uint64_t rss_hf)
+hns3_set_rss_tuple_field(struct hns3_hw *hw, uint64_t tuple_fields)
 {
 	struct hns3_rss_input_tuple_cmd *req;
 	struct hns3_cmd_desc desc;
-	uint64_t tuple_field;
 	int ret;
 
 	hns3_cmd_setup_basic_desc(&desc, HNS3_OPC_RSS_INPUT_TUPLE, false);
 	req = (struct hns3_rss_input_tuple_cmd *)desc.data;
-
-	tuple_field = hns3_rss_calc_tuple_filed(hw, rss_hf);
-	req->tuple_field = rte_cpu_to_le_64(tuple_field);
+	req->tuple_field = rte_cpu_to_le_64(tuple_fields);
 	ret = hns3_cmd_send(hw, &desc, 1);
-	if (ret) {
-		hns3_err(hw, "Update RSS flow types tuples failed %d", ret);
-		return ret;
-	}
+	if (ret != 0)
+		hns3_err(hw, "set RSS hash tuple fields failed ret = %d", ret);
 
-	return 0;
+	return ret;
+}
+
+int
+hns3_set_rss_tuple_by_rss_hf(struct hns3_hw *hw, uint64_t rss_hf)
+{
+	uint64_t tuple_fields;
+	int ret;
+
+	tuple_fields = hns3_rss_calc_tuple_filed(hw, rss_hf);
+	ret = hns3_set_rss_tuple_field(hw, tuple_fields);
+	if (ret != 0)
+		hns3_err(hw, "Update RSS flow types tuples failed, ret = %d",
+			 ret);
+
+	return ret;
 }
 
 /*
@@ -1000,6 +954,52 @@ hns3_set_rss_tc_mode(struct hns3_hw *hw)
 	return ret;
 }
 
+/*
+ * Note: the 'hash_algo' is defined by enum rte_eth_hash_function.
+ */
+int
+hns3_update_rss_algo_key(struct hns3_hw *hw, uint8_t hash_func,
+			 uint8_t *key, uint8_t key_len)
+{
+	uint8_t rss_key[HNS3_RSS_KEY_SIZE_MAX] = {0};
+	bool modify_key, modify_algo;
+	uint8_t hash_algo;
+	int ret;
+
+	modify_key = (key != NULL && key_len > 0);
+	modify_algo = hash_func != RTE_ETH_HASH_FUNCTION_DEFAULT;
+	if (!modify_key && !modify_algo)
+		return 0;
+
+	if (modify_algo && hash_func >= RTE_DIM(hns3_hash_func_map)) {
+		hns3_err(hw, "hash func (%u) is unsupported.", hash_func);
+		return -ENOTSUP;
+	}
+	if (modify_key && key_len != hw->rss_key_size) {
+		hns3_err(hw, "hash key length (%u) is invalid.", key_len);
+		return -EINVAL;
+	}
+
+	ret = hns3_rss_get_algo_key(hw, &hash_algo, rss_key, hw->rss_key_size);
+	if (ret != 0) {
+		hns3_err(hw, "fail to get RSS hash algorithm and key, ret = %d",
+			 ret);
+		return ret;
+	}
+
+	if (modify_algo)
+		hash_algo = hns3_hash_func_map[hash_func];
+	if (modify_key)
+		memcpy(rss_key, key, key_len);
+
+	ret = hns3_rss_set_algo_key(hw, hash_algo, rss_key, hw->rss_key_size);
+	if (ret != 0)
+		hns3_err(hw, "fail to set RSS hash algorithm and key, ret = %d",
+			 ret);
+
+	return ret;
+}
+
 static void
 hns3_rss_tuple_uninit(struct hns3_hw *hw)
 {
diff --git a/drivers/net/hns3/hns3_rss.h b/drivers/net/hns3/hns3_rss.h
index d19730c69c..d672481a14 100644
--- a/drivers/net/hns3/hns3_rss.h
+++ b/drivers/net/hns3/hns3_rss.h
@@ -8,23 +8,102 @@
 #include <rte_ethdev.h>
 #include <rte_flow.h>
 
-#define HNS3_ETH_RSS_SUPPORT ( \
-	RTE_ETH_RSS_IPV4 | \
-	RTE_ETH_RSS_FRAG_IPV4 | \
-	RTE_ETH_RSS_NONFRAG_IPV4_TCP | \
-	RTE_ETH_RSS_NONFRAG_IPV4_UDP | \
-	RTE_ETH_RSS_NONFRAG_IPV4_SCTP | \
-	RTE_ETH_RSS_NONFRAG_IPV4_OTHER | \
-	RTE_ETH_RSS_IPV6 | \
-	RTE_ETH_RSS_FRAG_IPV6 | \
-	RTE_ETH_RSS_NONFRAG_IPV6_TCP | \
-	RTE_ETH_RSS_NONFRAG_IPV6_UDP | \
-	RTE_ETH_RSS_NONFRAG_IPV6_SCTP | \
-	RTE_ETH_RSS_NONFRAG_IPV6_OTHER | \
-	RTE_ETH_RSS_L3_SRC_ONLY | \
-	RTE_ETH_RSS_L3_DST_ONLY | \
-	RTE_ETH_RSS_L4_SRC_ONLY | \
-	RTE_ETH_RSS_L4_DST_ONLY)
+#define HNS3_RSS_SUPPORT_L3_SRC_DST	(RTE_ETH_RSS_L3_SRC_ONLY | \
+					 RTE_ETH_RSS_L3_DST_ONLY)
+#define HNS3_RSS_SUPPORT_L4_SRC_DST	(RTE_ETH_RSS_L4_SRC_ONLY | \
+					 RTE_ETH_RSS_L4_DST_ONLY)
+#define HNS3_RSS_SUPPORT_L3L4		(HNS3_RSS_SUPPORT_L3_SRC_DST | \
+					 HNS3_RSS_SUPPORT_L4_SRC_DST)
+
+#define HNS3_RSS_SUPPORT_FLOW_TYPE	(RTE_ETH_RSS_IPV4 | \
+					 RTE_ETH_RSS_FRAG_IPV4 | \
+					 RTE_ETH_RSS_NONFRAG_IPV4_TCP | \
+					 RTE_ETH_RSS_NONFRAG_IPV4_UDP | \
+					 RTE_ETH_RSS_NONFRAG_IPV4_SCTP | \
+					 RTE_ETH_RSS_NONFRAG_IPV4_OTHER | \
+					 RTE_ETH_RSS_IPV6 | \
+					 RTE_ETH_RSS_FRAG_IPV6 | \
+					 RTE_ETH_RSS_NONFRAG_IPV6_TCP | \
+					 RTE_ETH_RSS_NONFRAG_IPV6_UDP | \
+					 RTE_ETH_RSS_NONFRAG_IPV6_SCTP | \
+					 RTE_ETH_RSS_NONFRAG_IPV6_OTHER)
+
+#define HNS3_ETH_RSS_SUPPORT		(HNS3_RSS_SUPPORT_FLOW_TYPE | \
+					 HNS3_RSS_SUPPORT_L3L4)
+
+enum hns3_tuple_field {
+	/* IPV4_TCP ENABLE FIELD */
+	HNS3_RSS_FIELD_IPV4_TCP_EN_TCP_D = 0,
+	HNS3_RSS_FIELD_IPV4_TCP_EN_TCP_S,
+	HNS3_RSS_FIELD_IPV4_TCP_EN_IP_D,
+	HNS3_RSS_FIELD_IPV4_TCP_EN_IP_S,
+
+	/* IPV4_UDP ENABLE FIELD */
+	HNS3_RSS_FIELD_IPV4_UDP_EN_UDP_D = 8,
+	HNS3_RSS_FIELD_IPV4_UDP_EN_UDP_S,
+	HNS3_RSS_FIELD_IPV4_UDP_EN_IP_D,
+	HNS3_RSS_FIELD_IPV4_UDP_EN_IP_S,
+
+	/* IPV4_SCTP ENABLE FIELD */
+	HNS3_RSS_FIELD_IPV4_SCTP_EN_SCTP_D = 16,
+	HNS3_RSS_FIELD_IPV4_SCTP_EN_SCTP_S,
+	HNS3_RSS_FIELD_IPV4_SCTP_EN_IP_D,
+	HNS3_RSS_FIELD_IPV4_SCTP_EN_IP_S,
+	HNS3_RSS_FIELD_IPV4_SCTP_EN_SCTP_VER,
+
+	/* IPV4 ENABLE FIELD */
+	HNS3_RSS_FIELD_IPV4_EN_NONFRAG_IP_D = 24,
+	HNS3_RSS_FIELD_IPV4_EN_NONFRAG_IP_S,
+	HNS3_RSS_FIELD_IPV4_EN_FRAG_IP_D,
+	HNS3_RSS_FIELD_IPV4_EN_FRAG_IP_S,
+
+	/* IPV6_TCP ENABLE FIELD */
+	HNS3_RSS_FIELD_IPV6_TCP_EN_TCP_D = 32,
+	HNS3_RSS_FIELD_IPV6_TCP_EN_TCP_S,
+	HNS3_RSS_FIELD_IPV6_TCP_EN_IP_D,
+	HNS3_RSS_FIELD_IPV6_TCP_EN_IP_S,
+
+	/* IPV6_UDP ENABLE FIELD */
+	HNS3_RSS_FIELD_IPV6_UDP_EN_UDP_D = 40,
+	HNS3_RSS_FIELD_IPV6_UDP_EN_UDP_S,
+	HNS3_RSS_FIELD_IPV6_UDP_EN_IP_D,
+	HNS3_RSS_FIELD_IPV6_UDP_EN_IP_S,
+
+	/* IPV6_SCTP ENABLE FIELD */
+	HNS3_RSS_FIELD_IPV6_SCTP_EN_SCTP_D = 48,
+	HNS3_RSS_FIELD_IPV6_SCTP_EN_SCTP_S,
+	HNS3_RSS_FIELD_IPV6_SCTP_EN_IP_D,
+	HNS3_RSS_FIELD_IPV6_SCTP_EN_IP_S,
+	HNS3_RSS_FIELD_IPV6_SCTP_EN_SCTP_VER,
+
+	/* IPV6 ENABLE FIELD */
+	HNS3_RSS_FIELD_IPV6_NONFRAG_IP_D = 56,
+	HNS3_RSS_FIELD_IPV6_NONFRAG_IP_S,
+	HNS3_RSS_FIELD_IPV6_FRAG_IP_D,
+	HNS3_RSS_FIELD_IPV6_FRAG_IP_S
+};
+
+#define HNS3_RSS_PCTYPE_IPV4_TCP	BIT_ULL(0)
+#define HNS3_RSS_PCTYPE_IPV4_UDP	BIT_ULL(8)
+#define HNS3_RSS_PCTYPE_IPV4_SCTP	BIT_ULL(16)
+#define HNS3_RSS_PCTYPE_IPV4_NONF	BIT_ULL(24)
+#define HNS3_RSS_PCTYPE_IPV4_FLAG	BIT_ULL(26)
+#define HNS3_RSS_PCTYPE_IPV6_TCP	BIT_ULL(32)
+#define HNS3_RSS_PCTYPE_IPV6_UDP	BIT_ULL(40)
+#define HNS3_RSS_PCTYPE_IPV6_SCTP	BIT_ULL(48)
+#define HNS3_RSS_PCTYPE_IPV6_NONF	BIT_ULL(56)
+#define HNS3_RSS_PCTYPE_IPV6_FLAG	BIT_ULL(58)
+
+#define HNS3_RSS_TUPLE_IPV4_TCP_M	GENMASK(3, 0)
+#define HNS3_RSS_TUPLE_IPV4_UDP_M	GENMASK(11, 8)
+#define HNS3_RSS_TUPLE_IPV4_SCTP_M	GENMASK(20, 16)
+#define HNS3_RSS_TUPLE_IPV4_NONF_M	GENMASK(25, 24)
+#define HNS3_RSS_TUPLE_IPV4_FLAG_M	GENMASK(27, 26)
+#define HNS3_RSS_TUPLE_IPV6_TCP_M	GENMASK(35, 32)
+#define HNS3_RSS_TUPLE_IPV6_UDP_M	GENMASK(43, 40)
+#define HNS3_RSS_TUPLE_IPV6_SCTP_M	GENMASK(52, 48)
+#define HNS3_RSS_TUPLE_IPV6_NONF_M	GENMASK(57, 56)
+#define HNS3_RSS_TUPLE_IPV6_FLAG_M	GENMASK(59, 58)
 
 #define HNS3_RSS_IND_TBL_SIZE	512 /* The size of hash lookup table */
 #define HNS3_RSS_IND_TBL_SIZE_MAX 2048
@@ -108,10 +187,14 @@ int hns3_rss_reset_indir_table(struct hns3_hw *hw);
 int hns3_config_rss(struct hns3_adapter *hns);
 void hns3_rss_uninit(struct hns3_adapter *hns);
 int hns3_set_rss_tuple_by_rss_hf(struct hns3_hw *hw, uint64_t rss_hf);
+int hns3_set_rss_tuple_field(struct hns3_hw *hw, uint64_t tuple_fields);
 int hns3_get_rss_tuple_field(struct hns3_hw *hw, uint64_t *tuple_fields);
 int hns3_rss_set_algo_key(struct hns3_hw *hw, uint8_t hash_algo,
 			  const uint8_t *key, uint8_t key_len);
 int hns3_rss_get_algo_key(struct hns3_hw *hw,  uint8_t *hash_algo,
 			  uint8_t *key, uint8_t key_len);
+uint64_t hns3_rss_calc_tuple_filed(struct hns3_hw *hw, uint64_t rss_hf);
+int hns3_update_rss_algo_key(struct hns3_hw *hw, uint8_t hash_algo,
+			     uint8_t *key, uint8_t key_len);
 
 #endif /* HNS3_RSS_H */
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-04-09 21:45:40.969711200 +0800
+++ 0086-net-hns3-reimplement-hash-flow-function.patch	2023-04-09 21:45:38.699042200 +0800
@@ -1 +1 @@
-From e3069658da9ffb6f83a0d972ff2776c405eb6a8f Mon Sep 17 00:00:00 2001
+From 3a5105f1de819eed82a669824012f6d7dd556994 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl@nvidia.com>
+
+[ upstream commit e3069658da9ffb6f83a0d972ff2776c405eb6a8f ]
@@ -28 +30,0 @@
-Cc: stable@dpdk.org
@@ -61 +63 @@
-index 89374816aa..6ac623bea9 100644
+index b1189455ec..c38bd9dd8b 100644

  parent reply	other threads:[~2023-04-09 15:33 UTC|newest]

Thread overview: 303+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-27  6:21 patch " Xueming Li
2023-02-27  6:21 ` patch 'drivers: fix symbol exports when map is omitted' " Xueming Li
2023-02-27  6:58 ` patch 'devtools: fix name check with mbox files' " Xueming Li
2023-02-27  6:58   ` patch 'eal/windows: mark memory config as complete' " Xueming Li
2023-02-27  6:58   ` patch 'kni: fix build on RHEL 9.1' " Xueming Li
2023-02-27  6:58   ` patch 'hash: fix GFNI implementation build with GCC 12' " Xueming Li
2023-02-27  6:58   ` patch 'doc: fix dependency setup in l2fwd-cat example guide' " Xueming Li
2023-02-27  6:58   ` patch 'devtools: fix escaped space in grep pattern' " Xueming Li
2023-02-27  6:58   ` patch 'crypto/cnxk: fix digest for empty input data' " Xueming Li
2023-02-27  6:58   ` patch 'app/crypto-perf: fix number of segments' " Xueming Li
2023-02-27  6:58   ` patch 'app/crypto-perf: fix session freeing' " Xueming Li
2023-02-27  6:58   ` patch 'app/crypto-perf: fix SPI zero' " Xueming Li
2023-02-27  6:58   ` patch 'app/crypto-perf: fix IPsec direction' " Xueming Li
2023-02-27  6:58   ` patch 'eventdev/crypto: fix enqueue count' " Xueming Li
2023-02-27  6:58   ` patch 'eventdev/crypto: fix offset used while flushing events' " Xueming Li
2023-02-27  6:58   ` patch 'eventdev/crypto: fix overflow in circular buffer' " Xueming Li
2023-02-27  6:58   ` patch 'eventdev/crypto: fix failed events' " Xueming Li
2023-02-27  6:58   ` patch 'eventdev/eth_tx: fix devices loop' " Xueming Li
2023-02-27  6:58   ` patch 'examples/l2fwd-event: fix worker cleanup' " Xueming Li
2023-02-27  6:58   ` patch 'crypto/qat: fix stream cipher direction' " Xueming Li
2023-02-27  6:58   ` patch 'crypto/qat: fix build for generic x86 with GCC 12' " Xueming Li
2023-02-27  6:58   ` patch 'crypto/qat: fix build' " Xueming Li
2023-02-27  6:58   ` patch 'bus/fslmc: fix deadlock on MC send command timeout' " Xueming Li
2023-02-27  6:58   ` patch 'fbarray: fix metadata dump' " Xueming Li
2023-02-27  6:58   ` patch 'gpudev: fix deadlocks when registering callback' " Xueming Li
2023-02-27  6:58   ` patch 'graph: fix node shrink' " Xueming Li
2023-02-27  6:58   ` patch 'net/nfp: fix Tx packet drop for large data length' " Xueming Li
2023-02-27  6:58   ` patch 'net/nfp: fix firmware name derived from PCI name' " Xueming Li
2023-02-27  6:58   ` patch 'net/ena: fix deadlock in RSS RETA update' " Xueming Li
2023-02-27  6:58   ` patch 'net/hns3: fix inaccurate RTC time to read' " Xueming Li
2023-02-27  6:58   ` patch 'net/nfp: store counter reset before zeroing flow query' " Xueming Li
2023-02-27  6:58   ` patch 'net/nfp: fix teardown of flows sharing a mask ID' " Xueming Li
2023-02-27  6:58   ` patch 'app/testpmd: fix interactive mode with no ports' " Xueming Li
2023-02-27  6:59   ` patch 'telemetry: move include after guard' " Xueming Li
2023-02-27  6:59   ` patch 'ethdev: fix telemetry data truncation' " Xueming Li
2023-02-27  6:59   ` patch 'mempool: " Xueming Li
2023-02-27  6:59   ` patch 'cryptodev: " Xueming Li
2023-02-27  6:59   ` patch 'mem: " Xueming Li
2023-02-27  6:59   ` patch 'examples/qos_sched: fix debug mode' " Xueming Li
2023-02-27  6:59   ` patch 'app/dumpcap: fix storing port identifier' " Xueming Li
2023-02-27  6:59   ` patch 'build: fix dependencies lookup' " Xueming Li
2023-02-27  6:59   ` patch 'vdpa/ifc: fix argument compatibility check' " Xueming Li
2023-02-27  6:59   ` patch 'vdpa/ifc: fix reconnection in SW-assisted live migration' " Xueming Li
2023-02-27  6:59   ` patch 'vhost: fix net header settings in datapath' " Xueming Li
2023-02-27  6:59   ` patch 'app/bbdev: fix build with optional flag' " Xueming Li
2023-02-27  6:59   ` Xueming Li
2023-02-27  6:59   ` patch 'app/bbdev: add allocation checks' " Xueming Li
2023-02-27  6:59   ` patch 'baseband/acc: fix memory leak on acc100 close' " Xueming Li
2023-02-27  6:59   ` patch 'baseband/acc: fix acc100 iteration counter in TB' " Xueming Li
2023-02-27  6:59   ` patch 'baseband/acc: fix multiplexing acc100 operations' " Xueming Li
2023-02-27  6:59   ` patch 'baseband/acc: fix acc100 queue mapping to 64 bits' " Xueming Li
2023-02-27  6:59   ` patch 'crypto/ccp: remove some printf' " Xueming Li
2023-02-27  6:59   ` patch 'crypto/ccp: remove some dead code for UIO' " Xueming Li
2023-02-27  6:59   ` patch 'crypto/ccp: fix IOVA handling' " Xueming Li
2023-02-27  6:59   ` patch 'crypto/openssl: fix warning on copy length' " Xueming Li
2023-02-27  6:59   ` patch 'crypto/ipsec_mb: remove unnecessary null check' " Xueming Li
2023-02-27  6:59   ` patch 'test/crypto: fix typo in AES test' " Xueming Li
2023-02-27  6:59   ` patch 'test/crypto: add missing MAC-I to PDCP vectors' " Xueming Li
2023-02-27  6:59   ` patch 'cryptodev: fix sym session mempool creation description' " Xueming Li
2023-02-27  6:59   ` patch 'compressdev: fix end of driver list' " Xueming Li
2023-02-27  6:59   ` patch 'crypto/ipsec_mb: fix ZUC-256 maximum tag length' " Xueming Li
2023-02-27  6:59   ` patch 'net/bnxt: fix Tx queue stats after queue stop and start' " Xueming Li
2023-02-27  6:59   ` patch 'net/bnxt: fix Rx " Xueming Li
2023-02-27  6:59   ` patch 'net/bnxt: fix RSS hash in mbuf' " Xueming Li
2023-02-27  6:59   ` patch 'doc: fix firmware list in bnxt guide' " Xueming Li
2023-02-27  6:59   ` patch 'eventdev/crypto: fix function symbol export' " Xueming Li
2023-02-27  6:59   ` patch 'event/cnxk: wait for CPT flow control on WQE path' " Xueming Li
2023-02-27  6:59   ` patch 'eventdev/eth_rx: fix getting adapter instance' " Xueming Li
2023-02-27  6:59   ` patch 'event/cnxk: fix burst timer arm' " Xueming Li
2023-02-27  6:59   ` patch 'event/cnxk: fix timer operations in secondary process' " Xueming Li
2023-02-27  6:59   ` patch 'net/cnxk: fix packet type for IPv6 packets post decryption' " Xueming Li
2023-02-27  6:59   ` patch 'common/cnxk: fix aura ID handling' " Xueming Li
2023-02-27  6:59   ` patch 'net/cnxk: fix deadlock in security session creation' " Xueming Li
2023-02-27  6:59   ` patch 'common/cnxk: fix dual VLAN parsing' " Xueming Li
2023-02-27  6:59   ` patch 'common/cnxk: fix IPv6 extension matching' " Xueming Li
2023-02-27  6:59   ` patch 'common/cnxk: reduce channel count per LMAC' " Xueming Li
2023-02-27  6:59   ` patch 'net/cnxk: validate RED threshold config' " Xueming Li
2023-02-27  6:59   ` patch 'mem: fix hugepage info mapping' " Xueming Li
2023-02-27  6:59   ` patch 'raw/ifpga/base: fix init with multi-process' " Xueming Li
2023-02-27  6:59   ` patch 'telemetry: fix repeat display when callback don't init dict' " Xueming Li
2023-02-27  6:59   ` patch 'eal/linux: fix hugetlbfs sub-directories discovery' " Xueming Li
2023-02-27  6:59   ` patch 'drivers/bus: fix leak for devices without driver' " Xueming Li
2023-02-27  6:59   ` patch 'test/mbuf: fix mbuf reset test' " Xueming Li
2023-02-27  6:59   ` patch 'eventdev/timer: fix overflow' " Xueming Li
2023-02-27  6:59   ` patch 'eal: cleanup alarm and hotplug before memory detach' " Xueming Li
2023-02-27  6:59   ` patch 'vhost: decrease log level for unimplemented requests' " Xueming Li
2023-02-27  6:59   ` patch 'vhost: fix possible FD leaks' " Xueming Li
2023-02-27  6:59   ` patch 'vhost: fix possible FD leaks on truncation' " Xueming Li
2023-02-27  6:59   ` patch 'net/virtio-user: fix device starting failure handling' " Xueming Li
2023-02-27  6:59   ` patch 'net/hns3: declare flow rule keeping capability' " Xueming Li
2023-02-27  6:59   ` patch 'doc: fix description of L2TPV2 flow item' " Xueming Li
2023-02-27  6:59   ` patch 'app/testpmd: fix forwarding stats for Tx dropped' " Xueming Li
2023-02-27  6:59   ` patch 'net/txgbe: fix default signal quality value for KX/KX4' " Xueming Li
2023-02-27  7:00   ` patch 'net/txgbe: fix packet type to parse from offload flags' " Xueming Li
2023-02-27  7:00   ` patch 'net/ngbe: " Xueming Li
2023-02-27  7:00   ` patch 'net/ngbe: add spinlock protection on YT PHY' " Xueming Li
2023-02-27  7:00   ` patch 'net/txgbe: fix interrupt loss' " Xueming Li
2023-02-27  7:00   ` patch 'net/hns3: fix log about indirection table size' " Xueming Li
2023-02-27  7:00   ` patch 'net/hns3: extract common function to query device' " Xueming Li
2023-02-27  7:00   ` patch 'net/hns3: refactor set RSS hash algorithm and key interface' " Xueming Li
2023-02-27  7:00   ` patch 'net/hns3: fix RSS key size compatibility' " Xueming Li
2023-02-27  7:00   ` patch 'net/hns3: fix clearing RSS configuration' " Xueming Li
2023-02-27  7:00   ` patch 'net/hns3: use RSS filter list to check duplicated rule' " Xueming Li
2023-02-27  7:00   ` patch 'net/hns3: remove useless code when destroy valid RSS " Xueming Li
2023-02-27  7:00   ` patch 'net/hns3: fix warning on flush or destroy " Xueming Li
2023-02-27  7:00   ` patch 'net/hns3: fix config struct used for conversion' " Xueming Li
2023-02-27  7:00   ` patch 'net/hns3: fix duplicate RSS rule check' " Xueming Li
2023-02-27  7:00   ` patch 'net/sfc: export pick transfer proxy callback to representors' " Xueming Li
2023-02-27  7:00   ` patch 'app/testpmd: fix link check condition on port start' " Xueming Li
2023-02-27  7:00   ` patch 'net/nfp: fix max DMA length' " Xueming Li
2023-02-27  7:00   ` patch 'net/hns3: fix burst mode query with dummy function' " Xueming Li
2023-02-27  7:00   ` patch 'net/hns3: add debug info for Rx/Tx " Xueming Li
2023-02-27  7:00   ` patch 'net/hns3: remove debug condition for Tx prepare' " Xueming Li
2023-02-27  7:00   ` patch 'net/hns3: separate Tx prepare from getting Tx function' " Xueming Li
2023-02-27  7:00   ` patch 'net/hns3: make getting Tx function static' " Xueming Li
2023-02-27  7:00   ` patch 'net/hns3: extract common functions to set Rx/Tx' " Xueming Li
2023-02-27  7:00   ` patch 'net/sfc: fix MAC address entry leak in transfer flow parsing' " Xueming Li
2023-02-27  7:00   ` patch 'net/sfc: enforce fate action in transfer flow rules' " Xueming Li
2023-02-27  7:00   ` patch 'net/txgbe: fix Rx buffer size in config register' " Xueming Li
2023-02-27  7:00   ` patch 'net/mlx5: fix available tag registers calculation for HWS' " Xueming Li
2023-02-27  7:00   ` patch 'net/mlx5: fix GENEVE resource overwrite' " Xueming Li
2023-02-27  7:00   ` patch 'common/mlx5: improve AES-XTS tweak capability check' " Xueming Li
2023-02-27  7:00   ` patch 'common/mlx5: fix offset of a field' " Xueming Li
2023-02-27  7:00   ` patch 'net/mlx5: fix flow sample with ConnectX-5' " Xueming Li
2023-02-27  7:00   ` patch 'net/mlx5: fix wait descriptor opcode for ConnectX-7' " Xueming Li
2023-02-27  7:00   ` patch 'net/mlx5: fix warning for Tx scheduling option' " Xueming Li
2023-02-27  7:00   ` patch 'net/mlx5: fix read device clock in real time mode' " Xueming Li
2023-02-27  7:00   ` patch 'net/mlx5/hws: fix memory leak on general pool DB init' " Xueming Li
2023-02-27  7:00   ` patch 'net/mlx5: fix error CQE dumping for vectorized Rx' " Xueming Li
2023-02-27  7:00   ` patch 'net/mlx5: ignore non-critical syndromes for Rx queue' " Xueming Li
2023-02-27  7:00   ` patch 'net/mlx5: check compressed CQE opcode in vectorized Rx' " Xueming Li
2023-02-27  7:00   ` patch 'net/iavf: fix outer UDP checksum offload' " Xueming Li
2023-02-27  7:00   ` patch 'net/i40e: reduce interrupt interval in multi-driver mode' " Xueming Li
2023-02-27  7:00   ` patch 'net/idpf: fix mbuf leak in split Tx' " Xueming Li
2023-02-27  7:00   ` patch 'net/idpf: fix driver infos' " Xueming Li
2023-02-27  7:00   ` patch 'net/ixgbe: fix firmware version consistency' " Xueming Li
2023-02-27  7:00   ` patch 'net/iavf: add lock for VF commands' " Xueming Li
2023-02-27  7:00   ` patch 'net/i40e: fix validation of flow transfer attribute' " Xueming Li
2023-02-27  7:00   ` patch 'net/ice: " Xueming Li
2023-02-27  7:00   ` patch 'net/iavf: protect insertion in flow list' " Xueming Li
2023-02-27  7:00   ` patch 'net/iavf: fix building data desc' " Xueming Li
2023-02-27  7:00   ` patch 'net/ixgbe: enable IPv6 mask in flow rules' " Xueming Li
2023-02-27  7:00   ` patch 'net/iavf: fix VLAN offload with AVX2' " Xueming Li
2023-02-27  7:00   ` patch 'app/compress-perf: fix some typos' " Xueming Li
2023-02-27  7:00   ` patch 'app/compress-perf: fix testing single operation' " Xueming Li
2023-02-27  7:00   ` patch 'common/cnxk: fix channel mask for SDP interfaces' " Xueming Li
2023-02-27  7:00   ` patch 'net/bnxt: fix link state change interrupt config' " Xueming Li
2023-02-27  7:00   ` patch 'net/nfp: fix VNI of VXLAN encap action' " Xueming Li
2023-02-27  7:00   ` patch 'net/nfp: restrict flow flush to the port' " Xueming Li
2023-02-27  7:00   ` patch 'app/testpmd: fix crash on cleanup' " Xueming Li
2023-02-27  7:00   ` patch 'sched: fix alignment of structs in subport' " Xueming Li
2023-02-27  7:00   ` patch 'eal/freebsd: fix lock in alarm callback' " Xueming Li
2023-02-27  7:00   ` patch 'dma/ioat: fix device stop if no copies done' " Xueming Li
2023-02-27  7:01   ` patch 'dma/ioat: fix indexes after restart' " Xueming Li
2023-02-27  7:01   ` patch 'dma/ioat: fix error reporting on " Xueming Li
2023-02-27  7:01   ` patch 'reorder: invalidate buffer from ready queue in drain' " Xueming Li
2023-02-27  7:01   ` patch 'test/reorder: fix double free of drained buffers' " Xueming Li
2023-02-27  7:01   ` patch 'build: fix toolchain definition' " Xueming Li
2023-02-27  7:01   ` patch 'eal: use same atomic intrinsics for GCC and clang' " Xueming Li
2023-02-27  7:01   ` patch 'examples/cmdline: fix build with GCC 12' " Xueming Li
2023-02-27  7:01   ` patch 'examples/qos_sched: fix Tx port config when link down' " Xueming Li
2023-04-09 15:23 ` patch " Xueming Li
2023-04-09 15:23   ` patch 'common/cnxk: fix second pass flow rule layer type' " Xueming Li
2023-04-09 15:23   ` patch 'net/mlx5: fix crash on action template failure' " Xueming Li
2023-04-09 15:23   ` patch 'eal/windows: fix pedantic build' " Xueming Li
2023-04-09 15:23   ` patch 'doc: add gpudev to the Doxygen index' " Xueming Li
2023-04-09 15:23   ` patch 'doc: fix reference to event timer header' " Xueming Li
2023-04-09 15:23   ` patch 'event/cnxk: fix SSO cleanup' " Xueming Li
2023-04-09 15:23   ` patch 'eventdev: fix memory size for telemetry' " Xueming Li
2023-04-09 15:23   ` patch 'baseband/acc: protect from TB negative scenario' " Xueming Li
2023-04-09 15:23   ` patch 'baseband/acc: add explicit mbuf append for soft output' " Xueming Li
2023-04-09 15:23   ` patch 'baseband/acc: prevent to dequeue more than requested' " Xueming Li
2023-04-09 15:23   ` patch 'baseband/acc: fix iteration counter in TB mode' " Xueming Li
2023-04-09 15:23   ` patch 'baseband/acc: fix check after deref and dead code' " Xueming Li
2023-04-09 15:23   ` patch 'test/bbdev: fix crash for non supported HARQ length' " Xueming Li
2023-04-09 15:23   ` patch 'test/bbdev: extend HARQ tolerance' " Xueming Li
2023-04-09 15:23   ` patch 'test/bbdev: remove check for invalid opaque data' " Xueming Li
2023-04-09 15:23   ` patch 'vhost: fix slot index in async split virtqueue Tx' " Xueming Li
2023-04-09 15:23   ` patch 'vhost: fix OOB access for invalid vhost ID' " Xueming Li
2023-04-09 15:23   ` patch 'net/virtio: deduce IP length for TSO checksum' " Xueming Li
2023-04-09 15:23   ` patch 'examples/ipsec-secgw: fix auth IV length' " Xueming Li
2023-04-09 15:23   ` patch 'compress/mlx5: fix decompress xform validation' " Xueming Li
2023-04-09 15:23   ` patch 'compress/mlx5: fix output Adler-32 checksum offset' " Xueming Li
2023-04-09 15:23   ` patch 'compress/mlx5: fix queue setup for partial transformations' " Xueming Li
2023-04-09 15:23   ` patch 'examples/fips_validation: fix MCT output for SHA' " Xueming Li
2023-04-09 15:23   ` patch 'examples/fips_validation: fix integer parsing' " Xueming Li
2023-04-09 15:23   ` patch 'examples/fips_validation: fix AES-GCM tests' " Xueming Li
2023-04-09 15:23   ` patch 'examples/fips_validation: fix AES-XTS sequence number' " Xueming Li
2023-04-09 15:23   ` patch 'examples/fips_validation: add extra space in JSON buffer' " Xueming Li
2023-04-09 15:23   ` patch 'common/cnxk: fix auth key length' " Xueming Li
2023-04-09 15:23   ` patch 'net/nfp: fix 48-bit DMA support for NFDk' " Xueming Li
2023-04-09 15:23   ` patch 'net/gve: fix offloading capability' " Xueming Li
2023-04-09 15:23   ` patch 'net/mana: enable driver by default' " Xueming Li
2023-04-09 15:23   ` patch 'app/testpmd: fix Tx preparation in checksum engine' " Xueming Li
2023-04-09 15:23   ` patch 'app/testpmd: fix packet count in IEEE 1588 " Xueming Li
2023-04-09 15:23   ` patch 'app/testpmd: fix packet transmission in noisy VNF " Xueming Li
2023-04-09 15:23   ` patch 'ethdev: fix build with LTO' " Xueming Li
2023-04-09 15:23   ` patch 'net/mana: fix stats counters' " Xueming Li
2023-04-09 15:23   ` patch 'net/nfp: fix getting RSS configuration' " Xueming Li
2023-04-09 15:23   ` patch 'ethdev: remove telemetry Rx mbuf alloc failed field' " Xueming Li
2023-04-09 15:23   ` patch 'net/nfp: fix set MAC flow action' " Xueming Li
2023-04-09 15:23   ` patch 'net/nfp: fix set IPv4 " Xueming Li
2023-04-09 15:23   ` patch 'net/nfp: fix set IPv6 " Xueming Li
2023-04-09 15:23   ` patch 'net/nfp: fix set TP " Xueming Li
2023-04-09 15:23   ` patch 'net/nfp: fix set TTL " Xueming Li
2023-04-09 15:23   ` patch 'net/nfp: fix set DSCP " Xueming Li
2023-04-09 15:23   ` patch 'net/nfp: fix offload of multiple output actions' " Xueming Li
2023-04-09 15:23   ` patch 'app/testpmd: fix secondary process packet forwarding' " Xueming Li
2023-04-09 15:23   ` patch 'net/ixgbe: fix IPv6 mask in flow director' " Xueming Li
2023-04-09 15:23   ` patch 'net/i40e: revert link status check on device start' " Xueming Li
2023-04-09 15:23   ` patch 'net/i40e: fix maximum frame size configuration' " Xueming Li
2023-04-09 15:23   ` patch 'net/ice: fix Rx timestamp' " Xueming Li
2023-04-09 15:23   ` patch 'net/cnxk: fix LBK BPID usage' " Xueming Li
2023-04-09 15:24   ` patch 'common/cnxk: add memory clobber to steor and ldeor' " Xueming Li
2023-04-09 15:24   ` patch 'eal/windows: fix thread creation' " Xueming Li
2023-04-09 15:24   ` patch 'net/nfp: fix MTU configuration order' " Xueming Li
2023-04-09 15:24   ` patch 'kvargs: add API documentation for process callback' " Xueming Li
2023-04-09 15:24   ` patch 'compressdev: fix empty devargs parsing' " Xueming Li
2023-04-09 15:24   ` patch 'cryptodev: " Xueming Li
2023-04-09 15:24   ` patch 'net/hns3: " Xueming Li
2023-04-09 15:24   ` patch 'net/virtio: " Xueming Li
2023-04-09 15:24   ` patch 'dma/skeleton: " Xueming Li
2023-04-09 15:24   ` patch 'raw/skeleton: " Xueming Li
2023-04-09 15:24   ` patch 'table: fix action selector group size log2 setting' " Xueming Li
2023-04-09 15:24   ` patch 'regex/mlx5: utilize all available queue pairs' " Xueming Li
2023-04-09 15:24   ` patch 'regex/mlx5: fix doorbell record' " Xueming Li
2023-04-09 15:24   ` patch 'common/sfc_efx/base: add MAE mark reset action' " Xueming Li
2023-04-09 15:24   ` patch 'net/sfc: fix resetting mark in tunnel offload switch rules' " Xueming Li
2023-04-09 15:24   ` patch 'kni: fix possible starvation when mbufs are exhausted' " Xueming Li
2023-04-09 15:24   ` patch 'cmdline: make rdline status not private' " Xueming Li
2023-04-09 15:24   ` patch 'cmdline: handle EOF as quit' " Xueming Li
2023-04-09 15:24   ` patch 'app/testpmd: cleanup cleanly from signal' " Xueming Li
2023-04-09 15:24   ` patch 'mem: fix heap ID in telemetry' " Xueming Li
2023-04-09 15:24   ` patch 'net/hns3: fix possible truncation of hash key when config' " Xueming Li
2023-04-09 15:24   ` patch 'net/hns3: fix possible truncation of redirection table' " Xueming Li
2023-04-09 15:24   ` patch 'net/hns3: use hardware config to report hash key' " Xueming Li
2023-04-09 15:24   ` patch 'net/hns3: use hardware config to report hash types' " Xueming Li
2023-04-09 15:24   ` patch 'net/hns3: use hardware config to report redirection table' " Xueming Li
2023-04-09 15:24   ` patch 'net/hns3: separate setting hash algorithm' " Xueming Li
2023-04-09 15:24   ` patch 'net/hns3: separate setting hash key' " Xueming Li
2023-04-09 15:24   ` patch 'net/hns3: separate setting redirection table' " Xueming Li
2023-04-09 15:24   ` patch 'net/hns3: separate setting RSS types' " Xueming Li
2023-04-09 15:24   ` patch 'net/hns3: separate setting and clearing RSS rule' " Xueming Li
2023-04-09 15:24   ` patch 'net/hns3: use new RSS rule to configure hardware' " Xueming Li
2023-04-09 15:24   ` patch 'net/hns3: save hash algo to RSS filter list node' " Xueming Li
2023-04-09 15:24   ` patch 'net/hns3: allow adding queue buffer size hash rule' " Xueming Li
2023-04-09 15:24   ` patch 'net/hns3: separate flow RSS config from RSS conf' " Xueming Li
2023-04-09 15:24   ` Xueming Li [this message]
2023-04-09 15:24   ` patch 'net/hns3: add verification of RSS types' " Xueming Li
2023-04-09 15:24   ` patch 'net/mlx5: fix Windows build with MinGW GCC 12' " Xueming Li
2023-04-09 15:24   ` patch 'crypto/ccp: fix PCI probing' " Xueming Li
2023-04-09 15:24   ` patch 'crypto/qat: fix SM3 auth mode' " Xueming Li
2023-04-09 15:24   ` patch 'crypto/openssl: fix freeing in RSA EVP' " Xueming Li
2023-04-09 15:24   ` patch 'app/crypto-perf: fix test file memory leak' " Xueming Li
2023-04-09 15:24   ` patch 'app/flow-perf: fix division or module by zero' " Xueming Li
2023-04-09 15:24   ` patch 'examples/ipsec-secgw: fix offload variable init' " Xueming Li
2023-04-09 15:24   ` patch 'raw/skeleton: fix selftest' " Xueming Li
2023-04-09 15:24   ` patch 'ring: silence GCC 12 warnings' " Xueming Li
2023-04-09 15:24   ` patch 'reorder: fix sequence number mbuf field register' " Xueming Li
2023-04-09 15:24   ` patch 'test: fix segment length in packet generator' " Xueming Li
2023-04-09 15:24   ` patch 'test/mbuf: fix test with mbuf debug enabled' " Xueming Li
2023-04-09 15:24   ` patch 'eal/unix: fix thread creation' " Xueming Li
2023-04-09 15:24   ` patch 'gpudev: export header file for external drivers' " Xueming Li
2023-04-09 15:24   ` patch 'app/testpmd: fix interactive mode on Windows' " Xueming Li
2023-04-09 15:24   ` patch 'test/crypto: fix ZUC digest length in comparison' " Xueming Li
2023-04-09 15:24   ` patch 'test/crypto: fix capability check for ZUC cipher-auth' " Xueming Li
2023-04-09 15:24   ` patch 'test/crypto: fix skip condition for CPU crypto SGL' " Xueming Li
2023-04-09 15:24   ` patch 'app/compress-perf: fix remaining data for ops' " Xueming Li
2023-04-09 15:24   ` patch 'crypto/ipsec_mb: relax multi-process requirement' " Xueming Li
2023-04-09 15:24   ` patch 'app/bbdev: check statistics failure' " Xueming Li
2023-04-09 15:24   ` patch 'net/vhost: add missing newline in logs' " Xueming Li
2023-04-09 15:24   ` patch 'net/vhost: fix leak in interrupt handle setup' " Xueming Li
2023-04-09 15:24   ` patch 'net/vhost: fix Rx interrupt' " Xueming Li
2023-04-09 15:25   ` patch 'net/virtio: remove address width limit for modern devices' " Xueming Li
2023-04-09 15:25   ` patch 'net/sfc: invalidate switch port entry on representor unplug' " Xueming Li
2023-04-09 15:25   ` patch 'net/i40e: fix AVX512 fast-free path' " Xueming Li
2023-04-09 15:25   ` patch 'net/e1000: fix saving of stripped VLAN TCI' " Xueming Li
2023-04-09 15:25   ` patch 'net/i40e: fix MAC loopback on X722' " Xueming Li
2023-04-09 15:25   ` patch 'net/idpf: reset queue flag when queue is stopped' " Xueming Li
2023-04-09 15:25   ` patch 'net/iavf: fix device stop during reset' " Xueming Li
2023-04-09 15:25   ` patch 'net/mlx5: fix hairpin Tx queue reference count' " Xueming Li
2023-04-09 15:25   ` patch 'examples/l3fwd: remove hash entry number' " Xueming Li
2023-04-09 15:25   ` patch 'doc: fix LPM support in l3forward guide' " Xueming Li
2023-04-09 15:25   ` patch 'net/mlx5: fix egress group translation in HWS' " Xueming Li
2023-04-09 15:25   ` patch 'net/mlx5: fix isolated mode if no representor matching' " Xueming Li
2023-04-09 15:25   ` patch 'bus/ifpga: fix devargs handling' " Xueming Li
2023-04-09 15:25   ` patch 'net/ipn3ke: fix thread exit' " Xueming Li
2023-04-09 15:25   ` patch 'net/ipn3ke: fix representor name' " Xueming Li
2023-04-09 15:25   ` patch 'examples/qos_sched: fix config entries in wrong sections' " Xueming Li
2023-04-09 15:25   ` patch 'app/testpmd: fix encap/decap size calculation' " Xueming Li
2023-04-09 15:25   ` patch 'net/mlx5/hws: fix pattern creation' " Xueming Li
2023-04-09 15:25   ` patch 'net/mlx5: fix build with GCC 12 and ASan' " Xueming Li
2023-04-09 15:25   ` patch 'net/mlx5/hws: fix error code of send queue action' " Xueming Li
2023-04-09 15:25   ` patch 'net/mlx5: fix CQE dump for Tx' " Xueming Li
2023-04-09 15:25   ` patch 'net/mlx5: fix sysfs port name translation' " Xueming Li
2023-04-09 15:25   ` patch 'doc: fix code blocks in cryptodev guide' " Xueming Li
2023-04-09 15:25   ` patch 'test/crypto: fix statistics error messages' " Xueming Li
2023-04-09 15:25   ` patch 'pdump: fix build with GCC 12' " Xueming Li
2023-04-09 15:25   ` patch 'acl: fix crash on PPC64 with GCC 11' " Xueming Li
2023-04-09 15:45 ` patch 'devtools: move mailmap check after patch applied' " Xueming Li
2023-04-09 15:45   ` patch 'doc: fix pipeline example path in user guide' " Xueming Li
2023-04-09 15:45   ` patch 'doc: add Linux capability to access physical addresses' " Xueming Li
2023-04-09 15:45   ` patch 'doc: fix DCF instructions in ice guide' " Xueming Li

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230409152529.5308-87-xuemingl@nvidia.com \
    --to=xuemingl@nvidia.com \
    --cc=lihuisong@huawei.com \
    --cc=liudongdong3@huawei.com \
    --cc=stable@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).