ksz9477_acl_...h_process_l2(9)
π ksz9477_acl_...h_process_l2(9) β kernel API manual, but make it make sense
okay so bestie, this is a page from the Kernel API Manual and the star of the show is ksz9477_acl_match_process_l2. Yes the header on the tin says ksz9477_acl_...h_process_l2(9) but we all know who the main character is π
β¨ NAME β¨
ksz9477_acl_match_process_l2 β sets up Layer 2 ACL matching rules and processing rules. Like, both. At once. She's multitasking. π
πΈ SYNOPSIS πΈ
void ksz9477_acl_match_process_l2 (struct ksz_device *dev , int port ,
u16 ethtype , u8 *src_mac , u8 *dst_mac , unsigned long cookie , u32
prio );
Returns void, so she gives you nothing back β she just does the thing. No cap. π
π¦ ARGUMENTS π¦
Here's the whole squad you gotta pass in, fr fr:
devβ Pointer to theksz_device. This is the device herself, the whole vibe. π«Άportβ Port number. Which port? That one. Int. π₯ethtypeβ Ethernet type, as au16. It's giving "what kind of packet are we even talking about". β¨src_macβ Source MAC address (u8 *). Where it's coming from, iykyk. πdst_macβ Destination MAC address (u8 *). Where it's going. Iconic. π«cookieβ The cookie to associate with the entry (unsigned long). Not a real cookie π but okay.prioβ The priority of the entry (u32). Very important, obviously. π
π DESCRIPTION π
So what she actually does: this function sets up matching and processing rules for Layer 2 ACLs. Both halves of the job, one function, slay. π
And the one little caveat you must remember, bestie, because it changes how you build your entries:
Only one MAC per entry is supported. One. Single. MAC. Don't come in here trying to fit two. π
That's the whole thing β she's not subtle, she's just specific.
π SEE ALSO π
The whole extended friend group, in order, no one left out π«Ά:
- The kernel file itself:
./drivers/net/dsa/microchip/ksz9477_acl.c 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_enable(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)
β¨ and that's the whole page, bestie β¨ This little gem lives in ./drivers/net/dsa/microchip and it's dated October 2026 β so future-coded of her. Go set those L2 ACL rules, one MAC per entry, and slay. πππ¦πΈπ
π
π¦ 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