OSDN Git Service

net/mlx5e: TC, set proper dest type
authorMark Bloch <mbloch@nvidia.com>
Tue, 22 Mar 2022 16:14:51 +0000 (16:14 +0000)
committerSaeed Mahameed <saeedm@nvidia.com>
Tue, 3 May 2022 04:21:13 +0000 (21:21 -0700)
Dest type isn't set, this works only because
MLX5_FLOW_DESTINATION_TYPE_VPORT is zero. Set the proper type.

Signed-off-by: Mark Bloch <mbloch@nvidia.com>
Reviewed-by: Maor Gottlieb <maorg@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
drivers/net/ethernet/mellanox/mlx5/core/en/tc/sample.c

index fd45045..1cbd2eb 100644 (file)
@@ -93,6 +93,7 @@ sampler_termtbl_create(struct mlx5e_tc_psample *tc_psample)
 
        act.action = MLX5_FLOW_CONTEXT_ACTION_FWD_DEST;
        dest.vport.num = esw->manager_vport;
+       dest.type = MLX5_FLOW_DESTINATION_TYPE_VPORT;
        tc_psample->termtbl_rule = mlx5_add_flow_rules(tc_psample->termtbl, NULL, &act, &dest, 1);
        if (IS_ERR(tc_psample->termtbl_rule)) {
                err = PTR_ERR(tc_psample->termtbl_rule);