From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ophir Munk Subject: Re: [PATCH v2] ethdev: document RSS default key and types Date: Wed, 7 Nov 2018 12:39:24 +0000 Message-ID: References: <1541259953-4273-1-git-send-email-ophirmu@mellanox.com> <1541582611-1609-1-git-send-email-ophirmu@mellanox.com> <20181107093109.GG4638@6wind.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Cc: Ferruh Yigit , Andrew Rybchenko , "dev@dpdk.org" , Thomas Monjalon , Asaf Penso , Shahaf Shuler , Olga Shern To: Adrien Mazarguil Return-path: Received: from EUR03-VE1-obe.outbound.protection.outlook.com (mail-eopbgr50065.outbound.protection.outlook.com [40.107.5.65]) by dpdk.org (Postfix) with ESMTP id 4682F14EC for ; Wed, 7 Nov 2018 13:39:27 +0100 (CET) In-Reply-To: <20181107093109.GG4638@6wind.com> Content-Language: en-US List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" > -----Original Message----- > From: Adrien Mazarguil [mailto:adrien.mazarguil@6wind.com] > Sent: Wednesday, November 07, 2018 11:31 AM > To: Ophir Munk > Cc: Ferruh Yigit ; Andrew Rybchenko > ; dev@dpdk.org; Thomas Monjalon > ; Asaf Penso ; Shahaf > Shuler ; Olga Shern > Subject: Re: [dpdk-dev] [PATCH v2] ethdev: document RSS default key and > types >=20 > On Wed, Nov 07, 2018 at 09:23:42AM +0000, 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 > > --- > > lib/librte_ethdev/rte_flow.h | 9 +++++++-- > > 1 file changed, 7 insertions(+), 2 deletions(-) > > > > diff --git a/lib/librte_ethdev/rte_flow.h > > b/lib/librte_ethdev/rte_flow.h index c0fe879..ca9e135 100644 > > --- a/lib/librte_ethdev/rte_flow.h > > +++ b/lib/librte_ethdev/rte_flow.h > > @@ -1782,10 +1782,15 @@ struct rte_flow_action_rss { > > * through. > > */ > > uint32_t level; > > - uint64_t types; /**< Specific RSS hash types (see ETH_RSS_*). */ > > + /** > > + * Specific RSS hash types (see ETH_RSS_*), > > + * or 0 for PMD specific default. > > + */ > > + uint64_t 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. */ > > + /** Hash key, or NULL for PMD specific default key. */ > > + const uint8_t *key; >=20 > I'd suggest to document that on key_len instead. If key_len is nonzero, k= ey > cannot be NULL anyway. The decision if a key/len combination is valid is done in the PMD action va= lidation API. For example, in MLX5 key=3D=3DNULL and key_len=3D=3D40 is accepted.=20 The combination key=3D=3DNULL and key_len=3D=3D0 should always succeeds, ho= wever the "must" parameter for RSS default is key=3D=3DNULL and not key_len= =3D=3D0. >=20 > > const uint16_t *queue; /**< Queue indices to use. */ }; > > > > -- > > 1.8.3.1 > > >=20 > -- > Adrien Mazarguil > 6WIND