IFIQ_INPUT(9)
πΈ IFIQ_INPUT(9) β ok bestie, welcome to the ifiqueue manual page πΈ
It's the Kernel Developer's Manual entry, and today we're talking about the network interface input queue (the ifiqueue) API. Yes, that's a real word, yes it's spelled like that, and yes you're gonna slay it.
β¨ NAME β¨
ifiq_input, ifiq_enqueue β the network interface input queue (ifiqueue) API π
π¦ SYNOPSIS π¦
#include <net/if_var.h>
int
ifiq_input(struct ifiqueue *ifiq, struct mbuf_list *ml);
void
ifiq_enqueue(struct ifiqueue *ifiq, struct mbuf *m);
π DESCRIPTION π
So the network interface input queue (ifiqueue) API is literally just a little set of functions that lets network drivers queue up received packets so the network stack can go process them. That's it. That's the whole vibe. It's giving "hand off the mail and let someone else sort it" π¬
ifiq_input(struct ifiqueue *ifq, struct mbuf_list *ml)β Enqueue the whole list of mbufs inmlonto theifiqinterface input queue, then notify the network stack so it comes and processes them. And if the queue is like "nope, rejecting these" β those packets get freed and counted as drops. RIP to them πifiq_enqueue(struct ifiqueue *ifq, struct mbuf *m)β Enqueue the single mbufmonto theifiqinterface input queue and notify the network stack to process it. One mbuf, one little delivery, no drama π«Ά
heads up: the synopsis names the paramifiqand the descriptions name itifqβ that's how the original rolls, don't come for me π
π CONTEXT π
ifiq_input() and ifiq_enqueue() are flexible like that β you can call them during autoconf, from process context, or from interrupt context. Three whole scenarios, iconic behavior honestly π
π₯ RETURN VALUES π₯
ifiq_input() returns a non-zero value if mbufs are getting queued too rapidly for the stack to process. Basically the stack is overwhelmed and it's telling you so π
If possible, the caller should attempt to reduce the number of mbufs being generated in the future. Like, chill a little. For example: if mbufs are being received from hardware managed with the interface RX ring API, you can call if_rxr_livelocked(9) to indicate to the hardware that backpressure is required. That's the move π«‘
π SEE ALSO π
if_rxr_livelocked(9)
π the cute sign-off π
That's the whole page, bestie! This one's from Debian, dated March 31, 2022 β so it's vintage at this point π Go forth and queue your mbufs responsibly β¨π§
π¦ where this page comes from
- nixpkgs unstable: cvs-export
- Copyright (c) 2020 David Gwynne <dlg@openbsd.org>
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms