ksz9477_acl_..._rule_cfg_l2(9)
π NAME π
ksz9477_acl_matching_rule_cfg_l2 β the function that sets up an ACL filtering entry so it matches Layer 2 types of Ethernet frames. (And yes bestie, we're in the ksz9477_acl_..._rule_cfg_l2(9) page of the Kernel API Manual, so buckle up π)
β¨ SYNOPSIS β¨
void ksz9477_acl_matching_rule_cfg_l2 (u8 *entry , u16 ethertype , u8
*eth_addr , bool is_src );
π«Ά ARGUMENTS π«Ά
entryβ Pointer to the ACL entry buffer. This is the lil canvas you're painting on π¨ethertypeβ The Ethertype value, periodt.eth_addrβ Pointer to the Ethernet address. She's the MAC in question πis_srcβ Iftrue, match the source MAC address; iffalse, match the destination MAC address. Choose your fighter π₯
πΈ DESCRIPTION πΈ
Okay so here's the tea: this function configures an Access Control List (ACL) filtering entry to match Layer 2 types of Ethernet frames, based on the ethertype and Ethernet address you hand it. And on top of that, it can match either the source or destination MAC address, depending on whatever is_src is giving π
π¦ Register Descriptions for MD = 01 and ENB != 00 (Layer 2 MAC header filtering) π¦
0x01 β Mode and Enable
- Bits 5:4 β MD (Mode) β
01= Layer 2 MAC header or counter filtering - Bits 3:2 β ENB (Enable)
01= Comparison is performed only on the TYPE value10= Comparison is performed only on the MAC Address value11= Both the MAC Address and TYPE are tested
- Bit 1 β S/D (Source / Destination) β
0= Destination address,1= Source address - Bit 0 β EQ (Equal / Not Equal) β
0= Not Equal produces true result,1= Equal produces true result
0x02-0x07 β MAC Address
0x02β MAC Address [47:40]0x03β MAC Address [39:32]0x04β MAC Address [31:24]0x05β MAC Address [23:16]0x06β MAC Address [15:8]0x07β MAC Address [7:0]
0x08-0x09 β EtherType
0x08β EtherType [15:8]0x09β EtherType [7:0]
π₯ SEE ALSO π₯
Kernel file ./drivers/net/dsa/microchip/ksz9477_acl.c β like, literally go read it, 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_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_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)
β¨ that's the whole page bestie, no cap β¨ This lil masterpiece lives in ./drivers/net/dsa/microchip, dated October 2026, and it's the ksz9477_acl_..._rule_cfg_l2(9) page β slay, go configure some ACLs πππ¦
π¦ 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