[PATCH v3] net/mlx5: fix connection tracking state item validation
Dariusz Sosnowski
dsosnowski at nvidia.com
Thu Aug 14 11:33:50 CEST 2025
On Thu, Aug 14, 2025 at 04:58:31AM -0400, Khadem Ullah wrote:
> [ snip ]
>
> +#define MLX5_FLOW_CONNTRACK_PKT_STATE_ALL(flags_all) \
> + (flags_all = (RTE_FLOW_CONNTRACK_PKT_STATE_VALID) | \
> + RTE_FLOW_CONNTRACK_PKT_STATE_CHANGED | \
> + RTE_FLOW_CONNTRACK_PKT_STATE_INVALID | \
> + RTE_FLOW_CONNTRACK_PKT_STATE_DISABLED | \
> + RTE_FLOW_CONNTRACK_PKT_STATE_BAD)
Please define this macro without setting the variable.
It should define only the constant value.
Defining this macro as proposed requires the user of that macro
to declare a variable, which is not needed for comparison against item's flags.
I mean something like this:
if (spec->flags & ~MLX5_FLOW_CONNTRACK_PKT_STATE_ALL)
If macro is defined in the fashion allowing that,
the flags_all variable definition will not be needed.
Could you also please add an empty line between the macro definition and
the comment appearing after it, so they appear separated?
> /*
> * When HW steering flow engine is used, the CT action handles are encoded in a following way:
> * - bits 31:29 - type
>
> [ snip ]
Best regards,
Dariusz Sosnowski
More information about the dev
mailing list