ksz_port_get_dscp_prio(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… ksz_port_get_dscp_prio(9) β€” like, the Kernel API Manual era of my life ✨

okay so bestie, gather round, because this one is a little function from the Kernel API Manual that does exactly one thing and does it slay πŸ’–


🌸 NAME 🌸

ksz_port_get_dscp_prio β€” she retrieves the priority for a DSCP value on a KSZ switch. no cap, that's the whole job πŸŽ€


✨ SYNOPSIS ✨

int ksz_port_get_dscp_prio (struct dsa_switch *ds , int port , u8 dscp
);

like yes, that's the signature, copy it exactly please, we do not freestyle function signatures in this house πŸ™ˆ


πŸ¦‹ ARGUMENTS πŸ¦‹

  • ds β€” pointer to the DSA switch structure. she's the main character, everything goes through her πŸ‘‘
  • port β€” the port number you want the priority for. which port, bestie? this port πŸ’…
  • dscp β€” the DSCP value you want the priority for. a u8, so keep it cute and in range 🌈

πŸ’œ DESCRIPTION πŸ’œ

so what she actually does: this function fetches the priority value from the switch global DSCP-to-priority mapping table, for the DSCP value you specified. that's it. that's the vibe check. one lookup, one answer, iconic behaviour honestly ⭐

it's the global table, not some per-port situation β€” she's reading the shared one, iykyk πŸ”₯

🫢 RETURN 🫢

  • on success: the priority value for the DSCP. slay πŸ’–
  • on failure: a negative error code. so if you get a negative number back, that's not a priority, that's a problem, okay? check it 😭

🧚 SEE ALSO 🧚

like, the whole friend group, fr fr 🫢


and that's the page!! πŸ’€ source lives at ./drivers/net/dsa/microchip, dated October 2026, and the header up top is ofc ksz_port_get_dscp_prio(9) from the Kernel API Manual β€” mwah, bye bestie, go read your man pages πŸ’…βœ¨

πŸ“¦ where this page comes from