From nobody@FreeBSD.org  Mon May 26 00:52:34 2008
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 03967106566C
	for <freebsd-gnats-submit@FreeBSD.org>; Mon, 26 May 2008 00:52:34 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21])
	by mx1.freebsd.org (Postfix) with ESMTP id D92D58FC0C
	for <freebsd-gnats-submit@FreeBSD.org>; Mon, 26 May 2008 00:52:33 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.14.2/8.14.2) with ESMTP id m4Q0p0bh095868
	for <freebsd-gnats-submit@FreeBSD.org>; Mon, 26 May 2008 00:51:00 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.14.2/8.14.1/Submit) id m4Q0p0IY095865;
	Mon, 26 May 2008 00:51:00 GMT
	(envelope-from nobody)
Message-Id: <200805260051.m4Q0p0IY095865@www.freebsd.org>
Date: Mon, 26 May 2008 00:51:00 GMT
From: Barrett Lyon <blyon@blyon.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: ECMP balancing issues
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         123991
>Category:       kern
>Synopsis:       [ecmp] ECMP balancing issues
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    qingli
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon May 26 01:00:08 UTC 2008
>Closed-Date:    Fri Dec 04 18:26:27 UTC 2009
>Last-Modified:  Fri Dec 04 18:26:27 UTC 2009
>Originator:     Barrett Lyon
>Release:        8.0-CURRENT
>Organization:
>Environment:
FreeBSD home.blyon.com 8.0-CURRENT FreeBSD 8.0-CURRENT #3: Sun May 25 02:18:13 PDT 2008     blyon@home.blyon.com:/usr/obj/usr/src/sys/GENERIC  i386

CVSUP as of May 25th


>Description:
Using RADIX_MPATH support in the kernel provides the desired ECMP support, however ECMP does not appear to load balance properly.

The first route appears to be a primary route, were the second path becomes almost a backup route.  Removing the first and re-adding it causes the preference to swap.

This is also seen in the netstat -rn "Use" output, where the counter on the => route is always higher than the secondary route.

The destination IPs are very mixed.

The desired effect would be a better load distribution across the two next-hops or even per-packet load balancing as an option.
>How-To-Repeat:
Add two routes with different next-hops, the first route becomes the preference route.
>Fix:
none

>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->qingli 
Responsible-Changed-By: linimon 
Responsible-Changed-When: Wed May 28 02:45:15 UTC 2008 
Responsible-Changed-Why:  
Over to committer. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=123991 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: kern/123991: commit references a PR
Date: Fri, 30 May 2008 09:34:41 +0000 (UTC)

 qingli      2008-05-30 09:34:35 UTC
 
   FreeBSD src repository
 
   Modified files:
     sys/net              radix_mpath.c radix_mpath.h 
   Log:
   When RADIX_MPATH is enabled, the route selection is not rotating
   through the multipath entries. The hash value was a signed integer
   and was always giving a -1 value.
   
   PR:     123991
   Submitted by:   Barrett Lyon
   
   Revision  Changes    Path
   1.6       +4 -4      src/sys/net/radix_mpath.c
   1.3       +2 -2      src/sys/net/radix_mpath.h
 _______________________________________________
 cvs-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/cvs-all
 To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
 
State-Changed-From-To: open->patched 
State-Changed-By: gavin 
State-Changed-When: Wed Jun 11 12:50:48 UTC 2008 
State-Changed-Why:  
Mark as patched, this seems to be fixed in HEAD 

http://www.freebsd.org/cgi/query-pr.cgi?pr=123991 
State-Changed-From-To: patched->closed 
State-Changed-By: qingli 
State-Changed-When: Fri Dec 4 18:26:10 UTC 2009 
State-Changed-Why:  
This limitation should be resolved by the flow-table implementation that is  
part of Release 8.0. 


http://www.freebsd.org/cgi/query-pr.cgi?pr=123991 
>Unformatted:
