netdev_cap_txqueue(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… netdev_cap_txqueue(9) β€” from the Kernel API Manual ✨

okay bestie, welcome to the kernel API manual, this is the page for netdev_cap_txqueue(9) and honestly it's a little baddie with one job. let's get into it 🫢


🌸 NAME 🌸

netdev_cap_txqueue β€” check if selected tx queue exceeds device queues πŸ’…

like literally it's the vibe check for your queue index, no cap.


⭐ SYNOPSIS ⭐

u16 netdev_cap_txqueue (struct net_device *dev , u16 queue_index );

look at her. two arguments. returning a u16. main character energy fr πŸ”₯


πŸŽ€ ARGUMENTS πŸŽ€

  • dev β€” the network device πŸ–₯️ like the actual NIC situation we're looking at.
  • queue_index β€” the given tx queue index πŸ’« the number somebody handed you and was like "is this valid". we're about to find out.

πŸ’– DESCRIPTION πŸ’–

okay so here's the whole lore, and it's genuinely so simple:

  • if the given tx queue index is >= the number of device tx queues, this function returns 0 πŸ’€
  • otherwise, it returns the originally passed tx queue index, untouched, unbothered, exactly as it came in πŸ‘‘

that's it. that's the function. she checks, she clamps, she slays. no cap, no extra steps, no drama. ✨


πŸ¦‹ SEE ALSO πŸ¦‹

Kernel file ./include/linux/netdevice.h, plus a whole group chat of friends:

iykyk, that's a whole friend group and they all ate πŸ’…


and that's the page!! mwah πŸ’‹ this one lives in ./include/linux, and it's dated October 2026, and yes the header up top really is netdev_cap_txqueue(9) β€” so go forth, clamp your queues, and remember: when in doubt, 0. periodt. πŸŽ€πŸŒŸπŸ‘‘

πŸ“¦ where this page comes from