Index: ifq_enqueue.9 =================================================================== RCS file: /cvs/src/share/man/man9/ifq_enqueue.9,v retrieving revision 1.1 diff -u -p -r1.1 ifq_enqueue.9 --- ifq_enqueue.9 20 Nov 2015 11:15:07 -0000 1.1 +++ ifq_enqueue.9 20 Nov 2015 11:42:08 -0000 @@ -25,7 +25,10 @@ .Nm ifq_deq_rollback , .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 @@ -45,6 +48,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 @@ -104,6 +113,22 @@ 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 , @@ -113,8 +138,11 @@ is empty. .Fn ifq_deq_rollback , .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 @@ -136,5 +164,9 @@ 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 m_freem 9