From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR03-VE1-obe.outbound.protection.outlook.com (mail-eopbgr50048.outbound.protection.outlook.com [40.107.5.48]) by dpdk.org (Postfix) with ESMTP id 6A750282 for ; Tue, 3 Jan 2017 13:30: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=/v5L9THUHtxT8h4tH0yznI/srQZLuarRimERgEBxwg0=; b=dWaMhw5Kss/EDTmhIJCZoUyHMn6P0J79timQ32sinfhLYh0QDLah3HvoTep6fpqMxOfao388V5O1vm7Jlper8+W6Y+WBQvNk5xKZiz55rJww8DaOvXf2n8Hp9/ejBbqMkFfTIK2r5JZe2jUbJNkHKU5P5aHuCTT2meSoVEeKZzQ= Received: from AM4PR05MB1505.eurprd05.prod.outlook.com (10.164.79.147) by AM4PR05MB1506.eurprd05.prod.outlook.com (10.164.79.148) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.817.10; Tue, 3 Jan 2017 12:30:50 +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.0817.009; Tue, 3 Jan 2017 12:30:50 +0000 From: Shahaf Shuler To: "Saleh, Omran" , "users@dpdk.org" Thread-Topic: Mellanox rss hash information Thread-Index: AdJg4ZUKHBVElpRgQ0Ozbzqe/tTD+QAFiM7wAAc1qPABKf9vYA== Date: Tue, 3 Jan 2017 12:30:50 +0000 Message-ID: References: <8c0c4278cb7045ffb4b204095ef621f7@DEWDFE13DE16.global.corp.sap> In-Reply-To: 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: e81d4155-40aa-4037-647e-08d433d45a44 x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(22001);SRVR:AM4PR05MB1506; x-microsoft-exchange-diagnostics: 1; AM4PR05MB1506; 7:v4hYq2P5iOmVy2dhsFxkk1koJRbznXAdAybM0JlGldSa8evaV/6MDwd4MNY1grUqmKEDG0EpaYlkF6F302O72h4CoX/jT7eyLYB3aa9E8UzYMup09irNnGm7UUzfmVURFYfLDHciCygcKTHqLdgCx2OGSohx1rvB+xl8NCTSRtWpVTS/YQDTks3mjta0Es30qaTb/nYZuMbeVfyuDoSMLCzXCz2tZQhaAVBOJwu9KjJc5vZ86Wk5MqaTX+9FYD0XYlaEKR1ObiCB7Gc2kZ2jRgoLDFo1CaLqlOSFFrXpXKkdq4NCQP/l89M/hoPra3brcO8DX82yDgkKRgK6lCLSAA1MrBk/mna+Q+HzjnApySvBfd/R6csxAKa6Ys5LRkEzgZVv9e6CDslsuNHymmRT9yqykvjVEveGbV6jmAVB106EbCJFJaZTuvodwYftYpL0tIgQG1ZjZWrJAHbNKAbf8w== x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(55761251573089); x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(6040375)(601004)(2401047)(8121501046)(5005006)(3002001)(10201501046)(6055026)(6041248)(20161123564025)(20161123562025)(20161123555025)(20161123560025)(6072148); SRVR:AM4PR05MB1506; BCL:0; PCL:0; RULEID:; SRVR:AM4PR05MB1506; x-forefront-prvs: 01762B0D64 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(6009001)(7916002)(39410400002)(39850400002)(39860400002)(39840400002)(39450400003)(377454003)(189002)(13464003)(199003)(53754006)(189998001)(3660700001)(2900100001)(38730400001)(9686002)(81156014)(2950100002)(229853002)(3846002)(77096006)(107886002)(3280700002)(102836003)(86362001)(2906002)(122556002)(6436002)(105586002)(5660300001)(6506006)(6116002)(106356001)(92566002)(8656002)(3480700004)(25786008)(8676002)(7736002)(97736004)(8936002)(7696004)(74316002)(2501003)(81166006)(5001770100001)(76176999)(99286003)(33656002)(54356999)(50986999)(101416001)(68736007)(66066001)(305945005)(55016002); DIR:OUT; SFP:1101; SCL:1; SRVR:AM4PR05MB1506; 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: 03 Jan 2017 12:30:50.5516 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM4PR05MB1506 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: Tue, 03 Jan 2017 12:30:52 -0000 Hi Saleh, Looking into the kernel, it turns out that the kernel sets by default the M= ellanox symmetric RSS hash. This is a proprietary hash function which perfo= rms operation on the tuple before it enters the Toeplitz function.=20 The next kernel drivers will use the spec-compliant RSS function, which wil= l match the rte_softrss output. =20 --Shahaf -----Original Message----- From: Saleh, Omran [mailto:omran.saleh@sap.com]=20 Sent: Wednesday, December 28, 2016 4:19 PM To: Shahaf Shuler ; users@dpdk.org Subject: RE: Mellanox rss hash information I am still getting the same problem with the optimized function, the result= value from rte_softrss_be is different than mbuf.hash->rss. any idea about the problem, can be an old kernel produce this problem? -----Original Message----- From: Shahaf Shuler [mailto:shahafs@mellanox.com]=20 Sent: Mittwoch, 28. Dezember 2016 12:00 To: Saleh, Omran ; users@dpdk.org Subject: RE: Mellanox rss hash information 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