net/mlx5: fix modify field action endianness
authorAlexander Kozyrev <akozyrev@nvidia.com>
Fri, 2 Apr 2021 02:07:41 +0000 (02:07 +0000)
committerRaslan Darawsheh <rasland@nvidia.com>
Tue, 13 Apr 2021 11:22:57 +0000 (13:22 +0200)
commitf70dcb2bab09f21f8f73a192eb7ba6fc0255b48b
tree2b0f6d98742ba989440ac648ee5fa8231672b8b1
parent102b46965d0a5d7f8b19ec7bf2b32f0dc48658bb
net/mlx5: fix modify field action endianness

Converting modify_field action masks to the big endian format is wrong
for small (less than 4 bytes) fields. Use the BE conversions appropriate
for a field size, not rte_cpu_to_be_32 for everything.

Fixes: 144127ba5660 ("net/mlx5: adjust modify field action endianness")
Cc: stable@dpdk.org
Signed-off-by: Alexander Kozyrev <akozyrev@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
drivers/net/mlx5/mlx5_flow_dv.c