net/mlx5: fix representor ID check for sampling
[dpdk.git] / drivers / net / mlx5 / mlx5_flow_dv.c
index d107665..8cbdf20 100644 (file)
@@ -5524,7 +5524,7 @@ flow_dv_validate_action_sample(uint64_t *action_flags,
                                                  "E-Switch must has a dest "
                                                  "port for mirroring");
                if (!priv->config.hca_attr.reg_c_preserve &&
-                    priv->representor_id != -1)
+                    priv->representor_id != UINT16_MAX)
                        *fdb_mirror_limit = 1;
        }
        /* Continue validation for Xcap actions.*/