From owner-freebsd-net@FreeBSD.ORG Tue Jan 14 19:21:21 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 71C87BF3 for ; Tue, 14 Jan 2014 19:21:21 +0000 (UTC) Received: from people.fsn.hu (people.fsn.hu [195.228.252.137]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 1C7A0169B for ; Tue, 14 Jan 2014 19:21:20 +0000 (UTC) Received: by people.fsn.hu (Postfix, from userid 1001) id 4CD5E12B4CBB; Tue, 14 Jan 2014 20:21:18 +0100 (CET) X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.3 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MF-ACE0E1EA [pR: 21.5670] X-CRM114-CacheID: sfid-20140114_20211_720175A7 X-CRM114-Status: Good ( pR: 21.5670 ) X-DSPAM-Result: Whitelisted X-DSPAM-Processed: Tue Jan 14 20:21:18 2014 X-DSPAM-Confidence: 0.9972 X-DSPAM-Probability: 0.0000 X-DSPAM-Signature: 52d58e2e986831614482305 X-DSPAM-Factors: 27, From*Attila Nagy , 0.00010, >+On, 0.00049, the+>, 0.00074, >+Hi, 0.00110, wrote+>>, 0.00115, wrote+>, 0.00189, ports, 0.00193, Hi+>, 0.00195, On+Tue, 0.00195, bytes, 0.00251, I+>, 0.00251, Url*pr, 0.00263, Url*org/cgi/query, 0.00277, In-Reply-To*mail.gmail.com>, 0.00289, References*mail.gmail.com>, 0.00297, >+>, 0.00323, >+>, 0.00323, >+And, 0.00329, at+10, 0.00329, >>+>>, 0.00362, >>+>>, 0.00362, for+>, 0.00375, exists, 0.00404, From*Attila, 0.00438, >>+Hi, 0.00477, 10+38, 0.00477, X-Spambayes-Classification: ham; 0.00 Received: from [192.168.3.2] (japan.t-online.co.hu [195.228.243.99]) by people.fsn.hu (Postfix) with ESMTPSA id DE9B612B4CA1; Tue, 14 Jan 2014 20:21:16 +0100 (CET) Message-ID: <52D58E29.7040306@fsn.hu> Date: Tue, 14 Jan 2014 20:21:13 +0100 From: Attila Nagy User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.23) Gecko/20090817 Thunderbird/2.0.0.23 Mnenhy/0.7.6.0 MIME-Version: 1.0 To: Nikolay Denev 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: Tue, 14 Jan 2014 19:21:21 -0000 Hi, I've read (well, mostly) OpenBSD's version (http://www.openbsd.org/cgi-bin/cvsweb/src/sys/net/radix_mpath.c), and I think it would be good to catch up with them. BTW, I couldn't even get it to work: http://www.freebsd.org/cgi/query-pr.cgi?pr=kern/185771 but I have only netbooted machines, it seems the two don't match currently. On 01/14/2014 08:15 PM, Nikolay Denev wrote: > Hi, > > Currently it's implemented using Modulo-N Hash (RFC2991), see > radix_mpath.c:rtalloc_mpath_fib() > > 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 > 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"