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)
committerSaeed Mahameed <saeedm@nvidia.com>
Mon, 22 Mar 2021 20:16:40 +0000 (13:16 -0700)
commit96b5b4585843e3c83fb1930e5dfbefd0fb889c55
tree0de3941ec1b90647a5075d95fddf15783c0fe4a3
parent7d6c86e3ccb5ceea767df5c7a9a17cdfccd3df9a
net/mlx5e: Offload tuple rewrite for non-CT flows

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>
drivers/net/ethernet/mellanox/mlx5/core/en/tc_ct.c
drivers/net/ethernet/mellanox/mlx5/core/en_tc.c