summaryrefslogtreecommitdiff
path: root/sys/net/if_var.h
diff options
context:
space:
mode:
authorDavid Gwynne <dlg@cvs.openbsd.org>2015-04-23 09:45:25 +0000
committerDavid Gwynne <dlg@cvs.openbsd.org>2015-04-23 09:45:25 +0000
commit9efc1f83db099c09458dde2cdc52d15cf5f0dbf1 (patch)
tree7b60bdeb9bd904315d1bd04d0aadee161124bbfe /sys/net/if_var.h
parent393e482feda6dff2dd9b392bc4189c0a23159608 (diff)
replace the use of struct ifqueue in pipex with mbuf_queues.
this has a slight semantic change. previously pipex would only process up to 128 packets on the input and output queues at a time and would reschedule the softint if there were any left. now it mq_delists the current set of pending packets and only processes them. if anything is added to the queues later they'll cause the softint to run again. this in turn lets us deprecate sysctl_ifq since nothing uses it anymore. because niqueues are mostly wrappers around mbuf_queues, we can provide sysctl_mq and just #define sysctl_niq to it. pipex bits are ok yasuoka@
Diffstat (limited to 'sys/net/if_var.h')
-rw-r--r--sys/net/if_var.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/sys/net/if_var.h b/sys/net/if_var.h
index 9ecd7d0bf9c..6c84dd2e183 100644
--- a/sys/net/if_var.h
+++ b/sys/net/if_var.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_var.h,v 1.24 2015/04/07 10:46:20 mpi Exp $ */
+/* $OpenBSD: if_var.h,v 1.25 2015/04/23 09:45:24 dlg Exp $ */
/* $NetBSD: if.h,v 1.23 1996/05/07 02:40:27 thorpej Exp $ */
/*
@@ -411,6 +411,8 @@ int niq_enlist(struct niqueue *, struct mbuf_list *);
#define niq_filter(_q, _f, _c) mq_filter(&(_q)->ni_q, (_f), (_c))
#define niq_len(_q) mq_len(&(_q)->ni_q)
#define niq_drops(_q) mq_drops(&(_q)->ni_q)
+#define sysctl_niq(_n, _l, _op, _olp, _np, _nl, _niq) \
+ sysctl_mq((_n), (_l), (_op), (_olp), (_np), (_nl), &(_niq)->ni_q)
extern struct ifnet_head ifnet;
extern struct ifnet *lo0ifp;
@@ -441,10 +443,8 @@ void if_clone_detach(struct if_clone *);
int if_clone_create(const char *);
int if_clone_destroy(const char *);
-int sysctl_ifq(int *, u_int, void *, size_t *, void *, size_t,
- struct ifqueue *);
-int sysctl_niq(int *, u_int, void *, size_t *, void *, size_t,
- struct niqueue *);
+int sysctl_mq(int *, u_int, void *, size_t *, void *, size_t,
+ struct mbuf_queue *);
int loioctl(struct ifnet *, u_long, caddr_t);
void loopattach(int);