get_next_free_node_id(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ get_next_free_node_id(9) ✨

okay bestie, welcome to the Kernel API Manual πŸ’… this one's short and sweet and it's giving "little helper function with main character energy" β€” no cap.


πŸŽ€ NAME πŸŽ€

get_next_free_node_id β€” literally finds the next free ID in the array of that node type πŸ¦‹

so like. the node type has an array. the array has IDs. some are taken. this function finds you a free one. that's the whole vibe. iykyk.


🌸 SYNOPSIS 🌸

int get_next_free_node_id (struct adf_rl *rl_data , struct rl_sla *sla
);

yes that's the whole signature, she's compact and she knows it ✨


πŸ’– ARGUMENTS πŸ’–

  • rl_data β€” pointer to the ratelimiting data structure 🫢 this is where all the rate-limiting info lives, like the group chat of the kernel
  • sla β€” pointer to the SLA object for which the ID is searched πŸ” like, "find me an ID for this one specifically"

πŸ‘‘ RETURN πŸ‘‘

bestie she returns an int and there are exactly two moods:

  • 0 : RL_[NODE_TYPE]_MAX β€” a correct ID πŸŽ‰ (yes the range is written with that [NODE_TYPE] placeholder, don't come for me, that's literally what the page says)
  • -ENOSPC β€” all slots of that type are in use πŸ˜­πŸ’€ every single one. gone. booked. no vacancy.
lowkey if you get -ENOSPC that's your cue to go touch grass and free up some slots fr fr 🌱

🌈 SEE ALSO 🌈

the kernel file in question lives at ./drivers/crypto/intel/qat/qat_common/adf_rl.c πŸ“ β€” yes, that's the whole path, she's long, she's iconic, she ate

and here's the whole friend group, all the homies, linked and accounted for:

find_parent(9), adf_rl_get_sla_arr_of_type(9), prepare_rp_ids(9), can_parent_afford_sla(9), can_node_afford_update(9), get_next_free_sla_id(9), add_new_sla_entry(9), add_update_sla(9), adf_rl_add_sla(9), adf_rl_update_sla(9), adf_rl_get_sla(9), adf_rl_get_capability_remaining(9), adf_rl_remove_sla(9), adf_rl_remove_sla_all(9)

like, that's a whole squad πŸ’œ read them, love them, cross-reference them.


✨ sign-off time ✨

this lil page comes from ./drivers/crypto/intel/qat/qat... (yes, truncated exactly like that, blame the footer) and it's dated October 2026 πŸ—“οΈ β€” future girlie behaviour honestly. anyway bestie, that's the page, go find those free node IDs, slay, periodt πŸ’…πŸŽ€πŸ¦‹

πŸ“¦ where this page comes from