[dpdk-dev,v1,01/21] ethdev: support tunnel RSS level

Message ID 20180309112921.2105-2-xuemingl@mellanox.com (mailing list archive)
State Superseded, archived
Headers

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation success Compilation OK

Commit Message

Xueming Li March 9, 2018, 11:29 a.m. UTC
  Currently PMD implementations default RSS on either tunnel outer or
inner fields. This patch introduced RSS level to allow user to specify
RSS hash field level of tunneled packets.

0: outer RSS.
1: inner RSS.
2-255: deep RSS level.

Please note that tunnels that tightly nested without IP/UDP/TCP layer
interlaced are deemed as one level. For example the following packet can
only use level 0 or 1:
	eth / ipv4 / GRE / MPLS / ipv4 / udp

Signed-off-by: Xueming Li <xuemingl@mellanox.com>
---
 lib/librte_ether/rte_ethdev.h | 9 +++++++++
 1 file changed, 9 insertions(+)
  

Patch

diff --git a/lib/librte_ether/rte_ethdev.h b/lib/librte_ether/rte_ethdev.h
index 0361533..baaeb3c 100644
--- a/lib/librte_ether/rte_ethdev.h
+++ b/lib/librte_ether/rte_ethdev.h
@@ -398,6 +398,15 @@  struct rte_eth_rss_conf {
 	uint8_t *rss_key;    /**< If not NULL, 40-byte hash key. */
 	uint8_t rss_key_len; /**< hash key length in bytes. */
 	uint64_t rss_hf;     /**< Hash functions to apply - see below. */
+	/**
+	 * RSS hash calculation on tunnel level:
+	 *  0: outer RSS, default.
+	 *  1: inner RSS.
+	 *  2-255: deep RSS level.
+	 * Please note that tunnels not interlaced with [IP|TCP|UDP] are
+	 * deemed as one level, such as MPLS over GRE.
+	 */
+	uint8_t rss_level;
 };
 
 /*