svn commit: r321618 - in head: sys/conf sys/net sys/netinet sys/netinet6 usr.bin/netstat
Bjoern A. Zeeb
bz at FreeBSD.org
Thu Jul 27 13:03:38 UTC 2017
Author: bz
Date: Thu Jul 27 13:03:36 2017
New Revision: 321618
URL: https://svnweb.freebsd.org/changeset/base/321618
Log:
After inpcb route caching was put back in place there is no need for
flowtable anymore (as flowtable was never considered to be useful in
the forwarding path).
Reviewed by: np
Differential Revision: https://reviews.freebsd.org/D11448
Deleted:
head/sys/net/flowtable.c
head/sys/net/flowtable.h
head/usr.bin/netstat/flowtable.c
Modified:
head/sys/conf/NOTES
head/sys/conf/options
head/sys/net/route.c
head/sys/netinet/ip_output.c
head/sys/netinet6/ip6_output.c
head/usr.bin/netstat/Makefile
head/usr.bin/netstat/main.c
head/usr.bin/netstat/netstat.h
Modified: head/sys/conf/NOTES
==============================================================================
--- head/sys/conf/NOTES Thu Jul 27 12:37:18 2017 (r321617)
+++ head/sys/conf/NOTES Thu Jul 27 13:03:36 2017 (r321618)
@@ -646,9 +646,6 @@ options LIBMCHAIN
# libalias library, performing NAT
options LIBALIAS
-# flowtable cache
-options FLOWTABLE
-
#
# SCTP is a NEW transport protocol defined by
# RFC2960 updated by RFC3309 and RFC3758.. and
Modified: head/sys/conf/options
==============================================================================
--- head/sys/conf/options Thu Jul 27 12:37:18 2017 (r321617)
+++ head/sys/conf/options Thu Jul 27 13:03:36 2017 (r321618)
@@ -454,8 +454,6 @@ TCP_RFC7413_MAX_KEYS opt_inet.h
TCP_SIGNATURE opt_ipsec.h
VLAN_ARRAY opt_vlan.h
XBONEHACK
-FLOWTABLE opt_route.h
-FLOWTABLE_HASH_ALL opt_route.h
#
# SCTP
Modified: head/sys/net/route.c
==============================================================================
--- head/sys/net/route.c Thu Jul 27 12:37:18 2017 (r321617)
+++ head/sys/net/route.c Thu Jul 27 13:03:36 2017 (r321618)
@@ -59,7 +59,6 @@
#include <net/route.h>
#include <net/route_var.h>
#include <net/vnet.h>
-#include <net/flowtable.h>
#ifdef RADIX_MPATH
#include <net/radix_mpath.h>
@@ -1504,79 +1503,12 @@ rt_mpath_unlink(struct rib_head *rnh, struct rt_addrin
}
#endif
-#ifdef FLOWTABLE
-static struct rtentry *
-rt_flowtable_check_route(struct rib_head *rnh, struct rt_addrinfo *info)
-{
-#if defined(INET6) || defined(INET)
- struct radix_node *rn;
-#endif
- struct rtentry *rt0;
-
- rt0 = NULL;
- /* "flow-table" only supports IPv6 and IPv4 at the moment. */
- switch (dst->sa_family) {
-#ifdef INET6
- case AF_INET6:
-#endif
-#ifdef INET
- case AF_INET:
-#endif
-#if defined(INET6) || defined(INET)
- rn = rnh->rnh_matchaddr(dst, &rnh->head);
- if (rn && ((rn->rn_flags & RNF_ROOT) == 0)) {
- struct sockaddr *mask;
- u_char *m, *n;
- int len;
-
- /*
- * compare mask to see if the new route is
- * more specific than the existing one
- */
- rt0 = RNTORT(rn);
- RT_LOCK(rt0);
- RT_ADDREF(rt0);
- RT_UNLOCK(rt0);
- /*
- * A host route is already present, so
- * leave the flow-table entries as is.
- */
- if (rt0->rt_flags & RTF_HOST) {
- RTFREE(rt0);
- rt0 = NULL;
- } else if (!(flags & RTF_HOST) && netmask) {
- mask = rt_mask(rt0);
- len = mask->sa_len;
- m = (u_char *)mask;
- n = (u_char *)netmask;
- while (len-- > 0) {
- if (*n != *m)
- break;
- n++;
- m++;
- }
- if (len == 0 || (*n < *m)) {
- RTFREE(rt0);
- rt0 = NULL;
- }
- }
- }
-#endif/* INET6 || INET */
- }
-
- return (rt0);
-}
-#endif
-
int
rtrequest1_fib(int req, struct rt_addrinfo *info, struct rtentry **ret_nrt,
u_int fibnum)
{
int error = 0;
struct rtentry *rt, *rt_old;
-#ifdef FLOWTABLE
- struct rtentry *rt0;
-#endif
struct radix_node *rn;
struct rib_head *rnh;
struct ifaddr *ifa;
@@ -1710,10 +1642,6 @@ rtrequest1_fib(int req, struct rt_addrinfo *info, stru
}
#endif
-#ifdef FLOWTABLE
- rt0 = rt_flowtable_check_route(rnh, info);
-#endif /* FLOWTABLE */
-
/* XXX mtu manipulation will be done in rnh_addaddr -- itojun */
rn = rnh->rnh_addaddr(ndst, netmask, &rnh->head, rt->rt_nodes);
@@ -1748,18 +1676,8 @@ rtrequest1_fib(int req, struct rt_addrinfo *info, stru
ifa_free(rt->rt_ifa);
R_Free(rt_key(rt));
uma_zfree(V_rtzone, rt);
-#ifdef FLOWTABLE
- if (rt0 != NULL)
- RTFREE(rt0);
-#endif
return (EEXIST);
}
-#ifdef FLOWTABLE
- else if (rt0 != NULL) {
- flowtable_route_flush(dst->sa_family, rt0);
- RTFREE(rt0);
- }
-#endif
if (rt_old != NULL) {
rt_notifydelete(rt_old, info);
Modified: head/sys/netinet/ip_output.c
==============================================================================
--- head/sys/netinet/ip_output.c Thu Jul 27 12:37:18 2017 (r321617)
+++ head/sys/netinet/ip_output.c Thu Jul 27 13:03:36 2017 (r321618)
@@ -63,7 +63,6 @@ __FBSDID("$FreeBSD$");
#include <net/netisr.h>
#include <net/pfil.h>
#include <net/route.h>
-#include <net/flowtable.h>
#ifdef RADIX_MPATH
#include <net/radix_mpath.h>
#endif
@@ -243,11 +242,6 @@ ip_output(struct mbuf *m, struct mbuf *opt, struct rou
ro = &iproute;
bzero(ro, sizeof (*ro));
}
-
-#ifdef FLOWTABLE
- if (ro->ro_rt == NULL)
- (void )flowtable_lookup(AF_INET, m, ro);
-#endif
if (opt) {
int len = 0;
Modified: head/sys/netinet6/ip6_output.c
==============================================================================
--- head/sys/netinet6/ip6_output.c Thu Jul 27 12:37:18 2017 (r321617)
+++ head/sys/netinet6/ip6_output.c Thu Jul 27 13:03:36 2017 (r321618)
@@ -117,10 +117,6 @@ __FBSDID("$FreeBSD$");
#include <netinet6/ip6protosw.h>
#include <netinet6/scope6_var.h>
-#ifdef FLOWTABLE
-#include <net/flowtable.h>
-#endif
-
extern int in6_mcast_loop;
struct ip6_exthdrs {
@@ -502,10 +498,6 @@ ip6_output(struct mbuf *m0, struct ip6_pktopts *opt,
if (opt && opt->ip6po_rthdr)
ro = &opt->ip6po_route;
dst = (struct sockaddr_in6 *)&ro->ro_dst;
-#ifdef FLOWTABLE
- if (ro->ro_rt == NULL)
- (void )flowtable_lookup(AF_INET6, m, (struct route *)ro);
-#endif
fibnum = (inp != NULL) ? inp->inp_inc.inc_fibnum : M_GETFIB(m);
again:
/*
Modified: head/usr.bin/netstat/Makefile
==============================================================================
--- head/usr.bin/netstat/Makefile Thu Jul 27 12:37:18 2017 (r321617)
+++ head/usr.bin/netstat/Makefile Thu Jul 27 13:03:36 2017 (r321618)
@@ -6,7 +6,7 @@
PROG= netstat
SRCS= if.c inet.c main.c mbuf.c mroute.c netisr.c nl_symbols.c route.c \
unix.c mroute6.c ipsec.c bpf.c pfkey.c sctp.c \
- flowtable.c nl_defs.h
+ nl_defs.h
nl_symbols.c: nlist_symbols
awk '\
Modified: head/usr.bin/netstat/main.c
==============================================================================
--- head/usr.bin/netstat/main.c Thu Jul 27 12:37:18 2017 (r321617)
+++ head/usr.bin/netstat/main.c Thu Jul 27 13:03:36 2017 (r321618)
@@ -480,7 +480,6 @@ main(int argc, char *argv[])
xo_open_container("statistics");
if (sflag) {
rt_stats();
- flowtable_stats();
} else
routepr(fib, af);
xo_close_container("statistics");
Modified: head/usr.bin/netstat/netstat.h
==============================================================================
--- head/usr.bin/netstat/netstat.h Thu Jul 27 12:37:18 2017 (r321617)
+++ head/usr.bin/netstat/netstat.h Thu Jul 27 13:03:36 2017 (r321618)
@@ -140,7 +140,6 @@ void intpr(void (*)(char *), int);
void pr_family(int);
void rt_stats(void);
-void flowtable_stats(void);
char *routename(struct sockaddr *, int);
const char *netname(struct sockaddr *, struct sockaddr *);
More information about the svn-src-head
mailing list