netif_setup_tc(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ NAME ✨

Okay so, bestie, welcome to the Kernel API Manual page for netif_setup_tc(9) β€” yes, the (9) means kernel API, iykyk. πŸ’… This one is all about handling tc mappings on a real_num_tx_queues change. Lowkey iconic, highkey important. πŸŽ€


πŸŽ€ SYNOPSIS πŸŽ€

Here's the signature, no cap β€” copy it exactly:

void netif_setup_tc (struct net_device *dev , unsigned int txq );

πŸ¦‹ ARGUMENTS πŸ¦‹

  • dev β€” the network device. Your main character struct, fr fr. 🌐
  • txq β€” the number of queues available. The queue count, bestie. 🎟️

🌸 DESCRIPTION 🌸

Okay so here's the tea. If real_num_tx_queues changes, the tc mappings may no longer be valid. Not cute. 😭 To resolve this, the function verifies that the tc mapping remains valid and, if it doesn't, it NULLs the mapping. Periodt. πŸ’…

With no priorities mapping to this offset/count pair, it will no longer be used. Simple as that. πŸ¦‹

🚨 worst case alert: TC0 is invalid and nothing can be done β€” so priority mappings get disabled. Not a slay, but it's what happens. πŸ’€

It's expected that drivers will fix this mapping if they can before calling netif_set_real_num_tx_queues. So do your homework first, bestie. πŸ“šβœ¨


🌈 SEE ALSO 🌈

This is the part where I hold your hand and we go through the whole friend group. Not one link left behind, no cap. The kernel file is ./net/core/dev.c, and here's every single reference:


Source/version check: this page is from ./net/core, dated October 2026. That's the footer, bestie β€” and that's the whole page. You ate. πŸ’…βœ¨

πŸ“¦ where this page comes from