]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
net/mlx5e: Offload tuple rewrite for non-CT flows
authorDima Chumak <dchumak@nvidia.com>
Thu, 4 Mar 2021 19:28:11 +0000 (21:28 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 30 Mar 2021 12:30:26 +0000 (14:30 +0200)
commit1c178ae0cf47cd36edfbe25db2efd00b44e0bef1
tree070833780f4fe4a3b16e62e0569ec1da08b5bb23
parent60b66dc676b93a5fac07a886b0ce7486e5a16861
net/mlx5e: Offload tuple rewrite for non-CT flows

[ Upstream commit 96b5b4585843e3c83fb1930e5dfbefd0fb889c55 ]

Setting connection tracking OVS flows and then setting non-CT flows that
use tuple rewrite action (e.g. mod_tp_dst), causes the latter flows not
being offloaded.

Fix by using a stricter condition in modify_header_match_supported() to
check tuple rewrite support only for flows with CT action. The check is
factored out into standalone modify_tuple_supported() function to aid
readability.

Fixes: 7e36feeb0467 ("net/mlx5e: CT: Don't offload tuple rewrites for established tuples")
Signed-off-by: Dima Chumak <dchumak@nvidia.com>
Reviewed-by: Paul Blakey <paulb@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/mellanox/mlx5/core/en/tc_ct.c
drivers/net/ethernet/mellanox/mlx5/core/en_tc.c