STRUCT IWL_RXQ(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ struct iwl_rxq(9) ✨

okay so bestie, welcome to the Kernel API Manual, section 9, and today's main character is struct iwl_rxq β€” literally "Rx queue" πŸ’… this is the whole vibe, the receive queue struct, and yes we're gonna go through every single field because that's just how we do it here 🫢


✨ NAME ✨

struct iwl_rxq β€” Rx queue πŸ‘‘


πŸ¦‹ SYNOPSIS πŸ¦‹

struct iwl_rxq {
    int id;
    void *bd;
    dma_addr_t bd_dma;
    void *used_bd;
    dma_addr_t used_bd_dma;
    u32 read;
    u32 write;
    u32 free_count;
    u32 used_count;
    u32 write_actual;
    u32 queue_size;
    struct list_head rx_free;
    struct list_head rx_used;
    bool need_update, next_rb_is_fragment;
    void *rb_stts;
    dma_addr_t rb_stts_dma;
    spinlock_t lock;
    struct napi_struct napi;
    struct iwl_rx_mem_buffer *queue[RX_QUEUE_SIZE];
 };

like, look at her. fully iconic. no notes. πŸ’–


πŸŽ€ Members πŸŽ€

bestie, let's go one by one, no skipping, we don't do skipping here ⭐

  • id β€” the queue index. that's her number, her little ID card 🌸
  • bd β€” the driver's pointer to the buffer of receive buffer descriptors (rbd). important detail alert: the address size is 32 bit in pre-9000 devices and 64 bit in 9000 devices. and in AX210 devices, it's a pointer to a list of iwl_rx_transfer_desc's πŸ‘€
  • bd_dma β€” bus address of buffer of receive buffer descriptors (rbd) πŸ¦‹
  • used_bd β€” the driver's pointer to the buffer of used receive buffer descriptors (rbd)
  • used_bd_dma β€” physical address of buffer of used receive buffer descriptors (rbd) ✨
  • read β€” shared index to newest available Rx buffer πŸ‘‘
  • write β€” shared index to oldest written Rx packet πŸ’œ
  • free_count β€” number of pre-allocated buffers in rx_free πŸ“
  • used_count β€” number of RBDs handled to allocator to use for allocation
  • write_actual β€” …so the source literally leaves this one blank πŸ™ˆ iconic mysterious silence, she said nothing and left, no description provided, we respect it
  • queue_size β€” size of this queue πŸ’…
  • rx_free β€” list of RBDs with allocated RB ready for use 🌈
  • rx_used β€” list of RBDs with no RB attached πŸ’€
  • need_update β€” flag to indicate we need to update read/write index πŸ”₯
  • next_rb_is_fragment β€” indicates that the previous RB that we handled set the fragmented flag, so the next one is still another fragment 🧚
  • rb_stts β€” the driver's pointer to receive buffer status ⭐
  • rb_stts_dma β€” bus address of receive buffer status 🌸
  • lock β€” per-queue lock πŸ”’
  • napi β€” NAPI struct for this queue πŸŽ€
  • queue β€” the actual rx queue. not used for multi-rx queue. 🫢

πŸ’– NOTE πŸ’–

rx_free and rx_used are used as a FIFO for iwl_rx_mem_buffers β€” yes bestie, first in first out, she's orderly like that πŸ’…


🌟 SEE ALSO 🌟

  • Kernel file ./drivers/net/wireless/intel/iwlwifi/pcie/gen1_2/internal.h
  • struct iwl_rx_mem_buffer(9)
  • struct iwl_rx_transfer_desc(9)
  • struct iwl_rx_completion_desc(9)
  • struct iwl_rx_completion_desc_bz(9)
  • struct iwl_rb_allocator(9)
  • iwl_get_closed_rb_stts(9)
  • enum iwl_fw_mon_dbgfs_state(9)
  • enum iwl_shared_irq_flags(9)
  • enum iwl_image_response_code(9)
  • struct cont_rec(9)
  • enum iwl_pcie_imr_status(9)
  • struct iwl_txq(9)
  • struct iwl_pcie_txqs(9)
  • struct iwl_trans_pcie(9)
  • iwl_txq_inc_wrap(9)
  • iwl_txq_dec_wrap(9)

like, go read them all, i'll wait 🫢✨


and that's the whole page, bestie!! source path clipped down to ./drivers/net/wireless/intel/i..., dated October 2026, and it's struct iwl_rxq(9) β€” that's the Kernel API Manual, section 9, mwah πŸ’‹ periodt πŸŽ€πŸ¦‹πŸ’–

πŸ“¦ where this page comes from