]> www.infradead.org Git - users/dwmw2/linux.git/commitdiff
net/mlx5: fs, set create match definer to not supported by HWS
authorMoshe Shemesh <moshe@nvidia.com>
Thu, 9 Jan 2025 16:05:42 +0000 (18:05 +0200)
committerJakub Kicinski <kuba@kernel.org>
Tue, 14 Jan 2025 03:21:09 +0000 (19:21 -0800)
Currently HW Steering does not support the API functions of create and
destroy match definer. Return not supported error in case requested.

Signed-off-by: Moshe Shemesh <moshe@nvidia.com>
Reviewed-by: Yevgeny Kliteynik <kliteyn@nvidia.com>
Reviewed-by: Mark Bloch <mbloch@nvidia.com>
Signed-off-by: Tariq Toukan <tariqt@nvidia.com>
Link: https://patch.msgid.link/20250109160546.1733647-12-tariqt@nvidia.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/mellanox/mlx5/core/steering/hws/fs_hws.c

index 58a9c03e6ef94890bc229c19e3d8504c1599a35d..dd9afde60070aad4d7d94afbf7aa105f02554218 100644 (file)
@@ -1321,6 +1321,18 @@ static void mlx5_cmd_hws_modify_header_dealloc(struct mlx5_flow_root_namespace *
        modify_hdr->fs_hws_action.mh_data = NULL;
 }
 
+static int mlx5_cmd_hws_create_match_definer(struct mlx5_flow_root_namespace *ns,
+                                            u16 format_id, u32 *match_mask)
+{
+       return -EOPNOTSUPP;
+}
+
+static int mlx5_cmd_hws_destroy_match_definer(struct mlx5_flow_root_namespace *ns,
+                                             int definer_id)
+{
+       return -EOPNOTSUPP;
+}
+
 static const struct mlx5_flow_cmds mlx5_flow_cmds_hws = {
        .create_flow_table = mlx5_cmd_hws_create_flow_table,
        .destroy_flow_table = mlx5_cmd_hws_destroy_flow_table,
@@ -1335,6 +1347,8 @@ static const struct mlx5_flow_cmds mlx5_flow_cmds_hws = {
        .packet_reformat_dealloc = mlx5_cmd_hws_packet_reformat_dealloc,
        .modify_header_alloc = mlx5_cmd_hws_modify_header_alloc,
        .modify_header_dealloc = mlx5_cmd_hws_modify_header_dealloc,
+       .create_match_definer = mlx5_cmd_hws_create_match_definer,
+       .destroy_match_definer = mlx5_cmd_hws_destroy_match_definer,
        .create_ns = mlx5_cmd_hws_create_ns,
        .destroy_ns = mlx5_cmd_hws_destroy_ns,
        .set_peer = mlx5_cmd_hws_set_peer,