Skip to content

Commit dbac71f

Browse files
Awik84Saeed Mahameed
authored andcommitted
net/mlx5e: Accept action skbedit in the tc actions list
Setting the skb packet type field to host is usually done when performing forwarding to ingress device. This is required since the receive handling that is used by the redirect to ingress action checks whether the packet doesn't belong to this host and drops the packet in such case. In order to be able to offload action redirect ingress, tc offload code needs to accept the skbedit ptype action as well. There's no special handling in HW for such action since it will be followed by a redirect action and therefore, this code only allows us to accept such action in the actions list but not performing anything specific in HW for it. Signed-off-by: Ariel Levkovich <lariel@nvidia.com> Reviewed-by: Paul Blakey <paulb@nvidia.com> Reviewed-by: Vlad Buslov <vladbu@nvidia.com> Reviewed-by: Roi Dayan <roid@nvidia.com> Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
1 parent 4f4edcc commit dbac71f

File tree

1 file changed

+7
-0
lines changed
  • drivers/net/ethernet/mellanox/mlx5/core

1 file changed

+7
-0
lines changed

drivers/net/ethernet/mellanox/mlx5/core/en_tc.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3856,6 +3856,13 @@ static int parse_tc_fdb_actions(struct mlx5e_priv *priv,
38563856
MLX5_FLOW_CONTEXT_ACTION_COUNT;
38573857
attr->flags |= MLX5_ESW_ATTR_FLAG_ACCEPT;
38583858
break;
3859+
case FLOW_ACTION_PTYPE:
3860+
if (act->ptype != PACKET_HOST) {
3861+
NL_SET_ERR_MSG_MOD(extack,
3862+
"skbedit ptype is only supported with type host");
3863+
return -EOPNOTSUPP;
3864+
}
3865+
break;
38593866
case FLOW_ACTION_DROP:
38603867
action |= MLX5_FLOW_CONTEXT_ACTION_DROP |
38613868
MLX5_FLOW_CONTEXT_ACTION_COUNT;

0 commit comments

Comments
 (0)