public inbox for netdev@vger.kernel.org 
 help / color / mirror / Atom feed
From: Jakub Kicinski <kuba@kernel•org>
To: Michael Chan <michael.chan@broadcom•com>
Cc: davem@davemloft•net, netdev@vger•kernel.org, edumazet@google•com,
	pabeni@redhat•com, gospo@broadcom•com
Subject: Re: [PATCH net] bnxt: don't handle XDP in netpoll
Date: Thu, 27 Jul 2023 12:42:28 -0700	[thread overview]
Message-ID: <20230727124228.01a9bb0a@kernel.org> (raw)
In-Reply-To: <CACKFLikORos5OuSfmrBpayaHx2usz_CR1hryYT3o8ZOvkhfMsg@mail.gmail.com>

On Thu, 27 Jul 2023 12:29:24 -0700 Michael Chan wrote:
> > Do you prefer adding a return value to tx_int() to tell
> > __bnxt_poll_work_done() whether the work has been done;
> > or to clear tx_pkts in the handler itself rather than
> > the caller?
> 
> It's a bigger problem.  When we transmit packets, we store these
> packet buffers and advance the producer index.  The completion ring
> tells us how many TX packets have completed.  We then walk the TX ring
> for the number of TX packets completed and free the buffers.  If we
> cannot free the buffers now, we have to save this information (the
> consumer index).  We won't get this information again in the
> completion ring.

It's already saved in bnapi->tx_pkts, isn't it?

This makes me wonder if the bug we were seeing with unexpected
completions isn't tx_pkts being stale. Because it's not getting
wiped on reset.

      parent reply	other threads:[~2023-07-27 19:42 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-27 17:05 [PATCH net] bnxt: don't handle XDP in netpoll Jakub Kicinski
2023-07-27 18:04 ` Andy Gospodarek
2023-07-27 18:26 ` Jakub Kicinski
2023-07-27 18:52 ` Michael Chan
2023-07-27 19:05   ` Jakub Kicinski
2023-07-27 19:29     ` Michael Chan
2023-07-27 19:40       ` Michael Chan
2023-07-27 19:42       ` Jakub Kicinski [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=20230727124228.01a9bb0a@kernel.org \
    --to=kuba@kernel$(echo .)org \
    --cc=davem@davemloft$(echo .)net \
    --cc=edumazet@google$(echo .)com \
    --cc=gospo@broadcom$(echo .)com \
    --cc=michael.chan@broadcom$(echo .)com \
    --cc=netdev@vger$(echo .)kernel.org \
    --cc=pabeni@redhat$(echo .)com \
    /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