drivers/net/ethernet/netronome/nfp/bpf/fw.h
Source file repositories/reference/linux-study-clean/drivers/net/ethernet/netronome/nfp/bpf/fw.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/net/ethernet/netronome/nfp/bpf/fw.h- Extension
.h- Size
- 2515 bytes
- Lines
- 126
- Domain
- Driver Families
- Bucket
- drivers/net
- 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/bitops.hlinux/types.h../ccm.h
Detected Declarations
struct nfp_bpf_cap_tlv_funcstruct nfp_bpf_cap_tlv_adjust_headstruct nfp_bpf_cap_tlv_mapsstruct cmsg_reply_map_simplestruct cmsg_req_map_alloc_tblstruct cmsg_reply_map_alloc_tblstruct cmsg_req_map_free_tblstruct cmsg_reply_map_free_tblstruct cmsg_req_map_opstruct cmsg_reply_map_opstruct cmsg_bpf_eventenum bpf_cap_tlv_typeenum nfp_bpf_cmsg_status
Annotated Snippet
struct nfp_bpf_cap_tlv_func {
__le32 func_id;
__le32 func_addr;
};
struct nfp_bpf_cap_tlv_adjust_head {
__le32 flags;
__le32 off_min;
__le32 off_max;
__le32 guaranteed_sub;
__le32 guaranteed_add;
};
#define NFP_BPF_ADJUST_HEAD_NO_META BIT(0)
struct nfp_bpf_cap_tlv_maps {
__le32 types;
__le32 max_maps;
__le32 max_elems;
__le32 max_key_sz;
__le32 max_val_sz;
__le32 max_elem_sz;
};
/*
* Types defined for map related control messages
*/
/* BPF ABIv2 fixed-length control message fields */
#define CMSG_MAP_KEY_LW 16
#define CMSG_MAP_VALUE_LW 16
enum nfp_bpf_cmsg_status {
CMSG_RC_SUCCESS = 0,
CMSG_RC_ERR_MAP_FD = 1,
CMSG_RC_ERR_MAP_NOENT = 2,
CMSG_RC_ERR_MAP_ERR = 3,
CMSG_RC_ERR_MAP_PARSE = 4,
CMSG_RC_ERR_MAP_EXIST = 5,
CMSG_RC_ERR_MAP_NOMEM = 6,
CMSG_RC_ERR_MAP_E2BIG = 7,
};
struct cmsg_reply_map_simple {
struct nfp_ccm_hdr hdr;
__be32 rc;
};
struct cmsg_req_map_alloc_tbl {
struct nfp_ccm_hdr hdr;
__be32 key_size; /* in bytes */
__be32 value_size; /* in bytes */
__be32 max_entries;
__be32 map_type;
__be32 map_flags; /* reserved */
};
struct cmsg_reply_map_alloc_tbl {
struct cmsg_reply_map_simple reply_hdr;
__be32 tid;
};
struct cmsg_req_map_free_tbl {
struct nfp_ccm_hdr hdr;
__be32 tid;
};
struct cmsg_reply_map_free_tbl {
struct cmsg_reply_map_simple reply_hdr;
__be32 count;
};
struct cmsg_req_map_op {
struct nfp_ccm_hdr hdr;
__be32 tid;
__be32 count;
__be32 flags;
u8 data[];
};
struct cmsg_reply_map_op {
struct cmsg_reply_map_simple reply_hdr;
__be32 count;
__be32 resv;
u8 data[];
};
struct cmsg_bpf_event {
struct nfp_ccm_hdr hdr;
__be32 cpu_id;
Annotation
- Immediate include surface: `linux/bitops.h`, `linux/types.h`, `../ccm.h`.
- Detected declarations: `struct nfp_bpf_cap_tlv_func`, `struct nfp_bpf_cap_tlv_adjust_head`, `struct nfp_bpf_cap_tlv_maps`, `struct cmsg_reply_map_simple`, `struct cmsg_req_map_alloc_tbl`, `struct cmsg_reply_map_alloc_tbl`, `struct cmsg_req_map_free_tbl`, `struct cmsg_reply_map_free_tbl`, `struct cmsg_req_map_op`, `struct cmsg_reply_map_op`.
- Atlas domain: Driver Families / drivers/net.
- 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.