From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pd0-f171.google.com (mail-pd0-f171.google.com [209.85.192.171]) by dpdk.org (Postfix) with ESMTP id 53F3D7F7C for ; Fri, 14 Nov 2014 19:39:13 +0100 (CET) Received: by mail-pd0-f171.google.com with SMTP id r10so17161273pdi.16 for ; Fri, 14 Nov 2014 10:49:16 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=UwL/44A5VQG4suhfyORhtu4wh7r8laisXVnLsoute4U=; b=RaQP4uRuqvwKGpbDtyV8YZ8X4MI9oAqcF6GBM9HcPHcRpsQwkG8xwK6VQ003hVMwRb zadEVD9Uj6tWRaFQncgDWcACkvMlT+5XIl7/tHeTNp6zkmto+rkTA/4WwuVNSCVF0ll5 yLoiiFoLmpJdcbmP8bArk48fZWdrpCWnKf8fj3hYXZqSqs6v6oe15tbiz2k+5Uu/iLWv ZBd65u0ZNHzs4fAI0KEZaqq5Zib+10vJFDm9G7WoADByqcqxzKZjlz+c2ekzWVUjjPWW d3CVBo252n+6Xq/gngMvKFL3BHzIegPnktN2yINlUYNSTMcWoDMDMq4tXUp3rmiXi0fz qy2A== X-Gm-Message-State: ALoCoQnB6/Eg1EkIcNJzkW3CEK+v8iz0j4okuWm71goRBHViX6CecvSZceTFcwRSBDgOsqook+Ed MIME-Version: 1.0 X-Received: by 10.70.126.134 with SMTP id my6mr12182351pdb.14.1415990956790; Fri, 14 Nov 2014 10:49:16 -0800 (PST) Received: by 10.70.41.76 with HTTP; Fri, 14 Nov 2014 10:49:16 -0800 (PST) In-Reply-To: References: <2601191342CEEE43887BDE71AB977258213ADDFA@IRSMSX105.ger.corp.intel.com> <54662C64.9040500@sts.kz> <2601191342CEEE43887BDE71AB977258213ADEA6@IRSMSX105.ger.corp.intel.com> Date: Fri, 14 Nov 2014 12:49:16 -0600 Message-ID: From: Matt Laswell To: "Chilikin, Andrey" Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Cc: "dev@dpdk.org" , Kamraan Nasim , Yuanzhang Hu Subject: Re: [dpdk-dev] Load-balancing position field in DPDK load_balancer sample app vs. Hash table X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Nov 2014 18:39:13 -0000 Hey Folks, This thread has been tremendously helpful, as I'm looking at adding RSS-based load balancing to my application in the not too distant future. Many thanks to all who have contributed, especially regarding symmetric RSS= . Not to derail the conversation too badly, but could one of you point me to some example code that demonstrates the steps needed to configure RSS? We're using Niantic NICs, so I assume that this is pretty standard stuff, but having an example to study is a real leg up. Again, thanks for all of the information. -- Matt Laswell laswell@infiniteio.com infinite io, inc. On Fri, Nov 14, 2014 at 10:57 AM, Chilikin, Andrey < andrey.chilikin@intel.com> wrote: > Fortville supports symmetrical hashing on HW level, a patch for i40e PMD > was submitted a couple of weeks ago. For Niantic you can use symmetrical > rss key recommended by Konstantin. > > Regards, > Andrey > > -----Original Message----- > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Ananyev, Konstantin > Sent: Friday, November 14, 2014 4:50 PM > To: Yerden Zhumabekov; Kamraan Nasim; dev@dpdk.org > Cc: Yuanzhang Hu > Subject: Re: [dpdk-dev] Load-balancing position field in DPDK > load_balancer sample app vs. Hash table > > > -----Original Message----- > > From: Yerden Zhumabekov [mailto:e_zhumabekov@sts.kz] > > Sent: Friday, November 14, 2014 4:23 PM > > To: Ananyev, Konstantin; Kamraan Nasim; dev@dpdk.org > > Cc: Yuanzhang Hu > > Subject: Re: [dpdk-dev] Load-balancing position field in DPDK > > load_balancer sample app vs. Hash table > > > > I'd like to interject a question here. > > > > In case of flow classification, one might possibly prefer for packets > > from the same flow to fall on the same logical core. With this '%' > > load balancing, it would require to get the same RSS hash value for > > packets with direct (src to dst) and swapped (dst to src) IPs and > > ports. Am I correct that hardware RSS calculation cannot provide this > symmetry? > > As I remember, it is possible but you have to tweak rss key values. > Here is a paper describing how to do that: > http://www.ndsl.kaist.edu/~shinae/papers/TR-symRSS.pdf > > Konstantin > > > > > 14.11.2014 20:44, Ananyev, Konstantin =D0=BF=D0=B8=D1=88=D0=B5=D1=82: > > > If you have a NIC that is capable to do HW hash computation, then > > > you can do your load balancing based on that value. > > > Let say ixgbe/igb/i40e NICs can calculate RSS hash value based on > > > different combinations of dst/src Ips, dst/src ports. > > > This value can be stored inside mbuf for each RX packet by PMD RX > function. > > > Then you can do: > > > worker_id =3D mbuf->hash.rss % n_workersl > > > > > > That might to provide better balancing then using just one byte > > > value, plus should be a bit faster, as in that case your balancer cod= e > don't need to touch packet's data. > > > > > > Konstantin > > > > -- > > Sincerely, > > > > Yerden Zhumabekov > > State Technical Service > > Astana, KZ > > > >