add_new_sla_entry(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ 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:

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