netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jakub Kicinski <kuba@kernel.org>
To: Bhargava Marreddy <bhargava.marreddy@broadcom.com>
Cc: davem@davemloft.net, edumazet@google.com, pabeni@redhat.com,
	andrew+netdev@lunn.ch, horms@kernel.org, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org, michael.chan@broadcom.com,
	pavan.chebbi@broadcom.com, vsrama-krishna.nemani@broadcom.com,
	vikas.gupta@broadcom.com,
	Rajashekar Hudumula <rajashekar.hudumula@broadcom.com>
Subject: Re: [v7, net-next 06/10] bng_en: Allocate packet buffers
Date: Sun, 14 Sep 2025 13:31:50 -0700	[thread overview]
Message-ID: <20250914133150.429b5f70@kernel.org> (raw)
In-Reply-To: <20250911193505.24068-7-bhargava.marreddy@broadcom.com>

On Fri, 12 Sep 2025 01:05:01 +0530 Bhargava Marreddy wrote:
> +static void bnge_alloc_one_rx_pkt_mem(struct bnge_net *bn,
> +				      struct bnge_rx_ring_info *rxr,
> +				      int ring_nr)
> +{
> +	u32 prod;
> +	int i;
> +
> +	prod = rxr->rx_prod;
> +	for (i = 0; i < bn->rx_ring_size; i++) {
> +		if (bnge_alloc_rx_data(bn, rxr, prod, GFP_KERNEL)) {
> +			netdev_warn(bn->netdev, "init'ed rx ring %d with %d/%d skbs only\n",
> +				    ring_nr, i, bn->rx_ring_size);
> +			break;
> +		}
> +		prod = NEXT_RX(prod);
> +	}
> +	rxr->rx_prod = prod;

You should have some sort of minimal fill level of the Rx rings.
Right now ndo_open will succeed even when Rx rings are completely empty.
Looks like you made even more functions void since v6, this is going in
the wrong direction. Most drivers actually expect the entire ring to be
filled. You can have a partial fill, but knowing bnxt I'm worried the
driver will actually never try to fill the rings back up.
-- 
pw-bot: cr

  reply	other threads:[~2025-09-14 20:31 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-11 19:34 [v7, net-next 00/10] Add more functionality to BNGE Bhargava Marreddy
2025-09-11 19:34 ` [v7, net-next 01/10] bng_en: make bnge_alloc_ring() self-unwind on failure Bhargava Marreddy
2025-09-16 15:12   ` Simon Horman
2025-09-18  9:50     ` Bhargava Chenna Marreddy
2025-09-18 19:06       ` Simon Horman
2025-09-11 19:34 ` [v7, net-next 02/10] bng_en: Add initial support for RX and TX rings Bhargava Marreddy
2025-09-11 19:34 ` [v7, net-next 03/10] bng_en: Add initial support for CP and NQ rings Bhargava Marreddy
2025-09-16 14:54   ` Simon Horman
2025-09-18  9:40     ` Bhargava Chenna Marreddy
2025-09-11 19:34 ` [v7, net-next 04/10] bng_en: Introduce VNIC Bhargava Marreddy
2025-09-11 19:35 ` [v7, net-next 05/10] bng_en: Initialise core resources Bhargava Marreddy
2025-09-16 15:45   ` Simon Horman
2025-09-18 10:49     ` Bhargava Chenna Marreddy
2025-09-11 19:35 ` [v7, net-next 06/10] bng_en: Allocate packet buffers Bhargava Marreddy
2025-09-14 20:31   ` Jakub Kicinski [this message]
2025-09-15 17:56     ` Bhargava Chenna Marreddy
2025-09-15 21:52       ` Jakub Kicinski
2025-09-11 19:35 ` [v7, net-next 07/10] bng_en: Allocate stat contexts Bhargava Marreddy
2025-09-11 19:35 ` [v7, net-next 08/10] bng_en: Register rings with the firmware Bhargava Marreddy
2025-09-16 15:51   ` Simon Horman
2025-09-18 10:41     ` Bhargava Chenna Marreddy
2025-09-18 19:06       ` Simon Horman
2025-09-17 20:14   ` [External] : " ALOK TIWARI
2025-09-11 19:35 ` [v7, net-next 09/10] bng_en: Register default VNIC Bhargava Marreddy
2025-09-17 20:18   ` ALOK TIWARI
2025-09-19  6:28     ` Bhargava Chenna Marreddy
2025-09-11 19:35 ` [v7, net-next 10/10] bng_en: Configure " Bhargava Marreddy

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=20250914133150.429b5f70@kernel.org \
    --to=kuba@kernel.org \
    --cc=andrew+netdev@lunn.ch \
    --cc=bhargava.marreddy@broadcom.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=horms@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=michael.chan@broadcom.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=pavan.chebbi@broadcom.com \
    --cc=rajashekar.hudumula@broadcom.com \
    --cc=vikas.gupta@broadcom.com \
    --cc=vsrama-krishna.nemani@broadcom.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).