STRUCT BNX2I_HBA(9)
π struct bnx2i_hba(9) π
okay so this is a page from the Kernel API Manual, bestie β literally the reference for struct bnx2i_hba, and we're gonna go through the whole thing together. no skimming, no skipping, we're doing all of it. grab a snack π
β¨ NAME β¨
struct bnx2i_hba β the bnx2i adapter structure. that's the vibe. it's giving "one struct to hold your whole HBA's life together" π
π SYNOPSIS π
here's the whole thing, character for character, no cap:
struct bnx2i_hba {
struct list_head link;
struct cnic_dev *cnic;
struct pci_dev *pcidev;
struct net_device *netdev;
void __iomem *regview;
resource_size_t reg_base;
u32 age;
unsigned long cnic_dev_type;
#define BNX2I_NX2_DEV_5706 0x0;
#define BNX2I_NX2_DEV_5708 0x1;
#define BNX2I_NX2_DEV_5709 0x2;
#define BNX2I_NX2_DEV_57710 0x3;
u32 mail_queue_access;
#define BNX2I_MQ_KERNEL_MODE 0x0;
#define BNX2I_MQ_KERNEL_BYPASS_MODE 0x1;
#define BNX2I_MQ_BIN_MODE 0x2;
unsigned long reg_with_cnic;
#define BNX2I_CNIC_REGISTERED 1;
unsigned long adapter_state;
#define ADAPTER_STATE_UP 0;
#define ADAPTER_STATE_GOING_DOWN 1;
#define ADAPTER_STATE_LINK_DOWN 2;
#define ADAPTER_STATE_INIT_FAILED 31;
unsigned int mtu_supported;
#define BNX2I_MAX_MTU_SUPPORTED 9000;
struct Scsi_Host *shost;
u32 max_sqes;
u32 max_rqes;
u32 max_cqes;
u32 num_ccell;
int ofld_conns_active;
wait_queue_head_t eh_wait;
int max_active_conns;
struct iscsi_cid_queue cid_que;
rwlock_t ep_rdwr_lock;
struct list_head ep_ofld_list;
struct list_head ep_active_list;
struct list_head ep_destroy_list;
char *mp_bd_tbl;
dma_addr_t mp_bd_dma;
char *dummy_buffer;
dma_addr_t dummy_buf_dma;
spinlock_t lock;
struct mutex net_dev_lock;
int hba_shutdown_tmo;
int conn_teardown_tmo;
int conn_ctx_destroy_tmo;
u16 pci_did;
u16 pci_vid;
u16 pci_sdid;
u16 pci_svid;
u16 pci_func;
u16 pci_devno;
u32 num_wqe_sent;
u32 num_cqe_rcvd;
u32 num_intr_claimed;
u32 link_changed_count;
u32 ipaddr_changed_count;
u32 num_sess_opened;
u32 num_conn_opened;
unsigned int ctx_ccell_tasks;
#ifdef CONFIG_32BIT;
spinlock_t stat_lock;
#endif;
struct bnx2i_stats_info bnx2i_stats;
struct iscsi_stats_info stats;
};
πΈ Members πΈ
okay this is the long part but honestly it's my favorite part. every single field, explained π
linkβ list head to link elements.cnicβ pointer to cnic device.pcidevβ pointer to pci dev.netdevβ pointer to netdev structure.regviewβ mapped PCI register space.ageβ age, incremented by every recovery.cnic_dev_typeβ cnic device type,5706/5708/5709/57710.mail_queue_accessβ mailbox queue access mode, applicable to5709only.reg_with_cnicβ indicates whether the device is register with CNIC.adapter_stateβ adapter state,UP,GOING_DOWN,LINK_DOWN.mtu_supportedβ Ethernet MTU supported.shostβ scsi host pointer.max_sqesβ SQ size.max_rqesβ RQ size.max_cqesβ CQ size.num_ccellβ number of command cells per connection.ofld_conns_activeβ active connection list.eh_waitβ wait queue for the endpoint to shutdown.max_active_connsβ max offload connections supported by this device.cid_queβ iscsi cid queue.ep_rdwr_lockβ read / write lock to synchronize various ep lists.ep_ofld_listβ connection list for pending offload completion.ep_active_listβ connection list for active offload endpoints.ep_destroy_listβ connection list for pending offload completion.mp_bd_tblβ BD table to be used with middle path requests.mp_bd_dmaβ DMA address ofmp_bd_tblmemory buffer.dummy_bufferβ Dummy buffer to be used with zero length scsicmd reqs.dummy_buf_dmaβ DMA address ofdummy_buffermemory buffer.lockβ lock to synchronize access to hba structure.hba_shutdown_tmoβ Timeout value to shutdown each connection.conn_teardown_tmoβ Timeout value to tear down each connection.conn_ctx_destroy_tmoβ Timeout value to destroy context of each connection.pci_didβ PCI device ID.pci_vidβ PCI vendor ID.pci_sdidβ PCI subsystem device ID.pci_svidβ PCI subsystem vendor ID.pci_funcβ PCI function number in system pci tree.pci_devnoβ PCI device number in system pci tree.num_wqe_sentβ statistic counter, total wqe's sent.num_cqe_rcvdβ statistic counter, total cqe's received.num_intr_claimedβ statistic counter, total interrupts claimed.link_changed_countβ statistic counter, num of link change notifications received.ipaddr_changed_countβ statistic counter, num times IP address changed while at least one connection is offloaded.num_sess_openedβ statistic counter, total num sessions opened.num_conn_openedβ statistic counter, total num conns opened on this hba.ctx_ccell_tasksβ captures number of ccells and tasks supported by currently offloaded connection, used to decode context memory.stat_lockβ spin lock used by the statistic collector (32 bit).statsβ local iSCSI statistic collection place holder.
ngl, net_dev_lock is in the struct but the member list doesn't give it a blurb β so we're not making one up. we respect the source π
π¦ Description π¦
Adapter Data Structure. that's it, that's the description. short and iconic, honestly π
π SEE ALSO π
go look at these, bestie β they're all in the Kernel file ./drivers/scsi/bnx2i/bnx2i.h:
struct generic_pdu_resc(9)struct bd_resc_page(9)struct io_bdt(9)struct bnx2i_conn(9)struct iscsi_cid_queue(9)struct qp_info(9)struct bnx2i_endpoint(9)
and that's the whole page, periodt π this one came from ./drivers/scsi/bnx2i and it's dated October 2026 β so yeah, shoutout to that source and that date, they ate and left no crumbs π«Άβ¨
π¦ 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