ksz9477_acl_port_enable(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… 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 β€” the ksz_device instance, 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 = Reserved
    • 01 = 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 πŸ“–


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