ksz_port_get_dscp_prio(9)
π 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. au8, 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 π§
- Kernel file
./drivers/net/dsa/microchip/ksz_dcb.cβ go read the source, it's giving homework but make it cute π ksz_get_dscp_prio_reg(9)ksz_get_apptrust_map_and_reg(9)ksz_port_get_default_prio(9)ksz_port_set_default_prio(9)ksz_set_global_dscp_entry(9)ksz_init_global_dscp_map(9)ksz_port_add_dscp_prio(9)ksz_port_del_dscp_prio(9)ksz_apptrust_error(9)ksz_port_set_apptrust_validate(9)ksz_port_set_apptrust(9)ksz_port_get_apptrust(9)ksz_dcb_init_port(9)ksz_dcb_init(9)
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
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms