From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr1-f68.google.com (mail-wr1-f68.google.com [209.85.221.68]) by dpdk.org (Postfix) with ESMTP id 68E7C2B94 for ; Wed, 7 Nov 2018 10:31:29 +0100 (CET) Received: by mail-wr1-f68.google.com with SMTP id y3-v6so16292943wrh.10 for ; Wed, 07 Nov 2018 01:31:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=MBj21huef97H+id8AVz6DNv0ngfE4+av/FIQZH11XcE=; b=qswF/jFVGF93bW+BXCjSZN1FQjsc9icw0X+xY3aVlpzwj+maa8w2X32Zv5OL6im40T YSxWWCePVK4SvCzDhgvbRn6tNHOaT1hUWPgKnWA+/klsnBaGI5bAI9zjXB7gxqImnPDg f+Jy7K7Uvs05kq/XJct2fKRxK1te94dxcnue4LynWm5mc0L63qzC5bo+NY0/n/B3kh7o rZKJN4ao3t5583L0dDD+2cxjsK2GL7/12vLCIuT2KWI8b28LZOG6vcraaNNAPG7c23lG 1C4tEswJX+lvXvHQkZ48wEaNxd8oHUWYo7dy2hdntc5Gl/SBzecIaVR1dUjOt5XfI69t TVvg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=MBj21huef97H+id8AVz6DNv0ngfE4+av/FIQZH11XcE=; b=OSiHHCxWAGqTSfjSfFE48zwQt9UVFIRAWehnZ0zdoaNQGHAbdqJz1CFQ4XojS9qlPr gwtuOTUG5h+epGLX2DK6GdDmxtfNelUv/kR8Alxvf21WmMEsknMGzucZceSwUcE1QZcH 5BVpv3ScSp27SmDq/1j5iI0E27FyeIasMk2c+ZeYizijZ2Lr1YWH+0AMaA6hAXOof/qi QmPDPy5FhFXVbjBocGjl7F4q3JZZrrprOvwMYrg0yonw/XMYVxUOqtj38fPk7GoHyA+u xvxq78bAOyhqRPAVYznxBoMWs76byiMZjBxiVm0SqglIZZocQJFiFDViJ0kMyOzy7UdE NC3A== X-Gm-Message-State: AGRZ1gJ/6Ifgqt2rzMvBSF756pprTQ82AILL55+ZkqOuTmcbkKeZ/yrb FK73icAtjzy7Y/7EmoLCU8vTxA== X-Google-Smtp-Source: AJdET5cizC827kCxe2PhE6CIZwQZbsAd3cGxP2CYqT9bZ5V353zLVdxYwbmU/3ZSeaCRdpnrNM8W/A== X-Received: by 2002:a5d:62c1:: with SMTP id o1-v6mr1082641wrv.83.1541583089112; Wed, 07 Nov 2018 01:31:29 -0800 (PST) Received: from 6wind.com (host.78.145.23.62.rev.coltfrance.com. [62.23.145.78]) by smtp.gmail.com with ESMTPSA id x142-v6sm1109430wmd.20.2018.11.07.01.31.27 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 07 Nov 2018 01:31:28 -0800 (PST) Date: Wed, 7 Nov 2018 10:31:09 +0100 From: Adrien Mazarguil To: Ophir Munk Cc: Ferruh Yigit , Andrew Rybchenko , "dev@dpdk.org" , Thomas Monjalon , Asaf Penso , Shahaf Shuler , Olga Shern Message-ID: <20181107093109.GG4638@6wind.com> References: <1541259953-4273-1-git-send-email-ophirmu@mellanox.com> <1541582611-1609-1-git-send-email-ophirmu@mellanox.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1541582611-1609-1-git-send-email-ophirmu@mellanox.com> Subject: Re: [dpdk-dev] [PATCH v2] ethdev: document RSS default key and types X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Nov 2018 09:31:29 -0000 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; I'd suggest to document that on key_len instead. If key_len is nonzero, key cannot be NULL anyway. > const uint16_t *queue; /**< Queue indices to use. */ > }; > > -- > 1.8.3.1 > -- Adrien Mazarguil 6WIND