Deleted Added
full compact
drbr.9 (230787) drbr.9 (233648)
1.\" Copyright (c) 2009 Bitgravity Inc
2.\" Written by: Kip Macy <kmacy@@FreeBSD.org>
3.\" All rights reserved.
4.\"
5.\" Redistribution and use in source and binary forms, with or without
6.\" modification, are permitted provided that the following conditions
7.\" are met:
8.\" 1. Redistributions of source code must retain the above copyright

--- 9 unchanged lines hidden (view full) ---

18.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24.\" SUCH DAMAGE.
25.\"
1.\" Copyright (c) 2009 Bitgravity Inc
2.\" Written by: Kip Macy <kmacy@@FreeBSD.org>
3.\" All rights reserved.
4.\"
5.\" Redistribution and use in source and binary forms, with or without
6.\" modification, are permitted provided that the following conditions
7.\" are met:
8.\" 1. Redistributions of source code must retain the above copyright

--- 9 unchanged lines hidden (view full) ---

18.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24.\" SUCH DAMAGE.
25.\"
26.\" $FreeBSD: head/share/man/man9/drbr.9 230787 2012-01-30 21:02:25Z brueffer $
26.\" $FreeBSD: head/share/man/man9/drbr.9 233648 2012-03-29 05:02:12Z eadler $
27.\"
28.Dd January 30, 2012
29.Dt DRBR 9
30.Os
31.Sh NAME
32.Nm drbr ,
33.Nm drbr_free ,
34.Nm drbr_enqueue ,

--- 36 unchanged lines hidden (view full) ---

71by the driver's tx queue lock.
72If
73.Dv INVARIANTS
74is enabled,
75.Fn drbr_dequeue
76will assert that the tx queue lock is held when it is called.
77.Pp
78The
27.\"
28.Dd January 30, 2012
29.Dt DRBR 9
30.Os
31.Sh NAME
32.Nm drbr ,
33.Nm drbr_free ,
34.Nm drbr_enqueue ,

--- 36 unchanged lines hidden (view full) ---

71by the driver's tx queue lock.
72If
73.Dv INVARIANTS
74is enabled,
75.Fn drbr_dequeue
76will assert that the tx queue lock is held when it is called.
77.Pp
78The
79.Fn drbr_free
79.Fn drbr_free
80function frees all the enqueued mbufs and then frees the buf_ring.
81.Pp
82The
83.Fn drbr_enqueue
84function is used to enqueue an mbuf to a buf_ring, falling back to the
85ifnet's IFQ if
86.Xr ALTQ 4
87is enabled.

--- 13 unchanged lines hidden (view full) ---

101.Dv TRUE
102or
103.Dv FALSE .
104.Pp
105The
106.Fn drbr_flush
107function frees all mbufs enqueued in the buf_ring and the ifnet's IFQ.
108.Pp
80function frees all the enqueued mbufs and then frees the buf_ring.
81.Pp
82The
83.Fn drbr_enqueue
84function is used to enqueue an mbuf to a buf_ring, falling back to the
85ifnet's IFQ if
86.Xr ALTQ 4
87is enabled.

--- 13 unchanged lines hidden (view full) ---

101.Dv TRUE
102or
103.Dv FALSE .
104.Pp
105The
106.Fn drbr_flush
107function frees all mbufs enqueued in the buf_ring and the ifnet's IFQ.
108.Pp
109The
109The
110.Fn drbr_empty
111function returns
112.Dv TRUE
113if there are no mbufs enqueued,
114.Dv FALSE
115otherwise.
116.Pp
117The
118.Fn drbr_inuse
119function returns the number of mbufs enqueued.
120Note to users that this is intrinsically racy as there is no guarantee that
110.Fn drbr_empty
111function returns
112.Dv TRUE
113if there are no mbufs enqueued,
114.Dv FALSE
115otherwise.
116.Pp
117The
118.Fn drbr_inuse
119function returns the number of mbufs enqueued.
120Note to users that this is intrinsically racy as there is no guarantee that
121there will not be more mbufs when
121there will not be more mbufs when
122.Fn drbr_dequeue
123is actually called.
124Provided the tx queue lock is held there will not be less.
125.Pp
126The
127.Fn drbr_stats_update
128function updates the number of bytes and the number of multicast packets sent.
129.Sh RETURN VALUES
130The
131.Fn drbr_enqueue
132function returns
133.Er ENOBUFS
134if there are no slots available in the buf_ring and
135.Dv 0
136on success.
137.Pp
138The
139.Fn drbr_dequeue
122.Fn drbr_dequeue
123is actually called.
124Provided the tx queue lock is held there will not be less.
125.Pp
126The
127.Fn drbr_stats_update
128function updates the number of bytes and the number of multicast packets sent.
129.Sh RETURN VALUES
130The
131.Fn drbr_enqueue
132function returns
133.Er ENOBUFS
134if there are no slots available in the buf_ring and
135.Dv 0
136on success.
137.Pp
138The
139.Fn drbr_dequeue
140and
140and
141.Fn drbr_dequeue_cond
142functions return an mbuf on success and
143.Dv NULL
144if the buf_ring is empty.
145.Sh HISTORY
146These functions were introduced in
147.Fx 8.0 .
141.Fn drbr_dequeue_cond
142functions return an mbuf on success and
143.Dv NULL
144if the buf_ring is empty.
145.Sh HISTORY
146These functions were introduced in
147.Fx 8.0 .