drivers/net/ethernet/sfc/mae.h
Source file repositories/reference/linux-study-clean/drivers/net/ethernet/sfc/mae.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/net/ethernet/sfc/mae.h- Extension
.h- Size
- 5213 bytes
- Lines
- 139
- 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/devlink.hnet_driver.htc.hmcdi_pcol.h
Detected Declarations
struct mae_mport_descstruct efx_maestruct mae_capsstruct efx_tc_ct_entry
Annotated Snippet
struct mae_mport_desc {
u32 mport_id;
u32 flags;
u32 caller_flags; /* enum mae_mport_desc_caller_flags */
u32 mport_type; /* MAE_MPORT_DESC_MPORT_TYPE_* */
union {
u32 port_idx; /* for mport_type == NET_PORT */
u32 alias_mport_id; /* for mport_type == ALIAS */
struct { /* for mport_type == VNIC */
u32 vnic_client_type; /* MAE_MPORT_DESC_VNIC_CLIENT_TYPE_* */
u32 interface_idx;
u16 pf_idx;
u16 vf_idx;
};
};
struct rhash_head linkage;
struct devlink_port dl_port;
};
int efx_mae_enumerate_mports(struct efx_nic *efx);
struct mae_mport_desc *efx_mae_get_mport(struct efx_nic *efx, u32 mport_id);
void efx_mae_put_mport(struct efx_nic *efx, struct mae_mport_desc *desc);
/**
* struct efx_mae - MAE information
*
* @efx: The associated NIC
* @mports_ht: m-port descriptions from MC_CMD_MAE_MPORT_READ_JOURNAL
*/
struct efx_mae {
struct efx_nic *efx;
struct rhashtable mports_ht;
};
int efx_mae_start_counters(struct efx_nic *efx, struct efx_rx_queue *rx_queue);
int efx_mae_stop_counters(struct efx_nic *efx, struct efx_rx_queue *rx_queue);
void efx_mae_counters_grant_credits(struct work_struct *work);
int efx_mae_get_tables(struct efx_nic *efx);
void efx_mae_free_tables(struct efx_nic *efx);
#define MAE_NUM_FIELDS (MAE_FIELD_ENC_VNET_ID + 1)
struct mae_caps {
u32 match_field_count;
u32 encap_types;
u32 action_prios;
u8 action_rule_fields[MAE_NUM_FIELDS];
u8 outer_rule_fields[MAE_NUM_FIELDS];
};
int efx_mae_get_caps(struct efx_nic *efx, struct mae_caps *caps);
int efx_mae_match_check_caps(struct efx_nic *efx,
const struct efx_tc_match_fields *mask,
struct netlink_ext_ack *extack);
int efx_mae_match_check_caps_lhs(struct efx_nic *efx,
const struct efx_tc_match_fields *mask,
struct netlink_ext_ack *extack);
int efx_mae_check_encap_match_caps(struct efx_nic *efx, bool ipv6,
u8 ip_tos_mask, __be16 udp_sport_mask,
struct netlink_ext_ack *extack);
int efx_mae_check_encap_type_supported(struct efx_nic *efx,
enum efx_encap_type typ);
int efx_mae_allocate_counter(struct efx_nic *efx, struct efx_tc_counter *cnt);
int efx_mae_free_counter(struct efx_nic *efx, struct efx_tc_counter *cnt);
int efx_mae_allocate_encap_md(struct efx_nic *efx,
struct efx_tc_encap_action *encap);
int efx_mae_update_encap_md(struct efx_nic *efx,
struct efx_tc_encap_action *encap);
int efx_mae_free_encap_md(struct efx_nic *efx,
struct efx_tc_encap_action *encap);
int efx_mae_allocate_pedit_mac(struct efx_nic *efx,
struct efx_tc_mac_pedit_action *ped);
void efx_mae_free_pedit_mac(struct efx_nic *efx,
struct efx_tc_mac_pedit_action *ped);
int efx_mae_alloc_action_set(struct efx_nic *efx, struct efx_tc_action_set *act);
int efx_mae_free_action_set(struct efx_nic *efx, u32 fw_id);
int efx_mae_alloc_action_set_list(struct efx_nic *efx,
struct efx_tc_action_set_list *acts);
int efx_mae_free_action_set_list(struct efx_nic *efx,
struct efx_tc_action_set_list *acts);
int efx_mae_register_encap_match(struct efx_nic *efx,
struct efx_tc_encap_match *encap);
int efx_mae_unregister_encap_match(struct efx_nic *efx,
Annotation
- Immediate include surface: `net/devlink.h`, `net_driver.h`, `tc.h`, `mcdi_pcol.h`.
- Detected declarations: `struct mae_mport_desc`, `struct efx_mae`, `struct mae_caps`, `struct efx_tc_ct_entry`.
- 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.