diff options
author | 2011-07-07 20:42:56 +0000 | |
---|---|---|
committer | 2011-07-07 20:42:56 +0000 | |
commit | 8c69b87d282ec44769fd827524d27c7f56281815 (patch) | |
tree | f55fc3a6c10b18226fddef71fc56be3349196c99 /sys/net/if_tun.c | |
parent | provide IF_LEN and IFQ_LEN to access ifq_len on an ifqueue, ryan ok (diff) | |
download | wireguard-openbsd-8c69b87d282ec44769fd827524d27c7f56281815.tar.xz wireguard-openbsd-8c69b87d282ec44769fd827524d27c7f56281815.zip |
use IF_LEN/IFQ_LEN to access and ifqueue's length field. ryan ok
with this nothing in the tree fiddles if ifqueue internals any more, of
course except if.c and if.h (and some altq)
Diffstat (limited to 'sys/net/if_tun.c')
-rw-r--r-- | sys/net/if_tun.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/net/if_tun.c b/sys/net/if_tun.c index ef649750c68..6c152ee6514 100644 --- a/sys/net/if_tun.c +++ b/sys/net/if_tun.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_tun.c,v 1.110 2011/07/02 22:20:08 nicm Exp $ */ +/* $OpenBSD: if_tun.c,v 1.111 2011/07/07 20:42:56 henning Exp $ */ /* $NetBSD: if_tun.c,v 1.24 1996/05/07 02:40:48 thorpej Exp $ */ /* @@ -1002,7 +1002,7 @@ tunpoll(dev_t dev, int events, struct proc *p) IFQ_POLL(&ifp->if_snd, m); if (m != NULL) { TUNDEBUG(("%s: tunselect q=%d\n", ifp->if_xname, - ifp->if_snd.ifq_len)); + IFQ_LEN(ifp->if_snd))); revents |= events & (POLLIN | POLLRDNORM); } else { TUNDEBUG(("%s: tunpoll waiting\n", ifp->if_xname)); @@ -1096,10 +1096,10 @@ filt_tunread(struct knote *kn, long hint) IFQ_POLL(&ifp->if_snd, m); if (m != NULL) { splx(s); - kn->kn_data = ifp->if_snd.ifq_len; + kn->kn_data = IFQ_LEN(&ifp->if_snd); TUNDEBUG(("%s: tunkqread q=%d\n", ifp->if_xname, - ifp->if_snd.ifq_len)); + IFQ_LEN(&ifp->if_snd))); return (1); } splx(s); |