[v1] ethdev: document RSS default key and types
Checks
Commit Message
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@mellanox.com>
---
v1: Initial version
lib/librte_ethdev/rte_flow.h | 20 ++++++++++++++++++--
1 file changed, 18 insertions(+), 2 deletions(-)
Comments
On 11/3/2018 3:46 PM, Ophir Munk wrote:
> 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@mellanox.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Applied to dpdk-next-net/master, thanks.
This patch is in next-net but may be improved before reaching mainline.
The comments may be shorter and avoid being split in 2 parts.
The second part of the doxygen comments, starting with /**,
will apply wrongly to the next field.
03/11/2018 16:46, Ophir Munk:
> 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@mellanox.com>
> ---
> v1: Initial version
>
> --- 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
> *
@@ -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
*