OpenBSD manual page server

Manual Page Search Parameters

IFQ_DEQ_BEGIN(9) Kernel Developer's Manual IFQ_DEQ_BEGIN(9)

ifq_deq_begin, ifq_deq_commit, ifq_deq_rollbackdequeue an mbuf from an interface sending queue

#include <net/if_var.h>

struct mbuf *
ifq_deq_begin(struct ifqueue *ifq);

void
ifq_deq_commit(struct ifqueue *ifq, struct mbuf *m);

void
ifq_deq_rollback(struct ifqueue *ifq, struct mbuf *m);

The ifq_deq_* set of functions provides a non-atomic alternative to ifq_dequeue(9). Their use is discouraged, code should use ifq_dequeue(9) whenever possible.

(struct ifqueue *ifq)
Get a reference to the next mbuf to be transmitted from the ifq interface send queue. If an mbuf is to be transmitted, also acquire a lock on the send queue to exclude modification or freeing of the referenced mbuf. Its packet header must not be modified until the mbuf has been dequeued with ().
ifq_deq_commit(struct ifqueue *ifq, struct mbuf *m)
Dequeue the mbuf m that was referenced by a previous call to ifq_deq_begin() and release the lock on ifq.
(struct ifqueue *ifq, struct mbuf *m)
Release the lock on the interface send queue ifq that was acquired while a reference to m was being held.

ifq_deq_begin(), ifq_deq_commit(), and ifq_deq_rollback() can be called during autoconf, from process context, or from interrupt context.

ifq_deq_begin() returns the next mbuf to be transmitted by the interface. If no packet is available for transmission, NULL is returned.

ifq_dequeue(9)

March 20, 2021 OpenBSD-current