[dpdk-dev] [PATCH v1] ethdev: document RSS default key and types

Ophir Munk ophirmu at mellanox.com
Sat Nov 3 16:46:16 CET 2018


struct rte_flow_action_rss include fields 'key' and 'types'.
Field 'key' is a pointer to bytes array (uint8_t *) which contains the
specific RSS hash key.
If an application is only interested in default RSS operation it
should not care about the specific hash key. The application can set
the hash key to NULL such that any PMD uses its default RSS key.

Field 'types' is a uint64_t bits flag used to specify a specific RSS
hash type such as ETH_RSS_IP (see ETH_RSS_*).
If an application does not care about the specific RSS type it can set
this field to 0 such that any PMD uses its default type.

Signed-off-by: Ophir Munk <ophirmu at mellanox.com>
---
v1: Initial version

 lib/librte_ethdev/rte_flow.h | 20 ++++++++++++++++++--
 1 file changed, 18 insertions(+), 2 deletions(-)

diff --git a/lib/librte_ethdev/rte_flow.h b/lib/librte_ethdev/rte_flow.h
index c0fe879..fb3e9a8 100644
--- a/lib/librte_ethdev/rte_flow.h
+++ b/lib/librte_ethdev/rte_flow.h
@@ -1782,13 +1782,29 @@ struct rte_flow_action_rss {
 	 * through.
 	 */
 	uint32_t level;
-	uint64_t types; /**< Specific RSS hash types (see ETH_RSS_*). */
+	uint64_t types; /**< Specific RSS hash types (see ETH_RSS_*) or 0 */
+	/**
+	 * Applications should supply specific RSS hash types (e.g.
+	 * ETH_RSS_IP). If the application does not care about the specific RSS
+	 * types it can set them to 0 and let any PMD use its default types.
+	 */
 	uint32_t key_len; /**< Hash key length in bytes. */
 	uint32_t queue_num; /**< Number of entries in @p queue. */
-	const uint8_t *key; /**< Hash key. */
+	const uint8_t *key; /**< Hash key (can be NULL). */
+	/**
+	 * The key is a pointer to hash bytes array.
+	 *
+	 * Applications should supply a specific RSS hash key.
+	 * If an application is only interested in default RSS operation it
+	 * should not care about the specific hash key. By setting the hash
+	 * key to NULL - any PMD will use its default RSS key.
+	 */
 	const uint16_t *queue; /**< Queue indices to use. */
 };
 
+
+
+
 /**
  * RTE_FLOW_ACTION_TYPE_VF
  *
-- 
1.8.3.1



More information about the dev mailing list