Deleted Added
full compact
30c30
< * $FreeBSD: head/sys/net/if_var.h 186199 2008-12-17 00:11:56Z kmacy $
---
> * $FreeBSD: head/sys/net/if_var.h 186207 2008-12-17 04:00:43Z kmacy $
79a80
> #include <sys/buf_ring.h>
550a552,577
> #ifdef _KERNEL
> static __inline int
> drbr_enqueue(struct buf_ring *br, struct mbuf *m)
> {
> int error = 0;
>
> if ((error = buf_ring_enqueue(br, m)) == ENOBUFS) {
> br->br_drops++;
> m_freem(m);
> }
>
> return (error);
> }
>
> static __inline void
> drbr_free(struct buf_ring *br, struct malloc_type *type)
> {
> struct mbuf *m;
>
> while ((m = buf_ring_dequeue_sc(br)) != NULL)
> m_freem(m);
>
> buf_ring_free(br, type);
> }
> #endif
>