add_new_sla_entry(9)
β¨ add_new_sla_entry(9) β¨
ok so this is a page from the Kernel API Manual and honestly? it's giving "tiny function, big responsibilities" π like it's literally the first step of the whole SLA journey. buckle up bestie, we're reading it together π
πΈ NAME πΈ
add_new_sla_entry β creates a new SLA object and fills it with user data
likeβ¦ that's the whole vibe. you make it, you fill it, you're done. iconic behavior, no notes π
π¦ SYNOPSIS π¦
int add_new_sla_entry (struct adf_accel_dev *accel_dev , struct
adf_rl_sla_input_data *sla_in , struct rl_sla **sla_out );
three arguments, one int coming back at you. that's the whole handshake π€
β ARGUMENTS β
accel_devβ pointer to acceleration device structure. this is the device the whole show is happening on, so pls know which one you're dealing with π«Άsla_inβ pointer to user input data for a new SLA. all the raw deets you're feeding in live here β¨sla_outβ pointer to a variable that will contain the address of a new SLA object if the operation succeeds. lowkey the most important word in that sentence is if β if it works, you get the address; if it doesn't, don't go dereferencing anything π
π RETURN π
the function hands back an int, and here's the whole menu of what you might get:
0β ok. slay. we love a success π-ENOMEMβ memory allocation failed. the allocation said "not today" π-EINVALβ invalid user input. bestieβ¦ check your inputs, respectfully π-ENOSPCβ all available SLAs are in use. you're at the limit, no cap, there's genuinely no room left π
ngl, -ENOSPC is the sneaky one β it's not your input being wrong, the pool is just full. don't go debugging your struct when the real answer is "wait for someone to free something up".
π₯ SEE ALSO π₯
go read the source, it's literally right here in the kernel tree:
- Kernel file
./drivers/crypto/intel/qat/qat_common/adf_rl.c
and the whole friend group of related functions, all in the (9) section:
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)get_next_free_node_id(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 is a squad right there β add_new_sla_entry is not doing this alone and you should def read the neighbours π§
π the sign-off π
this page lives at ./drivers/crypto/intel/qat/qat... (yes the path got cut off, that's just how the footer is, don't come for me π) and it's stamped October 2026 β future-dated manual page, main character energy fr fr β
anyway mwah, go write some correct kernel code, drink water, and remember: sla_out is only valid on success ππ«Ά
π¦ 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