Thread (23 messages) 23 messages, 5 authors, 2024-06-11

Re: [PATCH net 4/8] i40e: Fix XDP program unloading while removing the driver

From: Michal Kubiak <hidden>
Date: 2024-06-06 10:02:43

On Wed, Jun 05, 2024 at 12:29:57PM -0700, Jakub Kicinski wrote:
On Wed, 5 Jun 2024 17:00:02 +0200 Michal Kubiak wrote:
quoted
I am afraid checking for NULL won't be enough here.
Normally, when ndo_bpf is called from the user space application, that
callback can be called with NULL too (when the user just wants to unload
the XDP program). In such a case, apart from calling bpf_prog_put(), we
have to rebuild our internal data structures (queues, pointers, counters
etc.) to restore the i40e driver working back in normal mode (with no
XDP program).
Apologizes for asking a question which can be answered by studying 
the code longer, but why do you need to rebuild internal data
structures for a device which is *down*. Unregistering or not.
Excuse me, but I don't understand why we should assume that a device is
*down* when that callback is being called?
Maybe I didn't make it clear, but the ndo_bpf can be called every time
when the userspace application wants to load or unload the XDP program.
It can happen when a device is *up* and also when the link is *up*.

Michal
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help