libeth_xdpsq_num(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… libeth_xdpsq_num(9) β€” aka the "how many XDPSQs do we even need" girlie ✨

okay so bestie, welcome to the Kernel API Manual section 9 πŸŽ€ this one's a tiny little function but she's important, so let's get into it 🫢


✨ NAME ✨

libeth_xdpsq_num β€” she calculates the optimal number of XDPSQs for this device + sys πŸ”₯ no cap, that's the whole job.


🌸 SYNOPSIS 🌸

u32 libeth_xdpsq_num (u32 rxq , u32 txq , u32 max );

three little u32s go in, one u32 comes out, it's giving vending machine but make it kernel πŸ’€


πŸ¦‹ ARGUMENTS πŸ¦‹

  • rxq β€” the current number of active Rx queues, iykyk πŸ“₯
  • txq β€” the current number of active Tx queues, periodt πŸ“€
  • max β€” the maximum number of Tx queues, the literal ceiling bestie πŸ‘‘

πŸ’– DESCRIPTION πŸ’–

okay so here's the tea β˜•οΈ

Every RQ must have its own XDPSQ for XSk pairs β€” like, not optional, they're literally paired, main character energy πŸ’…

And every CPU must have its own XDPSQ for lockless sending (that's `XDP_TX`, and .ndo_xdp_xmit for the girlies taking notes ✍️).

Then you cap the maximum of these two with the number of SQs the device can have β€” minus the ones already used πŸ™ˆ like, sorry babe, the hardware has limits, that's just the vibe check.


⭐ RETURN ⭐

she returns the number of XDP Tx queues the device needs to use β€” that's it, that's the answer, slay πŸ’…πŸ’–


πŸ‘‘ SEE ALSO πŸ‘‘

the whole friend group, fr fr β€” from ./include/net/libeth/xdp.h:

heads up bestie: those two enum (anonymous)(9) entries are literally both named enum (anonymous) in the original, so yeah, two of them, don't @ me πŸ’€ they're staying exactly as written 🫢

🌈 and that's the page!! this little icon was shipped as part of the kernel source tree from ./include/net/libeth, dated October 2026, and she's serving Kernel API Manual realness from section 9 β€” go read the rest of the squad, muah πŸ’‹πŸ’– mwah ✨

πŸ“¦ where this page comes from