summaryrefslogtreecommitdiffstats
path: root/sys/net/route.h
diff options
context:
space:
mode:
authorqingli <qingli@FreeBSD.org>2010-03-09 01:11:45 +0000
committerqingli <qingli@FreeBSD.org>2010-03-09 01:11:45 +0000
commit93013817b06170ed5ed76ef83e4bc75efe85b100 (patch)
treefea4c8dfdec74a7dea073968c9742940e2408c8d /sys/net/route.h
parentfe5f1f57b8fcac02898f1fa59b4c49c028009495 (diff)
downloadFreeBSD-src-93013817b06170ed5ed76ef83e4bc75efe85b100.zip
FreeBSD-src-93013817b06170ed5ed76ef83e4bc75efe85b100.tar.gz
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
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 a8ae867..b337f32 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)
OpenPOWER on IntegriCloud