diff options
Diffstat (limited to 'share/man')
-rw-r--r-- | share/man/man9/Makefile | 6 | ||||
-rw-r--r-- | share/man/man9/ifq_enqueue.9 | 40 |
2 files changed, 40 insertions, 6 deletions
diff --git a/share/man/man9/Makefile b/share/man/man9/Makefile index 285f0584b6a..e25808556ec 100644 --- a/share/man/man9/Makefile +++ b/share/man/man9/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.261 2015/11/24 19:37:30 jmc Exp $ +# $OpenBSD: Makefile,v 1.262 2015/11/25 03:09:57 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. @@ -217,7 +217,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_enqueue.9 ifq_dequeue.9 ifq_enqueue.9 ifq_purge.9 \ - ifq_enqueue.9 ifq_len.9 ifq_enqueue.9 ifq_empty.9 + ifq_enqueue.9 ifq_len.9 ifq_enqueue.9 ifq_empty.9 \ + ifq_enqueue.9 ifq_set_oactive.9 ifq_enqueue.9 ifq_clr_oactive.9 \ + ifq_enqueue.9 ifq_is_oactive.9 MLINKS+=ifq_deq_begin.9 ifq_deq_commit.9 ifq_deq_begin.9 ifq_deq_rollback.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 \ diff --git a/share/man/man9/ifq_enqueue.9 b/share/man/man9/ifq_enqueue.9 index d3509cbbf5d..03c5909b0ca 100644 --- a/share/man/man9/ifq_enqueue.9 +++ b/share/man/man9/ifq_enqueue.9 @@ -1,4 +1,4 @@ -.\" $OpenBSD: ifq_enqueue.9,v 1.3 2015/11/23 11:07:58 jmc Exp $ +.\" $OpenBSD: ifq_enqueue.9,v 1.4 2015/11/25 03:09:57 dlg Exp $ .\" .\" Copyright (c) 2015 David Gwynne <dlg@openbsd.org> .\" @@ -14,7 +14,7 @@ .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. .\" -.Dd $Mdocdate: November 23 2015 $ +.Dd $Mdocdate: November 25 2015 $ .Dt IFQ_ENQUEUE 9 .Os .Sh NAME @@ -22,7 +22,10 @@ .Nm ifq_dequeue , .Nm ifq_purge , .Nm ifq_len , -.Nm ifq_empty +.Nm ifq_empty , +.Nm ifq_set_oactive , +.Nm ifq_clr_oactive , +.Nm ifq_is_oactive .Nd interface send queue API .Sh SYNOPSIS .In net/if_var.h @@ -36,6 +39,12 @@ .Fn ifq_len "struct ifqueue *ifq" .Ft unsigned int .Fn ifq_empty "struct ifqueue *ifq" +.Ft void +.Fn ifq_set_oactive "struct ifqueue *ifq" +.Ft void +.Fn ifq_clr_oactive "struct ifqueue *ifq" +.Ft unsigned int +.Fn ifq_is_oactive "struct ifqueue *ifq" .Sh DESCRIPTION The ifqueue API provides implementions of data structures and operations for the network stack to queue mbufs for a network driver @@ -72,14 +81,33 @@ or Return if the interface send queue .Fa ifq is empty. +.It Fn ifq_set_oactive "struct ifqueue *ifq" +.Fn ifq_set_oactive +is called by the relevant driver to mark the hardware associated +with the interface send queue +.Fa ifq +as unable to transmit more packets. +.It Fn ifq_clr_oactive "struct ifqueue *ifq" +.Fn ifq_clr_oactive +is called by the relevant driver to clear the "active" mark on the +hardware associated with the interface send queue +.Fa ifq , +meaning it is now able to transmit packets. +.It Fn ifq_is_oactive "struct ifqueue *ifq" +Return if the hardware associated with the interface send queue +.Fa ifq +is unable to transmit more packets. .El .Sh CONTEXT .Fn ifq_enqueue , .Fn ifq_dequeue , .Fn ifq_purge , .Fn ifq_len , +.Fn ifq_empty , +.Fn ifq_set_oactive , +.Fn ifq_clr_oactive , and -.Fn ifq_empty +.Fn ifq_is_oactive can be called during autoconf, from process context, or from interrupt context. .Sh RETURN VALUES .Fn ifq_enqueue @@ -99,6 +127,10 @@ returns the number of mbufs on the queue. .Pp .Fn ifq_empty returns a non-zero value if the queue is empty, otherwise 0. +.Pp +.Fn ifq_is_oactive +returns a non-zero value if the hardware associated with the interface +send queue is unable to transmit more packets, otherwise 0. .Sh SEE ALSO .Xr ifq_deq_begin 9 , .Xr m_freem 9 |