[v3,1/3] ethdev: add new RSS types for IPv6 prefix
diff mbox series

Message ID 20200708043621.276392-2-junfeng.guo@intel.com
State Superseded, archived
Delegated to: Ferruh Yigit
Headers show
Series
  • add RSS support for IPv6 prefix
Related show

Checks

Context Check Description
ci/Intel-compilation fail apply issues
ci/checkpatch success coding style OK

Commit Message

Guo, Junfeng July 8, 2020, 4:36 a.m. UTC
This patch defines new RSS offload types for IPv6 prefix with 32, 48,
64 bits of both SRC and DST IPv6 address.

Signed-off-by: Junfeng Guo <junfeng.guo@intel.com>
---
 lib/librte_ethdev/rte_ethdev.h | 51 ++++++++++++++++++++++++++++++++++
 1 file changed, 51 insertions(+)

Patch
diff mbox series

diff --git a/lib/librte_ethdev/rte_ethdev.h b/lib/librte_ethdev/rte_ethdev.h
index 631b146bd..5a7ba36d8 100644
--- a/lib/librte_ethdev/rte_ethdev.h
+++ b/lib/librte_ethdev/rte_ethdev.h
@@ -538,6 +538,9 @@  struct rte_eth_rss_conf {
 #define ETH_RSS_L4_DST_ONLY        (1ULL << 60)
 #define ETH_RSS_L2_SRC_ONLY        (1ULL << 59)
 #define ETH_RSS_L2_DST_ONLY        (1ULL << 58)
+#define ETH_RSS_L3_PRE32           (1ULL << 57)
+#define ETH_RSS_L3_PRE48           (1ULL << 56)
+#define ETH_RSS_L3_PRE64           (1ULL << 55)
 
 /**
  * For input set change of hash filter, if SRC_ONLY and DST_ONLY of
@@ -561,6 +564,54 @@  rte_eth_rss_hf_refine(uint64_t rss_hf)
 	return rss_hf;
 }
 
+#define ETH_RSS_IPV6_PRE32 ( \
+		ETH_RSS_IPV6 | \
+		ETH_RSS_L3_PRE32)
+
+#define ETH_RSS_IPV6_PRE48 ( \
+		ETH_RSS_IPV6 | \
+		ETH_RSS_L3_PRE48)
+
+#define ETH_RSS_IPV6_PRE64 ( \
+		ETH_RSS_IPV6 | \
+		ETH_RSS_L3_PRE64)
+
+#define ETH_RSS_IPV6_PRE32_UDP ( \
+		ETH_RSS_NONFRAG_IPV6_UDP | \
+		ETH_RSS_L3_PRE32)
+
+#define ETH_RSS_IPV6_PRE48_UDP ( \
+		ETH_RSS_NONFRAG_IPV6_UDP | \
+		ETH_RSS_L3_PRE48)
+
+#define ETH_RSS_IPV6_PRE64_UDP ( \
+		ETH_RSS_NONFRAG_IPV6_UDP | \
+		ETH_RSS_L3_PRE64)
+
+#define ETH_RSS_IPV6_PRE32_TCP ( \
+		ETH_RSS_NONFRAG_IPV6_TCP | \
+		ETH_RSS_L3_PRE32)
+
+#define ETH_RSS_IPV6_PRE48_TCP ( \
+		ETH_RSS_NONFRAG_IPV6_TCP | \
+		ETH_RSS_L3_PRE48)
+
+#define ETH_RSS_IPV6_PRE64_TCP ( \
+		ETH_RSS_NONFRAG_IPV6_TCP | \
+		ETH_RSS_L3_PRE64)
+
+#define ETH_RSS_IPV6_PRE32_SCTP ( \
+		ETH_RSS_NONFRAG_IPV6_SCTP | \
+		ETH_RSS_L3_PRE32)
+
+#define ETH_RSS_IPV6_PRE48_SCTP ( \
+		ETH_RSS_NONFRAG_IPV6_SCTP | \
+		ETH_RSS_L3_PRE48)
+
+#define ETH_RSS_IPV6_PRE64_SCTP ( \
+		ETH_RSS_NONFRAG_IPV6_SCTP | \
+		ETH_RSS_L3_PRE64)
+
 #define ETH_RSS_IP ( \
 	ETH_RSS_IPV4 | \
 	ETH_RSS_FRAG_IPV4 | \