ksz9477_vali...et_src_count(9)
π« 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 thestruct 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 π
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_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)ksz9477_acl_match_process_l2(9)
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
- 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