public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Heng Qi <hengqi@linux.alibaba.com>
To: Shradha Gupta <shradhagupta@linux.microsoft.com>
Cc: Souradeep Chakrabarti <schakrabarti@linux.microsoft.com>,
	Erick Archer <erick.archer@outlook.com>,
	Konstantin Taranov <kotaranov@microsoft.com>,
	Simon Horman <horms@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	Jakub Kicinski <kuba@kernel.org>,
	Eric Dumazet <edumazet@google.com>,
	"David S. Miller" <davem@davemloft.net>,
	Dexuan Cui <decui@microsoft.com>, Wei Liu <wei.liu@kernel.org>,
	Haiyang Zhang <haiyangz@microsoft.com>,
	"K. Y. Srinivasan" <kys@microsoft.com>,
	Shradha Gupta <shradhagupta@microsoft.com>,
	open list <linux-kernel@vger.kernel.org>,
	"open list:NETWORKING DRIVERS" <netdev@vger.kernel.org>,
	linux-hyperv@vger.kernel.org
Subject: Re: [PATCH net-next] net: mana: Use mana_cleanup_port_context() for rxq cleanup
Date: Mon, 17 Jun 2024 23:28:14 +0800	[thread overview]
Message-ID: <2f77825b-c6db-491a-867d-1d7d357ea2a3@linux.alibaba.com> (raw)
In-Reply-To: <1718349548-28697-1-git-send-email-shradhagupta@linux.microsoft.com>


在 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!

  parent reply	other threads:[~2024-06-17 15:28 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
2024-06-18  1:10 ` 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=2f77825b-c6db-491a-867d-1d7d357ea2a3@linux.alibaba.com \
    --to=hengqi@linux.alibaba.com \
    --cc=davem@davemloft.net \
    --cc=decui@microsoft.com \
    --cc=edumazet@google.com \
    --cc=erick.archer@outlook.com \
    --cc=haiyangz@microsoft.com \
    --cc=horms@kernel.org \
    --cc=kotaranov@microsoft.com \
    --cc=kuba@kernel.org \
    --cc=kys@microsoft.com \
    --cc=linux-hyperv@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=schakrabarti@linux.microsoft.com \
    --cc=shradhagupta@linux.microsoft.com \
    --cc=shradhagupta@microsoft.com \
    --cc=wei.liu@kernel.org \
    /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