Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F148763110
D55884.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
36 KB
Referenced Files
None
Subscribers
None
D55884.diff
View Options
diff --git a/sys/amd64/conf/FIRECRACKER b/sys/amd64/conf/FIRECRACKER
--- a/sys/amd64/conf/FIRECRACKER
+++ b/sys/amd64/conf/FIRECRACKER
@@ -29,7 +29,6 @@
options INET # InterNETworking
options INET6 # IPv6 communications protocols
options IPSEC_SUPPORT # Allow kldload of ipsec and tcpmd5
-options ROUTE_MPATH # Multipath routing support
options FIB_ALGO # Modular fib lookups
options TCP_OFFLOAD # TCP offload
options TCP_BLACKBOX # Enhanced TCP event logging
diff --git a/sys/amd64/conf/GENERIC b/sys/amd64/conf/GENERIC
--- a/sys/amd64/conf/GENERIC
+++ b/sys/amd64/conf/GENERIC
@@ -33,7 +33,6 @@
options INET6 # IPv6 communications protocols
options IPSEC_SUPPORT # Allow kldload of ipsec and tcpmd5
options IPSEC_OFFLOAD # Inline ipsec offload infra
-options ROUTE_MPATH # Multipath routing support
options FIB_ALGO # Modular fib lookups
options TCP_OFFLOAD # TCP offload
options TCP_BLACKBOX # Enhanced TCP event logging
diff --git a/sys/arm64/conf/std.arm64 b/sys/arm64/conf/std.arm64
--- a/sys/arm64/conf/std.arm64
+++ b/sys/arm64/conf/std.arm64
@@ -14,7 +14,6 @@
options CC_CUBIC # include CUBIC congestion control
options IPSEC_SUPPORT # Allow kldload of ipsec and tcpmd5
options IPSEC_OFFLOAD # Inline ipsec offload infra
-options ROUTE_MPATH # Multipath routing support
options FIB_ALGO # Modular fib lookups
options TCP_OFFLOAD # TCP offload
options TCP_BLACKBOX # Enhanced TCP event logging
diff --git a/sys/conf/NOTES b/sys/conf/NOTES
--- a/sys/conf/NOTES
+++ b/sys/conf/NOTES
@@ -1031,8 +1031,6 @@
# TCP_HHOOK enables the hhook(9) framework hooks for the TCP stack.
# SOCKET_HHOOK enables the hhook(9) framework hooks for socket operations.
#
-# ROUTE_MPATH provides support for multipath routing.
-#
options MROUTING # Multicast routing
options IPFIREWALL #firewall
options IPFIREWALL_VERBOSE #enable logging to syslogd(8)
@@ -1052,7 +1050,6 @@
options TCP_BLACKBOX
options TCP_HHOOK
options SOCKET_HHOOK
-options ROUTE_MPATH
# The MBUF_STRESS_TEST option enables options which create
# various random failures / extreme cases related to mbuf
diff --git a/sys/conf/files b/sys/conf/files
--- a/sys/conf/files
+++ b/sys/conf/files
@@ -4244,8 +4244,8 @@
net/pfil.c optional ether | inet
net/radix.c standard
net/route.c standard
-net/route/nhgrp.c optional route_mpath
-net/route/nhgrp_ctl.c optional route_mpath
+net/route/nhgrp.c standard
+net/route/nhgrp_ctl.c standard
net/route/nhop.c standard
net/route/nhop_ctl.c standard
net/route/nhop_utils.c standard
@@ -4261,7 +4261,7 @@
net/rss_config.c standard
net/rtsock.c standard
net/slcompress.c optional netgraph_vjc
-net/toeplitz.c optional inet | inet6 | route_mpath
+net/toeplitz.c optional inet | inet6
net/vnet.c optional vimage
net80211/ieee80211.c optional wlan
net80211/ieee80211_acl.c optional wlan wlan_acl
diff --git a/sys/conf/options b/sys/conf/options
--- a/sys/conf/options
+++ b/sys/conf/options
@@ -473,7 +473,6 @@
NFSLOCKD
NETLINK opt_global.h
PF_DEFAULT_TO_DROP opt_pf.h
-ROUTE_MPATH opt_route.h
ROUTETABLES opt_route.h
FIB_ALGO opt_route.h
RSS opt_rss.h
diff --git a/sys/i386/conf/GENERIC b/sys/i386/conf/GENERIC
--- a/sys/i386/conf/GENERIC
+++ b/sys/i386/conf/GENERIC
@@ -33,7 +33,6 @@
options INET # InterNETworking
options INET6 # IPv6 communications protocols
options IPSEC_SUPPORT # Allow kldload of ipsec and tcpmd5
-options ROUTE_MPATH # Multipath routing support
options TCP_HHOOK # hhook(9) framework for TCP
options TCP_OFFLOAD # TCP offload
options SCTP_SUPPORT # Allow kldload of SCTP
diff --git a/sys/modules/netgraph/netflow/Makefile b/sys/modules/netgraph/netflow/Makefile
--- a/sys/modules/netgraph/netflow/Makefile
+++ b/sys/modules/netgraph/netflow/Makefile
@@ -5,6 +5,6 @@
.PATH: ${SRCTOP}/sys/netgraph/netflow
KMOD= ng_netflow
-SRCS= ng_netflow.c netflow.c netflow_v9.c opt_inet.h opt_inet6.h opt_route.h
+SRCS= ng_netflow.c netflow.c netflow_v9.c opt_inet.h opt_inet6.h
.include <bsd.kmod.mk>
diff --git a/sys/modules/netlink/Makefile b/sys/modules/netlink/Makefile
--- a/sys/modules/netlink/Makefile
+++ b/sys/modules/netlink/Makefile
@@ -5,7 +5,7 @@
netlink_message_writer.c netlink_generic.c \
netlink_route.c route/iface.c route/iface_drivers.c route/neigh.c \
route/nexthop.c route/rt.c
-SRCS+= opt_inet.h opt_inet6.h opt_route.h
+SRCS+= opt_inet.h opt_inet6.h
CFLAGS+= -DNETLINK_MODULE
diff --git a/sys/net/route.h b/sys/net/route.h
--- a/sys/net/route.h
+++ b/sys/net/route.h
@@ -126,30 +126,13 @@
/* Outbound flowid generation rules */
#ifdef RSS
-
#define fib4_calc_packet_hash xps_proto_software_hash_v4
#define fib6_calc_packet_hash xps_proto_software_hash_v6
#define CALC_FLOWID_OUTBOUND_SENDTO true
-
-#ifdef ROUTE_MPATH
-#define CALC_FLOWID_OUTBOUND V_fib_hash_outbound
-#else
-#define CALC_FLOWID_OUTBOUND false
-#endif
-
#else /* !RSS */
-
#define fib4_calc_packet_hash fib4_calc_software_hash
#define fib6_calc_packet_hash fib6_calc_software_hash
-
-#ifdef ROUTE_MPATH
#define CALC_FLOWID_OUTBOUND_SENDTO V_fib_hash_outbound
-#define CALC_FLOWID_OUTBOUND V_fib_hash_outbound
-#else
-#define CALC_FLOWID_OUTBOUND_SENDTO false
-#define CALC_FLOWID_OUTBOUND false
-#endif
-
#endif /* RSS */
diff --git a/sys/net/route.c b/sys/net/route.c
--- a/sys/net/route.c
+++ b/sys/net/route.c
@@ -36,7 +36,6 @@
#include "opt_inet.h"
#include "opt_inet6.h"
#include "opt_mrouting.h"
-#include "opt_route.h"
#include <sys/param.h>
#include <sys/systm.h>
diff --git a/sys/net/route/fib_algo.c b/sys/net/route/fib_algo.c
--- a/sys/net/route/fib_algo.c
+++ b/sys/net/route/fib_algo.c
@@ -1714,9 +1714,7 @@
bzero(rinfo, sizeof(struct rib_rtable_info));
rinfo->num_prefixes = rh->rnh_prefixes;
rinfo->num_nhops = nhops_get_count(rh);
-#ifdef ROUTE_MPATH
rinfo->num_nhgrp = nhgrp_get_count(rh);
-#endif
}
/*
@@ -1762,12 +1760,10 @@
static uint32_t
get_nhop_idx(struct nhop_object *nh)
{
-#ifdef ROUTE_MPATH
if (NH_IS_NHGRP(nh))
return (nhgrp_get_idx((struct nhgrp_object *)nh));
- else
-#endif
- return (nhop_get_idx(nh));
+
+ return (nhop_get_idx(nh));
}
uint32_t
diff --git a/sys/net/route/nhgrp.c b/sys/net/route/nhgrp.c
--- a/sys/net/route/nhgrp.c
+++ b/sys/net/route/nhgrp.c
@@ -26,7 +26,6 @@
*/
#include "opt_inet.h"
-#include "opt_route.h"
#include <sys/param.h>
#include <sys/systm.h>
diff --git a/sys/net/route/nhgrp_ctl.c b/sys/net/route/nhgrp_ctl.c
--- a/sys/net/route/nhgrp_ctl.c
+++ b/sys/net/route/nhgrp_ctl.c
@@ -25,7 +25,6 @@
* SUCH DAMAGE.
*/
#include "opt_inet.h"
-#include "opt_route.h"
#include <sys/param.h>
#include <sys/systm.h>
diff --git a/sys/net/route/nhop.c b/sys/net/route/nhop.c
--- a/sys/net/route/nhop.c
+++ b/sys/net/route/nhop.c
@@ -27,7 +27,6 @@
#include <sys/cdefs.h>
#include "opt_inet.h"
-#include "opt_route.h"
#include <sys/param.h>
#include <sys/systm.h>
@@ -115,9 +114,7 @@
NHOPS_LOCK_DESTROY(ctl);
free(ctl->nh_head.ptr, M_NHOP);
free(ctl->nh_idx_head.idx, M_NHOP);
-#ifdef ROUTE_MPATH
nhgrp_ctl_free(ctl);
-#endif
free(ctl, M_NHOP);
}
@@ -160,9 +157,7 @@
FIB_RH_LOG(LOG_DEBUG3, rh, "marking nhop %u unlinked", nh_priv->nh_idx);
refcount_release(&nh_priv->nh_linked);
} CHT_SLIST_FOREACH_END;
-#ifdef ROUTE_MPATH
nhgrp_ctl_unlink_all(ctl);
-#endif
NHOPS_WUNLOCK(ctl);
/*
diff --git a/sys/net/route/nhop_ctl.c b/sys/net/route/nhop_ctl.c
--- a/sys/net/route/nhop_ctl.c
+++ b/sys/net/route/nhop_ctl.c
@@ -28,7 +28,6 @@
#include <sys/cdefs.h>
#include "opt_inet.h"
#include "opt_inet6.h"
-#include "opt_route.h"
#include <sys/param.h>
#include <sys/systm.h>
@@ -644,28 +643,21 @@
void
nhop_ref_any(struct nhop_object *nh)
{
-#ifdef ROUTE_MPATH
+
if (!NH_IS_NHGRP(nh))
nhop_ref_object(nh);
else
nhgrp_ref_object((struct nhgrp_object *)nh);
-#else
- nhop_ref_object(nh);
-#endif
}
void
nhop_free_any(struct nhop_object *nh)
{
-#ifdef ROUTE_MPATH
if (!NH_IS_NHGRP(nh))
nhop_free(nh);
else
nhgrp_free((struct nhgrp_object *)nh);
-#else
- nhop_free(nh);
-#endif
}
/* Nhop-related methods */
@@ -1169,12 +1161,11 @@
char *
nhop_print_buf_any(const struct nhop_object *nh, char *buf, size_t bufsize)
{
-#ifdef ROUTE_MPATH
+
if (NH_IS_NHGRP(nh))
return (nhgrp_print_buf((const struct nhgrp_object *)nh, buf, bufsize));
- else
-#endif
- return (nhop_print_buf(nh, buf, bufsize));
+
+ return (nhop_print_buf(nh, buf, bufsize));
}
/*
diff --git a/sys/net/route/nhop_utils.c b/sys/net/route/nhop_utils.c
--- a/sys/net/route/nhop_utils.c
+++ b/sys/net/route/nhop_utils.c
@@ -27,7 +27,6 @@
#include <sys/cdefs.h>
#include "opt_inet.h"
-#include "opt_route.h"
#include <sys/param.h>
#include <sys/systm.h>
diff --git a/sys/net/route/route_ctl.c b/sys/net/route/route_ctl.c
--- a/sys/net/route/route_ctl.c
+++ b/sys/net/route/route_ctl.c
@@ -28,7 +28,6 @@
#include <sys/cdefs.h>
#include "opt_inet.h"
#include "opt_inet6.h"
-#include "opt_route.h"
#include <sys/param.h>
#include <sys/systm.h>
@@ -82,11 +81,9 @@
static int add_route_flags(struct rib_head *rnh, struct rtentry *rt,
struct route_nhop_data *rnd_add, int op_flags, struct rib_cmd_info *rc);
-#ifdef ROUTE_MPATH
static int add_route_flags_mpath(struct rib_head *rnh, struct rtentry *rt,
struct route_nhop_data *rnd_add, struct route_nhop_data *rnd_orig,
int op_flags, struct rib_cmd_info *rc);
-#endif
static int add_route(struct rib_head *rnh, struct rtentry *rt,
struct route_nhop_data *rnd, struct rib_cmd_info *rc);
@@ -100,25 +97,15 @@
static int get_prio_from_info(const struct rt_addrinfo *info);
static int nhop_get_prio(const struct nhop_object *nh);
-#ifdef ROUTE_MPATH
static bool rib_can_multipath(struct rib_head *rh);
-#endif
/* Per-vnet multipath routing configuration */
SYSCTL_DECL(_net_route);
#define V_rib_route_multipath VNET(rib_route_multipath)
-#ifdef ROUTE_MPATH
-#define _MP_FLAGS CTLFLAG_RW
VNET_DEFINE(u_int, rib_route_multipath) = 1;
-#else
-#define _MP_FLAGS CTLFLAG_RD
-VNET_DEFINE(u_int, rib_route_multipath) = 0;
-#endif
-SYSCTL_UINT(_net_route, OID_AUTO, multipath, _MP_FLAGS | CTLFLAG_VNET,
+SYSCTL_UINT(_net_route, OID_AUTO, multipath, CTLFLAG_RW | CTLFLAG_VNET,
&VNET_NAME(rib_route_multipath), 0, "Enable route multipath");
-#undef _MP_FLAGS
-#ifdef ROUTE_MPATH
VNET_DEFINE(u_int, fib_hash_outbound) = 0;
SYSCTL_UINT(_net_route, OID_AUTO, hash_outbound, CTLFLAG_RD | CTLFLAG_VNET,
&VNET_NAME(fib_hash_outbound), 0,
@@ -132,7 +119,6 @@
0x77, 0xcb, 0x2d, 0xa3, 0x80, 0x30, 0xf2, 0x0c,
0x6a, 0x42, 0xb7, 0x3b, 0xbe, 0xac, 0x01, 0xfa,
};
-#endif
#if defined(INET) && defined(INET6)
FEATURE(ipv4_rfc5549_support, "Route IPv4 packets via IPv6 nexthops");
@@ -167,7 +153,6 @@
}
#endif
-#ifdef ROUTE_MPATH
static bool
rib_can_multipath(struct rib_head *rh)
{
@@ -200,7 +185,6 @@
return (1);
}
-#endif
static int
get_info_weight(const struct rt_addrinfo *info, uint32_t default_weight)
@@ -602,7 +586,6 @@
if (rc->rc_cmd == RTM_DELETE)
rt_free(rc->rc_rt);
-#ifdef ROUTE_MPATH
else {
/*
* Deleting 1 path may result in RTM_CHANGE to
@@ -611,7 +594,6 @@
*/
nhop_free_any(rc->rc_nh_old);
}
-#endif
return (0);
}
@@ -834,7 +816,6 @@
RIB_WUNLOCK(rnh);
-#ifdef ROUTE_MPATH
if ((op_flags & RTM_F_APPEND) && rib_can_multipath(rnh) &&
nhop_can_multipath(rnd_add->rnd_nhop) &&
nhop_can_multipath(rnd_orig.rnd_nhop)) {
@@ -857,7 +838,6 @@
}
return (error);
}
-#endif
/* Out of options - free state and return error */
error = EEXIST;
out:
@@ -868,7 +848,6 @@
return (error);
}
-#ifdef ROUTE_MPATH
static int
add_route_flags_mpath(struct rib_head *rnh, struct rtentry *rt,
struct route_nhop_data *rnd_add, struct route_nhop_data *rnd_orig,
@@ -912,7 +891,6 @@
return (0);
}
-#endif
/*
* Removes route defined by @info from the kernel table specified by @fibnum and
@@ -981,7 +959,6 @@
if (rc->rc_cmd == RTM_DELETE)
rt_free(rc->rc_rt);
-#ifdef ROUTE_MPATH
else {
/*
* Deleting 1 path may result in RTM_CHANGE to
@@ -990,7 +967,6 @@
*/
nhop_free_any(rc->rc_nh_old);
}
-#endif
return (0);
}
@@ -1008,7 +984,6 @@
{
struct nhop_object *nh = rt->rt_nhop;
-#ifdef ROUTE_MPATH
if (NH_IS_NHGRP(nh)) {
struct nhgrp_object *nhg = (struct nhgrp_object *)nh;
struct route_nhop_data rnd;
@@ -1027,7 +1002,6 @@
}
return (error);
}
-#endif
if (cb != NULL && !cb(rt, nh, cbdata))
return (ESRCH);
@@ -1129,7 +1103,6 @@
return (error);
}
-#ifdef ROUTE_MPATH
static int
change_mpath_route(struct rib_head *rnh, struct rtentry *rt,
struct rt_addrinfo *info, struct route_nhop_data *rnd_orig,
@@ -1180,7 +1153,6 @@
return (error);
}
-#endif
static int
change_route_byinfo(struct rib_head *rnh, struct rtentry *rt,
@@ -1195,10 +1167,8 @@
if (nh_orig == NULL)
return (ESRCH);
-#ifdef ROUTE_MPATH
if (NH_IS_NHGRP(nh_orig))
return (change_mpath_route(rnh, rt, info, rnd_orig, rc));
-#endif
rnd_new.rnd_weight = get_info_weight(info, rnd_orig->rnd_weight);
error = change_nhop(rnh, info, nh_orig, &rnd_new.rnd_nhop);
@@ -1448,14 +1418,12 @@
/* Add to the list and return */
rt->rt_chain = di->head;
di->head = rt;
-#ifdef ROUTE_MPATH
} else {
/*
* RTM_CHANGE to a different nexthop or nexthop group.
* Free old multipath group.
*/
nhop_free_any(di->rc.rc_nh_old);
-#endif
}
return (0);
@@ -1478,6 +1446,9 @@
struct rtentry *rt;
struct nhop_object *nh;
struct epoch_tracker et;
+ struct nhgrp_object *nhg;
+ const struct weightened_nhop *wn;
+ uint32_t num_nhops;
rnh = rt_tables_get_rnh(fibnum, family);
if (rnh == NULL)
@@ -1510,18 +1481,13 @@
rib_notify(rnh, RIB_NOTIFY_DELAYED, &di.rc);
if (report) {
-#ifdef ROUTE_MPATH
- struct nhgrp_object *nhg;
- const struct weightened_nhop *wn;
- uint32_t num_nhops;
if (NH_IS_NHGRP(nh)) {
nhg = (struct nhgrp_object *)nh;
wn = nhgrp_get_nhops(nhg, &num_nhops);
for (int i = 0; i < num_nhops; i++)
rt_routemsg(RTM_DELETE, rt, wn[i].nh, fibnum);
} else
-#endif
- rt_routemsg(RTM_DELETE, rt, nh, fibnum);
+ rt_routemsg(RTM_DELETE, rt, nh, fibnum);
}
rt_free(rt);
}
diff --git a/sys/net/route/route_helpers.c b/sys/net/route/route_helpers.c
--- a/sys/net/route/route_helpers.c
+++ b/sys/net/route/route_helpers.c
@@ -28,7 +28,6 @@
#include <sys/cdefs.h>
#include "opt_inet.h"
#include "opt_inet6.h"
-#include "opt_route.h"
#include <sys/param.h>
#include <sys/jail.h>
@@ -257,7 +256,6 @@
return (nh);
}
-#ifdef ROUTE_MPATH
static void
notify_add(struct rib_cmd_info *rc, const struct weightened_nhop *wn_src,
route_notification_t *cb, void *cbdata)
@@ -410,7 +408,6 @@
break;
}
}
-#endif
union sockaddr_union {
struct sockaddr sa;
diff --git a/sys/net/route/route_ifaddrs.c b/sys/net/route/route_ifaddrs.c
--- a/sys/net/route/route_ifaddrs.c
+++ b/sys/net/route/route_ifaddrs.c
@@ -29,8 +29,6 @@
* SUCH DAMAGE.
*/
-#include "opt_route.h"
-
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/malloc.h>
diff --git a/sys/net/route/route_rtentry.c b/sys/net/route/route_rtentry.c
--- a/sys/net/route/route_rtentry.c
+++ b/sys/net/route/route_rtentry.c
@@ -28,7 +28,6 @@
#include <sys/cdefs.h>
#include "opt_inet.h"
#include "opt_inet6.h"
-#include "opt_route.h"
#include <sys/param.h>
#include <sys/systm.h>
@@ -105,21 +104,19 @@
destroy_rtentry(struct rtentry *rt)
{
#ifdef VIMAGE
+ const struct weightened_nhop *wn;
struct nhop_object *nh = rt->rt_nhop;
+ uint32_t num_nhops;
/*
* At this moment rnh, nh_control may be already freed.
* nhop interface may have been migrated to a different vnet.
* Use vnet stored in the nexthop to delete the entry.
*/
-#ifdef ROUTE_MPATH
if (NH_IS_NHGRP(nh)) {
- const struct weightened_nhop *wn;
- uint32_t num_nhops;
wn = nhgrp_get_nhops((struct nhgrp_object *)nh, &num_nhops);
nh = wn[0].nh;
}
-#endif
CURVNET_SET(nhop_get_vnet(nh));
#endif
diff --git a/sys/net/route/route_subscription.c b/sys/net/route/route_subscription.c
--- a/sys/net/route/route_subscription.c
+++ b/sys/net/route/route_subscription.c
@@ -26,7 +26,6 @@
*/
#include <sys/cdefs.h>
-#include "opt_route.h"
#include <sys/param.h>
#include <sys/systm.h>
diff --git a/sys/net/route/route_var.h b/sys/net/route/route_var.h
--- a/sys/net/route/route_var.h
+++ b/sys/net/route/route_var.h
@@ -277,13 +277,12 @@
static inline struct nhop_object *
nhop_select(struct nhop_object *nh, uint32_t flowid)
{
+ struct nhgrp_object *nhg;
-#ifdef ROUTE_MPATH
if (NH_IS_NHGRP(nh)) {
- struct nhgrp_object *nhg = (struct nhgrp_object *)nh;
+ nhg = (struct nhgrp_object *)nh;
nh = nhg->nhops[flowid % nhg->nhg_size];
}
-#endif
return (nh);
}
diff --git a/sys/net/rtsock.c b/sys/net/rtsock.c
--- a/sys/net/rtsock.c
+++ b/sys/net/rtsock.c
@@ -29,7 +29,6 @@
* SUCH DAMAGE.
*/
#include "opt_ddb.h"
-#include "opt_route.h"
#include "opt_inet.h"
#include "opt_inet6.h"
@@ -287,13 +286,12 @@
static void
rts_handle_route_event(uint32_t fibnum, const struct rib_cmd_info *rc)
{
-#ifdef ROUTE_MPATH
+
if ((rc->rc_nh_new && NH_IS_NHGRP(rc->rc_nh_new)) ||
(rc->rc_nh_old && NH_IS_NHGRP(rc->rc_nh_old))) {
rib_decompose_notification(rc, report_route_event,
(void *)(uintptr_t)fibnum);
} else
-#endif
report_route_event(rc, (void *)(uintptr_t)fibnum);
}
static struct rtbridge rtsbridge = {
@@ -750,11 +748,12 @@
static struct nhop_object *
select_nhop(struct nhop_object *nh, const struct sockaddr *gw)
{
- if (!NH_IS_NHGRP(nh))
- return (nh);
-#ifdef ROUTE_MPATH
const struct weightened_nhop *wn;
uint32_t num_nhops;
+
+ if (!NH_IS_NHGRP(nh))
+ return (nh);
+
wn = nhgrp_get_nhops((struct nhgrp_object *)nh, &num_nhops);
if (gw == NULL)
return (wn[0].nh);
@@ -762,7 +761,7 @@
if (match_nhop_gw(wn[i].nh, gw))
return (wn[i].nh);
}
-#endif
+
return (NULL);
}
@@ -1029,7 +1028,6 @@
return (0);
}
-#ifdef ROUTE_MPATH
static void
save_del_notification(const struct rib_cmd_info *rc, void *_cbdata)
{
@@ -1047,7 +1045,6 @@
if (rc->rc_cmd == RTM_ADD)
*rc_new = *rc;
}
-#endif
#if defined(INET6) || defined(INET)
static struct sockaddr *
@@ -1171,7 +1168,6 @@
error = rib_action(fibnum, rtm->rtm_type, &info, &rc);
if (error == 0) {
rtsock_notify_event(fibnum, &rc);
-#ifdef ROUTE_MPATH
if (NH_IS_NHGRP(rc.rc_nh_new) ||
(rc.rc_nh_old && NH_IS_NHGRP(rc.rc_nh_old))) {
struct rib_cmd_info rc_simple = {};
@@ -1179,7 +1175,7 @@
save_add_notification, (void *)&rc_simple);
rc = rc_simple;
}
-#endif
+
/* nh MAY be empty if RTM_CHANGE request is no-op */
nh = rc.rc_nh_new;
if (nh != NULL) {
@@ -1193,7 +1189,6 @@
error = rib_action(fibnum, RTM_DELETE, &info, &rc);
if (error == 0) {
rtsock_notify_event(fibnum, &rc);
-#ifdef ROUTE_MPATH
if (NH_IS_NHGRP(rc.rc_nh_old) ||
(rc.rc_nh_new && NH_IS_NHGRP(rc.rc_nh_new))) {
struct rib_cmd_info rc_simple = {};
@@ -1201,7 +1196,6 @@
save_del_notification, (void *)&rc_simple);
rc = rc_simple;
}
-#endif
nh = rc.rc_nh_old;
}
break;
@@ -2249,8 +2243,11 @@
static int
sysctl_dumpentry(struct rtentry *rt, void *vw)
{
+ const struct weightened_nhop *wn;
struct walkarg *w = vw;
struct nhop_object *nh;
+ int error;
+ uint32_t num_nhops;
NET_EPOCH_ASSERT();
@@ -2259,11 +2256,7 @@
export_rtaddrs(rt, w->dst, w->mask);
nh = rt_get_raw_nhop(rt);
-#ifdef ROUTE_MPATH
if (NH_IS_NHGRP(nh)) {
- const struct weightened_nhop *wn;
- uint32_t num_nhops;
- int error;
wn = nhgrp_get_nhops((struct nhgrp_object *)nh, &num_nhops);
for (int i = 0; i < num_nhops; i++) {
error = sysctl_dumpnhop(rt, wn[i].nh, wn[i].weight, w);
@@ -2271,7 +2264,6 @@
return (error);
}
} else
-#endif
sysctl_dumpnhop(rt, nh, rt->rt_weight, w);
return (0);
@@ -2701,11 +2693,7 @@
if (w.w_op == NET_RT_NHOP)
error = nhops_dump_sysctl(rnh, w.w_req);
else
-#ifdef ROUTE_MPATH
error = nhgrp_dump_sysctl(rnh, w.w_req);
-#else
- error = ENOTSUP;
-#endif
break;
case NET_RT_IFLIST:
case NET_RT_IFLISTL:
diff --git a/sys/netgraph/netflow/netflow.c b/sys/netgraph/netflow/netflow.c
--- a/sys/netgraph/netflow/netflow.c
+++ b/sys/netgraph/netflow/netflow.c
@@ -33,7 +33,6 @@
#include <sys/cdefs.h>
#include "opt_inet.h"
#include "opt_inet6.h"
-#include "opt_route.h"
#include <sys/param.h>
#include <sys/bitstring.h>
#include <sys/systm.h>
diff --git a/sys/netgraph/netflow/netflow_v9.c b/sys/netgraph/netflow/netflow_v9.c
--- a/sys/netgraph/netflow/netflow_v9.c
+++ b/sys/netgraph/netflow/netflow_v9.c
@@ -28,7 +28,6 @@
#include <sys/cdefs.h>
#include "opt_inet6.h"
-#include "opt_route.h"
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/counter.h>
diff --git a/sys/netgraph/netflow/ng_netflow.c b/sys/netgraph/netflow/ng_netflow.c
--- a/sys/netgraph/netflow/ng_netflow.c
+++ b/sys/netgraph/netflow/ng_netflow.c
@@ -33,7 +33,6 @@
#include <sys/cdefs.h>
#include "opt_inet.h"
#include "opt_inet6.h"
-#include "opt_route.h"
#include <sys/param.h>
#include <sys/systm.h>
diff --git a/sys/netinet/in_fib.c b/sys/netinet/in_fib.c
--- a/sys/netinet/in_fib.c
+++ b/sys/netinet/in_fib.c
@@ -66,7 +66,6 @@
VNET_DEFINE(struct fib_dp *, inet_dp);
#endif
-#ifdef ROUTE_MPATH
struct _hash_5tuple_ipv4 {
struct in_addr src;
struct in_addr dst;
@@ -97,7 +96,6 @@
return (toeplitz_hash(MPATH_ENTROPY_KEY_LEN, mpath_entropy_key,
sizeof(data), (uint8_t *)&data));
}
-#endif
/*
* Looks up path in fib @fibnum specified by @dst.
@@ -192,19 +190,19 @@
check_urpf(struct nhop_object *nh, uint32_t flags,
const struct ifnet *src_if)
{
-#ifdef ROUTE_MPATH
+ const struct weightened_nhop *wn;
+ uint32_t num_nhops;
+
if (NH_IS_NHGRP(nh)) {
- const struct weightened_nhop *wn;
- uint32_t num_nhops;
wn = nhgrp_get_nhops((struct nhgrp_object *)nh, &num_nhops);
for (int i = 0; i < num_nhops; i++) {
if (check_urpf_nhop(wn[i].nh, flags, src_if) != 0)
return (1);
}
return (0);
- } else
-#endif
- return (check_urpf_nhop(nh, flags, src_if));
+ }
+
+ return (check_urpf_nhop(nh, flags, src_if));
}
#ifndef FIB_ALGO
diff --git a/sys/netinet/in_pcb.c b/sys/netinet/in_pcb.c
--- a/sys/netinet/in_pcb.c
+++ b/sys/netinet/in_pcb.c
@@ -41,7 +41,6 @@
#include "opt_inet.h"
#include "opt_inet6.h"
#include "opt_ratelimit.h"
-#include "opt_route.h"
#include "opt_rss.h"
#include <sys/param.h>
@@ -1167,8 +1166,8 @@
MPASS(error == 0);
} else
in_pcbrehash(inp);
-#ifdef ROUTE_MPATH
- if (CALC_FLOWID_OUTBOUND) {
+
+ if (V_fib_hash_outbound) {
uint32_t hash_val, hash_type;
hash_val = fib4_calc_software_hash(inp->inp_laddr,
@@ -1178,7 +1177,6 @@
inp->inp_flowid = hash_val;
inp->inp_flowtype = hash_type;
}
-#endif
if (anonport)
inp->inp_flags |= INP_ANONPORT;
return (0);
diff --git a/sys/netinet/ip_input.c b/sys/netinet/ip_input.c
--- a/sys/netinet/ip_input.c
+++ b/sys/netinet/ip_input.c
@@ -33,7 +33,6 @@
#include "opt_inet.h"
#include "opt_ipstealth.h"
#include "opt_ipsec.h"
-#include "opt_route.h"
#include "opt_rss.h"
#include "opt_sctp.h"
diff --git a/sys/netinet/ip_output.c b/sys/netinet/ip_output.c
--- a/sys/netinet/ip_output.c
+++ b/sys/netinet/ip_output.c
@@ -34,7 +34,6 @@
#include "opt_kern_tls.h"
#include "opt_mbuf_stress_test.h"
#include "opt_ratelimit.h"
-#include "opt_route.h"
#include "opt_rss.h"
#include "opt_sctp.h"
diff --git a/sys/netinet/raw_ip.c b/sys/netinet/raw_ip.c
--- a/sys/netinet/raw_ip.c
+++ b/sys/netinet/raw_ip.c
@@ -33,7 +33,6 @@
#include "opt_inet.h"
#include "opt_inet6.h"
#include "opt_ipsec.h"
-#include "opt_route.h"
#include <sys/param.h>
#include <sys/jail.h>
@@ -486,8 +485,7 @@
ip->ip_len = htons(m->m_pkthdr.len);
ip->ip_src = inp->inp_laddr;
ip->ip_dst.s_addr = *dst;
-#ifdef ROUTE_MPATH
- if (CALC_FLOWID_OUTBOUND) {
+ if (V_fib_hash_outbound) {
uint32_t hash_type, hash_val;
hash_val = fib4_calc_software_hash(ip->ip_src,
@@ -496,7 +494,6 @@
M_HASHTYPE_SET(m, hash_type);
flags |= IP_NODEFAULTFLOWID;
}
-#endif
if (jailed(inp->inp_cred)) {
/*
* prison_local_ip4() would be good enough but would
@@ -539,8 +536,7 @@
return (EINVAL);
ip = mtod(m, struct ip *);
}
-#ifdef ROUTE_MPATH
- if (CALC_FLOWID_OUTBOUND) {
+ if (V_fib_hash_outbound) {
uint32_t hash_type, hash_val;
hash_val = fib4_calc_software_hash(ip->ip_dst,
@@ -549,7 +545,6 @@
M_HASHTYPE_SET(m, hash_type);
flags |= IP_NODEFAULTFLOWID;
}
-#endif
INP_RLOCK(inp);
/*
* Don't allow both user specified and setsockopt options,
diff --git a/sys/netinet/udp_usrreq.c b/sys/netinet/udp_usrreq.c
--- a/sys/netinet/udp_usrreq.c
+++ b/sys/netinet/udp_usrreq.c
@@ -39,7 +39,6 @@
#include "opt_inet.h"
#include "opt_inet6.h"
#include "opt_ipsec.h"
-#include "opt_route.h"
#include "opt_rss.h"
#include <sys/param.h>
@@ -1127,7 +1126,7 @@
u_char tos, vflagsav;
uint8_t pr;
uint16_t cscov = 0;
- uint32_t flowid = 0;
+ uint32_t hash_val, hash_type, flowid = 0;
uint8_t flowtype = M_HASHTYPE_NONE;
bool use_cached_route;
@@ -1487,11 +1486,7 @@
if (flowtype != M_HASHTYPE_NONE) {
m->m_pkthdr.flowid = flowid;
M_HASHTYPE_SET(m, flowtype);
- }
-#if defined(ROUTE_MPATH) || defined(RSS)
- else if (CALC_FLOWID_OUTBOUND_SENDTO) {
- uint32_t hash_val, hash_type;
-
+ } else if (CALC_FLOWID_OUTBOUND_SENDTO) {
hash_val = fib4_calc_packet_hash(laddr, faddr,
lport, fport, pr, &hash_type);
m->m_pkthdr.flowid = hash_val;
@@ -1510,7 +1505,6 @@
* hash value based on the packet contents.
*/
ipflags |= IP_NODEFAULTFLOWID;
-#endif /* RSS */
if (pr == IPPROTO_UDPLITE)
UDPLITE_PROBE(send, NULL, inp, &ui->ui_i, inp, &ui->ui_u);
diff --git a/sys/netinet6/in6_fib.c b/sys/netinet6/in6_fib.c
--- a/sys/netinet6/in6_fib.c
+++ b/sys/netinet6/in6_fib.c
@@ -72,7 +72,6 @@
VNET_DEFINE(struct fib_dp *, inet6_dp);
#endif
-#ifdef ROUTE_MPATH
struct _hash_5tuple_ipv6 {
struct in6_addr src;
struct in6_addr dst;
@@ -103,7 +102,6 @@
return (toeplitz_hash(MPATH_ENTROPY_KEY_LEN, mpath_entropy_key,
sizeof(data), (uint8_t *)&data));
}
-#endif
/*
* Looks up path in fib @fibnum specified by @dst.
@@ -201,19 +199,19 @@
check_urpf(struct nhop_object *nh, uint32_t flags,
const struct ifnet *src_if)
{
-#ifdef ROUTE_MPATH
+ const struct weightened_nhop *wn;
+ uint32_t num_nhops;
+
if (NH_IS_NHGRP(nh)) {
- const struct weightened_nhop *wn;
- uint32_t num_nhops;
wn = nhgrp_get_nhops((struct nhgrp_object *)nh, &num_nhops);
for (int i = 0; i < num_nhops; i++) {
if (check_urpf_nhop(wn[i].nh, flags, src_if) != 0)
return (1);
}
return (0);
- } else
-#endif
- return (check_urpf_nhop(nh, flags, src_if));
+ }
+
+ return (check_urpf_nhop(nh, flags, src_if));
}
#ifndef FIB_ALGO
diff --git a/sys/netinet6/in6_pcb.c b/sys/netinet6/in6_pcb.c
--- a/sys/netinet6/in6_pcb.c
+++ b/sys/netinet6/in6_pcb.c
@@ -67,7 +67,6 @@
#include "opt_inet.h"
#include "opt_inet6.h"
#include "opt_ipsec.h"
-#include "opt_route.h"
#include "opt_rss.h"
#include <sys/hash.h>
@@ -449,8 +448,7 @@
bzero(&laddr6, sizeof(laddr6));
laddr6.sin6_family = AF_INET6;
-#ifdef ROUTE_MPATH
- if (CALC_FLOWID_OUTBOUND) {
+ if (V_fib_hash_outbound) {
uint32_t hash_type, hash_val;
hash_val = fib6_calc_software_hash(&inp->in6p_laddr,
@@ -459,7 +457,6 @@
inp->inp_flowid = hash_val;
inp->inp_flowtype = hash_type;
}
-#endif
/*
* Call inner routine, to assign local interface address.
* in6_pcbladdr() may automatically fill in sin6_scope_id.
diff --git a/sys/netinet6/in6_proto.c b/sys/netinet6/in6_proto.c
--- a/sys/netinet6/in6_proto.c
+++ b/sys/netinet6/in6_proto.c
@@ -65,7 +65,6 @@
#include "opt_ipsec.h"
#include "opt_ipstealth.h"
#include "opt_sctp.h"
-#include "opt_route.h"
#include <sys/param.h>
#include <sys/socket.h>
diff --git a/sys/netinet6/ip6_input.c b/sys/netinet6/ip6_input.c
--- a/sys/netinet6/ip6_input.c
+++ b/sys/netinet6/ip6_input.c
@@ -63,7 +63,6 @@
#include "opt_inet.h"
#include "opt_inet6.h"
#include "opt_ipsec.h"
-#include "opt_route.h"
#include "opt_rss.h"
#include "opt_sctp.h"
diff --git a/sys/netinet6/ip6_output.c b/sys/netinet6/ip6_output.c
--- a/sys/netinet6/ip6_output.c
+++ b/sys/netinet6/ip6_output.c
@@ -65,7 +65,6 @@
#include "opt_ipsec.h"
#include "opt_kern_tls.h"
#include "opt_ratelimit.h"
-#include "opt_route.h"
#include "opt_rss.h"
#include "opt_sctp.h"
diff --git a/sys/netinet6/nd6.c b/sys/netinet6/nd6.c
--- a/sys/netinet6/nd6.c
+++ b/sys/netinet6/nd6.c
@@ -33,7 +33,6 @@
#include "opt_inet.h"
#include "opt_inet6.h"
-#include "opt_route.h"
#include <sys/param.h>
#include <sys/systm.h>
@@ -1637,13 +1636,10 @@
void
nd6_subscription_cb(struct rib_head *rnh, struct rib_cmd_info *rc, void *arg)
{
-#ifdef ROUTE_MPATH
+
rib_decompose_notification(rc, check_release_defrouter, NULL);
if (rc->rc_cmd == RTM_DELETE && !NH_IS_NHGRP(rc->rc_nh_old))
check_release_defrouter(rc, NULL);
-#else
- check_release_defrouter(rc, NULL);
-#endif
}
int
diff --git a/sys/netinet6/raw_ip6.c b/sys/netinet6/raw_ip6.c
--- a/sys/netinet6/raw_ip6.c
+++ b/sys/netinet6/raw_ip6.c
@@ -61,7 +61,6 @@
#include "opt_ipsec.h"
#include "opt_inet6.h"
-#include "opt_route.h"
#include <sys/param.h>
#include <sys/errno.h>
@@ -361,6 +360,7 @@
int use_defzone = 0;
int hlim = 0;
struct in6_addr in6a;
+ uint32_t hash_type, hash_val;
inp = sotoinpcb(so);
KASSERT(inp != NULL, ("rip6_send: inp == NULL"));
@@ -452,16 +452,12 @@
}
ip6 = mtod(m, struct ip6_hdr *);
-#ifdef ROUTE_MPATH
- if (CALC_FLOWID_OUTBOUND) {
- uint32_t hash_type, hash_val;
-
+ if (V_fib_hash_outbound) {
hash_val = fib6_calc_software_hash(&inp->in6p_laddr,
&dstsock->sin6_addr, 0, 0, inp->inp_ip_p, &hash_type);
inp->inp_flowid = hash_val;
inp->inp_flowtype = hash_type;
}
-#endif
/*
* Source address selection.
*/
diff --git a/sys/netinet6/udp6_usrreq.c b/sys/netinet6/udp6_usrreq.c
--- a/sys/netinet6/udp6_usrreq.c
+++ b/sys/netinet6/udp6_usrreq.c
@@ -70,7 +70,6 @@
#include "opt_inet.h"
#include "opt_inet6.h"
#include "opt_ipsec.h"
-#include "opt_route.h"
#include "opt_rss.h"
#include <sys/param.h>
@@ -940,7 +939,6 @@
}
flags = 0;
-#if defined(ROUTE_MPATH) || defined(RSS)
if (CALC_FLOWID_OUTBOUND_SENDTO) {
uint32_t hash_type, hash_val;
uint8_t pr;
@@ -954,7 +952,6 @@
}
/* do not use inp flowid */
flags |= IP_NODEFAULTFLOWID;
-#endif
UDPSTAT_INC(udps_opackets);
if (nxt == IPPROTO_UDPLITE)
diff --git a/sys/netlink/route/nexthop.c b/sys/netlink/route/nexthop.c
--- a/sys/netlink/route/nexthop.c
+++ b/sys/netlink/route/nexthop.c
@@ -28,7 +28,6 @@
#include <sys/cdefs.h>
#include "opt_inet.h"
#include "opt_inet6.h"
-#include "opt_route.h"
#include <sys/types.h>
#include <sys/ck.h>
#include <sys/epoch.h>
@@ -268,12 +267,10 @@
static struct nhop_object *
clone_unhop(const struct user_nhop *unhop, uint32_t fibnum, int family, int nh_flags)
{
-#ifdef ROUTE_MPATH
const struct weightened_nhop *wn;
struct weightened_nhop *wn_new, wn_base[MAX_STACK_NHOPS];
- uint32_t num_nhops;
-#endif
struct nhop_object *nh = NULL;
+ uint32_t num_nhops;
int error;
if (unhop->un_nhop_src != NULL) {
@@ -298,10 +295,9 @@
nhop_set_pxtype_flag(nh, nh_flags);
return (nhop_get_nhop(nh, &error));
}
-#ifdef ROUTE_MPATH
+
wn = unhop->un_nhgrp_src;
num_nhops = unhop->un_nhgrp_count;
-
if (num_nhops > MAX_STACK_NHOPS) {
wn_new = malloc(num_nhops * sizeof(struct weightened_nhop), M_TEMP, M_NOWAIT);
if (wn_new == NULL)
@@ -328,7 +324,7 @@
if (wn_new != wn_base)
free(wn_new, M_TEMP);
-#endif
+
return (nh);
}
diff --git a/sys/netlink/route/rt.c b/sys/netlink/route/rt.c
--- a/sys/netlink/route/rt.c
+++ b/sys/netlink/route/rt.c
@@ -29,7 +29,6 @@
#include <sys/cdefs.h>
#include "opt_inet.h"
#include "opt_inet6.h"
-#include "opt_route.h"
#include <sys/types.h>
#include <sys/malloc.h>
#include <sys/rmlock.h>
@@ -67,20 +66,21 @@
static uint8_t
nl_get_rtm_protocol(const struct nhop_object *nh)
{
-#ifdef ROUTE_MPATH
+ const struct nhgrp_object *nhg = (const struct nhgrp_object *)nh;
+ int rt_flags;
+ uint8_t origin;
+
if (NH_IS_NHGRP(nh)) {
- const struct nhgrp_object *nhg = (const struct nhgrp_object *)nh;
- uint8_t origin = nhgrp_get_origin(nhg);
+ origin = nhgrp_get_origin(nhg);
if (origin != RTPROT_UNSPEC)
return (origin);
nh = nhg->nhops[0];
}
-#endif
- uint8_t origin = nhop_get_origin(nh);
+ origin = nhop_get_origin(nh);
if (origin != RTPROT_UNSPEC)
return (origin);
/* TODO: remove guesswork once all kernel users fill in origin */
- int rt_flags = nhop_get_rtflags(nh);
+ rt_flags = nhop_get_rtflags(nh);
if (rt_flags & RTF_PROTO1)
return (RTPROT_ZEBRA);
if (rt_flags & RTF_STATIC)
@@ -174,7 +174,6 @@
*((uint32_t *)(nla + 1)) = nh->nh_mtu;
}
-#ifdef ROUTE_MPATH
static void
dump_rc_nhg(struct nl_writer *nw, const struct nhgrp_object *nhg, struct rtmsg *rtm)
{
@@ -218,20 +217,19 @@
}
nlattr_set_len(nw, off);
}
-#endif
static void
dump_rc_nhop(struct nl_writer *nw, const struct route_nhop_data *rnd, struct rtmsg *rtm)
{
-#ifdef ROUTE_MPATH
+ const struct nhop_object *nh = rnd->rnd_nhop;
+ uint32_t rtflags, uidx, nh_expire;
+
if (NH_IS_NHGRP(rnd->rnd_nhop)) {
dump_rc_nhg(nw, rnd->rnd_nhgrp, rtm);
return;
}
-#endif
- const struct nhop_object *nh = rnd->rnd_nhop;
- uint32_t rtflags = nhop_get_rtflags(nh);
+ rtflags = nhop_get_rtflags(nh);
/*
* IPv4 over IPv6
* ('RTA_VIA', {'family': 10, 'addr': 'fe80::20c:29ff:fe67:2dd'}), ('RTA_OIF', 2),
@@ -243,7 +241,7 @@
if (nh->nh_flags & NHF_GATEWAY)
dump_rc_nhop_gw(nw, nh);
- uint32_t uidx = nhop_get_uidx(nh);
+ uidx = nhop_get_uidx(nh);
if (uidx != 0)
nlattr_add_u32(nw, NL_RTA_NH_ID, uidx);
nlattr_add_u32(nw, NL_RTA_KNH_ID, nhop_get_idx(nh));
@@ -251,7 +249,7 @@
if (rtflags & RTF_FIXEDMTU)
dump_rc_nhop_mtu(nw, nh);
- uint32_t nh_expire = nhop_get_expire(nh);
+ nh_expire = nhop_get_expire(nh);
if (nh_expire > 0)
nlattr_add_u32(nw, NL_RTA_EXPIRES, nh_expire - time_uptime);
@@ -818,7 +816,6 @@
return (op_flags);
}
-#ifdef ROUTE_MPATH
static int
create_nexthop_one(struct nl_parsed_route *attrs, struct rta_mpath_nh *mpnh,
struct nl_pstate *npt, struct nhop_object **pnh)
@@ -848,24 +845,26 @@
return (error);
}
-#endif
static struct nhop_object *
create_nexthop_from_attrs(struct nl_parsed_route *attrs,
struct nl_pstate *npt, int *perror)
{
struct nhop_object *nh = NULL;
- int error = 0;
+ struct nhgrp_object *nhg;
+ struct weightened_nhop *wn;
+ struct rib_head *rh;
+ struct rta_mpath_nh *mpnh;
+ int num_nhops, error = 0;
uint32_t nh_expire = 0;
if (attrs->rta_multipath != NULL) {
-#ifdef ROUTE_MPATH
/* Multipath w/o explicit nexthops */
- int num_nhops = attrs->rta_multipath->num_nhops;
- struct weightened_nhop *wn = npt_alloc(npt, sizeof(*wn) * num_nhops);
+ num_nhops = attrs->rta_multipath->num_nhops;
+ wn = npt_alloc(npt, sizeof(*wn) * num_nhops);
for (int i = 0; i < num_nhops; i++) {
- struct rta_mpath_nh *mpnh = &attrs->rta_multipath->nhops[i];
+ mpnh = &attrs->rta_multipath->nhops[i];
error = create_nexthop_one(attrs, mpnh, npt, &wn[i].nh);
if (error != 0) {
@@ -876,9 +875,7 @@
wn[i].weight = mpnh->rtnh_weight > 0 ? mpnh->rtnh_weight : 1;
}
if (error == 0) {
- struct rib_head *rh = nhop_get_rh(wn[0].nh);
- struct nhgrp_object *nhg;
-
+ rh = nhop_get_rh(wn[0].nh);
nhg = nhgrp_alloc(rh->rib_fibnum, rh->rib_family,
wn, num_nhops, perror);
if (nhg != NULL) {
@@ -892,9 +889,6 @@
return ((struct nhop_object *)nhg);
error = *perror;
}
-#else
- error = ENOTSUP;
-#endif
*perror = error;
} else {
nh = nhop_alloc(attrs->rta_table, attrs->rtm_family);
diff --git a/sys/powerpc/conf/GENERIC64 b/sys/powerpc/conf/GENERIC64
--- a/sys/powerpc/conf/GENERIC64
+++ b/sys/powerpc/conf/GENERIC64
@@ -41,7 +41,6 @@
options INET # InterNETworking
options INET6 # IPv6 communications protocols
options IPSEC_SUPPORT # Allow kldload of ipsec and tcpmd5
-options ROUTE_MPATH # Multipath routing support
options TCP_OFFLOAD # TCP offload
options TCP_BLACKBOX # Enhanced TCP event logging
options TCP_HHOOK # hhook(9) framework for TCP
diff --git a/sys/riscv/conf/GENERIC b/sys/riscv/conf/GENERIC
--- a/sys/riscv/conf/GENERIC
+++ b/sys/riscv/conf/GENERIC
@@ -30,7 +30,6 @@
options INET6 # IPv6 communications protocols
options TCP_HHOOK # hhook(9) framework for TCP
options IPSEC_SUPPORT # Allow kldload of ipsec and tcpmd5
-options ROUTE_MPATH # Multipath routing support
options FIB_ALGO # Modular fib lookups
options TCP_OFFLOAD # TCP offload
options TCP_BLACKBOX # Enhanced TCP event logging
diff --git a/tests/sys/netinet/output.sh b/tests/sys/netinet/output.sh
--- a/tests/sys/netinet/output.sh
+++ b/tests/sys/netinet/output.sh
@@ -223,7 +223,7 @@
mpath_check()
{
if [ `sysctl -iW net.route.multipath | wc -l` != "1" ]; then
- atf_skip "This test requires ROUTE_MPATH enabled"
+ atf_skip "This test requires multipath enabled"
fi
}
diff --git a/tests/sys/netinet6/output6.sh b/tests/sys/netinet6/output6.sh
--- a/tests/sys/netinet6/output6.sh
+++ b/tests/sys/netinet6/output6.sh
@@ -247,7 +247,7 @@
mpath_check()
{
if [ `sysctl -iW net.route.multipath | wc -l` != "1" ]; then
- atf_skip "This test requires ROUTE_MPATH enabled"
+ atf_skip "This test requires multipath enabled"
fi
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Mar 21, 2:30 AM (12 h, 13 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
30054852
Default Alt Text
D55884.diff (36 KB)
Attached To
Mode
D55884: routing: remove ROUTE_MPATH compile option
Attached
Detach File
Event Timeline
Log In to Comment