drivers/net/ethernet/mellanox/mlx5/core/fs_core.h

Source file repositories/reference/linux-study-clean/drivers/net/ethernet/mellanox/mlx5/core/fs_core.h

File Facts

System
Linux kernel
Corpus path
drivers/net/ethernet/mellanox/mlx5/core/fs_core.h
Extension
.h
Size
13203 bytes
Lines
434
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.

Dependency Surface

Detected Declarations

Annotated Snippet

struct mlx5_flow_definer {
	enum mlx5_flow_namespace_type ns_type;
	u32 id;
};

enum mlx5_flow_resource_owner {
	MLX5_FLOW_RESOURCE_OWNER_FW,
	MLX5_FLOW_RESOURCE_OWNER_SW,
	MLX5_FLOW_RESOURCE_OWNER_HWS,
};

struct mlx5_modify_hdr {
	enum mlx5_flow_namespace_type ns_type;
	enum mlx5_flow_resource_owner owner;
	union {
		struct mlx5_fs_dr_action fs_dr_action;
		struct mlx5_fs_hws_action fs_hws_action;
		u32 id;
	};
};

struct mlx5_pkt_reformat {
	enum mlx5_flow_namespace_type ns_type;
	int reformat_type; /* from mlx5_ifc */
	enum mlx5_flow_resource_owner owner;
	union {
		struct mlx5_fs_dr_action fs_dr_action;
		struct mlx5_fs_hws_action fs_hws_action;
		u32 id;
	};
};

/* FS_TYPE_PRIO_CHAINS is a PRIO that will have namespaces only,
 * and those are in parallel to one another when going over them to connect
 * a new flow table. Meaning the last flow table in a TYPE_PRIO prio in one
 * parallel namespace will not automatically connect to the first flow table
 * found in any prio in any next namespace, but skip the entire containing
 * TYPE_PRIO_CHAINS prio.
 *
 * This is used to implement tc chains, each chain of prios is a different
 * namespace inside a containing TYPE_PRIO_CHAINS prio.
 */

enum fs_node_type {
	FS_TYPE_NAMESPACE,
	FS_TYPE_PRIO,
	FS_TYPE_PRIO_CHAINS,
	FS_TYPE_FLOW_TABLE,
	FS_TYPE_FLOW_GROUP,
	FS_TYPE_FLOW_ENTRY,
	FS_TYPE_FLOW_DEST
};

enum fs_flow_table_op_mod {
	FS_FT_OP_MOD_NORMAL,
	FS_FT_OP_MOD_LAG_DEMUX,
};

enum fs_fte_status {
	FS_FTE_STATUS_EXISTING = 1UL << 0,
};

enum mlx5_flow_steering_mode {
	MLX5_FLOW_STEERING_MODE_DMFS,
	MLX5_FLOW_STEERING_MODE_SMFS,
	MLX5_FLOW_STEERING_MODE_HMFS,
};

enum mlx5_flow_steering_capabilty {
	MLX5_FLOW_STEERING_CAP_VLAN_PUSH_ON_RX = 1UL << 0,
	MLX5_FLOW_STEERING_CAP_VLAN_POP_ON_TX = 1UL << 1,
	MLX5_FLOW_STEERING_CAP_MATCH_RANGES = 1UL << 2,
	MLX5_FLOW_STEERING_CAP_DUPLICATE_MATCH = 1UL << 3,
};

struct mlx5_flow_steering {
	struct mlx5_core_dev *dev;
	enum   mlx5_flow_steering_mode	mode;
	struct kmem_cache		*fgs_cache;
	struct kmem_cache               *ftes_cache;
	struct mlx5_flow_root_namespace *root_ns;
	struct mlx5_flow_root_namespace *fdb_root_ns;
	struct mlx5_flow_namespace	**fdb_sub_ns;
	struct xarray			esw_egress_root_ns;
	struct xarray			esw_ingress_root_ns;
	struct mlx5_flow_root_namespace	*sniffer_tx_root_ns;
	struct mlx5_flow_root_namespace	*sniffer_rx_root_ns;
	struct mlx5_flow_root_namespace	*rdma_rx_root_ns;
	struct mlx5_flow_root_namespace	*rdma_tx_root_ns;
	struct mlx5_flow_root_namespace	*egress_root_ns;

Annotation

Implementation Notes