net/mlx5: fix modify field action order for MAC
authorAlexander Kozyrev <akozyrev@nvidia.com>
Wed, 16 Jun 2021 14:42:36 +0000 (17:42 +0300)
committerRaslan Darawsheh <rasland@nvidia.com>
Thu, 24 Jun 2021 11:19:52 +0000 (13:19 +0200)
commitfdd0c046f48b44749d894a4f97070a9359ad9afe
tree480df95334ac78d7fd4dfea54b0e922033b4df38
parentfa06906a48ee9d31a22f58a05f72c7bd4b737459
net/mlx5: fix modify field action order for MAC

MAC addresses are split into 2 parts inside Mellanox NIC:
bits 0-15 are separate from bits 16-47. That makes a copy
from another packet field tricky because any other field
is aligned to 32 bits, not 16. This causes unexpected
results when using the MODIFY_FIELD action with MAC addresses.
Track crossing MAC addresses boundary and arrange a proper
order for the MODIFY_FIELD action involving MAC addresses.

Fixes: 641dbe4fb053 ("net/mlx5: support modify field flow action")
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