DPDK patches and discussions
 help / color / mirror / Atom feed
From: simei <simei.su@intel.com>
To: qi.z.zhang@intel.com, jingjing.wu@intel.com,
	ferruh.yigit@intel.com, adrien.mazarguil@6wind.com
Cc: dev@dpdk.org, simei.su@intel.com
Subject: [dpdk-dev] [RFC,v3] ethdev: extend RSS offload types
Date: Mon, 29 Jul 2019 10:44:11 +0800	[thread overview]
Message-ID: <1564368251-112891-1-git-send-email-simei.su@intel.com> (raw)
In-Reply-To: <1564101350-98092-1-git-send-email-simei.su@intel.com>

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

Make it easier to represent to define macro values as (1ULL << ###).

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_INSET_L3_SRC: hash on src ip address only
    ETH_RSS_IPV4_UDP | ETH_RSS_INSET_L4_DST: hash on src/dst IP and
				            dst UDP port
    ETH_RSS_L2_PAYLOAD | ETH_RSS_INSET_L2_DST: hash on dst mac address

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

diff --git a/lib/librte_ethdev/rte_ethdev.h b/lib/librte_ethdev/rte_ethdev.h
index dc6596b..8af6355 100644
--- a/lib/librte_ethdev/rte_ethdev.h
+++ b/lib/librte_ethdev/rte_ethdev.h
@@ -508,6 +508,19 @@ 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
+ * from bottom of the 64 bits.
+ */
+#define	ETH_RSS_INSET_L2_SRC       (1ULL << 63)
+#define	ETH_RSS_INSET_L2_DST       (1ULL << 62)
+#define	ETH_RSS_INSET_L3_SRC       (1ULL << 61)
+#define	ETH_RSS_INSET_L3_DST       (1ULL << 60)
+#define	ETH_RSS_INSET_L4_SRC       (1ULL << 59)
+#define	ETH_RSS_INSET_L4_DST       (1ULL << 58)
+
 #define ETH_RSS_IP ( \
 	ETH_RSS_IPV4 | \
 	ETH_RSS_FRAG_IPV4 | \
-- 
1.8.3.1


  parent reply	other threads:[~2019-07-29  3:27 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-25 11:37 [dpdk-dev] [RFC] " simei
2019-07-26  0:35 ` [dpdk-dev] [RFC,v2] " simei
2019-07-26 10:21   ` Ferruh Yigit
2019-07-29  2:44   ` simei [this message]
2019-07-30  6:06     ` [dpdk-dev] [RFC,v3] " 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

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=1564368251-112891-1-git-send-email-simei.su@intel.com \
    --to=simei.su@intel.com \
    --cc=adrien.mazarguil@6wind.com \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@intel.com \
    --cc=jingjing.wu@intel.com \
    --cc=qi.z.zhang@intel.com \
    /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).