[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZmieBWzCg1yR7R73@localhost.localdomain>
Date: Tue, 11 Jun 2024 20:57:09 +0200
From: Michal Kubiak <michal.kubiak@...el.com>
To: Tony Nguyen <anthony.l.nguyen@...el.com>
CC: <davem@...emloft.net>, <kuba@...nel.org>, <pabeni@...hat.com>,
<edumazet@...gle.com>, <netdev@...r.kernel.org>,
<maciej.fijalkowski@...el.com>, <magnus.karlsson@...el.com>,
<ast@...nel.org>, <daniel@...earbox.net>, <hawk@...nel.org>,
<john.fastabend@...il.com>, <bpf@...r.kernel.org>, Wojciech Drewek
<wojciech.drewek@...el.com>, George Kuruvinakunnel
<george.kuruvinakunnel@...el.com>, Simon Horman <horms@...nel.org>
Subject: Re: [PATCH net 1/4] i40e: Fix XDP program unloading while removing
the driver
On Tue, Jun 11, 2024 at 11:42:35AM -0700, Tony Nguyen wrote:
> From: Michal Kubiak <michal.kubiak@...el.com>
>
> The commit 6533e558c650 ("i40e: Fix reset path while removing
> the driver") introduced a new PF state "__I40E_IN_REMOVE" to block
> modifying the XDP program while the driver is being removed.
> Unfortunately, such a change is useful only if the ".ndo_bpf()"
> callback was called out of the rmmod context because unloading the
> existing XDP program is also a part of driver removing procedure.
> In other words, from the rmmod context the driver is expected to
> unload the XDP program without reporting any errors. Otherwise,
> the kernel warning with callstack is printed out to dmesg.
>
> Example failing scenario:
> 1. Load the i40e driver.
> 2. Load the XDP program.
> 3. Unload the i40e driver (using "rmmod" command).
>
> Fix this by improving checks in ".ndo_bpf()" to determine if that
> callback was called from the removing context and if the kernel
> wants to unload the XDP program. Allow for unloading the XDP program
> in such a case.
>
> Fixes: 6533e558c650 ("i40e: Fix reset path while removing the driver")
> Reviewed-by: Wojciech Drewek <wojciech.drewek@...el.com>
> Signed-off-by: Michal Kubiak <michal.kubiak@...el.com>
> Tested-by: George Kuruvinakunnel <george.kuruvinakunnel@...el.com>
> Acked-by: Maciej Fijalkowski <maciej.fijalkowski@...el.com>
> Reviewed-by: Simon Horman <horms@...nel.org>
> Signed-off-by: Tony Nguyen <anthony.l.nguyen@...el.com>
> ---
Hi Tony,
After my conversation with Kuba in a separate thread, I analyzed that
patch one more time and it seems the fix can be implemented in a simpler
way, so I am going to send the v2.
Therefore, please ignore this patch.
Thanks,
Michal
Powered by blists - more mailing lists