IFQ_DEQ_BEGIN(9)

πŸ“¦ in nixpkgs unstable

okay so bestie, welcome to IFQ_DEQ_BEGIN(9) from the Kernel Developer's Manual β€” this is the page about dequeuing an mbuf from an interface sending queue. let's get into it πŸ’…βœ¨

🌸 NAME 🌸

ifq_deq_begin, ifq_deq_commit, ifq_deq_rollback β€” dequeue an mbuf from an interface sending queue πŸŽ€

✨ SYNOPSIS ✨

#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);

πŸ’– DESCRIPTION πŸ’–

okay so the ifq_deq_* set of functions provides a non-atomic alternative to ifq_dequeue(9). 🫢

🚨 real talk: their use is discouraged β€” code should use ifq_dequeue(9) whenever possible. no cap.
  • ifq_deq_begin(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(). πŸ”’
  • 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. βœ…
  • ifq_deq_rollback(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. ↩️

🧚 CONTEXT 🧚

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

⭐ RETURN VALUES ⭐

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

πŸ¦‹ SEE ALSO πŸ¦‹

  • ifq_dequeue(9) πŸ‘€

xoxo, Debian πŸ’– β€” March 20, 2021 ✨

πŸ“¦ where this page comes from
  • nixpkgs unstable: cvs-export
  • πŸ’– girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms