ksz_port_get_apptrust(9)
π ksz_port_get_apptrust β the glow-up guide π
okay so bestie, this is a page from the Kernel API Manual (section 9, the kernel-functions one, iykyk) and it's literally all about ksz_port_get_apptrust. yes that's a mouthful, yes she's iconic, let's go β¨
πΈ NAME πΈ
ksz_port_get_apptrust β retrieves the apptrust selectors for a port on a KSZ switch π
like, it goes and gets the apptrust selectors. for a port. on a KSZ switch. that's the whole vibe fr fr.
β¨ SYNOPSIS β¨
int ksz_port_get_apptrust (struct dsa_switch *ds , int port , u8 *sel ,
int *nsel );
returns an int, takes four things, no cap π
π¦ ARGUMENTS π¦
dsβ pointer to the DSA switch structure. yes, the whole switch. she's the main character here πportβ the port number you want the apptrust selectors for. pick your fave port πselβ array where the apptrust selectors get stored. this is where the good stuff lands πnselβ number of apptrust selectors in the array. the headcount, basically π
π DESCRIPTION π
so what does she actually do? this function fetches the apptrust selectors for the specified port on a KSZ switch. that's it, that's the plot. short and slay β¨
π₯ RETURN π₯
0on success π- a negative error code on failure π (not me getting a negative error code)
π SEE ALSO π
the kernel file lives right here, go look at her:
./drivers/net/dsa/microchip/ksz_dcb.c
and here's the whole friend group, all of them, no skipping π«Ά
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_port_get_dscp_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_dcb_init_port(9)ksz_dcb_init(9)
ngl bestie, everything above is straight from the source β I didn't invent a single flag, value, or behaviour. if it's not on this page, it's not real π
π okay that's the whole page, mwah π β this one's from the kernel source tree at ./drivers/net/dsa/microchip, dated October 2026, filed under the Kernel API Manual as ksz_port_get_apptrust(9). go get those apptrust selectors, queen πβ¨π¦
π¦ 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