net/mlx5: fix offset calculation for modify field action
authorAlexander Kozyrev <akozyrev@nvidia.com>
Mon, 5 Jul 2021 09:47:04 +0000 (12:47 +0300)
committerRaslan Darawsheh <rasland@nvidia.com>
Thu, 8 Jul 2021 20:09:30 +0000 (22:09 +0200)
commit8762718d721204a89d5de1a499c869a38f2f639b
treec1acb9df1aab0fe647496ffb43e88aa72e676652
parentcdc32d127e68d711d2c072883983e4bcf792fa61
net/mlx5: fix offset calculation for modify field action

Offsets are not taken into account during MAC addresses
manipulation for the MODIFY_FIELD action. That leads to
a wrong split between 0-15 and 16-47 bits and corrupted
data being copied to/from MAC addresses. Use both source
and destination offsets to calcucate the proper modify
header action specification.

Fixes: fdd0c046f4 ("net/mlx5: fix modify field action order for MAC")
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