From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR02-AM5-obe.outbound.protection.outlook.com (mail-eopbgr00062.outbound.protection.outlook.com [40.107.0.62]) by dpdk.org (Postfix) with ESMTP id C1201689B for ; Wed, 28 Dec 2016 11:59:52 +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; bh=4JvwM9XYdiJxpRUamIHHSxcX+1y9DBopB8JI5tgKuLU=; b=FzsS8rRMzLRr0E5/uWeRSk7SNb6ZveYerP2ElUrLFiwb3NOzH+JsCgXwUt0Fe+IgNnzLJn7fNTCZAk7MyMz7sVjEvIl/1BA/vymBIX3UK27nmbtRh9E0WgV7uXczHXnhlnXUYCMnKpNO+F+NbRhg0stc9o/dN/Pfjw0Gn+SLcJ8= Received: from AM4PR05MB1505.eurprd05.prod.outlook.com (10.164.79.147) by AM4PR05MB1505.eurprd05.prod.outlook.com (10.164.79.147) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.803.11; Wed, 28 Dec 2016 10:59:51 +0000 Received: from AM4PR05MB1505.eurprd05.prod.outlook.com ([10.164.79.147]) by AM4PR05MB1505.eurprd05.prod.outlook.com ([10.164.79.147]) with mapi id 15.01.0803.021; Wed, 28 Dec 2016 10:59:51 +0000 From: Shahaf Shuler To: "Saleh, Omran" , "users@dpdk.org" Thread-Topic: Mellanox rss hash information Thread-Index: AdJg4ZUKHBVElpRgQ0Ozbzqe/tTD+QAFiM7w Date: Wed, 28 Dec 2016 10:59:51 +0000 Message-ID: References: <8c0c4278cb7045ffb4b204095ef621f7@DEWDFE13DE16.global.corp.sap> In-Reply-To: <8c0c4278cb7045ffb4b204095ef621f7@DEWDFE13DE16.global.corp.sap> 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=shahafs@mellanox.com; x-originating-ip: [193.47.165.251] x-ms-office365-filtering-correlation-id: 180fde3c-101e-4167-6d7a-08d42f10a613 x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(22001);SRVR:AM4PR05MB1505; x-microsoft-exchange-diagnostics: 1; AM4PR05MB1505; 7:WA9nXEidvSrLfsDvPKBDa//OTDo7q2QGKeqrA4/Uhnc4N12750x8LltcC+7SylscqjjqY+AfWyZfS1ZxnOo8jSsRmTsc0EjT1TDR43jnFoTeTo6zSaTcSDnO2WyLdAptLb8zcqoYsRJKrCe8xYeCM1kvp8hAL+BWkNfhVYkE+0GBMrf1hhhDPhKTmn2PPNYYZmLGhfbGyiGDlTFQNcBnLLOAOKAhdod3YFeOXSJTZqosARWdSkEsJjO+okmhu52stTk/VAQZrNlRzqWlboHBhJ9PmruOl8L9edig/0+5EAK7SrA1HNf3OS2nDvX9HbQ3AQY4yMk+TTotS2wRayPfSKiJTRBmChM6CekqW0DQdk3laHcm77cSwMNgXjFtYWmkdO00/IK6FO5E72JJXYUzGNq85TEtw4RQo35R3nXd/lRXSS2R4UG7IiLFHZG8j0k6lK6slF1ThW4VAW4BFC565w== x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:; x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(6040375)(601004)(2401047)(8121501046)(5005006)(3002001)(10201501046)(6055026)(6041248)(20161123562025)(20161123560025)(20161123564025)(20161123555025)(6072148); SRVR:AM4PR05MB1505; BCL:0; PCL:0; RULEID:; SRVR:AM4PR05MB1505; x-forefront-prvs: 0170DAF08C x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(6009001)(7916002)(39860400002)(39850400002)(39450400003)(39410400002)(39840400002)(189002)(377454003)(53754006)(199003)(13464003)(81166006)(81156014)(189998001)(76576001)(9686002)(101416001)(5660300001)(77096006)(3660700001)(8656002)(6506006)(3480700004)(6436002)(2501003)(66066001)(8936002)(8676002)(122556002)(25786008)(33656002)(97736004)(50986999)(68736007)(86362001)(5001770100001)(92566002)(76176999)(2906002)(3280700002)(2900100001)(229853002)(38730400001)(54356999)(305945005)(3846002)(106356001)(6116002)(102836003)(105586002)(7696004)(7736002)(2950100002)(74316002)(107886002)(7059030); DIR:OUT; SFP:1101; SCL:1; SRVR:AM4PR05MB1505; H:AM4PR05MB1505.eurprd05.prod.outlook.com; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A:1; LANG:en; received-spf: None (protection.outlook.com: mellanox.com does not designate permitted sender hosts) 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-originalarrivaltime: 28 Dec 2016 10:59:51.6834 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM4PR05MB1505 Subject: Re: [dpdk-users] Mellanox rss hash information X-BeenThere: users@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK usage discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Dec 2016 10:59:52 -0000 Have you tried you use rte_softrss_be function? I suspect you have an endianness issue here as the mlx5 rss_hash_default_ke= y is already in big-endian format.=20 /** =20 * Optimized implementation. * If you want the calculated hash value matches NIC RSS value * you have to use special converted key with rte_convert_rss_key() fn. * @param input_tuple * Pointer to input tuple * @param input_len * Length of input_tuple in 4-bytes chunks * @param *rss_key * Pointer to RSS hash key. * @return * Calculated hash value. */ static inline uint32_t rte_softrss_be(uint32_t *input_tuple, uint32_t input_len, const uint8_t *rss_key) { ... } --Shahaf -----Original Message----- From: users [mailto:users-bounces@dpdk.org] On Behalf Of Saleh, Omran Sent: Wednesday, December 28, 2016 10:29 AM To: users@dpdk.org Subject: [dpdk-users] Mellanox rss hash information Hi All, Currently, I am using DPDK 16.11 with Mellanox NIC adapters (mlx5). I encou= nter a problem that the RSS hash value from mbuf (mbug.hash->rss) is not t= he same as calculated from rte_softrss(). It is completely different. I am using the default hash key from mlx5 uint8_t rss_hash_default_key[] =3D { 0x2c, 0xc6, 0x81, 0xd1, 0x5b, 0xdb, 0xf4, 0xf7, 0xfc, 0xa2, 0x83, 0x19, 0xdb, 0x1a, 0x3e, 0x94, 0x6b, 0x9e, 0x38, 0xd9, 0x2c, 0x9c, 0x03, 0xd1, 0xad, 0x99, 0x44, 0xa7, 0xd9, 0x56, 0x3d, 0x59, 0x06, 0x3c, 0x25, 0xf3, 0xfc, 0x1f, 0xdc, 0x2a, }; And the following call: auto hash =3D rte_softrss(&tuple.v4.src_addr, RTE_THASH_V4_L4_LEN, rss_hash= _default_key); with RSS configurations as the following: port_conf.rxmode.mq_mode =3D ETH_MQ_RX_RSS; port_conf.rx_adv_conf.rss_conf.= rss_hf =3D ETH_RSS_NONFRAG_IPV4_TCP; port_conf.rx_adv_conf.rss_conf.rss_key= =3D rss_hash_default_key; port_conf.rx_adv_conf.rss_conf.rss_key_len =3D 40= ; This is working perfectly with ixgbe but Mellanox not. Can you help me to = figure out what is the problem? What is the default Toeplitz function for m= lx5?! My NIC adapters are Mellanox Technologies MT27700 Family [ConnectX-4] With= firmware version 12.16.1006 and ofed version 3.3-2.0.0 uname -a : Linux ibmhanar16 3.12.49-11-default #1 SMP Wed Nov 11 20:52:43 U= TC 2015 (8d714a0) x86_64 x86_64 x86_64 GNU/Linux Thank you Best regards, Omran Saleh