diff options
author | David Gwynne <dlg@cvs.openbsd.org> | 2016-01-21 03:34:06 +0000 |
---|---|---|
committer | David Gwynne <dlg@cvs.openbsd.org> | 2016-01-21 03:34:06 +0000 |
commit | 203ffc9481e5702ba7717c92967fd188e6886f5a (patch) | |
tree | e142652fa89a20ffcfbcb45699762c71f5afa8a3 /sys/netinet | |
parent | ad79220a1f6a61284080bbcf35e395b17d1f205b (diff) |
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@
Diffstat (limited to 'sys/netinet')
-rw-r--r-- | sys/netinet/if_ether.c | 7 |
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; |