aboutsummaryrefslogtreecommitdiff
path: root/sys/net/route.h
diff options
context:
space:
mode:
authorQing Li <qingli@FreeBSD.org>2010-03-09 01:11:45 +0000
committerQing Li <qingli@FreeBSD.org>2010-03-09 01:11:45 +0000
commitc7ea0aa6480e379b31c634d10535b0cab6ffb9b5 (patch)
treefea4c8dfdec74a7dea073968c9742940e2408c8d /sys/net/route.h
parent13d85d438269de7378ac3b0d98f1db3273d76154 (diff)
downloadsrc-c7ea0aa6480e379b31c634d10535b0cab6ffb9b5.tar.gz
src-c7ea0aa6480e379b31c634d10535b0cab6ffb9b5.zip
One of the advantages of enabling ECMP (a.k.a RADIX_MPATH) is to
allow for connection load balancing across interfaces. Currently the address alias handling method is colliding with the ECMP code. For example, when two interfaces are configured on the same prefix, only one prefix route is installed. So connection load balancing among the available interfaces is not possible. The other advantage of ECMP is for failover. The issue with the current code, is that the interface link-state is not reflected in the route entry. For example, if there are two interfaces on the same prefix, the cable on one interface is unplugged, new and existing connections should switch over to the other interface. This is not done today and packets go into a black hole. Also, there is a small bug in the kernel where deleting ECMP routes in the userland will always return an error even though the command is successfully executed. MFC after: 5 days
Notes
Notes: svn path=/head/; revision=204902
Diffstat (limited to 'sys/net/route.h')
-rw-r--r--sys/net/route.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/net/route.h b/sys/net/route.h
index a8ae867f526e..b337f32ddd2f 100644
--- a/sys/net/route.h
+++ b/sys/net/route.h
@@ -319,6 +319,8 @@ struct rt_addrinfo {
#ifdef _KERNEL
+#define RT_LINK_IS_UP(ifp) ((ifp)->if_link_state == LINK_STATE_UP)
+
#define RT_LOCK_INIT(_rt) \
mtx_init(&(_rt)->rt_mtx, "rtentry", NULL, MTX_DEF | MTX_DUPOK)
#define RT_LOCK(_rt) mtx_lock(&(_rt)->rt_mtx)