ieee8021q_tt_to_tc(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… ieee8021q_tt_to_tc β€” the kernel API manual, bestie edition ✨

Okay so picture this: it's a kernel API manual page, the function is ieee8021q_tt_to_tc, and it's here to do exactly one iconic thing β€” map your IEEE 802.1Q Traffic Type to a Traffic Class. That's it. That's the whole vibe. πŸŽ€


✨ NAME ✨

ieee8021q_tt_to_tc β€” Map IEEE 802.1Q Traffic Type to Traffic Class

Like, the name literally ate and left no crumbs. πŸ¦‹


🌸 SYNOPSIS 🌸

int ieee8021q_tt_to_tc (enum ieee8021q_traffic_type tt , unsigned int
num_queues );

Notice how we're returning an int, bestie β€” remember that, it's foreshadowing for the RETURN section. πŸ‘€


🫢 ARGUMENTS 🫢

  • tt β€” the IEEE 802.1Q Traffic Type. Yes, that's the whole description. She's minimal, she's mysterious, she's tt. πŸ’…
  • num_queues β€” the Number of queues. Also exactly what it sounds like. No cap. ✨

πŸ”₯ DESCRIPTION πŸ”₯

So what does this function actually do? It maps an IEEE 802.1Q Traffic Type to a Traffic Class (TC), and the mapping depends on how many queues are configured on the NIC. The way it picks the TC is based on the example that IEEE 802.1Q-2022 gives us in Annex I, "I.3 Traffic type to traffic class mapping", plus Table I-1, "Traffic type to traffic class mapping". So like, it's not vibes-based mapping, it's standards-based mapping. Very main character energy of it honestly. πŸ‘‘


πŸ’– RETURN πŸ’–

It returns the Traffic Class that corresponds to the Traffic Type you handed it β€” or, plot twist, a negative value if something goes wrong. 😭 So yeah, check your return value, bestie, that's the whole point of it being an int.

Lowkey important: a negative return means error. Don't just assume you got a valid TC, fr fr. πŸ™ˆ

πŸ‘‘ SEE ALSO πŸ‘‘

  • Kernel file ./net/core/ieee8021q_helpers.c β€” go read it, it's giving source code realness πŸ“‚
  • ietf_dscp_to_ieee8021q_tt(9) β€” the sibling function, iykyk 🌈

⭐ Alright bestie, that's the whole page. This little gem lives over in ./net/core, it's from October 2026, and it's brought to you by the Kernel API Manual. Slay, go map some traffic types responsibly. πŸ’œπŸ§šβ€β™€οΈ

πŸ“¦ where this page comes from