]> git.baikalelectronics.ru Git - kernel.git/commit
net/mlx5e: Properly enforce disallowing of partial field re-write offload
authorOr Gerlitz <ogerlitz@mellanox.com>
Tue, 9 May 2017 16:02:42 +0000 (19:02 +0300)
committerSaeed Mahameed <saeedm@mellanox.com>
Tue, 23 May 2017 13:23:31 +0000 (16:23 +0300)
commit8d2bb2f8310ccf8acdf8ed3ea77eec0ab4bd9514
treeb5b2e82f1cb8776f6fb49f167990ef763789af93
parent2f11816fbbd4e5a1ef3526553976fc1136ef1708
net/mlx5e: Properly enforce disallowing of partial field re-write offload

Currently we don't support partial header re-writes through TC pedit
action offloading. However, the code that enforces that wasn't err-ing
on cases where the first and last bits of the mask are set but there is
some zero bit between them, such as in the below example, fix that!

tc filter add dev enp1s0 protocol ip parent ffff: prio 10 flower
ip_proto udp dst_port 2001 skip_sw
action pedit munge ip src set 1.0.0.1 retain 0xff0000ff

Fixes: 0a1fcdab0706 ('net/mlx5e: Add parsing of TC pedit actions to HW format')
Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com>
Reviewed-by: Paul Blakey <paulb@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
drivers/net/ethernet/mellanox/mlx5/core/en_tc.c