summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordlg <dlg@openbsd.org>2016-01-21 03:34:05 +0000
committerdlg <dlg@openbsd.org>2016-01-21 03:34:05 +0000
commit5fe57d5d4f76eba9e033ec35963b1c3e40f12676 (patch)
tree026e155dff415e076c959d0b0ac860d457a22562
parentNuke 'writable' field now that it is always in sync with 'rflag'. Since (diff)
downloadwireguard-openbsd-5fe57d5d4f76eba9e033ec35963b1c3e40f12676.tar.xz
wireguard-openbsd-5fe57d5d4f76eba9e033ec35963b1c3e40f12676.zip
remove the arp_inuse and arp_allocated counters
we can get the same info from the arp pool: # vmstat -m | grep -e ^arp -e ^Name Name Size Requests Fail InUse Pgreq Pgrel Npage Hiwat Minpg Maxpg Idle arp 56 84 0 6 1 0 1 1 0 8 0 Requests and InUse end up being the same: # pstat -d d arp_allocated arp_allocated at 0xffffffff81942084: 84 # pstat -d d arp_inuse arp_inuse at 0xffffffff81942098: 6 ok bluhm@ claudio@ mpi@
-rw-r--r--sys/netinet/if_ether.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/sys/netinet/if_ether.c b/sys/netinet/if_ether.c
index b6d825cda0d..1218b676a8e 100644
--- a/sys/netinet/if_ether.c
+++ b/sys/netinet/if_ether.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_ether.c,v 1.200 2016/01/14 12:41:02 mpi Exp $ */
+/* $OpenBSD: if_ether.c,v 1.201 2016/01/21 03:34:05 dlg Exp $ */
/* $NetBSD: if_ether.c,v 1.31 1996/05/11 12:59:58 mycroft Exp $ */
/*
@@ -86,7 +86,6 @@ void in_revarpinput(struct mbuf *);
LIST_HEAD(, llinfo_arp) arp_list;
struct pool arp_pool; /* pool for llinfo_arp structures */
-int arp_inuse, arp_allocated;
int arp_maxtries = 5;
int arpinit_done;
int la_hold_total;
@@ -193,8 +192,7 @@ arp_rtrequest(struct ifnet *ifp, int req, struct rtentry *rt)
log(LOG_DEBUG, "%s: pool get failed\n", __func__);
break;
}
- arp_inuse++;
- arp_allocated++;
+
ml_init(&la->la_ml);
la->la_rt = rt;
rt->rt_flags |= RTF_LLINFO;
@@ -215,7 +213,6 @@ arp_rtrequest(struct ifnet *ifp, int req, struct rtentry *rt)
case RTM_DELETE:
if (la == NULL)
break;
- arp_inuse--;
LIST_REMOVE(la, la_list);
rt->rt_llinfo = 0;
rt->rt_flags &= ~RTF_LLINFO;