diff options
-rw-r--r-- | share/man/man9/Makefile | 11 | ||||
-rw-r--r-- | share/man/man9/ifq_enqueue.9 (renamed from share/man/man9/ifq_enq.9) | 26 | ||||
-rw-r--r-- | sys/net/if.c | 6 | ||||
-rw-r--r-- | sys/net/if_var.h | 12 |
4 files changed, 28 insertions, 27 deletions
diff --git a/share/man/man9/Makefile b/share/man/man9/Makefile index ddffd6be35c..dfd6ff940db 100644 --- a/share/man/man9/Makefile +++ b/share/man/man9/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.254 2015/11/20 03:35:22 dlg Exp $ +# $OpenBSD: Makefile,v 1.255 2015/11/20 11:15:07 dlg Exp $ # $NetBSD: Makefile,v 1.4 1996/01/09 03:23:01 thorpej Exp $ # Makefile for section 9 (kernel function and variable) manual pages. @@ -18,7 +18,7 @@ MAN= aml_evalnode.9 atomic_add_int.9 atomic_cas_uint.9 \ ieee80211.9 ieee80211_crypto.9 ieee80211_input.9 ieee80211_ioctl.9 \ ieee80211_node.9 ieee80211_output.9 ieee80211_proto.9 \ ieee80211_radiotap.9 \ - if_rxr_init.9 ifq_enq.9 iic.9 intro.9 inittodr.9 intr_barrier.9 \ + if_rxr_init.9 ifq_enqueue.9 iic.9 intro.9 inittodr.9 intr_barrier.9 \ kern.9 km_alloc.9 knote.9 kthread.9 ktrace.9 \ loadfirmware.9 lock.9 log.9 \ malloc.9 membar_sync.9 mbuf.9 mbuf_tags.9 md5.9 mi_switch.9 \ @@ -216,9 +216,10 @@ MLINKS+=ieee80211_proto.9 ieee80211_proto_attach.9 \ MLINKS+=if_rxr_init.9 if_rxr_get.9 if_rxr_init.9 if_rxr_put.9 \ if_rxr_init.9 if_rxr_inuse.9 if_rxr_init.9 if_rxr_ioctl.9 \ if_rxr_init.9 if_rxr_info_ioctl.9 -MLINKS+=ifq_enq.9 ifq_deq.9 ifq_enq.9 ifq_deq_begin.9 \ - ifq_enq.9 ifq_deq_commit.9 ifq_enq.9 ifq_deq_rollback.9 \ - ifq_enq.9 ifq_purge.9 ifq_enq.9 ifq_len.9 ifq_enq.9 ifq_empty.9 +MLINKS+=ifq_enqueue.9 ifq_dequeue.9 ifq_enqueue.9 ifq_deq_begin.9 \ + ifq_enqueue.9 ifq_deq_commit.9 ifq_enqueue.9 ifq_deq_rollback.9 \ + ifq_enqueue.9 ifq_purge.9 ifq_enqueue.9 ifq_len.9 \ + ifq_enqueue.9 ifq_empty.9 MLINKS+=iic.9 iic_acquire_bus.9 iic.9 iic_release_bus.9 iic.9 iic_exec.9 \ iic.9 iic_smbus_write_byte.9 iic.9 iic_smbus_read_byte.9 \ iic.9 iic_smbus_receive_byte.9 diff --git a/share/man/man9/ifq_enq.9 b/share/man/man9/ifq_enqueue.9 index eccf7715e2c..a53bde5e1f0 100644 --- a/share/man/man9/ifq_enq.9 +++ b/share/man/man9/ifq_enqueue.9 @@ -1,4 +1,4 @@ -.\" $OpenBSD: ifq_enq.9,v 1.2 2015/11/20 07:07:37 jmc Exp $ +.\" $OpenBSD: ifq_enqueue.9,v 1.1 2015/11/20 11:15:07 dlg Exp $ .\" .\" Copyright (c) 2015 David Gwynne <dlg@openbsd.org> .\" @@ -15,11 +15,11 @@ .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. .\" .Dd $Mdocdate: November 20 2015 $ -.Dt IFQ_ENQ 9 +.Dt IFQ_ENQUEUE 9 .Os .Sh NAME -.Nm ifq_enq , -.Nm ifq_deq , +.Nm ifq_enqueue , +.Nm ifq_dequeue , .Nm ifq_deq_begin , .Nm ifq_deq_commit , .Nm ifq_deq_rollback , @@ -30,9 +30,9 @@ .Sh SYNOPSIS .In net/if_var.h .Ft int -.Fn ifq_enq "struct ifqueue *ifq" "struct mbuf *m" +.Fn ifq_enqueue "struct ifqueue *ifq" "struct mbuf *m" .Ft struft mbuf * -.Fn ifq_deq "struct ifqueue *ifq" +.Fn ifq_dequeue "struct ifqueue *ifq" .Ft struft mbuf * .Fn ifq_deq_begin "struct ifqueue *ifq" .Ft void @@ -50,7 +50,7 @@ The ifqueue API provides implementions of data structures and operations for the network stack to queue mbufs for a network driver to dequeue from its start routine for transmission. .Bl -tag -width Ds -.It Fn ifq_enq "struct ifqueue *ifq" "struct mbuf *m" +.It Fn ifq_enqueue "struct ifqueue *ifq" "struct mbuf *m" Enqueue mbuf .Fa m on the @@ -59,7 +59,7 @@ interface send queue. If the queue rejects the packet it will be freed with .Xr m_freem 9 and counted as a drop. -.It Fn ifq_deq "struct ifqueue *ifq" +.It Fn ifq_dequeue "struct ifqueue *ifq" Dequeue the next mbuf to be transmitted from the .Fa ifq interface send queue. @@ -97,7 +97,7 @@ Note that while .Fn ifq_len may report that mbufs are on the queue, the current queue discipline may not make them available for dequeueing with -.Fn ifq_deq +.Fn ifq_dequeue or .Fn ifq_deq_begin . .It Fn ifq_empty "struct ifqueue *ifq" @@ -106,8 +106,8 @@ Return if the interface send queue is empty. .El .Sh CONTEXT -.Fn ifq_enq , -.Fn ifq_deq , +.Fn ifq_enqueue , +.Fn ifq_dequeue , .Fn ifq_deq_begin , .Fn ifq_deq_commit , .Fn ifq_deq_rollback , @@ -117,10 +117,10 @@ and .Fn ifq_empty can be called during autoconf, from process context, or from interrupt context. .Sh RETURN VALUES -.Fn ifq_enq +.Fn ifq_enqueue returns 0 if the mbuf was successfully queued, or non-zero if mbuf was freed. .Pp -.Fn ifq_deq +.Fn ifq_dequeue and .Fn ifq_deq_begin return the next mbuf to be transmitted by the interface. diff --git a/sys/net/if.c b/sys/net/if.c index c419a5ca303..f899cd8788c 100644 --- a/sys/net/if.c +++ b/sys/net/if.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if.c,v 1.409 2015/11/20 10:40:00 sthen Exp $ */ +/* $OpenBSD: if.c,v 1.410 2015/11/20 11:15:07 dlg Exp $ */ /* $NetBSD: if.c,v 1.35 1996/05/07 05:26:04 thorpej Exp $ */ /* @@ -2873,7 +2873,7 @@ ifq_enqueue_try(struct ifqueue *ifq, struct mbuf *m) } int -ifq_enq(struct ifqueue *ifq, struct mbuf *m) +ifq_enqueue(struct ifqueue *ifq, struct mbuf *m) { int err; @@ -2928,7 +2928,7 @@ ifq_deq_rollback(struct ifqueue *ifq, struct mbuf *m) } struct mbuf * -ifq_deq(struct ifqueue *ifq) +ifq_dequeue(struct ifqueue *ifq) { struct mbuf *m; diff --git a/sys/net/if_var.h b/sys/net/if_var.h index 470e5543f99..2739ac8a9a5 100644 --- a/sys/net/if_var.h +++ b/sys/net/if_var.h @@ -1,4 +1,4 @@ -/* $OpenBSD: if_var.h,v 1.54 2015/11/20 03:35:23 dlg Exp $ */ +/* $OpenBSD: if_var.h,v 1.55 2015/11/20 11:15:07 dlg Exp $ */ /* $NetBSD: if.h,v 1.23 1996/05/07 02:40:27 thorpej Exp $ */ /* @@ -279,12 +279,12 @@ struct ifg_list { void ifq_init(struct ifqueue *); void ifq_attach(struct ifqueue *, const struct ifq_ops *, void *); void ifq_destroy(struct ifqueue *); -int ifq_enq_try(struct ifqueue *, struct mbuf *); -int ifq_enq(struct ifqueue *, struct mbuf *); +int ifq_enqueue_try(struct ifqueue *, struct mbuf *); +int ifq_enqueue(struct ifqueue *, struct mbuf *); struct mbuf *ifq_deq_begin(struct ifqueue *); void ifq_deq_commit(struct ifqueue *, struct mbuf *); void ifq_deq_rollback(struct ifqueue *, struct mbuf *); -struct mbuf *ifq_deq(struct ifqueue *); +struct mbuf *ifq_dequeue(struct ifqueue *); unsigned int ifq_purge(struct ifqueue *); void *ifq_q_enter(struct ifqueue *, const struct ifq_ops *); void ifq_q_leave(struct ifqueue *, void *); @@ -304,12 +304,12 @@ extern const struct ifq_ops * const ifq_priq_ops; #define IFQ_ENQUEUE(ifq, m, err) \ do { \ - (err) = ifq_enq((ifq), (m)); \ + (err) = ifq_enqueue((ifq), (m)); \ } while (/* CONSTCOND */0) #define IFQ_DEQUEUE(ifq, m) \ do { \ - (m) = ifq_deq(ifq); \ + (m) = ifq_dequeue(ifq); \ } while (/* CONSTCOND */0) #define IFQ_PURGE(ifq) \ |