IFIQ_INPUT(9)

πŸ“¦ in nixpkgs unstable

🌸 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 in ml onto the ifiq interface 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 mbuf m onto the ifiq interface input queue and notify the network stack to process it. One mbuf, one little delivery, no drama 🫢
heads up: the synopsis names the param ifiq and the descriptions name it ifq β€” 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
  • πŸ’– girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms