summaryrefslogtreecommitdiffstats
path: root/sys/netinet6
diff options
context:
space:
mode:
authorglebius <glebius@FreeBSD.org>2014-03-21 15:15:30 +0000
committerglebius <glebius@FreeBSD.org>2014-03-21 15:15:30 +0000
commit03fdc2934eb61c44c049a02b02aa974cfdd8a0eb (patch)
treecc0fec78da85e9575659f55226fa9d0d7e1fb82c /sys/netinet6
parenta528b1ed30bfe465bfdd83f8e18449b8bf399429 (diff)
downloadFreeBSD-src-03fdc2934eb61c44c049a02b02aa974cfdd8a0eb.zip
FreeBSD-src-03fdc2934eb61c44c049a02b02aa974cfdd8a0eb.tar.gz
Merge r262763, r262767, r262771, r262806 from head:
- Remove rt_metrics_lite and simply put its members into rtentry. - Use counter(9) for rt_pksent (former rt_rmx.rmx_pksent). This removes another cache trashing ++ from packet forwarding path. - Create zini/fini methods for the rtentry UMA zone. Via initialize mutex and counter in them. - Fix reporting of rmx_pksent to routing socket. - Fix netstat(1) to report "Use" both in kvm(3) and sysctl(3) mode.
Diffstat (limited to 'sys/netinet6')
-rw-r--r--sys/netinet6/in6_rmx.c11
-rw-r--r--sys/netinet6/ip6_ipsec.c4
-rw-r--r--sys/netinet6/ip6_output.c12
3 files changed, 12 insertions, 15 deletions
diff --git a/sys/netinet6/in6_rmx.c b/sys/netinet6/in6_rmx.c
index 88ecc14..394cdb6 100644
--- a/sys/netinet6/in6_rmx.c
+++ b/sys/netinet6/in6_rmx.c
@@ -135,8 +135,8 @@ in6_addroute(void *v_arg, void *n_arg, struct radix_node_head *head,
}
}
- if (!rt->rt_rmx.rmx_mtu && rt->rt_ifp)
- rt->rt_rmx.rmx_mtu = IN6_LINKMTU(rt->rt_ifp);
+ if (!rt->rt_mtu && rt->rt_ifp)
+ rt->rt_mtu = IN6_LINKMTU(rt->rt_ifp);
ret = rn_addroute(v_arg, n_arg, head, treenodes);
if (ret == NULL) {
@@ -206,12 +206,11 @@ in6_mtuexpire(struct radix_node *rn, void *rock)
if (!rt)
panic("rt == NULL in in6_mtuexpire");
- if (rt->rt_rmx.rmx_expire && !(rt->rt_flags & RTF_PROBEMTU)) {
- if (rt->rt_rmx.rmx_expire <= time_uptime) {
+ if (rt->rt_expire && !(rt->rt_flags & RTF_PROBEMTU)) {
+ if (rt->rt_expire <= time_uptime) {
rt->rt_flags |= RTF_PROBEMTU;
} else {
- ap->nextstop = lmin(ap->nextstop,
- rt->rt_rmx.rmx_expire);
+ ap->nextstop = lmin(ap->nextstop, rt->rt_expire);
}
}
diff --git a/sys/netinet6/ip6_ipsec.c b/sys/netinet6/ip6_ipsec.c
index 8cdd431..436af00 100644
--- a/sys/netinet6/ip6_ipsec.c
+++ b/sys/netinet6/ip6_ipsec.c
@@ -369,9 +369,7 @@ ip6_ipsec_mtu(struct mbuf *m)
sp->req->sav->sah != NULL) {
ro = &sp->req->sav->sah->route_cache.sa_route;
if (ro->ro_rt && ro->ro_rt->rt_ifp) {
- mtu =
- ro->ro_rt->rt_rmx.rmx_mtu ?
- ro->ro_rt->rt_rmx.rmx_mtu :
+ mtu = ro->ro_rt->rt_mtu ? ro->ro_rt->rt_mtu :
ro->ro_rt->rt_ifp->if_mtu;
mtu -= ipsechdr;
}
diff --git a/sys/netinet6/ip6_output.c b/sys/netinet6/ip6_output.c
index 171a918..b1d27d4 100644
--- a/sys/netinet6/ip6_output.c
+++ b/sys/netinet6/ip6_output.c
@@ -218,9 +218,9 @@ in6_delayed_cksum(struct mbuf *m, uint32_t plen, u_short offset)
* skipped and ro->ro_rt would be used. If ro is present but ro->ro_rt is NULL,
* then result of route lookup is stored in ro->ro_rt.
*
- * type of "mtu": rt_rmx.rmx_mtu is u_long, ifnet.ifr_mtu is int, and
+ * type of "mtu": rt_mtu is u_long, ifnet.ifr_mtu is int, and
* nd_ifinfo.linkmtu is u_int32_t. so we use u_long to hold largest one,
- * which is rt_rmx.rmx_mtu.
+ * which is rt_mtu.
*
* ifpp - XXX: just for statistics
*/
@@ -660,7 +660,7 @@ again:
}
if (rt != NULL) {
ia = (struct in6_ifaddr *)(rt->rt_ifa);
- rt->rt_use++;
+ counter_u64_add(rt->rt_pksent, 1);
}
@@ -1396,9 +1396,9 @@ ip6_getpmtu(struct route_in6 *ro_pmtu, struct route_in6 *ro,
ifmtu = IN6_LINKMTU(ifp);
mtu = tcp_hc_getmtu(&inc);
if (mtu)
- mtu = min(mtu, ro_pmtu->ro_rt->rt_rmx.rmx_mtu);
+ mtu = min(mtu, ro_pmtu->ro_rt->rt_mtu);
else
- mtu = ro_pmtu->ro_rt->rt_rmx.rmx_mtu;
+ mtu = ro_pmtu->ro_rt->rt_mtu;
if (mtu == 0)
mtu = ifmtu;
else if (mtu < IPV6_MMTU) {
@@ -1422,7 +1422,7 @@ ip6_getpmtu(struct route_in6 *ro_pmtu, struct route_in6 *ro,
* field isn't locked).
*/
mtu = ifmtu;
- ro_pmtu->ro_rt->rt_rmx.rmx_mtu = mtu;
+ ro_pmtu->ro_rt->rt_mtu = mtu;
}
} else if (ifp) {
mtu = IN6_LINKMTU(ifp);
OpenPOWER on IntegriCloud