DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [RFC] ethdev: extend RSS offload types
@ 2019-07-25 11:37 simei
  2019-07-26  0:35 ` [dpdk-dev] [RFC,v2] " simei
  0 siblings, 1 reply; 10+ messages in thread
From: simei @ 2019-07-25 11:37 UTC (permalink / raw)
  To: qi.z.zhang, jingjing.wu, adrien.mazarguil; +Cc: dev, simei.su

From: Simei Su <simei.su@intel.com>

This RFC reserves several bits as input set selection from
bottom of the 64 bits. The flow type is combined with input set
to represent rss types.

for example:
    ETH_RSS_IPV4 | ETH_RSS_L3_SRC_ONLY: hash on src ip address only
    ETH_RSS_IPV4_UDP | ETH_RSS_L4_DST_ONLY: hash on src/dst IP and
				            dst UDP port
    ETH_RSS_L2_PAYLOAD | ETH_RSS_L2_DST_ONLY: hash on dst mac address

Signed-off-by: Simei Su <simei.su@intel.com>
---
 lib/librte_ethdev/rte_ethdev.h | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/lib/librte_ethdev/rte_ethdev.h b/lib/librte_ethdev/rte_ethdev.h
index dc6596b..452d29f 100644
--- a/lib/librte_ethdev/rte_ethdev.h
+++ b/lib/librte_ethdev/rte_ethdev.h
@@ -508,6 +508,18 @@ struct rte_eth_rss_conf {
 #define ETH_RSS_GENEVE             (1ULL << RTE_ETH_FLOW_GENEVE)
 #define ETH_RSS_NVGRE              (1ULL << RTE_ETH_FLOW_NVGRE)
 
+/*
+ * The following six macros are used combined with ETH_RSS_* to
+ * represent rss types. The structure rte_flow_action_rss.types is
+ * 64-bit wide and we reserve couple bits here for input set selection.
+ */
+#define	ETH_RSS_INSET_L2_SRC       0x0400000000000000
+#define	ETH_RSS_INSET_L2_DST       0x0800000000000000
+#define	ETH_RSS_INSET_L3_SRC       0x1000000000000000
+#define	ETH_RSS_INSET_L3_DST       0x2000000000000000
+#define	ETH_RSS_INSET_L4_SRC       0x4000000000000000
+#define	ETH_RSS_INSET_L4_DST       0x8000000000000000
+
 #define ETH_RSS_IP ( \
 	ETH_RSS_IPV4 | \
 	ETH_RSS_FRAG_IPV4 | \
-- 
1.8.3.1


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2019-08-01  5:37 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-25 11:37 [dpdk-dev] [RFC] ethdev: extend RSS offload types simei
2019-07-26  0:35 ` [dpdk-dev] [RFC,v2] " simei
2019-07-26 10:21   ` Ferruh Yigit
2019-07-29  2:44   ` [dpdk-dev] [RFC,v3] " simei
2019-07-30  6:06     ` Ori Kam
2019-07-30  7:42       ` Adrien Mazarguil
2019-08-01  4:54     ` [dpdk-dev] [RFC,v4] " simei
2019-07-29 15:30   ` [dpdk-dev] [RFC,v2] " Stephen Hemminger
2019-07-30 15:50   ` Stephen Hemminger
2019-07-31  2:57     ` Su, Simei

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).