From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id BC687A2EDB for ; Mon, 30 Sep 2019 08:14:48 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 8D03E29C6; Mon, 30 Sep 2019 08:14:48 +0200 (CEST) Received: from dispatchb-us1.ppe-hosted.com (dispatchb-us1.ppe-hosted.com [148.163.129.53]) by dpdk.org (Postfix) with ESMTP id 8FF17DE3 for ; Mon, 30 Sep 2019 08:14:47 +0200 (CEST) X-Virus-Scanned: Proofpoint Essentials engine Received: from webmail.solarflare.com (uk.solarflare.com [193.34.186.16]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by mx1-us5.ppe-hosted.com (PPE Hosted ESMTP Server) with ESMTPS id 135FF18005B; Mon, 30 Sep 2019 06:14:45 +0000 (UTC) Received: from [192.168.38.17] (91.220.146.112) by ukex01.SolarFlarecom.com (10.17.10.4) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Mon, 30 Sep 2019 07:14:39 +0100 To: "Su, Simei" , Shahaf Shuler , Adrien Mazarguil CC: "Zhang, Qi Z" , "Wu, Jingjing" , "dev@dpdk.org" References: <1564030646-73951-1-git-send-email-simei.su@intel.com> <1564030646-73951-2-git-send-email-simei.su@intel.com> <291f410f-fc71-191b-8595-4c3d9e970041@solarflare.com> <20190731123040.GG4512@6wind.com> <65F28F834D25B54B9EC1999B623071B30C45F64C@SHSMSX104.ccr.corp.intel.com> From: Andrew Rybchenko Message-ID: <686e301d-8296-75dc-a132-389ba587f183@solarflare.com> Date: Mon, 30 Sep 2019 09:14:35 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0 MIME-Version: 1.0 In-Reply-To: <65F28F834D25B54B9EC1999B623071B30C45F64C@SHSMSX104.ccr.corp.intel.com> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-GB X-Originating-IP: [91.220.146.112] X-ClientProxiedBy: ocex03.SolarFlarecom.com (10.20.40.36) To ukex01.SolarFlarecom.com (10.17.10.4) X-TM-AS-Product-Ver: SMEX-12.5.0.1300-8.5.1010-24944.003 X-TM-AS-Result: No-18.668300-8.000000-10 X-TMASE-MatchedRID: xcONGPdDH5rmLzc6AOD8DfHkpkyUphL9Ud7Bjfo+5jTfoEW8Nyvnb+MN Q/xRdQ+dsOgv3K25H2kqIo4myHvjBxL/12vY1jd3+LORUvwlJdtqYMyGMxJ2eSNGK7UC7ElMEoN 4n3g9Rrb4gEv2m5JkmuYifiRg+Kj7aFlk0tAiKs4jCTunWqnclqa83Mq89i9dCuSPuSVW5+7/70 cHDegsXOJCs+kG1YoPwAxqZS5vxQHd2kK37TYfrIlSWYvdSPSYSWg+u4ir2NMC/nuPl5P0FnZQr rFTqfg/HdZU4LCAysJHvPWyFe6hU2gXrzP3rqzH9Ib/6w+1lWQeRZr2cxRELmpQWJR6J/J1n9u6 ZDHvy7fW8NwyKQZv49WyRmRjVUkf7gJJPErM9IMSEYfcJF0pRQsvO1J2+zEYDO+DX+rUwfb151e OJhOslORdnEX1rI/VkZOl7WKIImrvXOvQVlExsFZ0V5tYhzdWxEHRux+uk8h+ICquNi0WJAvz4L FnIhLpdYGAtE3kZZqxjSxTC1iubdANPm2a/rb9ftwZ3X11IV0= X-TM-AS-User-Approved-Sender: Yes X-TM-AS-User-Blocked-Sender: No X-TMASE-Result: 10--18.668300-8.000000 X-TMASE-Version: SMEX-12.5.0.1300-8.5.1010-24944.003 X-MDID: 1569824087-aLirabY1iqLy Subject: Re: [dpdk-dev] [PATCH 1/2] ethdev: add symmetric toeplitz hash support 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Hi Simei, On 9/30/19 6:12 AM, Su, Simei wrote: > Hi, Andrew > >> -----Original Message----- >> From: Andrew Rybchenko [mailto:arybchenko@solarflare.com] >> Sent: Sunday, September 29, 2019 7:51 PM >> To: Shahaf Shuler ; Adrien Mazarguil >> >> Cc: Su, Simei ; Zhang, Qi Z ; Wu, >> Jingjing ; dev@dpdk.org >> Subject: Re: [dpdk-dev] [PATCH 1/2] ethdev: add symmetric toeplitz hash >> support >> >> On 7/31/19 4:43 PM, Shahaf Shuler wrote: >>> Wednesday, July 31, 2019 3:31 PM, Adrien Mazarguil: >>>> Subject: Re: [dpdk-dev] [PATCH 1/2] ethdev: add symmetric toeplitz >>>> hash support >>>> >>>> On Wed, Jul 31, 2019 at 03:08:19PM +0300, Andrew Rybchenko wrote: >>>>> On 7/25/19 7:57 AM, simei wrote: >>>>>> From: Simei Su >>>>>> >>>>>> Currently, there are DEFAULT,TOEPLITZ and SIMPLE_XOR hash funtion. >>>>>> To support symmetric hash by rte_flow RSS action, this patch adds >>>>>> new hash function "Symmetric Toeplitz" which is supported by some >>>> hardware. >>>>> Isn't it a question of key to achieve symmetry? >>>>> I.e. hash algorithm (function) is still the same - Toeplitz, but >>>>> hash key makes the result symmetric (i.e. equal for flows in both >>>>> directions - swap transport ports and IPv4/6 addresses). >>>> This is only an option when src/dst are known in advance. >>>> >>>> When doing RSS, HW implementations (such as Mellanox's) implement a >>>> modified Toeplitz XOR'ing src with dst resulting in the same hash >>>> both ways regardless of the key. >>> Just to stand correct it was a bug on Mellanox kernel driver that was fixed. Now >> the RSS is spec complaint (non-symmetric). >>> Andrew is correct one can have a special key that will make the RSS symmetric, >> however it is good to have this option for the user to explicitly request symmetric >> function (w/o any restriction on the key). >> >> I think we need a definition what is behind SYMMETRIC_TOEPLITZ here. >> If I'd like to test it and check, I need to know an algorithm in order to know what >> to expect. >> Also it is important to make it the same for all NIC vendors: what should >> algorithm be in order to say that it is symmetric Toeplitz? > The symmetric toeplitz is: src, dst will be replaced by xor(src, dst). > It is expected to get the same hash value when swapping src/dst ip or port. Are both replaced by XOR or just one is replaced by XOR and another one removed from Toeplitz input? If later, how does it coexist with src/dst only flags? Anyway, please, add it to the patch in Doxygen comments. Thanks, Andrew.