Re: [PATCH net 4/8] i40e: Fix XDP program unloading while removing the driver
From: Jakub Kicinski <kuba@kernel.org>
Date: 2024-06-05 19:29:58
From: Jakub Kicinski <kuba@kernel.org>
Date: 2024-06-05 19:29:58
On Wed, 5 Jun 2024 17:00:02 +0200 Michal Kubiak wrote:
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.