mirror of
https://github.com/torvalds/linux.git
synced 2026-05-30 00:29:35 +08:00
net/mlx5: HWS: Reject unsupported remove-header action
mlx5_cmd_hws_packet_reformat_alloc() handles
MLX5_REFORMAT_TYPE_REMOVE_HDR by looking up a matching HWS remove-header
action.
If mlx5_fs_get_action_remove_header_vlan() returns NULL, the code only
logs an error and continues. The function then returns success with a NULL
HWS action stored in the packet-reformat object.
Return an error when no matching remove-header action is available.
Fixes: aecd9d1020 ("net/mlx5: fs, add HWS packet reformat API function")
Signed-off-by: Prathamesh Deshpande <prathameshdeshpande7@gmail.com>
Reviewed-by: Simon Horman <horms@kernel.org>
Reviewed-by: Yevgeny Kliteynik <kliteyn@nvidia.com>
Acked-by: Tariq Toukan <tariqt@nvidia.com>
Link: https://patch.msgid.link/20260506000054.51797-1-prathameshdeshpande7@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
committed by
Jakub Kicinski
parent
87a1e0fe77
commit
86f1d0f063
@@ -1320,8 +1320,10 @@ mlx5_cmd_hws_packet_reformat_alloc(struct mlx5_flow_root_namespace *ns,
|
||||
break;
|
||||
case MLX5_REFORMAT_TYPE_REMOVE_HDR:
|
||||
hws_action = mlx5_fs_get_action_remove_header_vlan(fs_ctx, params);
|
||||
if (!hws_action)
|
||||
if (!hws_action) {
|
||||
mlx5_core_err(dev, "Only vlan remove header supported\n");
|
||||
return -EOPNOTSUPP;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
mlx5_core_err(ns->dev, "Packet-reformat not supported(%d)\n",
|
||||
|
||||
Reference in New Issue
Block a user