From: Saeed Mahameed <saeed@kernel•org>
To: "David S. Miller" <davem@davemloft•net>,
Jakub Kicinski <kuba@kernel•org>, Paolo Abeni <pabeni@redhat•com>,
Eric Dumazet <edumazet@google•com>
Cc: Saeed Mahameed <saeedm@nvidia•com>,
netdev@vger•kernel.org, Tariq Toukan <tariqt@nvidia•com>,
Vlad Buslov <vladbu@nvidia•com>, Roi Dayan <roid@nvidia•com>
Subject: [net 05/15] net/mlx5e: Use correct encap attribute during invalidation
Date: Mon, 22 May 2023 22:42:32 -0700 [thread overview]
Message-ID: <20230523054242.21596-6-saeed@kernel.org> (raw)
In-Reply-To: <20230523054242.21596-1-saeed@kernel.org>
From: Vlad Buslov <vladbu@nvidia•com>
With introduction of post action infrastructure most of the users of encap
attribute had been modified in order to obtain the correct attribute by
calling mlx5e_tc_get_encap_attr() helper instead of assuming encap action
is always on default attribute. However, the cited commit didn't modify
mlx5e_invalidate_encap() which prevents it from destroying correct modify
header action which leads to a warning [0]. Fix the issue by using correct
attribute.
[0]:
Feb 21 09:47:35 c-237-177-40-045 kernel: WARNING: CPU: 17 PID: 654 at drivers/net/ethernet/mellanox/mlx5/core/en_tc.c:684 mlx5e_tc_attach_mod_hdr+0x1cc/0x230 [mlx5_core]
Feb 21 09:47:35 c-237-177-40-045 kernel: RIP: 0010:mlx5e_tc_attach_mod_hdr+0x1cc/0x230 [mlx5_core]
Feb 21 09:47:35 c-237-177-40-045 kernel: Call Trace:
Feb 21 09:47:35 c-237-177-40-045 kernel: <TASK>
Feb 21 09:47:35 c-237-177-40-045 kernel: mlx5e_tc_fib_event_work+0x8e3/0x1f60 [mlx5_core]
Feb 21 09:47:35 c-237-177-40-045 kernel: ? mlx5e_take_all_encap_flows+0xe0/0xe0 [mlx5_core]
Feb 21 09:47:35 c-237-177-40-045 kernel: ? lock_downgrade+0x6d0/0x6d0
Feb 21 09:47:35 c-237-177-40-045 kernel: ? lockdep_hardirqs_on_prepare+0x273/0x3f0
Feb 21 09:47:35 c-237-177-40-045 kernel: ? lockdep_hardirqs_on_prepare+0x273/0x3f0
Feb 21 09:47:35 c-237-177-40-045 kernel: process_one_work+0x7c2/0x1310
Feb 21 09:47:35 c-237-177-40-045 kernel: ? lockdep_hardirqs_on_prepare+0x3f0/0x3f0
Feb 21 09:47:35 c-237-177-40-045 kernel: ? pwq_dec_nr_in_flight+0x230/0x230
Feb 21 09:47:35 c-237-177-40-045 kernel: ? rwlock_bug.part.0+0x90/0x90
Feb 21 09:47:35 c-237-177-40-045 kernel: worker_thread+0x59d/0xec0
Feb 21 09:47:35 c-237-177-40-045 kernel: ? __kthread_parkme+0xd9/0x1d0
Fixes: 8300f225268b ("net/mlx5e: Create new flow attr for multi table actions")
Signed-off-by: Vlad Buslov <vladbu@nvidia•com>
Reviewed-by: Roi Dayan <roid@nvidia•com>
Reviewed-by: Tariq Toukan <tariqt@nvidia•com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia•com>
---
drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun_encap.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun_encap.c b/drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun_encap.c
index 20c2d2ecaf93..6a052c6cfc15 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun_encap.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun_encap.c
@@ -1369,11 +1369,13 @@ static void mlx5e_invalidate_encap(struct mlx5e_priv *priv,
struct mlx5e_tc_flow *flow;
list_for_each_entry(flow, encap_flows, tmp_list) {
- struct mlx5_flow_attr *attr = flow->attr;
struct mlx5_esw_flow_attr *esw_attr;
+ struct mlx5_flow_attr *attr;
if (!mlx5e_is_offloaded_flow(flow))
continue;
+
+ attr = mlx5e_tc_get_encap_attr(flow);
esw_attr = attr->esw_attr;
if (flow_flag_test(flow, SLOW))
--
2.40.1
next prev parent reply other threads:[~2023-05-23 5:42 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-23 5:42 [pull request][net 00/15] mlx5 fixes 2023-05-22 Saeed Mahameed
2023-05-23 5:42 ` [net 01/15] net/mlx5: Collect command failures data only for known commands Saeed Mahameed
2023-05-24 7:50 ` patchwork-bot+netdevbpf
2023-05-23 5:42 ` [net 02/15] net/mlx5: Handle pairing of E-switch via uplink un/load APIs Saeed Mahameed
2023-05-23 5:42 ` [net 03/15] net/mlx5: DR, Fix crc32 calculation to work on big-endian (BE) CPUs Saeed Mahameed
2023-05-23 5:42 ` [net 04/15] net/mlx5: DR, Check force-loopback RC QP capability independently from RoCE Saeed Mahameed
2023-05-23 5:42 ` Saeed Mahameed [this message]
2023-05-23 5:42 ` [net 06/15] net/mlx5: Fix error message when failing to allocate device memory Saeed Mahameed
2023-05-23 5:42 ` [net 07/15] net/mlx5e: Fix deadlock in tc route query code Saeed Mahameed
2023-05-23 5:42 ` [net 08/15] net/mlx5e: Fix SQ wake logic in ptp napi_poll context Saeed Mahameed
2023-05-23 5:42 ` [net 09/15] net/mlx5e: TC, Fix using eswitch mapping in nic mode Saeed Mahameed
2023-05-23 5:42 ` [net 10/15] net/mlx5: E-switch, Devcom, sync devcom events and devcom comp register Saeed Mahameed
2023-05-23 5:42 ` [net 11/15] net/mlx5: Devcom, fix error flow in mlx5_devcom_register_device Saeed Mahameed
2023-05-23 5:42 ` [net 12/15] net/mlx5: Devcom, serialize devcom registration Saeed Mahameed
2023-05-23 5:42 ` [net 13/15] net/mlx5: Free irqs only on shutdown callback Saeed Mahameed
2023-05-23 5:42 ` [net 14/15] net/mlx5: Fix irq affinity management Saeed Mahameed
2023-05-23 5:42 ` [net 15/15] net/mlx5: Fix indexing of mlx5_irq Saeed Mahameed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230523054242.21596-6-saeed@kernel.org \
--to=saeed@kernel$(echo .)org \
--cc=davem@davemloft$(echo .)net \
--cc=edumazet@google$(echo .)com \
--cc=kuba@kernel$(echo .)org \
--cc=netdev@vger$(echo .)kernel.org \
--cc=pabeni@redhat$(echo .)com \
--cc=roid@nvidia$(echo .)com \
--cc=saeedm@nvidia$(echo .)com \
--cc=tariqt@nvidia$(echo .)com \
--cc=vladbu@nvidia$(echo .)com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox