Date: Thu, 16 Jan 2014 13:07:59 -0800 From: Vijay Singh <vijju.singh@gmail.com> To: Adrian Chadd <adrian@freebsd.org> Cc: "freebsd-net@freebsd.org" <freebsd-net@freebsd.org>, "Alexander V. Chernikov" <melifaro@freebsd.org> Subject: Re: ECMP hash keys? Message-ID: <CALCNsJSOdfmO9YytVFOcgPZ5gfaCvzRW1GK2M_AU9n1774BFHA@mail.gmail.com> In-Reply-To: <CAJ-VmomP-JaVopS0aneeV82OFtM1Pvb=qKn__mn=ooDXOdgmQw@mail.gmail.com> References: <52D5138B.8050100@fsn.hu> <CA%2BP_MZFQU4%2B05Pk5cZ4NMZujD9vXDrV=mehN7_vz1OZ6r2-f1Q@mail.gmail.com> <52D6525D.50102@FreeBSD.org> <CAJ-VmomP-JaVopS0aneeV82OFtM1Pvb=qKn__mn=ooDXOdgmQw@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
FYI, there is a Toeplitz hash function that gnn is reviewing for me and should be in the system soon. It would be used in the PCBGROUP framework when the hash needs to be generated in SW. On Wed, Jan 15, 2014 at 7:22 AM, Adrian Chadd <adrian@freebsd.org> wrote: > On 15 January 2014 01:18, Alexander V. Chernikov <melifaro@freebsd.org> > wrote: > > On 14.01.2014 23:15, Nikolay Denev wrote: > >> > >> Hi, > >> > >> Currently it's implemented using Modulo-N Hash (RFC2991), see > >> radix_mpath.c:rtalloc_mpath_fib() > > > > Yup. I'm going to change this to use flowid. > > > >> > >> And as hash the xor of source and destination IP is supplied, look for > >> rtalloc_mpath_fib() in ip_output.c : > >> > >> ... > >> #ifdef RADIX_MPATH > >> rtalloc_mpath_fib(ro, > >> ntohl(ip->ip_src.s_addr ^ > ip->ip_dst.s_addr), > >> inp ? inp->inp_inc.inc_fibnum : > M_GETFIB(m)); > >> #else > >> ... > >> > >> I've tried to hack this to use m_pkthdr.flowid if it exists, but in my > >> case my network cards were not setting this (vr(4) on soekris) so I > > > > You can try http://static.ipfw.ru/patches/netisr_ip_flowid.diff to get > > flowid values generated by netisr. > > Hm, this is interesting. I wonder if we should (finally) add in the > toeplitz hash here and then make sure we are hashing the frame based > on the right header contents and direction (so transmit and receive > path frames hash to the same value.) > > What do you think? > > > -a > _______________________________________________ > freebsd-net@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-net > To unsubscribe, send any mail to "freebsd-net-unsubscribe@freebsd.org" >
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CALCNsJSOdfmO9YytVFOcgPZ5gfaCvzRW1GK2M_AU9n1774BFHA>