ksz9477_acl_..._rule_cfg_l2(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… 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 β€” If true, match the source MAC address; if false, 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 value
    • 10 = Comparison is performed only on the MAC Address value
    • 11 = 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 πŸ“–


✨ 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