diff options
author | glebius <glebius@FreeBSD.org> | 2014-03-21 15:15:30 +0000 |
---|---|---|
committer | glebius <glebius@FreeBSD.org> | 2014-03-21 15:15:30 +0000 |
commit | 03fdc2934eb61c44c049a02b02aa974cfdd8a0eb (patch) | |
tree | cc0fec78da85e9575659f55226fa9d0d7e1fb82c /sys/netinet/ip_output.c | |
parent | a528b1ed30bfe465bfdd83f8e18449b8bf399429 (diff) | |
download | FreeBSD-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/netinet/ip_output.c')
-rw-r--r-- | sys/netinet/ip_output.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/netinet/ip_output.c b/sys/netinet/ip_output.c index bee37a7..69832d4 100644 --- a/sys/netinet/ip_output.c +++ b/sys/netinet/ip_output.c @@ -296,7 +296,7 @@ again: } ia = ifatoia(rte->rt_ifa); ifp = rte->rt_ifp; - rte->rt_rmx.rmx_pksent++; + counter_u64_add(rte->rt_pksent, 1); if (rte->rt_flags & RTF_GATEWAY) gw = (struct sockaddr_in *)rte->rt_gateway; if (rte->rt_flags & RTF_HOST) @@ -316,9 +316,9 @@ again: * them, there is no way for one to update all its * routes when the MTU is changed. */ - if (rte->rt_rmx.rmx_mtu > ifp->if_mtu) - rte->rt_rmx.rmx_mtu = ifp->if_mtu; - mtu = rte->rt_rmx.rmx_mtu; + if (rte->rt_mtu > ifp->if_mtu) + rte->rt_mtu = ifp->if_mtu; + mtu = rte->rt_mtu; } else { mtu = ifp->if_mtu; } |