From: Michal Kubiak <michal.kubiak@intel.com>
To: Tony Nguyen <anthony.l.nguyen@intel.com>
Cc: <davem@davemloft.net>, <kuba@kernel.org>, <pabeni@redhat.com>,
<edumazet@google.com>, <netdev@vger.kernel.org>,
<maciej.fijalkowski@intel.com>, <magnus.karlsson@intel.com>,
<ast@kernel.org>, <daniel@iogearbox.net>, <hawk@kernel.org>,
<john.fastabend@gmail.com>, <bpf@vger.kernel.org>,
Wojciech Drewek <wojciech.drewek@intel.com>,
George Kuruvinakunnel <george.kuruvinakunnel@intel.com>,
Simon Horman <horms@kernel.org>
Subject: Re: [PATCH net 1/4] i40e: Fix XDP program unloading while removing the driver
Date: Tue, 11 Jun 2024 20:57:09 +0200 [thread overview]
Message-ID: <ZmieBWzCg1yR7R73@localhost.localdomain> (raw)
In-Reply-To: <20240611184239.1518418-2-anthony.l.nguyen@intel.com>
On Tue, Jun 11, 2024 at 11:42:35AM -0700, Tony Nguyen wrote:
> From: Michal Kubiak <michal.kubiak@intel.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@intel.com>
> Signed-off-by: Michal Kubiak <michal.kubiak@intel.com>
> Tested-by: George Kuruvinakunnel <george.kuruvinakunnel@intel.com>
> Acked-by: Maciej Fijalkowski <maciej.fijalkowski@intel.com>
> Reviewed-by: Simon Horman <horms@kernel.org>
> Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.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
next prev parent reply other threads:[~2024-06-11 18:57 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20240611184239.1518418-1-anthony.l.nguyen@intel.com>
2024-06-11 18:42 ` [PATCH net 1/4] i40e: Fix XDP program unloading while removing the driver Tony Nguyen
2024-06-11 18:57 ` Michal Kubiak [this message]
2024-06-11 19:03 ` Tony Nguyen
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=ZmieBWzCg1yR7R73@localhost.localdomain \
--to=michal.kubiak@intel.com \
--cc=anthony.l.nguyen@intel.com \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=george.kuruvinakunnel@intel.com \
--cc=hawk@kernel.org \
--cc=horms@kernel.org \
--cc=john.fastabend@gmail.com \
--cc=kuba@kernel.org \
--cc=maciej.fijalkowski@intel.com \
--cc=magnus.karlsson@intel.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=wojciech.drewek@intel.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