[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20231108175215.351d22bf@kernel.org>
Date: Wed, 8 Nov 2023 17:52:15 -0800
From: Jakub Kicinski <kuba@...nel.org>
To: "Nelson, Shannon" <shannon.nelson@....com>
Cc: Toke Høiland-Jørgensen <toke@...hat.com>, Jesper
Dangaard Brouer <hawk@...nel.org>, David Ahern <dsahern@...il.com>,
netdev@...r.kernel.org, bpf@...r.kernel.org, Daniel Borkmann
<daniel@...earbox.net>, Alexei Starovoitov <ast@...nel.org>, Andrii
Nakryiko <andrii@...nel.org>
Subject: Re: BPF/XDP: kernel panic when removing an interface that is an
xdp_redirect target
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().
Powered by blists - more mailing lists