From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Monjalon Subject: Re: [PATCH v1] ethdev: document RSS default key and types Date: Mon, 05 Nov 2018 22:47:38 +0100 Message-ID: <2255663.byWF4y053J@xps> References: <1541259953-4273-1-git-send-email-ophirmu@mellanox.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7Bit Cc: dev@dpdk.org, Ferruh Yigit , Andrew Rybchenko , Asaf Penso , Shahaf Shuler , Olga Shern , Yongseok Koh To: Ophir Munk Return-path: Received: from out5-smtp.messagingengine.com (out5-smtp.messagingengine.com [66.111.4.29]) by dpdk.org (Postfix) with ESMTP id 19F774F90 for ; Mon, 5 Nov 2018 22:47:42 +0100 (CET) In-Reply-To: <1541259953-4273-1-git-send-email-ophirmu@mellanox.com> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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 > --- > 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 > *