From 8a3e4bbebb00c94db1ecf732ad3a6e3aa982384d Mon Sep 17 00:00:00 2001 From: glebius Date: Wed, 5 Mar 2014 01:17:47 +0000 Subject: - 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. The change is mostly targeted for stable/10 merge. For head, rt_pksent is expected to just disappear. Discussed with: melifaro Sponsored by: Netflix Sponsored by: Nginx, Inc. --- sys/netpfil/pf/pf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sys/netpfil/pf/pf.c') diff --git a/sys/netpfil/pf/pf.c b/sys/netpfil/pf/pf.c index 496ff13..c40d948 100644 --- a/sys/netpfil/pf/pf.c +++ b/sys/netpfil/pf/pf.c @@ -5496,7 +5496,7 @@ pf_route(struct mbuf **m, struct pf_rule *r, int dir, struct ifnet *oifp, } ifp = rt->rt_ifp; - rt->rt_rmx.rmx_pksent++; + counter_u64_add(rt->rt_pksent, 1); if (rt->rt_flags & RTF_GATEWAY) bcopy(satosin(rt->rt_gateway), &dst, sizeof(dst)); -- cgit v1.1