ksz9477_acl_port_enable(9)
π
ksz9477_acl_port_enable(9) β the Kernel API Manual edition π
okay so bestie, welcome to the glow-up of ksz9477_acl_port_enable(9), straight out of the Kernel API Manual β¨ this one's a single function, she's cute, she's focused, and she's here to turn on ACL vibes for exactly one port. let's get into it π¦
β¨ NAME β¨
ksz9477_acl_port_enable β literally just enables ACL functionality on a given port. that's it. that's the whole job π
πΈ SYNOPSIS πΈ
int ksz9477_acl_port_enable (struct ksz_device *dev , int port );
π ARGUMENTS π
devβ theksz_deviceinstance, aka the whole device situation we're working with π«Άportβ the port number where you want ACL functionality switched on π₯
π DESCRIPTION π
So what she actually does: this function enables ACL functionality on the port you specified by configuring the appropriate control registers. Returns 0 if it worked, or a negative error code if something goes sideways π
Now the fun part β the registers. buckle up π
0xn801 β KSZ9477S 5.2.8.2 Port Priority Control Register
- Bit 7 β Highest Priority
- Bit 6 β OR'ed Priority
- Bit 4 β MAC Address Priority Classification
- Bit 3 β VLAN Priority Classification
- Bit 2 β 802.1p Priority Classification
- Bit 1 β Diffserv Priority Classification
- Bit 0 β ACL Priority Classification
The current driver implementation sets 802.1p priority classification by default. In this function we add ACL priority classification with OR'ed priority. And per testing? Priority set by ACL will supersede the 802.1p priority. no cap, ACL wins π
0xn803 β KSZ9477S 5.2.8.4 Port Authentication Control Register
- Bit 2 β Access Control List (ACL) Enable
- Bits 1:0 β Authentication Mode
00= Reserved01= Block Mode. Authentication is enabled. When ACL is enabled, all traffic that misses the ACL rules is blocked; otherwise ACL actions apply.10= Pass Mode. Authentication is disabled. When ACL is enabled, all traffic that misses the ACL rules is forwarded; otherwise ACL actions apply.11= Trap Mode. Authentication is enabled. All traffic is forwarded to the host port. When ACL is enabled, all traffic that misses the ACL rules is blocked; otherwise ACL actions apply.
In this function we're using Pass Mode π§ (mode 10, authentication disabled, misses get forwarded β very chill of her honestly)
β RETURN β
0 if the operation is successful, or a negative error code if an error occurs. that's the whole vibe check π
π SEE ALSO π
Kernel file ./drivers/net/dsa/microchip/ksz9477_acl.c β go read the source, iykyk π
ksz9477_dump_acl_index(9)ksz9477_dump_acl(9)ksz9477_acl_is_valid_matching_rule(9)ksz9477_acl_get_cont_entr(9)ksz9477_acl_update_linkage(9)ksz9477_validate_and_get_src_count(9)ksz9477_move_entries_downwards(9)ksz9477_move_entries_upwards(9)ksz9477_acl_move_entries(9)ksz9477_get_next_block_start(9)ksz9477_swap_acl_blocks(9)ksz9477_sort_acl_entr_no_back(9)ksz9477_sort_acl_entries(9)ksz9477_acl_wait_ready(9)ksz9477_acl_entry_write(9)ksz9477_acl_port_disable(9)ksz9477_acl_write_list(9)ksz9477_acl_remove_entries(9)ksz9477_port_acl_init(9)ksz9477_port_acl_free(9)ksz9477_acl_set_reg(9)ksz9477_acl_matching_rule_cfg_l2(9)ksz9477_acl_action_rule_cfg(9)ksz9477_acl_processing_rule_set_action(9)ksz9477_acl_processing_rule_add_match(9)ksz9477_acl_get_init_entry(9)ksz9477_acl_match_process_l2(9)
and that's the page, bestie π«Ά this little icon dropped from ./drivers/net/dsa/microchip, dated October 2026, and she's filed under ksz9477_acl_port_enable(9) β go enable some ACLs, slay, periodt π
β¨πΈ
π¦ 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