adf_fw_counters_get(9)
π adf_fw_counters_get β bestie's guide to snagging them FW counters
okay so real talk, this is adf_fw_counters_get from the Kernel API Manual, and it's lowkey iconic. Sit down, grab a strawberry drink π, and let's get into it.
β¨ NAME β¨
adf_fw_counters_get β returns the FW counters for the device you hand it. that's the whole vibe. π
π¦ SYNOPSIS π¦
struct adf_fw_counters * adf_fw_counters_get (struct adf_accel_dev
*accel_dev );
πΈ ARGUMENTS πΈ
accel_devβ a pointer to a QAT acceleration device. that's it, that's the whole input, she's low maintenance fr fr π
π DESCRIPTION π
so what she does is: she allocates and returns a table of counters π and that table is full of execution statistics for every non-admin AE that's available through the acceleration device you passed in. not the admin ones. the non-admin ones. iykyk.
β οΈ and here's the part where you need to pay attention, bestie β the caller becomes the owner of that memory. yes, YOU. it's yours now. which means you are responsible for deallocating it, and the way you do that is by calling kfree. don't just walk away from it, that's not main character energy, that's a leak π
β RETURN β
- on success: a pointer to a dynamically allocated
struct adf_fw_countersπ₯ - on error: a negative value π
so like, vibe check the return before you use it, obviously.
π SEE ALSO π
- Kernel file
./drivers/crypto/intel/qat/qat_common/adf_fw_counters.c adf_fw_counters_dbgfs_add(9)adf_fw_counters_dbgfs_rm(9)
and that's the page, periodt π«Ά this lil kernel API manual moment came from ./drivers/crypto/intel/qat/qat... and it's dated October 2026 β go off, calendar icon β¨π§
π¦ 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