ksz9477_vali...et_src_count(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’« ksz9477_vali...et_src_count β€” a Kernel API Manual moment ✨

ok so bestie, welcome to the Kernel API Manual entry for ksz9477_vali...et_src_count (yes the name is truncated in the header, no we're not gonna fix it, it's part of the vibe 😭). This one is a little validation baddie that lives in the KSZ9477 ACL code and it is, genuinely, doing the most. Let's get into it πŸ’…


🌸 NAME 🌸

ksz9477_validate_and_get_src_count β€” validates your source and destination indices and figures out how many source entries you actually have. lowkey the hype woman of ACL bookkeeping 🫢


✨ SYNOPSIS ✨

int ksz9477_validate_and_get_src_count (struct ksz_device *dev , int
port , int src_idx , int dst_idx , int *src_count , int *dst_count );

πŸŽ€ ARGUMENTS πŸŽ€

  • dev β€” pointer to the struct ksz_device. the main character struct, obviously πŸ‘‘
  • port β€” the port number on the KSZ device where these ACL entries are chilling.
  • src_idx β€” index of the starting ACL entry that needs to be validated. where the journey begins ✨
  • dst_idx β€” index of the destination where the source entries are intended to be moved. the goal, the dream, the target 🎯
  • src_count β€” pointer to the variable that will hold the number of contiguous source entries, but only if validation passes. no validation, no count, that's the deal πŸ’€
  • dst_count β€” pointer to the variable that will hold the number of contiguous destination entries, again only if validation passes. matching set, we love to see it πŸ’–

πŸ¦‹ DESCRIPTION πŸ¦‹

So what does this icon actually do? She performs validation on the source and destination indices you handed over for the ACL entries. First up: she checks whether those indices are within the valid range. Then she checks whether the source entries are contiguous β€” like, actually sitting next to each other, no gaps, no randoms in between 🧚

On top of that, the function makes sure there's adequate space at the destination for the source entries, and that the destination index isn't sitting right in the middle of a RuleSet. that last one is giving "do not interrupt, we're in a meeting" energy ngl πŸ™ˆ

If every single validation passes? Then she returns the number of contiguous source and destination entries, and everybody claps πŸ‘


πŸ”₯ RETURN πŸ”₯

0 on success πŸ’š otherwise a negative error code is returned if any validation check fails. it's giving pass/fail, no in-between 😌


🌈 SEE ALSO 🌈

Kernel file ./drivers/net/dsa/microchip/ksz9477_acl.c β€” go read the source bestie, it's right there πŸ“–


and that's the whole page, bestie πŸ’œ this icon comes to you from ./drivers/net/dsa/microchip, dated October 2026 β€” go forth and validate those indices, periodt 🌟

πŸ“¦ where this page comes from