From: Tariq Toukan <tariqt@nvidia.com>
To: "David S. Miller" <davem@davemloft.net>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Eric Dumazet <edumazet@google.com>
Cc: <netdev@vger.kernel.org>, Saeed Mahameed <saeedm@nvidia.com>,
Gal Pressman <gal@nvidia.com>,
Leon Romanovsky <leonro@nvidia.com>,
Jianbo Liu <jianbol@nvidia.com>,
Dragos Tatulea <dtatulea@nvidia.com>,
Tariq Toukan <tariqt@nvidia.com>
Subject: [PATCH net V2 5/7] net/mlx5e: Add mqprio_rl cleanup and free in mlx5e_priv_cleanup()
Date: Thu, 27 Jun 2024 21:02:38 +0300 [thread overview]
Message-ID: <20240627180240.1224975-6-tariqt@nvidia.com> (raw)
In-Reply-To: <20240627180240.1224975-1-tariqt@nvidia.com>
From: Jianbo Liu <jianbol@nvidia.com>
In the cited commit, mqprio_rl cleanup and free are mistakenly removed
in mlx5e_priv_cleanup(), and it causes the leakage of host memory and
firmware SCHEDULING_ELEMENT objects while changing eswitch mode. So,
add them back.
Fixes: 0bb7228f7096 ("net/mlx5e: Fix mqprio_rl handling on devlink reload")
Signed-off-by: Jianbo Liu <jianbol@nvidia.com>
Reviewed-by: Dragos Tatulea <dtatulea@nvidia.com>
Signed-off-by: Tariq Toukan <tariqt@nvidia.com>
---
drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_main.c b/drivers/net/ethernet/mellanox/mlx5/core/en_main.c
index a605eae56685..eedbcba22689 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/en_main.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en_main.c
@@ -5868,6 +5868,11 @@ void mlx5e_priv_cleanup(struct mlx5e_priv *priv)
kfree(priv->htb_qos_sq_stats[i]);
kvfree(priv->htb_qos_sq_stats);
+ if (priv->mqprio_rl) {
+ mlx5e_mqprio_rl_cleanup(priv->mqprio_rl);
+ mlx5e_mqprio_rl_free(priv->mqprio_rl);
+ }
+
memset(priv, 0, sizeof(*priv));
}
--
2.31.1
next prev parent reply other threads:[~2024-06-27 18:04 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-27 18:02 [PATCH net V2 0/7] mlx5 fixes 2024-06-27 Tariq Toukan
2024-06-27 18:02 ` [PATCH net V2 1/7] net/mlx5: IFC updates for changing max EQs Tariq Toukan
2024-06-30 7:30 ` Tariq Toukan
2024-06-27 18:02 ` [PATCH net V2 2/7] net/mlx5: Use max_num_eqs_24b capability if set Tariq Toukan
2024-06-27 18:02 ` [PATCH net V2 3/7] net/mlx5: Use max_num_eqs_24b when setting max_io_eqs Tariq Toukan
2024-06-27 18:02 ` [PATCH net V2 4/7] net/mlx5: E-switch, Create ingress ACL when needed Tariq Toukan
2024-06-27 18:02 ` Tariq Toukan [this message]
2024-06-27 18:02 ` [PATCH net V2 6/7] net/mlx5e: Present succeeded IPsec SA bytes and packet Tariq Toukan
2024-06-27 18:02 ` [PATCH net V2 7/7] net/mlx5e: Approximate IPsec per-SA payload data bytes count Tariq Toukan
2024-06-28 12:00 ` [PATCH net V2 0/7] mlx5 fixes 2024-06-27 patchwork-bot+netdevbpf
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=20240627180240.1224975-6-tariqt@nvidia.com \
--to=tariqt@nvidia.com \
--cc=davem@davemloft.net \
--cc=dtatulea@nvidia.com \
--cc=edumazet@google.com \
--cc=gal@nvidia.com \
--cc=jianbol@nvidia.com \
--cc=kuba@kernel.org \
--cc=leonro@nvidia.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=saeedm@nvidia.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
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;
as well as URLs for NNTP newsgroup(s).