* [PATCH net-next] net: mana: Use mana_cleanup_port_context() for rxq cleanup
@ 2024-06-14 7:19 Shradha Gupta
2024-06-15 14:28 ` Simon Horman
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: Shradha Gupta @ 2024-06-14 7:19 UTC (permalink / raw)
To: linux-kernel, netdev, linux-hyperv
Cc: Shradha Gupta, Souradeep Chakrabarti, Erick Archer,
Konstantin Taranov, Simon Horman, Paolo Abeni, Jakub Kicinski,
Eric Dumazet, David S. Miller, Dexuan Cui, Wei Liu, Haiyang Zhang,
K. Y. Srinivasan, Shradha Gupta
To cleanup rxqs in port context structures, instead of duplicating the
code, use existing function mana_cleanup_port_context() which does
the exact cleanup that's needed.
Signed-off-by: Shradha Gupta <shradhagupta@linux.microsoft.com>
---
drivers/net/ethernet/microsoft/mana/mana_en.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/net/ethernet/microsoft/mana/mana_en.c b/drivers/net/ethernet/microsoft/mana/mana_en.c
index b89ad4afd66e..93e526e5dd16 100644
--- a/drivers/net/ethernet/microsoft/mana/mana_en.c
+++ b/drivers/net/ethernet/microsoft/mana/mana_en.c
@@ -2529,8 +2529,7 @@ static int mana_init_port(struct net_device *ndev)
return 0;
reset_apc:
- kfree(apc->rxqs);
- apc->rxqs = NULL;
+ mana_cleanup_port_context(apc);
return err;
}
@@ -2787,8 +2786,7 @@ static int mana_probe_port(struct mana_context *ac, int port_idx,
free_indir:
mana_cleanup_indir_table(apc);
reset_apc:
- kfree(apc->rxqs);
- apc->rxqs = NULL;
+ mana_cleanup_port_context(apc);
free_net:
*ndev_storage = NULL;
netdev_err(ndev, "Failed to probe vPort %d: %d\n", port_idx, err);
--
2.34.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH net-next] net: mana: Use mana_cleanup_port_context() for rxq cleanup
2024-06-14 7:19 [PATCH net-next] net: mana: Use mana_cleanup_port_context() for rxq cleanup Shradha Gupta
@ 2024-06-15 14:28 ` Simon Horman
2024-06-17 6:50 ` Wei Liu
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: Simon Horman @ 2024-06-15 14:28 UTC (permalink / raw)
To: Shradha Gupta
Cc: linux-kernel, netdev, linux-hyperv, Souradeep Chakrabarti,
Erick Archer, Konstantin Taranov, Paolo Abeni, Jakub Kicinski,
Eric Dumazet, David S. Miller, Dexuan Cui, Wei Liu, Haiyang Zhang,
K. Y. Srinivasan, Shradha Gupta
On Fri, Jun 14, 2024 at 12:19:08AM -0700, Shradha Gupta wrote:
>
> To cleanup rxqs in port context structures, instead of duplicating the
> code, use existing function mana_cleanup_port_context() which does
> the exact cleanup that's needed.
>
> Signed-off-by: Shradha Gupta <shradhagupta@linux.microsoft.com>
Thanks for following-up with this clean-up, much appreciated.
Reviewed-by: Simon Horman <horms@kernel.org>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH net-next] net: mana: Use mana_cleanup_port_context() for rxq cleanup
2024-06-14 7:19 [PATCH net-next] net: mana: Use mana_cleanup_port_context() for rxq cleanup Shradha Gupta
2024-06-15 14:28 ` Simon Horman
@ 2024-06-17 6:50 ` Wei Liu
2024-06-17 15:28 ` Heng Qi
2024-06-18 1:10 ` patchwork-bot+netdevbpf
3 siblings, 0 replies; 5+ messages in thread
From: Wei Liu @ 2024-06-17 6:50 UTC (permalink / raw)
To: Shradha Gupta
Cc: linux-kernel, netdev, linux-hyperv, Souradeep Chakrabarti,
Erick Archer, Konstantin Taranov, Simon Horman, Paolo Abeni,
Jakub Kicinski, Eric Dumazet, David S. Miller, Dexuan Cui,
Wei Liu, Haiyang Zhang, K. Y. Srinivasan, Shradha Gupta
On Fri, Jun 14, 2024 at 12:19:08AM -0700, Shradha Gupta wrote:
>
> To cleanup rxqs in port context structures, instead of duplicating the
> code, use existing function mana_cleanup_port_context() which does
> the exact cleanup that's needed.
>
> Signed-off-by: Shradha Gupta <shradhagupta@linux.microsoft.com>
Reviewed-by: Wei Liu <wei.liu@kernel.org>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH net-next] net: mana: Use mana_cleanup_port_context() for rxq cleanup
2024-06-14 7:19 [PATCH net-next] net: mana: Use mana_cleanup_port_context() for rxq cleanup Shradha Gupta
2024-06-15 14:28 ` Simon Horman
2024-06-17 6:50 ` Wei Liu
@ 2024-06-17 15:28 ` Heng Qi
2024-06-18 1:10 ` patchwork-bot+netdevbpf
3 siblings, 0 replies; 5+ messages in thread
From: Heng Qi @ 2024-06-17 15:28 UTC (permalink / raw)
To: Shradha Gupta
Cc: Souradeep Chakrabarti, Erick Archer, Konstantin Taranov,
Simon Horman, Paolo Abeni, Jakub Kicinski, Eric Dumazet,
David S. Miller, Dexuan Cui, Wei Liu, Haiyang Zhang,
K. Y. Srinivasan, Shradha Gupta, open list,
open list:NETWORKING DRIVERS, linux-hyperv
在 2024/6/14 下午3:19, Shradha Gupta 写道:
> To cleanup rxqs in port context structures, instead of duplicating the
> code, use existing function mana_cleanup_port_context() which does
> the exact cleanup that's needed.
>
> Signed-off-by: Shradha Gupta <shradhagupta@linux.microsoft.com>
> ---
> drivers/net/ethernet/microsoft/mana/mana_en.c | 6 ++----
> 1 file changed, 2 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/net/ethernet/microsoft/mana/mana_en.c b/drivers/net/ethernet/microsoft/mana/mana_en.c
> index b89ad4afd66e..93e526e5dd16 100644
> --- a/drivers/net/ethernet/microsoft/mana/mana_en.c
> +++ b/drivers/net/ethernet/microsoft/mana/mana_en.c
> @@ -2529,8 +2529,7 @@ static int mana_init_port(struct net_device *ndev)
> return 0;
>
> reset_apc:
> - kfree(apc->rxqs);
> - apc->rxqs = NULL;
> + mana_cleanup_port_context(apc);
> return err;
> }
>
> @@ -2787,8 +2786,7 @@ static int mana_probe_port(struct mana_context *ac, int port_idx,
> free_indir:
> mana_cleanup_indir_table(apc);
> reset_apc:
> - kfree(apc->rxqs);
> - apc->rxqs = NULL;
> + mana_cleanup_port_context(apc);
> free_net:
> *ndev_storage = NULL;
> netdev_err(ndev, "Failed to probe vPort %d: %d\n", port_idx, err);
Reviewed-by: Heng Qi <hengqi@linux.alibaba.com>
Thanks!
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH net-next] net: mana: Use mana_cleanup_port_context() for rxq cleanup
2024-06-14 7:19 [PATCH net-next] net: mana: Use mana_cleanup_port_context() for rxq cleanup Shradha Gupta
` (2 preceding siblings ...)
2024-06-17 15:28 ` Heng Qi
@ 2024-06-18 1:10 ` patchwork-bot+netdevbpf
3 siblings, 0 replies; 5+ messages in thread
From: patchwork-bot+netdevbpf @ 2024-06-18 1:10 UTC (permalink / raw)
To: Shradha Gupta
Cc: linux-kernel, netdev, linux-hyperv, schakrabarti, erick.archer,
kotaranov, horms, pabeni, kuba, edumazet, davem, decui, wei.liu,
haiyangz, kys, shradhagupta
Hello:
This patch was applied to netdev/net-next.git (main)
by Jakub Kicinski <kuba@kernel.org>:
On Fri, 14 Jun 2024 00:19:08 -0700 you wrote:
> To cleanup rxqs in port context structures, instead of duplicating the
> code, use existing function mana_cleanup_port_context() which does
> the exact cleanup that's needed.
>
> Signed-off-by: Shradha Gupta <shradhagupta@linux.microsoft.com>
> ---
> drivers/net/ethernet/microsoft/mana/mana_en.c | 6 ++----
> 1 file changed, 2 insertions(+), 4 deletions(-)
Here is the summary with links:
- [net-next] net: mana: Use mana_cleanup_port_context() for rxq cleanup
https://git.kernel.org/netdev/net-next/c/e275e19c918b
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2024-06-18 1:10 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-06-14 7:19 [PATCH net-next] net: mana: Use mana_cleanup_port_context() for rxq cleanup Shradha Gupta
2024-06-15 14:28 ` Simon Horman
2024-06-17 6:50 ` Wei Liu
2024-06-17 15:28 ` Heng Qi
2024-06-18 1:10 ` patchwork-bot+netdevbpf
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).