net/mlx5: reject copy to mark via modify action
authorAlexander Kozyrev <akozyrev@nvidia.com>
Fri, 16 Jul 2021 08:43:05 +0000 (11:43 +0300)
committerThomas Monjalon <thomas@monjalon.net>
Thu, 22 Jul 2021 14:26:41 +0000 (16:26 +0200)
commit39f0df9b6d135ee0dd049c53d876092c6236a398
tree93940af8b819560a1c4cba8405aa6862441babc3
parent6d5735c1cba2e3b7e9eca781fbd79213e176a6c6
net/mlx5: reject copy to mark via modify action

The Mark action is a two-stage process in the Mellanox driver.
First, a hardware register is filled with the required value,
then this value is registered in the software resource table.

The MODIFY_FIELD action can instruct a Mellanox NIC to copy
some value from an arbitrary packet header field into the
hardware register, associated with the Mark item. But there
is no way NIC can modify the software resource table as well.

Due to these driver limitations the copying of arbitrary value
to the MARK can not be supported and should be rejected in the
MODIFY_FIELD action.

Signed-off-by: Alexander Kozyrev <akozyrev@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
drivers/net/mlx5/mlx5_flow_dv.c