[PATCH] net/mlx5: fix MAC address initialization
Ferruh Yigit
ferruh.yigit at amd.com
Mon Nov 11 02:47:02 CET 2024
On 11/8/2024 4:07 PM, Dariusz Sosnowski wrote:
> Offending patch added code which broke compilation on GCC 15,
> where MAC address was initialized with a string, causing the following
> errors:
>
> ../drivers/net/mlx5/mlx5_flow.c:
> In function ‘mlx5_legacy_dmac_flow_create’:
> ../drivers/net/mlx5/mlx5_flow.c:8568:44:
> error: initializer-string for array of ‘unsigned char’ is too long
> [-Werror=unterminated-string-initialization]
> 8568 | .hdr.dst_addr.addr_bytes =
> "\xff\xff\xff\xff\xff\xff",
> |
> ^~~~~~~~~~~~~~~~~~~~~~~~~~
>
> ../drivers/net/mlx5/mlx5_flow.c: In function
> ‘mlx5_legacy_dmac_vlan_flow_create’:
> ../drivers/net/mlx5/mlx5_flow.c:8583:44:
> error: initializer-string for array of ‘unsigned char’ is too long
> [-Werror=unterminated-string-initialization]
> 8583 | .hdr.dst_addr.addr_bytes =
> "\xff\xff\xff\xff\xff\xff",
> |
> ^~~~~~~~~~~~~~~~~~~~~~~~~~
>
> This patch fixes this issue by converting it to array initialization.
>
> Fixes: cf99567fe566 ("net/mlx5: add legacy unicast flow rules management")
>
> Signed-off-by: Dariusz Sosnowski <dsosnowski at nvidia.com>
>
Acked-by: Ferruh Yigit <ferruh.yigit at amd.com>
Applied to dpdk-next-net/main, thanks.
More information about the dev
mailing list