]> git.baikalelectronics.ru Git - kernel.git/commit
net/mlx5e: Fix endianness handling in pedit mask
authorSebastian Hense <sebastian.hense1@ibm.com>
Thu, 20 Feb 2020 07:11:36 +0000 (08:11 +0100)
committerSaeed Mahameed <saeedm@mellanox.com>
Thu, 5 Mar 2020 23:13:42 +0000 (15:13 -0800)
commit85e6354903a38eb06cf710777983003a572d577c
tree9ef7bb2ff22bf4163d6b033c5c0546f3db6a19fa
parent21abba6e9845516d652b73946dd29aa6bd568984
net/mlx5e: Fix endianness handling in pedit mask

The mask value is provided as 64 bit and has to be casted in
either 32 or 16 bit. On big endian systems the wrong half was
casted which resulted in an all zero mask.

Fixes: e52fa2a1c373 ("net/mlx5e: Support header re-write of partial fields in TC pedit offload")
Signed-off-by: Sebastian Hense <sebastian.hense1@ibm.com>
Reviewed-by: Roi Dayan <roid@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
drivers/net/ethernet/mellanox/mlx5/core/en_tc.c