From mboxrd@z Thu Jan 1 00:00:00 1970 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) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Mellanox.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=XqVyxwKTlURRvTvOSg6UvU6o3ZE2B5kXP3l2q8vwF+s=; b=M/o5ymzn5FO2mgmb9KXu2H1fUpYKzzFvHEJhoQSNTEp+Unyk6sDYAt3bEyxT3aN+ziYraLqTjKBTdikG00+u+llAlw0PKnLeMmwoYn2dU0V9w37xj/UAhM3QsuboOIsR3oMdbHfR9uabay+1v6NpIHppYM1FARP0lWfWaF3KGx4= Received: from VI1PR0502MB3743.eurprd05.prod.outlook.com (52.134.8.154) by VI1PR0502MB3982.eurprd05.prod.outlook.com (52.134.18.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1294.26; Wed, 7 Nov 2018 12:39:25 +0000 Received: from VI1PR0502MB3743.eurprd05.prod.outlook.com ([fe80::84d3:8812:d45c:98e4]) by VI1PR0502MB3743.eurprd05.prod.outlook.com ([fe80::84d3:8812:d45c:98e4%4]) with mapi id 15.20.1294.034; Wed, 7 Nov 2018 12:39:25 +0000 From: Ophir Munk To: Adrien Mazarguil CC: Ferruh Yigit , Andrew Rybchenko , "dev@dpdk.org" , Thomas Monjalon , Asaf Penso , Shahaf Shuler , Olga Shern Thread-Topic: [dpdk-dev] [PATCH v2] ethdev: document RSS default key and types Thread-Index: AQHUdnuTE9UKU0bjB02/QczzO0OvtKVEDEOAgAAxJTA= 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> In-Reply-To: <20181107093109.GG4638@6wind.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=ophirmu@mellanox.com; x-originating-ip: [193.47.165.251] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; VI1PR0502MB3982; 6:h97NTqdWjegKBrmVe3Pn7DXQ8ecilN8odgbgA0yfHzsTUg5Sa5r94Uyk7uuEso7a+hlh9vzCLXEJZjoZ6G6LOe1Uupml6MrnctVpsXUsWy7yoWRC9HBrujY9BcUQnlcbKyVibVBBD/2erilAytlz51WXJuFiB6tIzH6Dh21+ka2bAXWpjA8uY6MMbe13H5Lx4S60CCDqu/MZCt+jO3spsWR2IP2Ae0hVrdL9aAnZW8QqN9UaBaRC7WP/xeVyOANrMo//2hvCGA9Au+pGB+me2hRbpIarc3NhXBAGmCGdxthjIlKjC/vQX08XAmy1B8gfhylN9VbDVIXsE/bP4cAa/PDqj9ROw3gkClJ3fv9pSl7ht5m9UZXM8h/l8rD4WPziu/f7d4Gk+OpwCn8ElN/duT/nFXAQ/CBigc0zknWt2DqpEYvi1vFALrM5Zw8ydzOmex5vvkdWhFLUGokqD4nmHw==; 5:uFlC0DSHQdmqV5ZlViOWDx7RQJl2xIAJUyeIoW4gH/Y35oHv27Kw2cPlpk3fkApb7D2ltRjaBoNW55kka9YgwCQ9bzb1Wa0/D0djqiMNav6HPaS1BriK6sVto+vWKhNoyofldezgfu8v4rDvn8JFnXmH1RqokVRXJuO/dywXPc8=; 7:T6cU/KZRrQi8SslwWaR5XhzXWRUg03PdC5Ojs4xiGPmjfXlXh1hvi4JY5NgFfF+ZpiZUzJTkGOlvJqrBQdDWJJjS9/6ZCm+hoDDUaipqA0u+deTTw/NwIl+7o29mVH1VsKTARxv2H0jRTgUX+oRYLA== x-ms-exchange-antispam-srfa-diagnostics: SOS; x-ms-office365-filtering-correlation-id: f2d6c722-2525-4879-bf73-08d644ae0cdd x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989299)(5600074)(711020)(4618075)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(2017052603328)(7153060)(7193020); SRVR:VI1PR0502MB3982; x-ms-traffictypediagnostic: VI1PR0502MB3982: x-ld-processed: a652971c-7d2e-4d9b-a6a4-d149256f461b,ExtAddr x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(228905959029699); x-ms-exchange-senderadcheck: 1 x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(93006095)(93001095)(10201501046)(3002001)(3231382)(944501410)(52105095)(6055026)(148016)(149066)(150057)(6041310)(20161123558120)(20161123564045)(20161123560045)(20161123562045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(201708071742011)(7699051)(76991095); SRVR:VI1PR0502MB3982; BCL:0; PCL:0; RULEID:; SRVR:VI1PR0502MB3982; x-forefront-prvs: 08497C3D99 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(346002)(39860400002)(396003)(136003)(366004)(376002)(199004)(189003)(13464003)(186003)(8676002)(9686003)(107886003)(55016002)(71190400001)(71200400001)(6436002)(33656002)(11346002)(476003)(86362001)(5660300001)(74316002)(256004)(305945005)(6916009)(7736002)(68736007)(6246003)(53936002)(486006)(446003)(105586002)(575784001)(316002)(6116002)(2906002)(3846002)(229853002)(97736004)(106356001)(2900100001)(4326008)(478600001)(66066001)(25786009)(8936002)(81166006)(81156014)(53546011)(6506007)(102836004)(14454004)(26005)(76176011)(99286004)(7696005)(54906003); DIR:OUT; SFP:1101; SCL:1; SRVR:VI1PR0502MB3982; H:VI1PR0502MB3743.eurprd05.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; received-spf: None (protection.outlook.com: mellanox.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: mwdp3pPeW7Om/9K4KOCOTVkSbPuRrGWOJdSgLPF0U7kOkrnZpkskW4/aSJveAtSoH3gdIhul0IuZRqucdICLilKL10vF8TbPqScZpmS5Vq4WpR26Gibqwz0fWwk+/upT5wg9fZPPu+S/y9t3ERXTQpI3/OntJalnZz6hgodiotrEQsdlG0g30t7NdM4CqVrmrhzKoVa/3n+mRJHOEK2e6Hk7wTA8lvQbWJg8O1AM/3wNFd0NuWBD1FXUcSaUPrda5ZAHg7X/aeLDLI+UyGbuSHd1e8h1AeDpkJ6UyXlQ6yzQomte2qCPQP9QR5sbpAeoqKi0ADUHpkXNlA6bl1Pxrrfa8VOu6rSrQEqgbXbZhG4= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-Network-Message-Id: f2d6c722-2525-4879-bf73-08d644ae0cdd X-MS-Exchange-CrossTenant-originalarrivaltime: 07 Nov 2018 12:39:24.9423 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR0502MB3982 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 12:39:27 -0000 > -----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