drivers/net/ethernet/netronome/nfp/flower/conntrack.h
Source file repositories/reference/linux-study-clean/drivers/net/ethernet/netronome/nfp/flower/conntrack.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/net/ethernet/netronome/nfp/flower/conntrack.h- Extension
.h- Size
- 9400 bytes
- Lines
- 290
- 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
net/netfilter/nf_flow_table.hmain.h
Detected Declarations
struct nfp_fl_ct_zone_entrystruct nfp_fl_ct_flow_entrystruct nfp_fl_ct_tc_mergestruct nfp_fl_nft_tc_mergestruct nfp_fl_ct_map_entryenum ct_entry_typeenum nfp_nfp_layer_name
Annotated Snippet
struct nfp_fl_ct_zone_entry {
u16 zone;
struct rhash_head hash_node;
struct nfp_flower_priv *priv;
struct nf_flowtable *nft;
struct list_head pre_ct_list;
unsigned int pre_ct_count;
struct list_head post_ct_list;
unsigned int post_ct_count;
struct rhashtable tc_merge_tb;
unsigned int tc_merge_count;
struct list_head nft_flows_list;
unsigned int nft_flows_count;
struct rhashtable nft_merge_tb;
unsigned int nft_merge_count;
};
enum ct_entry_type {
CT_TYPE_PRE_CT,
CT_TYPE_NFT,
CT_TYPE_POST_CT,
_CT_TYPE_MAX,
};
#define NFP_MAX_RECIRC_CT_ZONES 4
#define NFP_MAX_ENTRY_RULES (NFP_MAX_RECIRC_CT_ZONES * 2 + 1)
enum nfp_nfp_layer_name {
FLOW_PAY_META_TCI = 0,
FLOW_PAY_INPORT,
FLOW_PAY_EXT_META,
FLOW_PAY_MAC_MPLS,
FLOW_PAY_L4,
FLOW_PAY_IPV4,
FLOW_PAY_IPV6,
FLOW_PAY_CT,
FLOW_PAY_GRE,
FLOW_PAY_QINQ,
FLOW_PAY_UDP_TUN,
FLOW_PAY_GENEVE_OPT,
_FLOW_PAY_LAYERS_MAX
};
/* NFP flow entry flags. */
#define NFP_FL_ACTION_DO_NAT BIT(0)
#define NFP_FL_ACTION_DO_MANGLE BIT(1)
/**
* struct nfp_fl_ct_flow_entry - Flow entry containing conntrack flow information
* @cookie: Flow cookie, same as original TC flow, used as key
* @list_node: Used by the list
* @chain_index: Chain index of the original flow
* @goto_chain_index: goto chain index of the flow
* @netdev: netdev structure.
* @zt: Reference to the zone table this belongs to
* @children: List of tc_merge flows this flow forms part of
* @rule: Reference to the original TC flow rule
* @stats: Used to cache stats for updating
* @prev_m_entries: Array of all previous nft_tc_merge entries
* @num_prev_m_entries: The number of all previous nft_tc_merge entries
* @tun_offset: Used to indicate tunnel action offset in action list
* @flags: Used to indicate flow flag like NAT which used by merge.
* @type: Type of ct-entry from enum ct_entry_type
*/
struct nfp_fl_ct_flow_entry {
unsigned long cookie;
struct list_head list_node;
u32 chain_index;
u32 goto_chain_index;
struct net_device *netdev;
struct nfp_fl_ct_zone_entry *zt;
struct list_head children;
struct flow_rule *rule;
struct flow_stats stats;
struct nfp_fl_nft_tc_merge *prev_m_entries[NFP_MAX_RECIRC_CT_ZONES - 1];
u8 num_prev_m_entries;
u8 tun_offset; // Set to NFP_FL_CT_NO_TUN if no tun
u8 flags;
u8 type;
};
/**
* struct nfp_fl_ct_tc_merge - Merge of two flows from tc
Annotation
- Immediate include surface: `net/netfilter/nf_flow_table.h`, `main.h`.
- Detected declarations: `struct nfp_fl_ct_zone_entry`, `struct nfp_fl_ct_flow_entry`, `struct nfp_fl_ct_tc_merge`, `struct nfp_fl_nft_tc_merge`, `struct nfp_fl_ct_map_entry`, `enum ct_entry_type`, `enum nfp_nfp_layer_name`.
- 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.