]> git.baikalelectronics.ru Git - kernel.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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 22 Mar 2023 12:33:48 +0000 (13:33 +0100)
commit470b6913c0f103b5c10215a35bb8d0afe0701aa6
tree49137ebd2046f99ab816bee449ebc0899a87eddc
parent931b6ef14718c0e4bd42e1bbab1b5f5fd94ca760
net/mlx5: E-switch, Fix wrong usage of source port rewrite in split rules

[ Upstream commit e9d335be5e239ac70bf87c37ab3d00c4c5992175 ]

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: 6fea958db052 ("net/mlx5e: VF tunnel TX traffic offloading")
Fixes: 8ce9bb6bce82 ("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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c