Skip to content

Commit

Permalink
net/mlx5: Add alias flow table bits
Browse files Browse the repository at this point in the history
Add all the capabilities needed to check for alias object support.
As well as all the fields or commands needed for its creation and
the creation of flow table that is able to jump to an alias object.

Signed-off-by: Patrisious Haddad <[email protected]>
Reviewed-by: Mark Bloch <[email protected]>
Link: https://lore.kernel.org/r/544c030f2a78c4adf3fe6b64f97a39cc1bbdabb9.1695296682.git.leon@kernel.org
Signed-off-by: Leon Romanovsky <[email protected]>
  • Loading branch information
PatrisiousHaddad authored and rleon committed Oct 2, 2023
1 parent eff5b66 commit ef36ffc
Showing 1 changed file with 55 additions and 1 deletion.
56 changes: 55 additions & 1 deletion include/linux/mlx5/mlx5_ifc.h
Original file line number Diff line number Diff line change
Expand Up @@ -312,6 +312,7 @@ enum {
MLX5_CMD_OP_QUERY_VHCA_STATE = 0xb0d,
MLX5_CMD_OP_MODIFY_VHCA_STATE = 0xb0e,
MLX5_CMD_OP_SYNC_CRYPTO = 0xb12,
MLX5_CMD_OP_ALLOW_OTHER_VHCA_ACCESS = 0xb16,
MLX5_CMD_OP_MAX
};

Expand Down Expand Up @@ -1934,6 +1935,14 @@ struct mlx5_ifc_cmd_hca_cap_bits {
u8 match_definer_format_supported[0x40];
};

enum {
MLX5_CROSS_VHCA_OBJ_TO_OBJ_SUPPORTED_LOCAL_FLOW_TABLE_TO_REMOTE_FLOW_TABLE_MISS = 0x80000,
};

enum {
MLX5_ALLOWED_OBJ_FOR_OTHER_VHCA_ACCESS_FLOW_TABLE = 0x200,
};

struct mlx5_ifc_cmd_hca_cap_2_bits {
u8 reserved_at_0[0x80];

Expand All @@ -1952,7 +1961,11 @@ struct mlx5_ifc_cmd_hca_cap_2_bits {
u8 migration_in_chunks[0x1];
u8 reserved_at_d1[0xf];

u8 reserved_at_e0[0xc0];
u8 cross_vhca_object_to_object_supported[0x20];

u8 allowed_object_for_other_vhca_access[0x40];

u8 reserved_at_140[0x60];

u8 flow_table_type_2_type[0x8];
u8 reserved_at_1a8[0x3];
Expand Down Expand Up @@ -6371,6 +6384,28 @@ struct mlx5_ifc_general_obj_out_cmd_hdr_bits {
u8 reserved_at_60[0x20];
};

struct mlx5_ifc_allow_other_vhca_access_in_bits {
u8 opcode[0x10];
u8 uid[0x10];
u8 reserved_at_20[0x10];
u8 op_mod[0x10];
u8 reserved_at_40[0x50];
u8 object_type_to_be_accessed[0x10];
u8 object_id_to_be_accessed[0x20];
u8 reserved_at_c0[0x40];
union {
u8 access_key_raw[0x100];
u8 access_key[8][0x20];
};
};

struct mlx5_ifc_allow_other_vhca_access_out_bits {
u8 status[0x8];
u8 reserved_at_8[0x18];
u8 syndrome[0x20];
u8 reserved_at_40[0x40];
};

struct mlx5_ifc_modify_header_arg_bits {
u8 reserved_at_0[0x80];

Expand All @@ -6393,6 +6428,24 @@ struct mlx5_ifc_create_match_definer_out_bits {
struct mlx5_ifc_general_obj_out_cmd_hdr_bits general_obj_out_cmd_hdr;
};

struct mlx5_ifc_alias_context_bits {
u8 vhca_id_to_be_accessed[0x10];
u8 reserved_at_10[0xd];
u8 status[0x3];
u8 object_id_to_be_accessed[0x20];
u8 reserved_at_40[0x40];
union {
u8 access_key_raw[0x100];
u8 access_key[8][0x20];
};
u8 metadata[0x80];
};

struct mlx5_ifc_create_alias_obj_in_bits {
struct mlx5_ifc_general_obj_in_cmd_hdr_bits hdr;
struct mlx5_ifc_alias_context_bits alias_ctx;
};

enum {
MLX5_QUERY_FLOW_GROUP_OUT_MATCH_CRITERIA_ENABLE_OUTER_HEADERS = 0x0,
MLX5_QUERY_FLOW_GROUP_OUT_MATCH_CRITERIA_ENABLE_MISC_PARAMETERS = 0x1,
Expand Down Expand Up @@ -11919,6 +11972,7 @@ enum {
MLX5_GENERAL_OBJECT_TYPES_FLOW_METER_ASO = 0x24,
MLX5_GENERAL_OBJECT_TYPES_MACSEC = 0x27,
MLX5_GENERAL_OBJECT_TYPES_INT_KEK = 0x47,
MLX5_GENERAL_OBJECT_TYPES_FLOW_TABLE_ALIAS = 0xff15,
};

enum {
Expand Down

0 comments on commit ef36ffc

Please sign in to comment.