From owner-cvs-src@FreeBSD.ORG Sun Apr 13 05:45:14 2008 Return-Path: Delivered-To: cvs-src@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E82411065677; Sun, 13 Apr 2008 05:45:14 +0000 (UTC) (envelope-from qingli@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id CDA328FC1D; Sun, 13 Apr 2008 05:45:14 +0000 (UTC) (envelope-from qingli@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m3D5jE66081772; Sun, 13 Apr 2008 05:45:14 GMT (envelope-from qingli@repoman.freebsd.org) Received: (from qingli@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m3D5jEtd081771; Sun, 13 Apr 2008 05:45:14 GMT (envelope-from qingli) Message-Id: <200804130545.m3D5jEtd081771@repoman.freebsd.org> From: Qing Li Date: Sun, 13 Apr 2008 05:45:14 +0000 (UTC) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: HEAD Cc: Subject: cvs commit: src/sys/conf files options src/sys/net radix.c radix.h route.c route.h rtsock.c src/sys/netinet in_proto.c ip_output.c src/sys/netinet6 in6_proto.c in6_src.c nd6_nbr.c X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 13 Apr 2008 05:45:15 -0000 qingli 2008-04-13 05:45:14 UTC FreeBSD src repository Modified files: sys/conf files options sys/net radix.c radix.h route.c route.h rtsock.c sys/netinet in_proto.c ip_output.c sys/netinet6 in6_proto.c in6_src.c nd6_nbr.c Log: This patch provides the back end support for equal-cost multi-path (ECMP) for both IPv4 and IPv6. Previously, multipath route insertion is disallowed. For example, route add -net 192.103.54.0/24 10.9.44.1 route add -net 192.103.54.0/24 10.9.44.2 The second route insertion will trigger an error message of "add net 192.103.54.0/24: gateway 10.2.5.2: route already in table" Multiple default routes can also be inserted. Here is the netstat output: default 10.2.5.1 UGS 0 3074 bge0 => default 10.2.5.2 UGS 0 0 bge0 When multipath routes exist, the "route delete" command requires a specific gateway to be specified or else an error message would be displayed. For example, route delete default would fail and trigger the following error message: "route: writing to routing socket: No such process" "delete net default: not in table" On the other hand, route delete default 10.2.5.2 would be successful: "delete net default: gateway 10.2.5.2" One does not have to specify a gateway if there is only a single route for a particular destination. I need to perform more testings on address aliases and multiple interfaces that have the same IP prefixes. This patch as it stands today is not yet ready for prime time. Therefore, the ECMP code fragments are fully guarded by the RADIX_MPATH macro. Include the "options RADIX_MPATH" in the kernel configuration to enable this feature. Reviewed by: robert, sam, gnn, julian, kmacy Revision Changes Path 1.1289 +1 -0 src/sys/conf/files 1.625 +1 -0 src/sys/conf/options 1.39 +22 -0 src/sys/net/radix.c 1.27 +1 -0 src/sys/net/radix.h 1.127 +121 -1 src/sys/net/route.c 1.69 +3 -0 src/sys/net/route.h 1.145 +20 -0 src/sys/net/rtsock.c 1.88 +8 -0 src/sys/netinet/in_proto.c 1.280 +9 -0 src/sys/netinet/ip_output.c 1.49 +8 -0 src/sys/netinet6/in6_proto.c 1.50 +9 -0 src/sys/netinet6/in6_src.c 1.50 +14 -0 src/sys/netinet6/nd6_nbr.c