Skip to content

Commit c09cf80

Browse files
mosheshemesh2kuba-moo
authored andcommitted
net/mlx5: fs, add HWS get capabilities
Add API function get capabilities to HW Steering flow commands. Signed-off-by: Moshe Shemesh <[email protected]> Reviewed-by: Yevgeny Kliteynik <[email protected]> Reviewed-by: Mark Bloch <[email protected]> Signed-off-by: Tariq Toukan <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
1 parent 866e503 commit c09cf80

File tree

1 file changed

+12
-0
lines changed
  • drivers/net/ethernet/mellanox/mlx5/core/steering/hws

1 file changed

+12
-0
lines changed

drivers/net/ethernet/mellanox/mlx5/core/steering/hws/fs_hws.c

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1333,6 +1333,17 @@ static int mlx5_cmd_hws_destroy_match_definer(struct mlx5_flow_root_namespace *n
13331333
return -EOPNOTSUPP;
13341334
}
13351335

1336+
static u32 mlx5_cmd_hws_get_capabilities(struct mlx5_flow_root_namespace *ns,
1337+
enum fs_flow_table_type ft_type)
1338+
{
1339+
if (ft_type != FS_FT_FDB)
1340+
return 0;
1341+
1342+
return MLX5_FLOW_STEERING_CAP_VLAN_PUSH_ON_RX |
1343+
MLX5_FLOW_STEERING_CAP_VLAN_POP_ON_TX |
1344+
MLX5_FLOW_STEERING_CAP_MATCH_RANGES;
1345+
}
1346+
13361347
static const struct mlx5_flow_cmds mlx5_flow_cmds_hws = {
13371348
.create_flow_table = mlx5_cmd_hws_create_flow_table,
13381349
.destroy_flow_table = mlx5_cmd_hws_destroy_flow_table,
@@ -1352,6 +1363,7 @@ static const struct mlx5_flow_cmds mlx5_flow_cmds_hws = {
13521363
.create_ns = mlx5_cmd_hws_create_ns,
13531364
.destroy_ns = mlx5_cmd_hws_destroy_ns,
13541365
.set_peer = mlx5_cmd_hws_set_peer,
1366+
.get_capabilities = mlx5_cmd_hws_get_capabilities,
13551367
};
13561368

13571369
const struct mlx5_flow_cmds *mlx5_fs_cmd_get_hws_cmds(void)

0 commit comments

Comments
 (0)