drivers/net/ethernet/mellanox/mlx5/core/en_accel/ktls.h
Source file repositories/reference/linux-study-clean/drivers/net/ethernet/mellanox/mlx5/core/en_accel/ktls.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/net/ethernet/mellanox/mlx5/core/en_accel/ktls.h- Extension
.h- Size
- 4090 bytes
- Lines
- 153
- 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/debugfs.hlinux/tls.hnet/tls.hen.hlib/crypto.hlib/mlx5.h
Detected Declarations
struct mlx5e_tls_sw_statsstruct mlx5e_tls_debugfsstruct mlx5e_tlsfunction mlx5e_is_ktls_devicefunction mlx5e_ktls_type_checkfunction mlx5e_is_ktls_txfunction mlx5e_ktls_build_netdevfunction mlx5e_ktls_cleanup_txfunction mlx5e_ktls_cleanup_rxfunction mlx5e_ktls_rx_resync_create_resp_listfunction mlx5e_ktls_rx_resync_destroy_resp_listfunction mlx5e_ktls_initfunction mlx5e_ktls_cleanupfunction mlx5e_ktls_get_strings
Annotated Snippet
struct mlx5e_tls_sw_stats {
atomic64_t tx_tls_ctx;
atomic64_t tx_tls_del;
atomic64_t tx_tls_pool_alloc;
atomic64_t tx_tls_pool_free;
atomic64_t rx_tls_ctx;
atomic64_t rx_tls_del;
};
struct mlx5e_tls_debugfs {
struct dentry *dfs;
struct dentry *dfs_tx;
};
struct mlx5e_tls {
struct mlx5_core_dev *mdev;
struct mlx5e_tls_sw_stats sw_stats;
struct workqueue_struct *rx_wq;
struct mlx5e_tls_tx_pool *tx_pool;
struct mlx5_crypto_dek_pool *dek_pool;
struct mlx5e_tls_debugfs debugfs;
};
int mlx5e_ktls_init(struct mlx5e_priv *priv);
void mlx5e_ktls_cleanup(struct mlx5e_priv *priv);
int mlx5e_ktls_get_count(struct mlx5e_priv *priv);
void mlx5e_ktls_get_strings(struct mlx5e_priv *priv, u8 **data);
void mlx5e_ktls_get_stats(struct mlx5e_priv *priv, u64 **data);
#else
static inline void mlx5e_ktls_build_netdev(struct mlx5e_priv *priv)
{
}
static inline int mlx5e_ktls_init_tx(struct mlx5e_priv *priv)
{
return 0;
}
static inline void mlx5e_ktls_cleanup_tx(struct mlx5e_priv *priv)
{
}
static inline int mlx5e_ktls_init_rx(struct mlx5e_priv *priv)
{
return 0;
}
static inline void mlx5e_ktls_cleanup_rx(struct mlx5e_priv *priv)
{
}
static inline int mlx5e_ktls_set_feature_rx(struct net_device *netdev, bool enable)
{
netdev_warn(netdev, "kTLS is not supported\n");
return -EOPNOTSUPP;
}
static inline struct mlx5e_ktls_resync_resp *
mlx5e_ktls_rx_resync_create_resp_list(void)
{
return ERR_PTR(-EOPNOTSUPP);
}
static inline void
mlx5e_ktls_rx_resync_destroy_resp_list(struct mlx5e_ktls_resync_resp *resp_list) {}
static inline bool mlx5e_is_ktls_rx(struct mlx5_core_dev *mdev)
{
return false;
}
static inline int mlx5e_ktls_init(struct mlx5e_priv *priv) { return 0; }
static inline void mlx5e_ktls_cleanup(struct mlx5e_priv *priv) { }
static inline int mlx5e_ktls_get_count(struct mlx5e_priv *priv) { return 0; }
static inline void mlx5e_ktls_get_strings(struct mlx5e_priv *priv, u8 **data) { }
static inline void mlx5e_ktls_get_stats(struct mlx5e_priv *priv, u64 **data) { }
#endif
#endif /* __MLX5E_TLS_H__ */
Annotation
- Immediate include surface: `linux/debugfs.h`, `linux/tls.h`, `net/tls.h`, `en.h`, `lib/crypto.h`, `lib/mlx5.h`.
- Detected declarations: `struct mlx5e_tls_sw_stats`, `struct mlx5e_tls_debugfs`, `struct mlx5e_tls`, `function mlx5e_is_ktls_device`, `function mlx5e_ktls_type_check`, `function mlx5e_is_ktls_tx`, `function mlx5e_ktls_build_netdev`, `function mlx5e_ktls_cleanup_tx`, `function mlx5e_ktls_cleanup_rx`, `function mlx5e_ktls_rx_resync_create_resp_list`.
- 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.