From owner-freebsd-net@FreeBSD.ORG Wed Jan 15 09:21:45 2014 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0ED61D6 for ; Wed, 15 Jan 2014 09:21:45 +0000 (UTC) Received: from mail.ipfw.ru (mail.ipfw.ru [IPv6:2a01:4f8:120:6141::2]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id C55EF1D6A for ; Wed, 15 Jan 2014 09:21:44 +0000 (UTC) Received: from [2a02:6b8:0:401:222:4dff:fe50:cd2f] (helo=ptichko.yndx.net) by mail.ipfw.ru with esmtpsa (TLSv1:CAMELLIA256-SHA:256) (Exim 4.76 (FreeBSD)) (envelope-from ) id 1W3Ipe-000LcP-83; Wed, 15 Jan 2014 09:16:02 +0400 Message-ID: <52D6525D.50102@FreeBSD.org> Date: Wed, 15 Jan 2014 13:18:21 +0400 From: "Alexander V. Chernikov" User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:24.0) Gecko/20100101 Thunderbird/24.0.1 MIME-Version: 1.0 To: Nikolay Denev , Attila Nagy Subject: Re: ECMP hash keys? References: <52D5138B.8050100@fsn.hu> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: "freebsd-net@freebsd.org" X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Jan 2014 09:21:45 -0000 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. > did not saw any change. Maybe my idea was completely wrong, but the > XOR of src and dst IP is 4 bytes, and this is the size of the flowid > as well. (haven't tried with FLOWTABLE enabled though). > > --Nikolay > > On Tue, Jan 14, 2014 at 10:38 AM, Attila Nagy wrote: >> Hi, >> >> Does equal cost multipath take only the destination address into >> consideration when choosing the route? (I've spent only about two minutes >> reading radix_mpath.h, but I've got this impression) >> >> What would be needed to use src and dst addresses and ports -if appropriate? >> >> Thanks, >> >> _______________________________________________ >> 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" > _______________________________________________ > 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" >