From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR01-HE1-obe.outbound.protection.outlook.com (mail-he1eur01on0057.outbound.protection.outlook.com [104.47.0.57]) by dpdk.org (Postfix) with ESMTP id 15BE2A49 for ; Sat, 3 Nov 2018 16:46:18 +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=1yNd/P5ohjZ7x8tSV9cvxjdVdHl3QtIYfiYgxxJ+ZeE=; b=DihaXyi6sUHmFAgPo07+loyOm9l3ygAi3PlUMSP899zkb71dtLVqIcY2ff2gA7/2JAaQv1uAR6hX9iNmUSD7uNp8kuL4LwkfeoBF0UnANSjU4Ug6o+sDy23foV9Acs0wqVp/ZcGgMHppvmN+QuTARopJEOPIDs/UjiHb6Q1IXOk= Received: from VI1PR0502MB3743.eurprd05.prod.outlook.com (52.134.8.154) by VI1PR0502MB3006.eurprd05.prod.outlook.com (10.175.21.20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1294.21; Sat, 3 Nov 2018 15:46:16 +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.028; Sat, 3 Nov 2018 15:46:16 +0000 From: Ophir Munk To: Ferruh Yigit , Andrew Rybchenko , "dev@dpdk.org" , Thomas Monjalon CC: Asaf Penso , Shahaf Shuler , Olga Shern , Ophir Munk , Yongseok Koh Thread-Topic: [PATCH v1] ethdev: document RSS default key and types Thread-Index: AQHUc4xbbW5yJO7mWEOnlGjBJJJ7AA== Date: Sat, 3 Nov 2018 15:46:16 +0000 Message-ID: <1541259953-4273-1-git-send-email-ophirmu@mellanox.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: LO2P265CA0237.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:b::33) To VI1PR0502MB3743.eurprd05.prod.outlook.com (2603:10a6:803:11::26) authentication-results: spf=none (sender IP is ) smtp.mailfrom=ophirmu@mellanox.com; x-ms-exchange-messagesentrepresentingtype: 1 x-originating-ip: [37.142.13.130] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; VI1PR0502MB3006; 6:UZR6IG7ywnosxOnoGZy3xy7iEpVjq7rFMxTQww3NgY2Fy1BPRpAw56Npr40uaOG/DFPJgVgtjz4vUVYwDnnasjPxz+AxwMIzYt+5Rw8Ei/dquaRGqRXNuTzHe2yr5s7T6CschETdPYT3birjt7BiASziBkjPTBeysX6N8zwjO2y+gvavkZYOgFuox1l2UyZsNY071C4izPAIPxy6Z+0zn2dY/XChxMUF2/IfMNJwPTxFv2ec3xCPpTr7tYSEDHg8pzSHti3tVU+kJxebRfjrksX3hkuIfz9iqWfQJ1oUTfRhcYzEeykqB195ke5buE4rGzLcMSFmUZgQTWe5LPgqtTgUc+KzB65hUttBUPck7tuBYvVXLSK8lw7A8TVxj458UKl3GMvfmbML+m1jbwMMwEz1yERzqUnaDVXgCPEry/3KEnNgwLe81bqmUuGYzlz36BbbDQ5ytAVAndF1lZrtAQ==; 5:uPCU+207R2coOq3DsoPr7oz0bdTOzlUt+zxfoGvH7b888hg2/QmcluB2npIcs19oHMffYVLmsy0FuOHUIiUc4IbrA9B/C/C/iIdWkv1+3bXcvG8xQLBywb8VoKXziLB/MSanRi+J6OoSuz2EqPW+TfaJNMOC6RPQ2bpYjNVOTVI=; 7:A6Rr6MhSvUCJnfpO53DNIMfDNplYmrfe1ofRi3nRh2TW5DQe9IrLZkd3a12nAEn3DjaeI3A1vxFvo6gOOeX+BbxoaZy7tP4P7N8uFwHAr6+kUXvN5dtED2rCSiNoCbWVXIUqR+KcWYEAKxjTgAopVw== x-ms-office365-filtering-correlation-id: 50751e60-eea2-4635-c347-08d641a37d60 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:VI1PR0502MB3006; x-ms-traffictypediagnostic: VI1PR0502MB3006: x-ld-processed: a652971c-7d2e-4d9b-a6a4-d149256f461b,ExtAddr x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(278428928389397); 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:VI1PR0502MB3006; BCL:0; PCL:0; RULEID:; SRVR:VI1PR0502MB3006; x-forefront-prvs: 08457955C4 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(376002)(346002)(39860400002)(136003)(396003)(366004)(189003)(199004)(476003)(2616005)(305945005)(7736002)(52116002)(5660300001)(486006)(106356001)(107886003)(6512007)(53936002)(68736007)(99286004)(71190400001)(2501003)(105586002)(81156014)(71200400001)(25786009)(256004)(81166006)(8936002)(6486002)(26005)(8676002)(4326008)(2906002)(2900100001)(6116002)(3846002)(186003)(6436002)(316002)(575784001)(86362001)(54906003)(110136005)(386003)(478600001)(36756003)(14454004)(97736004)(6506007)(66066001)(102836004); DIR:OUT; SFP:1101; SCL:1; SRVR:VI1PR0502MB3006; H:VI1PR0502MB3743.eurprd05.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; received-spf: None (protection.outlook.com: mellanox.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: 1mJh531kJE3Lyej3b2PYabvNbB6UxI05S7BwTBOkbQwI66Nbs9GNWUDJ55FrgQGsoBwLpqidT8UbR6jTJWEhT1lAr9t+XUx+dbvwQufEz2N5d9TTaubFEHMeVm8pmG0Eau3JFtyfWiUdG/LhkJhJeW4ur7B+Q1y0gvtRsmj1mshovCZ6vWje3s27evabzg2slmL4AWz2dxTUStHNxxpff4yfKXRF2Cb8zVqCQ8YrDUTTMzxh97i36XDNGW90FreOl8PMMdd/cDttT7pOlAz5zaZGLwDXo+lSSgfY2hqtoPXgS5hLD1CzWYM1Yp0NdGur5qU3mH2QO2+W+KIntPK53I8GnKcn0OEx/9wntwtQxYo= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-Network-Message-Id: 50751e60-eea2-4635-c347-08d641a37d60 X-MS-Exchange-CrossTenant-originalarrivaltime: 03 Nov 2018 15:46:16.3315 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR0502MB3006 Subject: [dpdk-dev] [PATCH v1] 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: Sat, 03 Nov 2018 15:46:18 -0000 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 lib/librte_ethdev/rte_flow.h | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/lib/librte_ethdev/rte_flow.h b/lib/librte_ethdev/rte_flow.h index c0fe879..fb3e9a8 100644 --- 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. */ }; =20 + + + /** * RTE_FLOW_ACTION_TYPE_VF * --=20 1.8.3.1