From: Sean Anderson <sean.anderson@linux.dev>
To: Jakub Kicinski <kuba@kernel.org>
Cc: Radhey Shyam Pandey <radhey.shyam.pandey@amd.com>,
"David S . Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Paolo Abeni <pabeni@redhat.com>,
netdev@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
Michal Simek <michal.simek@amd.com>,
Andy Chiu <andy.chiu@sifive.com>,
Daniel Borkmann <daniel@iogearbox.net>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH net] net: xilinx: axienet: Fix packet counting
Date: Thu, 5 Sep 2024 10:40:03 -0400 [thread overview]
Message-ID: <096b8143-c6e5-4d64-9097-68d19ed514f3@linux.dev> (raw)
In-Reply-To: <20240904170917.29692bcb@kernel.org>
On 9/4/24 20:09, Jakub Kicinski wrote:
> On Tue, 3 Sep 2024 13:56:19 -0400 Sean Anderson wrote:
>> axienet_free_tx_chain returns the number of DMA descriptors it's
>> handled. However, axienet_tx_poll treats the return as the number of
>> packets. When scatter-gather SKBs are enabled, a single packet may use
>> multiple DMA descriptors, which causes incorrect packet counts. Fix this
>> by explicitly keepting track of the number of packets processed as
>> separate from the DMA descriptors.
>
> budget doubles up as a "are we really in NAPI" flag.
> You can't pass non-zero budget to napi_consume_skb() if not in NAPI.
Hm, maybe I should just determine this all from the "force" flag then.
--Sean
prev parent reply other threads:[~2024-09-05 14:40 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-03 17:56 [PATCH net] net: xilinx: axienet: Fix packet counting Sean Anderson
2024-09-05 0:09 ` Jakub Kicinski
2024-09-05 14:40 ` Sean Anderson [this message]
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=096b8143-c6e5-4d64-9097-68d19ed514f3@linux.dev \
--to=sean.anderson@linux.dev \
--cc=andy.chiu@sifive.com \
--cc=daniel@iogearbox.net \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=kuba@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 \
/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).