From 9efc1f83db099c09458dde2cdc52d15cf5f0dbf1 Mon Sep 17 00:00:00 2001 From: David Gwynne Date: Thu, 23 Apr 2015 09:45:25 +0000 Subject: 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@ --- sys/net/if_var.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'sys/net/if_var.h') 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); -- cgit v1.2.3