From: Jakub Kicinski <kuba@kernel.org>
To: "Nelson, Shannon" <shannon.nelson@amd.com>
Cc: "Toke Høiland-Jørgensen" <toke@redhat.com>,
"Jesper Dangaard Brouer" <hawk@kernel.org>,
"David Ahern" <dsahern@gmail.com>,
netdev@vger.kernel.org, bpf@vger.kernel.org,
"Daniel Borkmann" <daniel@iogearbox.net>,
"Alexei Starovoitov" <ast@kernel.org>,
"Andrii Nakryiko" <andrii@kernel.org>
Subject: Re: BPF/XDP: kernel panic when removing an interface that is an xdp_redirect target
Date: Wed, 8 Nov 2023 17:52:15 -0800 [thread overview]
Message-ID: <20231108175215.351d22bf@kernel.org> (raw)
In-Reply-To: <fa95d5d0-35c0-497e-aea8-a35f9f6304f4@amd.com>
On Wed, 8 Nov 2023 13:30:21 -0800 Nelson, Shannon wrote:
> > Another source of a bug like this could be that your driver does not in
> > fact call xdp_do_flush() before exiting its NAPI cycle, so that there
> > will be packets from the previous cycle in the bq queue, in which case
> > the assumption mentioned in the linked document obviously breaks down.
> > But that would also be a driver bug :)
>
> We do call the xdp_do_flush() at the end of the NAPI cycle, just before
> calling napi_complete_done().
Just to be sure - flush has to happen on every cycle, not only
before calling napi_complete_done().
next prev parent reply other threads:[~2023-11-09 1:52 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-06 23:03 BPF/XDP: kernel panic when removing an interface that is an xdp_redirect target Nelson, Shannon
2023-11-07 15:31 ` Toke Høiland-Jørgensen
2023-11-08 21:30 ` Nelson, Shannon
2023-11-08 23:10 ` Toke Høiland-Jørgensen
2023-11-09 1:52 ` Jakub Kicinski [this message]
2023-11-09 2:11 ` Nelson, Shannon
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=20231108175215.351d22bf@kernel.org \
--to=kuba@kernel.org \
--cc=andrii@kernel.org \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=dsahern@gmail.com \
--cc=hawk@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=shannon.nelson@amd.com \
--cc=toke@redhat.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