drivers/net/ethernet/intel/i40e/i40e.h
Source file repositories/reference/linux-study-clean/drivers/net/ethernet/intel/i40e/i40e.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/net/ethernet/intel/i40e/i40e.h- Extension
.h- Size
- 45238 bytes
- Lines
- 1438
- 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.
- Touches IRQ or DMA behavior; this matters for the representative real-device path.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/linkmode.hlinux/pci.hlinux/ptp_clock_kernel.hlinux/types.hlinux/avf/virtchnl.hlinux/net/intel/i40e_client.hnet/devlink.hnet/pkt_cls.hnet/udp_tunnel.hi40e_dcb.hi40e_debug.hi40e_devlink.hi40e_io.hi40e_prototype.hi40e_register.hi40e_txrx.h
Detected Declarations
struct i40e_lump_trackingstruct i40e_rx_flow_userdefstruct i40e_fdir_filterstruct i40e_cloud_filterstruct i40e_tc_infostruct i40e_tc_configurationstruct i40e_udp_port_configstruct i40e_flex_pitstruct i40e_fwd_adapterstruct i40e_channelstruct i40e_ptp_pins_settingsstruct i40e_pfstruct i40e_mac_filterstruct i40e_new_mac_filterstruct i40e_vebstruct i40e_vsistruct i40e_netdev_privstruct i40e_q_vectorstruct i40e_deviceenum i40e_stateenum i40e_vsi_stateenum i40e_pf_flagsenum i40e_interrupt_policyenum i40e_fd_stat_idxenum i40e_filter_statefunction i40e_is_channel_macvlanfunction __i40e_pf_next_vsifunction __i40e_pf_next_vebfunction i40e_addr_to_hkeyfunction i40e_info_nvm_verfunction i40e_info_eetrackfunction i40e_info_civd_verfunction i40e_vsi_setup_irqhandlerfunction i40e_get_fd_cnt_allfunction i40e_read_fd_input_setfunction i40e_write_fd_input_setfunction i40e_get_pf_countfunction i40e_find_vsi_by_typefunction i40e_dbg_pf_initfunction i40e_irq_dynamic_enablefunction i40e_is_sw_dcbfunction i40e_enabled_xdp_vsifunction i40e_is_tc_mqprio_enabledfunction i40e_pf_get_vsi_by_seidfunction i40e_pf_get_veb_by_seidfunction i40e_get_max_num_descriptors
Annotated Snippet
struct i40e_lump_tracking {
u16 num_entries;
u16 list[];
#define I40E_PILE_VALID_BIT 0x8000
#define I40E_IWARP_IRQ_PILE_ID (I40E_PILE_VALID_BIT - 2)
};
#define I40E_DEFAULT_ATR_SAMPLE_RATE 20
#define I40E_FDIR_MAX_RAW_PACKET_SIZE 512
#define I40E_FDIR_BUFFER_FULL_MARGIN 10
#define I40E_FDIR_BUFFER_HEAD_ROOM 32
#define I40E_FDIR_BUFFER_HEAD_ROOM_FOR_ATR (I40E_FDIR_BUFFER_HEAD_ROOM * 4)
#define I40E_HKEY_ARRAY_SIZE ((I40E_PFQF_HKEY_MAX_INDEX + 1) * 4)
#define I40E_HLUT_ARRAY_SIZE ((I40E_PFQF_HLUT_MAX_INDEX + 1) * 4)
#define I40E_VF_HLUT_ARRAY_SIZE ((I40E_VFQF_HLUT1_MAX_INDEX + 1) * 4)
enum i40e_fd_stat_idx {
I40E_FD_STAT_ATR,
I40E_FD_STAT_SB,
I40E_FD_STAT_ATR_TUNNEL,
I40E_FD_STAT_PF_COUNT
};
#define I40E_FD_STAT_PF_IDX(pf_id) ((pf_id) * I40E_FD_STAT_PF_COUNT)
#define I40E_FD_ATR_STAT_IDX(pf_id) \
(I40E_FD_STAT_PF_IDX(pf_id) + I40E_FD_STAT_ATR)
#define I40E_FD_SB_STAT_IDX(pf_id) \
(I40E_FD_STAT_PF_IDX(pf_id) + I40E_FD_STAT_SB)
#define I40E_FD_ATR_TUNNEL_STAT_IDX(pf_id) \
(I40E_FD_STAT_PF_IDX(pf_id) + I40E_FD_STAT_ATR_TUNNEL)
/* The following structure contains the data parsed from the user-defined
* field of the ethtool_rx_flow_spec structure.
*/
struct i40e_rx_flow_userdef {
bool flex_filter;
u16 flex_word;
u16 flex_offset;
};
struct i40e_fdir_filter {
struct hlist_node fdir_node;
/* filter ipnut set */
u8 flow_type;
u8 ipl4_proto;
/* TX packet view of src and dst */
__be32 dst_ip;
__be32 src_ip;
__be32 dst_ip6[4];
__be32 src_ip6[4];
__be16 src_port;
__be16 dst_port;
__be32 sctp_v_tag;
__be16 vlan_etype;
__be16 vlan_tag;
/* Flexible data to match within the packet payload */
__be16 flex_word;
u16 flex_offset;
bool flex_filter;
/* filter control */
u16 q_index;
u8 flex_off;
u8 pctype;
u16 dest_vsi;
u8 dest_ctl;
u8 fd_status;
u16 cnt_index;
u32 fd_id;
};
#define I40E_CLOUD_FIELD_OMAC BIT(0)
#define I40E_CLOUD_FIELD_IMAC BIT(1)
#define I40E_CLOUD_FIELD_IVLAN BIT(2)
#define I40E_CLOUD_FIELD_TEN_ID BIT(3)
#define I40E_CLOUD_FIELD_IIP BIT(4)
#define I40E_CLOUD_FILTER_FLAGS_OMAC I40E_CLOUD_FIELD_OMAC
#define I40E_CLOUD_FILTER_FLAGS_IMAC I40E_CLOUD_FIELD_IMAC
#define I40E_CLOUD_FILTER_FLAGS_IMAC_IVLAN (I40E_CLOUD_FIELD_IMAC | \
I40E_CLOUD_FIELD_IVLAN)
#define I40E_CLOUD_FILTER_FLAGS_IMAC_TEN_ID (I40E_CLOUD_FIELD_IMAC | \
I40E_CLOUD_FIELD_TEN_ID)
#define I40E_CLOUD_FILTER_FLAGS_OMAC_TEN_ID_IMAC (I40E_CLOUD_FIELD_OMAC | \
I40E_CLOUD_FIELD_IMAC | \
I40E_CLOUD_FIELD_TEN_ID)
#define I40E_CLOUD_FILTER_FLAGS_IMAC_IVLAN_TEN_ID (I40E_CLOUD_FIELD_IMAC | \
I40E_CLOUD_FIELD_IVLAN | \
I40E_CLOUD_FIELD_TEN_ID)
Annotation
- Immediate include surface: `linux/linkmode.h`, `linux/pci.h`, `linux/ptp_clock_kernel.h`, `linux/types.h`, `linux/avf/virtchnl.h`, `linux/net/intel/i40e_client.h`, `net/devlink.h`, `net/pkt_cls.h`.
- Detected declarations: `struct i40e_lump_tracking`, `struct i40e_rx_flow_userdef`, `struct i40e_fdir_filter`, `struct i40e_cloud_filter`, `struct i40e_tc_info`, `struct i40e_tc_configuration`, `struct i40e_udp_port_config`, `struct i40e_flex_pit`, `struct i40e_fwd_adapter`, `struct i40e_channel`.
- Atlas domain: Driver Families / drivers/net.
- Implementation status: source implementation candidate.
- IRQ or DMA behavior appears here, which is relevant to the selected PCIe/NVMe device path.
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.