]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/blobdiff - drivers/net/ethernet/mellanox/mlx5/core/en_tc.c
net/mlx5e: Support accept action
[mirror_ubuntu-jammy-kernel.git] / drivers / net / ethernet / mellanox / mlx5 / core / en_tc.c
index 4ef96c86d044b12fdafbbc31e8f03241559fc488..95a9c1156eee4c2543d5aa68f71823ed60b84e66 100644 (file)
@@ -3881,6 +3881,11 @@ static int parse_tc_fdb_actions(struct mlx5e_priv *priv,
 
        flow_action_for_each(i, act, flow_action) {
                switch (act->id) {
+               case FLOW_ACTION_ACCEPT:
+                       action |= MLX5_FLOW_CONTEXT_ACTION_FWD_DEST |
+                               MLX5_FLOW_CONTEXT_ACTION_COUNT;
+                       attr->flags |= MLX5_ESW_ATTR_FLAG_ACCEPT;
+                       break;
                case FLOW_ACTION_DROP:
                        action |= MLX5_FLOW_CONTEXT_ACTION_DROP |
                                  MLX5_FLOW_CONTEXT_ACTION_COUNT;