[PATCH] net/mlx5: fix matcher flags in counter offset detection

David Marchand david.marchand at redhat.com
Wed Aug 27 11:15:57 CEST 2025


On Wed, 20 Aug 2025 at 10:47, Dariusz Sosnowski <dsosnowski at nvidia.com> wrote:
>
> This patch fixes a bug in
> mlx5_flow_dv_discover_counter_offset_support()
> uncovered by a warning reported by MSVC:
>
>     ../drivers/net/mlx5/mlx5_flow_dv.c(19636): warning C5287:
>         operands are different enum types 'ibv_flow_attr_type' and
>         'ibv_flow_flags';
>         use an explicit cast to silence this warning
>
> IBV_FLOW_ATTR_FLAGS_EGRESS was incorrectly passed in to
> type field of mlx5dv_flow_matcher_attr struct,
> instead of flags field.
> As a result counter offset support discovery returned a false positive
> result on application with old rdma-core.
>
> Bugzilla ID: 1758
> Fixes: 4fd5e1484887 ("net/mlx5: fix counter offset detection")
> Cc: suanmingm at nvidia.com
> Cc: stable at dpdk.org
>
> Reported-by: Andre Muezerie <andremue at linux.microsoft.com>
> Signed-off-by: Dariusz Sosnowski <dsosnowski at nvidia.com>

I did not test the patch, but on the principle this lgtm.

Andre, can you confirm it solves the build warning you were seeing with MSVC?


-- 
David Marchand



More information about the stable mailing list