All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jakub Kicinski <kuba@kernel.org>
To: "Gupta, Suraj" <Suraj.Gupta2@amd.com>
Cc: "andrew+netdev@lunn.ch" <andrew+netdev@lunn.ch>,
	"davem@davemloft.net" <davem@davemloft.net>,
	"edumazet@google.com" <edumazet@google.com>,
	"pabeni@redhat.com" <pabeni@redhat.com>,
	"Simek, Michal" <michal.simek@amd.com>,
	"sean.anderson@linux.dev" <sean.anderson@linux.dev>,
	"Pandey, Radhey Shyam" <radhey.shyam.pandey@amd.com>,
	"horms@kernel.org" <horms@kernel.org>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	"linux-arm-kernel@lists.infradead.org"
	<linux-arm-kernel@lists.infradead.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"Katakam, Harini" <harini.katakam@amd.com>
Subject: Re: [PATCH net] net: xilinx: axienet: Increment Rx skb ring head pointer after BD is successfully allocated in dmaengine flow
Date: Mon, 11 Aug 2025 08:37:38 -0700	[thread overview]
Message-ID: <20250811083738.04bf1e31@kernel.org> (raw)
In-Reply-To: <BL3PR12MB65712291B55DD8D535BAE667C92EA@BL3PR12MB6571.namprd12.prod.outlook.com>

On Sat, 9 Aug 2025 20:31:40 +0000 Gupta, Suraj wrote:
> > The fix itself seems incomplete. Even if we correctly skip the increment we
> > will never try to catch up with the allocations, the ring will have fewer
> > outstanding Rx skbs until reset, right? Worst case we drop all the skbs and the
> > ring will be empty, no Rx will happen until reset.
> > The shutdown path seems to be checking for skb = NULL so I guess it's correct
> > but good to double check..
> 
> I agree that Rx ring will have fewer outstanding skbs. But I think
> that difference won't exceed one anytime as descriptors submission
> will fail only once due to insufficient space in AXIDMA BD ring. Rest
> of the time we already will have an extra entry in AXIDMA BD ring.
> Also, invoking callback (where Rx skb ring hp is filled in
> axienet)and freeing AXIDMA BD are part of same tasklet in AXIDMA
> driver so next callback will only be called after freeing a BD. I
> tested running stress tests (Both UPD and TCP netperf). Please let me
> know your thoughts if I'm missing something.

That wasn't my reading, maybe I misinterpreted the code.

From what I could tell the driver tries to give one new buffer for each
buffer completed. So it never tries to "catch up" on previously missed
allocations. IOW say we have a queue with 16 indexes, after 16 failures
(which may be spread out over time) the ring will be empty.


  reply	other threads:[~2025-08-11 18:36 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-05 19:19 [PATCH net] net: xilinx: axienet: Increment Rx skb ring head pointer after BD is successfully allocated in dmaengine flow Suraj Gupta
2025-08-05 19:32 ` Sean Anderson
2025-08-06  9:03 ` Pandey, Radhey Shyam
2025-08-08 19:05 ` Jakub Kicinski
2025-08-09 20:31   ` Gupta, Suraj
2025-08-11 15:37     ` Jakub Kicinski [this message]
2025-08-11 15:55       ` Pandey, Radhey Shyam
2025-08-11 16:43         ` Jakub Kicinski
2025-08-11 17:41           ` Gupta, Suraj

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=20250811083738.04bf1e31@kernel.org \
    --to=kuba@kernel.org \
    --cc=Suraj.Gupta2@amd.com \
    --cc=andrew+netdev@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=harini.katakam@amd.com \
    --cc=horms@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=michal.simek@amd.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=radhey.shyam.pandey@amd.com \
    --cc=sean.anderson@linux.dev \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.