drivers/net/ethernet/netronome/nfp/flower/main.h
Source file repositories/reference/linux-study-clean/drivers/net/ethernet/netronome/nfp/flower/main.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/net/ethernet/netronome/nfp/flower/main.h- Extension
.h- Size
- 23750 bytes
- Lines
- 733
- 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.
- Uses kernel synchronization; read lock ordering, sleepability, and interrupt context assumptions before translating.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
cmsg.h../nfp_net.hlinux/circ_buf.hlinux/hashtable.hlinux/rhashtable.hlinux/time64.hlinux/types.hnet/flow_offload.hnet/pkt_cls.hnet/pkt_sched.hnet/tcp.hlinux/workqueue.hlinux/idr.h
Detected Declarations
struct nfp_fl_pre_lagstruct net_devicestruct nfp_appstruct nfp_fl_mask_idstruct nfp_fl_stats_idstruct nfp_fl_tunnel_offloadsstruct nfp_tun_neigh_lagstruct nfp_tun_neighstruct nfp_tun_neigh_extstruct nfp_tun_neigh_v4struct nfp_tun_neigh_v6struct nfp_neigh_entrystruct nfp_predt_entrystruct nfp_mtu_confstruct nfp_fl_lagstruct nfp_fl_internal_portsstruct nfp_flower_privstruct nfp_fl_qosstruct nfp_flower_repr_privstruct nfp_flower_non_repr_privstruct nfp_fl_key_lsstruct nfp_fl_rule_metadatastruct nfp_fl_statsstruct nfp_ipv6_addr_entrystruct nfp_fl_payloadstruct nfp_fl_payload_linkstruct nfp_merge_infostruct nfp_fl_stats_framestruct nfp_meter_stats_entrystruct nfp_meter_entrystruct nfp_meter_statsenum nfp_meter_opfunction nfp_flower_internal_port_can_offloadfunction nfp_flower_is_merge_flowfunction nfp_flower_is_supported_bridge
Annotated Snippet
struct nfp_fl_mask_id {
struct circ_buf mask_id_free_list;
ktime_t *last_used;
u8 init_unallocated;
};
struct nfp_fl_stats_id {
struct circ_buf free_list;
u32 init_unalloc;
u8 repeated_em_count;
};
/**
* struct nfp_fl_tunnel_offloads - priv data for tunnel offloads
* @offloaded_macs: Hashtable of the offloaded MAC addresses
* @ipv4_off_list: List of IPv4 addresses to offload
* @ipv6_off_list: List of IPv6 addresses to offload
* @ipv4_off_lock: Lock for the IPv4 address list
* @ipv6_off_lock: Lock for the IPv6 address list
* @mac_off_ids: IDA to manage id assignment for offloaded MACs
* @neigh_nb: Notifier to monitor neighbour state
*/
struct nfp_fl_tunnel_offloads {
struct rhashtable offloaded_macs;
struct list_head ipv4_off_list;
struct list_head ipv6_off_list;
struct mutex ipv4_off_lock;
struct mutex ipv6_off_lock;
struct ida mac_off_ids;
struct notifier_block neigh_nb;
};
/**
* struct nfp_tun_neigh_lag - lag info
* @lag_version: lag version
* @lag_instance: lag instance
*/
struct nfp_tun_neigh_lag {
u8 lag_version[3];
u8 lag_instance;
};
/**
* struct nfp_tun_neigh - basic neighbour data
* @dst_addr: Destination MAC address
* @src_addr: Source MAC address
* @port_id: NFP port to output packet on - associated with source IPv4
*/
struct nfp_tun_neigh {
u8 dst_addr[ETH_ALEN];
u8 src_addr[ETH_ALEN];
__be32 port_id;
};
/**
* struct nfp_tun_neigh_ext - extended neighbour data
* @vlan_tpid: VLAN_TPID match field
* @vlan_tci: VLAN_TCI match field
* @host_ctx: Host context ID to be saved here
*/
struct nfp_tun_neigh_ext {
__be16 vlan_tpid;
__be16 vlan_tci;
__be32 host_ctx;
};
/**
* struct nfp_tun_neigh_v4 - neighbour/route entry on the NFP for IPv4
* @dst_ipv4: Destination IPv4 address
* @src_ipv4: Source IPv4 address
* @common: Neighbour/route common info
* @ext: Neighbour/route extended info
* @lag: lag port info
*/
struct nfp_tun_neigh_v4 {
__be32 dst_ipv4;
__be32 src_ipv4;
struct nfp_tun_neigh common;
struct nfp_tun_neigh_ext ext;
struct nfp_tun_neigh_lag lag;
};
/**
* struct nfp_tun_neigh_v6 - neighbour/route entry on the NFP for IPv6
* @dst_ipv6: Destination IPv6 address
* @src_ipv6: Source IPv6 address
* @common: Neighbour/route common info
* @ext: Neighbour/route extended info
* @lag: lag port info
*/
Annotation
- Immediate include surface: `cmsg.h`, `../nfp_net.h`, `linux/circ_buf.h`, `linux/hashtable.h`, `linux/rhashtable.h`, `linux/time64.h`, `linux/types.h`, `net/flow_offload.h`.
- Detected declarations: `struct nfp_fl_pre_lag`, `struct net_device`, `struct nfp_app`, `struct nfp_fl_mask_id`, `struct nfp_fl_stats_id`, `struct nfp_fl_tunnel_offloads`, `struct nfp_tun_neigh_lag`, `struct nfp_tun_neigh`, `struct nfp_tun_neigh_ext`, `struct nfp_tun_neigh_v4`.
- Atlas domain: Driver Families / drivers/net.
- Implementation status: source implementation candidate.
- Synchronization appears in or near this file; preserve lock ordering, sleepability, and interrupt-context constraints.
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.