drivers/net/ethernet/intel/iavf/iavf_fdir.h
Source file repositories/reference/linux-study-clean/drivers/net/ethernet/intel/iavf/iavf_fdir.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/net/ethernet/intel/iavf/iavf_fdir.h- Extension
.h- Size
- 4081 bytes
- Lines
- 143
- 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
- No C-style include directives detected by the generator.
Detected Declarations
struct iavf_adapterstruct iavf_flex_wordstruct iavf_ipv4_addrsstruct iavf_ipv6_addrsstruct iavf_fdir_ethstruct iavf_fdir_ipstruct iavf_fdir_extrastruct iavf_fdir_fltrenum iavf_fdir_fltr_state_tenum iavf_fdir_flow_typefunction iavf_is_raw_fdir
Annotated Snippet
struct iavf_flex_word {
u16 offset;
u16 word;
};
struct iavf_ipv4_addrs {
__be32 src_ip;
__be32 dst_ip;
};
struct iavf_ipv6_addrs {
struct in6_addr src_ip;
struct in6_addr dst_ip;
};
struct iavf_fdir_eth {
__be16 etype;
};
struct iavf_fdir_ip {
union {
struct iavf_ipv4_addrs v4_addrs;
struct iavf_ipv6_addrs v6_addrs;
};
__be16 src_port;
__be16 dst_port;
__be32 l4_header; /* first 4 bytes of the layer 4 header */
__be32 spi; /* security parameter index for AH/ESP */
union {
u8 tos;
u8 tclass;
};
u8 proto;
};
struct iavf_fdir_extra {
u32 usr_def[IAVF_FLEX_WORD_NUM];
};
/* bookkeeping of Flow Director filters */
struct iavf_fdir_fltr {
enum iavf_fdir_fltr_state_t state;
struct list_head list;
enum iavf_fdir_flow_type flow_type;
struct iavf_fdir_eth eth_data;
struct iavf_fdir_eth eth_mask;
struct iavf_fdir_ip ip_data;
struct iavf_fdir_ip ip_mask;
struct iavf_fdir_extra ext_data;
struct iavf_fdir_extra ext_mask;
enum virtchnl_action action;
/* flex byte filter data */
u8 ip_ver; /* used to adjust the flex offset, 4 : IPv4, 6 : IPv6 */
u8 flex_cnt;
struct iavf_flex_word flex_words[IAVF_FLEX_WORD_NUM];
u32 flow_id;
u32 cls_u32_handle; /* for FDIR added via tc u32 */
u32 loc; /* Rule location inside the flow table */
u32 q_index;
struct virtchnl_fdir_add vc_add_msg;
};
static inline bool iavf_is_raw_fdir(struct iavf_fdir_fltr *fltr)
{
return !fltr->vc_add_msg.rule_cfg.proto_hdrs.count;
}
int iavf_validate_fdir_fltr_masks(struct iavf_adapter *adapter,
struct iavf_fdir_fltr *fltr);
int iavf_fill_fdir_add_msg(struct iavf_adapter *adapter, struct iavf_fdir_fltr *fltr);
void iavf_print_fdir_fltr(struct iavf_adapter *adapter, struct iavf_fdir_fltr *fltr);
bool iavf_fdir_is_dup_fltr(struct iavf_adapter *adapter, struct iavf_fdir_fltr *fltr);
int iavf_fdir_add_fltr(struct iavf_adapter *adapter,
struct iavf_fdir_fltr *fltr);
int iavf_fdir_del_fltr(struct iavf_adapter *adapter, bool is_raw, u32 data);
struct iavf_fdir_fltr *iavf_find_fdir_fltr(struct iavf_adapter *adapter,
bool is_raw, u32 data);
#endif /* _IAVF_FDIR_H_ */
Annotation
- Detected declarations: `struct iavf_adapter`, `struct iavf_flex_word`, `struct iavf_ipv4_addrs`, `struct iavf_ipv6_addrs`, `struct iavf_fdir_eth`, `struct iavf_fdir_ip`, `struct iavf_fdir_extra`, `struct iavf_fdir_fltr`, `enum iavf_fdir_fltr_state_t`, `enum iavf_fdir_flow_type`.
- 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.