netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Simon Horman <simon.horman@corigine.com>
To: Pieter Jansen van Vuuren <pieter.jansen-van-vuuren@amd.com>
Cc: netdev@vger.kernel.org, linux-net-drivers@amd.com,
	davem@davemloft.net, kuba@kernel.org, pabeni@redhat.com,
	edumazet@google.com, ecree.xilinx@gmail.com,
	habetsm.xilinx@gmail.com
Subject: Re: [PATCH net-next] sfc: handle VI shortage on ef100 by readjusting the channels
Date: Wed, 24 May 2023 16:25:25 +0200	[thread overview]
Message-ID: <ZG4eVZgdhy6oo8P7@corigine.com> (raw)
In-Reply-To: <d4ea49b5-5515-4097-c879-afb60cc5c673@amd.com>

On Wed, May 24, 2023 at 02:52:48PM +0100, Pieter Jansen van Vuuren wrote:
> 
> 
> On 24/05/2023 11:09, Simon Horman wrote:
> > On Wed, May 24, 2023 at 10:36:38AM +0100, Pieter Jansen van Vuuren wrote:
> >> When fewer VIs are allocated than what is allowed we can readjust
> >> the channels by calling efx_mcdi_alloc_vis() again.
> >>
> >> Signed-off-by: Pieter Jansen van Vuuren <pieter.jansen-van-vuuren@amd.com>
> >> Reviewed-by: Martin Habets <habetsm.xilinx@gmail.com>
> > 
> > Hi Pieter,
> > 
> > this patch looks good to me.
> > 
> > Reviewed-by: Simon Horman <simon.horman@corigine.com>
> > 
> > But during the review I noticed that Smatch flags some
> > problems in ef100_netdev.c that you may wish to address.
> > Please see below.
> > 
> >> ---
> >>  drivers/net/ethernet/sfc/ef100_netdev.c | 51 ++++++++++++++++++++++---
> >>  1 file changed, 45 insertions(+), 6 deletions(-)
> >>
> >> diff --git a/drivers/net/ethernet/sfc/ef100_netdev.c b/drivers/net/ethernet/sfc/ef100_netdev.c
> >> index d916877b5a9a..c201e001f3b8 100644
> >> --- a/drivers/net/ethernet/sfc/ef100_netdev.c
> >> +++ b/drivers/net/ethernet/sfc/ef100_netdev.c
> > 
> ...
> >> +		/* It should be very unlikely that we failed here again, but in
> >> +		 * such a case we return ENOSPC.
> >> +		 */
> >> +		if (rc == -EAGAIN) {
> >> +			rc = -ENOSPC;
> >> +			goto fail;
> >> +		}
> >> +	}
> >> +
> >>  	rc = efx_probe_channels(efx);
> >>  	if (rc)
> >>  		return rc;
> > 
> > Not strictly related to this patch, but Smatch says that on error this should
> > probably free some resources. So perhaps:
> > 
> > 		goto fail;
> > 
> > Also not strictly related this patch, but Smatch also noticed that
> > in ef100_probe_netdev net_dev does not seem to be freed on the error path.
> 
> Thank you for the review Simon. Yes, I think this requires some attention, I think
> this is one of a few that we need to look at. So it will likely become a separate
> patch set addressing Smatch issues.

Thanks Pieter,

I agree that these are separate issues and can
be handled outside the scope of this patch.

  reply	other threads:[~2023-05-24 14:25 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-24  9:36 [PATCH net-next] sfc: handle VI shortage on ef100 by readjusting the channels Pieter Jansen van Vuuren
2023-05-24 10:09 ` Simon Horman
2023-05-24 13:52   ` Pieter Jansen van Vuuren
2023-05-24 14:25     ` Simon Horman [this message]
2023-05-25 14:51 ` Edward Cree
2023-05-30 10:21   ` Pieter Jansen van Vuuren
2023-05-26  9:20 ` 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=ZG4eVZgdhy6oo8P7@corigine.com \
    --to=simon.horman@corigine.com \
    --cc=davem@davemloft.net \
    --cc=ecree.xilinx@gmail.com \
    --cc=edumazet@google.com \
    --cc=habetsm.xilinx@gmail.com \
    --cc=kuba@kernel.org \
    --cc=linux-net-drivers@amd.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=pieter.jansen-van-vuuren@amd.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).