drivers/target/iscsi/cxgbit/cxgbit.h
Source file repositories/reference/linux-study-clean/drivers/target/iscsi/cxgbit/cxgbit.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/target/iscsi/cxgbit/cxgbit.h- Extension
.h- Size
- 8173 bytes
- Lines
- 352
- Domain
- Driver Families
- Bucket
- drivers/target
- Inferred role
- Driver Families: implementation source
- Status
- source implementation candidate
Why This File Exists
Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/mutex.hlinux/list.hlinux/spinlock.hlinux/idr.hlinux/completion.hlinux/netdevice.hlinux/sched.hlinux/pci.hlinux/dma-mapping.hlinux/inet.hlinux/wait.hlinux/kref.hlinux/timer.hlinux/io.hasm/byteorder.hnet/net_namespace.htarget/iscsi/iscsi_transport.hiscsi_target_parameters.hiscsi_target_login.ht4_regs.ht4_msg.hcxgb4.hcxgb4_uld.hl2t.hlibcxgb_ppm.hcxgbit_lro.h
Detected Declarations
struct cxgbit_npstruct cxgbit_sockstruct cxgbit_cmdstruct cxgbit_iso_infostruct cxgbit_skb_rx_cbstruct cxgbit_skb_tx_cbstruct np_infostruct cxgbit_list_headstruct cxgbit_devicestruct cxgbit_wr_waitstruct cxgbit_sock_commonstruct cxgbit_npstruct cxgbit_sockenum cxgbit_skcb_flagsenum cxgbit_cdev_flagsenum cxgbit_csk_stateenum cxgbit_csk_flagsfunction cxgbit_get_cdevfunction cxgbit_put_cdevfunction cxgbit_get_cskfunction cxgbit_put_cskfunction cxgbit_get_cnpfunction cxgbit_put_cnpfunction cxgbit_sock_reset_wr_listfunction cxgbit_sock_enqueue_wr
Annotated Snippet
struct cxgbit_cmd {
struct scatterlist sg;
struct cxgbi_task_tag_info ttinfo;
bool setup_ddp;
bool release;
};
#define CXGBIT_MAX_ISO_PAYLOAD \
min_t(u32, MAX_SKB_FRAGS * PAGE_SIZE, 65535)
struct cxgbit_iso_info {
u8 flags;
u32 mpdu;
u32 len;
u32 burst_len;
};
enum cxgbit_skcb_flags {
SKCBF_TX_NEED_HDR = (1 << 0), /* packet needs a header */
SKCBF_TX_FLAG_COMPL = (1 << 1), /* wr completion flag */
SKCBF_TX_ISO = (1 << 2), /* iso cpl in tx skb */
SKCBF_RX_LRO = (1 << 3), /* lro skb */
};
struct cxgbit_skb_rx_cb {
u8 opcode;
void *pdu_cb;
void (*backlog_fn)(struct cxgbit_sock *, struct sk_buff *);
};
struct cxgbit_skb_tx_cb {
u8 submode;
u32 extra_len;
};
union cxgbit_skb_cb {
struct {
u8 flags;
union {
struct cxgbit_skb_tx_cb tx;
struct cxgbit_skb_rx_cb rx;
};
};
struct {
/* This member must be first. */
struct l2t_skb_cb l2t;
struct sk_buff *wr_next;
};
};
#define CXGBIT_SKB_CB(skb) ((union cxgbit_skb_cb *)&((skb)->cb[0]))
#define cxgbit_skcb_flags(skb) (CXGBIT_SKB_CB(skb)->flags)
#define cxgbit_skcb_submode(skb) (CXGBIT_SKB_CB(skb)->tx.submode)
#define cxgbit_skcb_tx_wr_next(skb) (CXGBIT_SKB_CB(skb)->wr_next)
#define cxgbit_skcb_tx_extralen(skb) (CXGBIT_SKB_CB(skb)->tx.extra_len)
#define cxgbit_skcb_rx_opcode(skb) (CXGBIT_SKB_CB(skb)->rx.opcode)
#define cxgbit_skcb_rx_backlog_fn(skb) (CXGBIT_SKB_CB(skb)->rx.backlog_fn)
#define cxgbit_rx_pdu_cb(skb) (CXGBIT_SKB_CB(skb)->rx.pdu_cb)
static inline void *cplhdr(struct sk_buff *skb)
{
return skb->data;
}
enum cxgbit_cdev_flags {
CDEV_STATE_UP = 0,
CDEV_ISO_ENABLE,
CDEV_DDP_ENABLE,
};
#define NP_INFO_HASH_SIZE 32
struct np_info {
struct np_info *next;
struct cxgbit_np *cnp;
unsigned int stid;
};
struct cxgbit_list_head {
struct list_head list;
/* device lock */
spinlock_t lock;
};
struct cxgbit_device {
struct list_head list;
struct cxgb4_lld_info lldi;
struct np_info *np_hash_tab[NP_INFO_HASH_SIZE];
/* np lock */
Annotation
- Immediate include surface: `linux/mutex.h`, `linux/list.h`, `linux/spinlock.h`, `linux/idr.h`, `linux/completion.h`, `linux/netdevice.h`, `linux/sched.h`, `linux/pci.h`.
- Detected declarations: `struct cxgbit_np`, `struct cxgbit_sock`, `struct cxgbit_cmd`, `struct cxgbit_iso_info`, `struct cxgbit_skb_rx_cb`, `struct cxgbit_skb_tx_cb`, `struct np_info`, `struct cxgbit_list_head`, `struct cxgbit_device`, `struct cxgbit_wr_wait`.
- Atlas domain: Driver Families / drivers/target.
- Implementation status: source implementation candidate.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.