STRUCT SEC_QUEUE(9)
π NAME π
struct sec_queue β literally all the tea about a HW queue π«β¨
πΈ SYNOPSIS πΈ
ok bestie, here's the whole struct, no cap, character for character:
struct sec_queue {
struct sec_dev_info *dev_info;
int task_irq;
char name[SEC_NAME_SIZE];
struct sec_queue_ring_cmd ring_cmd;
struct sec_queue_ring_cq ring_cq;
struct sec_queue_ring_db ring_db;
void __iomem *regs;
u32 queue_id;
bool in_use;
int expected;
unsigned long unprocessed[BITS_TO_LONGS( SEC_QUEUE_LEN)];
typeof(struct sec_request_el *) *softqueue;
bool havesoftqueue;
spinlock_t queuelock;
void *shadow[SEC_QUEUE_LEN];
};
π MEMBERS π
okay so here's the vibe check on every member the page actually spills about π
dev_infoβ the parent SEC device this queue belongs to. it's giving "who's your mom" energy πtask_irqβ the completion interrupt for the queue β‘nameβ a human-readable queue description, and it's also used as the irq name. dual-purpose icon πregsβ the iomapped device registers πΊοΈqueue_idβ the index of the queue, used for naming and resource selection π’in_useβ a flag that says whether the queue is in use. yes bestie, it's a flag that flags π©expectedβ the next expected element to finish, assuming we were in order. optimistic much πsoftqueueβ a software queue used when chaining requirements prevent direct use of the hardware queues π§havesoftqueueβ a flag to say we have a queue β because we may need one for the current mode π¦queuelockβ protects the soft queue from concurrent changes, so we avoid some potential loss of data races π (spinlock doing spinlock things, we stan)shadowβ pointers back to the shadow copy of the hardware ring element, needed because we can't store any context reference in thebdelement π
β¨ SEE ALSO β¨
go read these next, iykyk π
- Kernel file
./drivers/crypto/hisilicon/sec/sec_drv.hstruct sec_queue_ring_cmd(9)sec_alg_tfm_ctx(9)sec_request(9)sec_request_el(9)sec_hw_sge(9)sec_hw_sgl(9)sec_dev_info(9)
and that's the whole page, bestie π«Ά this lil gem lives in ./drivers/crypto/hisilicon/sec and it's dated October 2026 β struct sec_queue(9), 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