public inbox for netdev@vger.kernel.org 
 help / color / mirror / Atom feed
From: Jakub Kicinski <kuba@kernel•org>
To: "Pandey, Radhey Shyam" <radhey.shyam.pandey@amd•com>
Cc: "davem@davemloft•net" <davem@davemloft•net>,
	"edumazet@google•com" <edumazet@google•com>,
	"pabeni@redhat•com" <pabeni@redhat•com>,
	"robh+dt@kernel•org" <robh+dt@kernel•org>,
	"krzysztof.kozlowski+dt@linaro•org"
	<krzysztof.kozlowski+dt@linaro•org>,
	"conor+dt@kernel•org" <conor+dt@kernel•org>,
	"Simek, Michal" <michal.simek@amd•com>,
	"linux@armlinux•org.uk" <linux@armlinux•org.uk>,
	"f.fainelli@gmail•com" <f.fainelli@gmail•com>,
	"netdev@vger•kernel.org" <netdev@vger•kernel.org>,
	"devicetree@vger•kernel.org" <devicetree@vger•kernel.org>,
	"linux-kernel@vger•kernel.org" <linux-kernel@vger•kernel.org>,
	"linux-arm-kernel@lists•infradead.org"
	<linux-arm-kernel@lists•infradead.org>,
	"git (AMD-Xilinx)" <git@amd•com>
Subject: Re: [PATCH net-next v7 3/3] net: axienet: Introduce dmaengine support
Date: Mon, 9 Oct 2023 17:17:56 -0700	[thread overview]
Message-ID: <20231009171756.23e00a89@kernel.org> (raw)
In-Reply-To: <MN0PR12MB5953E37D081382AF52C309E2B7CEA@MN0PR12MB5953.namprd12.prod.outlook.com>

On Mon, 9 Oct 2023 19:41:35 +0000 Pandey, Radhey Shyam wrote:
> > But somewhere else or just here after printing the warning?  
> 
> There is call to netif_stop_queue(ndev) just before this netdev_warn.
> I copied below for quick reference.
> 
> +	sg_len = skb_shinfo(skb)->nr_frags + 1;
> +	if (!CIRC_SPACE(lp->tx_ring_head, lp->tx_ring_tail, TX_BD_NUM_MAX)) {
> +		netif_stop_queue(ndev);
> +		if (net_ratelimit())
> +			netdev_warn(ndev, "TX ring unexpectedly full\n");
> +		return NETDEV_TX_BUSY;
> +	}
> 
> However, I noticed above check doesn't account for all frags - so will 
> modify the if check to see if available space is less than sg_len. If yes, then 
> stop the queue and return busy , else continue with xmit.

Please take a look at:

https://www.kernel.org/doc/html/next/networking/driver.html#stop-queues-in-advance


  reply	other threads:[~2023-10-10  0:17 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-27 19:32 [PATCH net-next v7 0/3] net: axienet: Introduce dmaengine Radhey Shyam Pandey
2023-09-27 19:32 ` [PATCH net-next v7 1/3] dt-bindings: net: xlnx,axi-ethernet: Introduce DMA support Radhey Shyam Pandey
2023-09-27 19:32 ` [PATCH net-next v7 2/3] net: axienet: Preparatory changes for dmaengine support Radhey Shyam Pandey
2023-10-04 20:41   ` Jakub Kicinski
2023-10-06 18:24     ` Pandey, Radhey Shyam
2023-09-27 19:32 ` [PATCH net-next v7 3/3] net: axienet: Introduce " Radhey Shyam Pandey
2023-10-04 20:53   ` Jakub Kicinski
2023-10-06 19:04     ` Pandey, Radhey Shyam
2023-10-06 21:32       ` Jakub Kicinski
2023-10-09 19:41         ` Pandey, Radhey Shyam
2023-10-10  0:17           ` Jakub Kicinski [this message]
2023-10-09 20:20   ` Florian Fainelli
2023-10-10 15:16     ` Pandey, Radhey Shyam

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=20231009171756.23e00a89@kernel.org \
    --to=kuba@kernel$(echo .)org \
    --cc=conor+dt@kernel$(echo .)org \
    --cc=davem@davemloft$(echo .)net \
    --cc=devicetree@vger$(echo .)kernel.org \
    --cc=edumazet@google$(echo .)com \
    --cc=f.fainelli@gmail$(echo .)com \
    --cc=git@amd$(echo .)com \
    --cc=krzysztof.kozlowski+dt@linaro$(echo .)org \
    --cc=linux-arm-kernel@lists$(echo .)infradead.org \
    --cc=linux-kernel@vger$(echo .)kernel.org \
    --cc=linux@armlinux$(echo .)org.uk \
    --cc=michal.simek@amd$(echo .)com \
    --cc=netdev@vger$(echo .)kernel.org \
    --cc=pabeni@redhat$(echo .)com \
    --cc=radhey.shyam.pandey@amd$(echo .)com \
    --cc=robh+dt@kernel$(echo .)org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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