]> git.dujemihanovic.xyz Git - linux.git/commit
net/mlx5: E-switch, Fix wrong usage of source port rewrite in split rules
authorMaor Dickman <maord@nvidia.com>
Tue, 7 Feb 2023 13:07:00 +0000 (15:07 +0200)
committerSaeed Mahameed <saeedm@nvidia.com>
Wed, 15 Mar 2023 22:50:16 +0000 (15:50 -0700)
commit1313d78ac0c1cfcff7bdece8da54b080e71487c4
tree547ed776fe7407796e38a1c4b8208e97481e1491
parent7ba930fc25def6fd736abcdfa224272948a65cf7
net/mlx5: E-switch, Fix wrong usage of source port rewrite in split rules

In few cases, rules with mirror use case are split to two FTEs, one which
do the mirror action and forward to second FTE which do the rest of the rule
actions and the second redirect action.
In case of mirror rules which do split and forward to ovs internal port or
VF stack devices, source port rewrite should be used in the second FTE but
it is wrongly also set in the first FTE which break the offload.

Fix this issue by removing the wrong check if source port rewrite is needed to
be used on the first FTE of the split and instead return EOPNOTSUPP which will
block offload of rules which mirror to ovs internal port or VF stack devices
which isn't supported.

Fixes: 10742efc20a4 ("net/mlx5e: VF tunnel TX traffic offloading")
Fixes: a508728a4c8b ("net/mlx5e: VF tunnel RX traffic offloading")
Signed-off-by: Maor Dickman <maord@nvidia.com>
Reviewed-by: Roi Dayan <roid@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c