drivers/net/ethernet/mellanox/mlx5/core/en_accel/ipsec.h
Source file repositories/reference/linux-study-clean/drivers/net/ethernet/mellanox/mlx5/core/en_accel/ipsec.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/net/ethernet/mellanox/mlx5/core/en_accel/ipsec.h- Extension
.h- Size
- 9809 bytes
- Lines
- 399
- 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
linux/mlx5/device.hnet/xfrm.hlinux/idr.hlib/aso.hlib/devcom.h
Detected Declarations
struct aes_gcm_keymatstruct upspecstruct mlx5_ipsec_lftstruct mlx5_replay_esnstruct mlx5e_ipsec_addrstruct mlx5_accel_esp_xfrm_attrsstruct mlx5e_privstruct mlx5e_ipsec_hw_statsstruct mlx5e_ipsec_sw_statsstruct mlx5e_ipsec_fcstruct mlx5e_ipsec_txstruct mlx5e_ipsec_workstruct mlx5e_ipsec_netevent_datastruct mlx5e_ipsec_dworkstruct mlx5e_ipsec_asostruct mlx5e_ipsec_rx_create_attrstruct mlx5e_ipsec_ftstruct mlx5e_ipsec_dropstruct mlx5e_ipsec_rulestruct mlx5e_ipsec_missstruct mlx5e_ipsec_tx_create_attrstruct mlx5e_ipsec_mpv_workstruct mlx5e_ipsecstruct mlx5e_ipsec_esn_statestruct mlx5e_ipsec_limitsstruct mlx5e_ipsec_sa_entrystruct mlx5_accel_pol_xfrm_attrsstruct mlx5e_ipsec_pol_entryenum mlx5_ipsec_capfunction mlx5e_ipsec_sa2devfunction mlx5e_ipsec_pol2devfunction addr6_all_zerofunction mlx5e_ipsec_initfunction mlx5e_ipsec_handle_mpv_event
Annotated Snippet
struct aes_gcm_keymat {
u64 seq_iv;
u32 salt;
u32 icv_len;
u32 key_len;
u32 aes_key[256 / 32];
};
struct upspec {
u16 dport;
u16 dport_mask;
u16 sport;
u16 sport_mask;
u8 proto;
};
struct mlx5_ipsec_lft {
u64 hard_packet_limit;
u64 soft_packet_limit;
u64 numb_rounds_hard;
u64 numb_rounds_soft;
};
struct mlx5_replay_esn {
u32 replay_window;
u32 esn;
u32 esn_msb;
u8 overlap : 1;
u8 trigger : 1;
};
struct mlx5e_ipsec_addr {
union {
__be32 a4;
__be32 a6[4];
} saddr;
union {
__be32 m4;
__be32 m6[4];
} smask;
union {
__be32 a4;
__be32 a6[4];
} daddr;
union {
__be32 m4;
__be32 m6[4];
} dmask;
u8 family;
};
struct mlx5_accel_esp_xfrm_attrs {
u32 spi;
u32 mode;
struct aes_gcm_keymat aes_gcm;
struct mlx5e_ipsec_addr addrs;
struct upspec upspec;
u8 dir : 2;
u8 type : 2;
u8 drop : 1;
u8 encap : 1;
struct mlx5_replay_esn replay_esn;
u32 authsize;
u32 reqid;
struct mlx5_ipsec_lft lft;
union {
u8 smac[ETH_ALEN];
__be16 sport;
};
union {
u8 dmac[ETH_ALEN];
__be16 dport;
};
};
enum mlx5_ipsec_cap {
MLX5_IPSEC_CAP_CRYPTO = 1 << 0,
MLX5_IPSEC_CAP_ESN = 1 << 1,
MLX5_IPSEC_CAP_PACKET_OFFLOAD = 1 << 2,
MLX5_IPSEC_CAP_ROCE = 1 << 3,
MLX5_IPSEC_CAP_PRIO = 1 << 4,
MLX5_IPSEC_CAP_TUNNEL = 1 << 5,
MLX5_IPSEC_CAP_ESPINUDP = 1 << 6,
};
struct mlx5e_priv;
struct mlx5e_ipsec_hw_stats {
Annotation
- Immediate include surface: `linux/mlx5/device.h`, `net/xfrm.h`, `linux/idr.h`, `lib/aso.h`, `lib/devcom.h`.
- Detected declarations: `struct aes_gcm_keymat`, `struct upspec`, `struct mlx5_ipsec_lft`, `struct mlx5_replay_esn`, `struct mlx5e_ipsec_addr`, `struct mlx5_accel_esp_xfrm_attrs`, `struct mlx5e_priv`, `struct mlx5e_ipsec_hw_stats`, `struct mlx5e_ipsec_sw_stats`, `struct mlx5e_ipsec_fc`.
- 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.