STRUCT SEC_QUEUE(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– 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 the bd element πŸ™ˆ

✨ SEE ALSO ✨

go read these next, iykyk πŸ’œ

  • Kernel file ./drivers/crypto/hisilicon/sec/sec_drv.h struct
  • 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