include/linux/mlx5/fs.h

Source file repositories/reference/linux-study-clean/include/linux/mlx5/fs.h

File Facts

System
Linux kernel
Corpus path
include/linux/mlx5/fs.h
Extension
.h
Size
11049 bytes
Lines
386
Domain
Core OS
Bucket
Core Kernel Interface
Inferred role
Core OS: implementation source
Status
source implementation candidate

Why This File Exists

Core operating-system implementation surface: boot, tasks, memory, VFS, syscall-facing interfaces, synchronization, credentials, and isolation.

Dependency Surface

Detected Declarations

Annotated Snippet

struct mlx5_flow_context {
	u32 flags;
	u32 flow_tag;
	u32 flow_source;
};

struct mlx5_flow_spec {
	u8   match_criteria_enable;
	u32  match_criteria[MLX5_ST_SZ_DW(fte_match_param)];
	u32  match_value[MLX5_ST_SZ_DW(fte_match_param)];
	struct mlx5_flow_context flow_context;
};

enum {
	MLX5_FLOW_DEST_VPORT_VHCA_ID      = BIT(0),
	MLX5_FLOW_DEST_VPORT_REFORMAT_ID  = BIT(1),
};

enum mlx5_flow_dest_range_field {
	MLX5_FLOW_DEST_RANGE_FIELD_PKT_LEN = 0,
};

struct mlx5_flow_destination {
	enum mlx5_flow_destination_type	type;
	union {
		u32			tir_num;
		u32			ft_num;
		struct mlx5_flow_table	*ft;
		struct mlx5_fc          *counter;
		struct {
			u16		id;
		} vhca;
		struct {
			u16		num;
			u16		vhca_id;
			struct mlx5_pkt_reformat *pkt_reformat;
			u8		flags;
		} vport;
		struct {
			struct mlx5_flow_table         *hit_ft;
			struct mlx5_flow_table         *miss_ft;
			enum mlx5_flow_dest_range_field field;
			u32                             min;
			u32                             max;
		} range;
		u32			sampler_id;
	};
};

struct mod_hdr_tbl {
	struct mutex lock; /* protects hlist */
	DECLARE_HASHTABLE(hlist, 8);
};

struct mlx5_flow_namespace *
mlx5_get_fdb_sub_ns(struct mlx5_core_dev *dev, int n);
struct mlx5_flow_namespace *
mlx5_get_flow_namespace(struct mlx5_core_dev *dev,
			enum mlx5_flow_namespace_type type);
struct mlx5_flow_namespace *
mlx5_get_flow_vport_namespace(struct mlx5_core_dev *dev,
			      enum mlx5_flow_namespace_type type,
			      int vport_idx);

struct mlx5_flow_table_attr {
	int prio;
	int max_fte;
	u32 level;
	u32 flags;
	u16 uid;
	u16 vport;
	u16 esw_owner_vhca_id;
	struct mlx5_flow_table *next_ft;

	struct {
		int max_num_groups;
		int num_reserved_entries;
	} autogroup;
};

struct mlx5_flow_table *
mlx5_create_flow_table(struct mlx5_flow_namespace *ns,
		       struct mlx5_flow_table_attr *ft_attr);

struct mlx5_flow_table *
mlx5_create_auto_grouped_flow_table(struct mlx5_flow_namespace *ns,
				    struct mlx5_flow_table_attr *ft_attr);

struct mlx5_flow_table *
mlx5_create_vport_flow_table(struct mlx5_flow_namespace *ns,

Annotation

Implementation Notes