From: Tony Nguyen <anthony.l.nguyen@intel.com>
To: intel-wired-lan@osuosl.org
Subject: [Intel-wired-lan] [PATCH net v1 2/2] iavf: Fix call trace during removing iavf driver
Date: Fri, 27 May 2022 09:56:56 -0700 [thread overview]
Message-ID: <04b439d9-2e8f-7c50-3d52-bd6a6880edfd@intel.com> (raw)
In-Reply-To: <20220527080919.2370640-2-jedrzej.jagielski@intel.com>
On 5/27/2022 1:09 AM, Jedrzej Jagielski wrote:
> From: Grzegorz Szczurek <grzegorzx.szczurek@intel.com>
>
> If VF has configured tc qdisc with number of queues less than original
> set and then the driver went in removing process, tc resources are also
> releasing. Attempt of modify real num tx/rx in this state is causing
> call trace, because kernel is trying to releasing uninitialized queues.
>
> Fix by not modifying the number of queues when removing a driver.
>
> Fixes: d5b33d024496 ("i40evf: add ndo_setup_tc callback to i40evf")
> Signed-off-by: Grzegorz Szczurek <grzegorzx.szczurek@intel.com>
> Signed-off-by: Jedrzej Jagielski <jedrzej.jagielski@intel.com>
> ---
> drivers/net/ethernet/intel/iavf/iavf_main.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/drivers/net/ethernet/intel/iavf/iavf_main.c b/drivers/net/ethernet/intel/iavf/iavf_main.c
> index eec74ee5fc19..1b46a97f4ad6 100644
> --- a/drivers/net/ethernet/intel/iavf/iavf_main.c
> +++ b/drivers/net/ethernet/intel/iavf/iavf_main.c
> @@ -3478,6 +3478,9 @@ static int __iavf_setup_tc(struct net_device *netdev, void *type_data)
> }
> }
> exit:
> + if (iavf_is_remove_in_progress(adapter))
> + return 0;
Why do we check this condition at the end of the function after
everything is done instead of the beginning?
Also, this function from patch 1, is a refactor for checking a bit.
Refactors shouldn't be going to net unless necessary. This patch can
directly check the bit and the other patch can be sent as a follow on
after this patch has been applied.
Thanks,
Tony
> return ret;
> }
>
next prev parent reply other threads:[~2022-05-27 16:56 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-27 8:09 [Intel-wired-lan] [PATCH net v1 1/2] iavf: Add helper to check if iavf_remove() is in progress Jedrzej Jagielski
2022-05-27 8:09 ` [Intel-wired-lan] [PATCH net v1 2/2] iavf: Fix call trace during removing iavf driver Jedrzej Jagielski
2022-05-27 12:20 ` Paul Menzel
2022-05-30 8:59 ` Jagielski, Jedrzej
2022-05-27 16:56 ` Tony Nguyen [this message]
2022-06-08 9:29 ` Jagielski, Jedrzej
2022-05-27 16:58 ` [Intel-wired-lan] [PATCH net v1 1/2] iavf: Add helper to check if iavf_remove() is in progress Tony Nguyen
2022-05-31 8:47 ` Jagielski, Jedrzej
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=04b439d9-2e8f-7c50-3d52-bd6a6880edfd@intel.com \
--to=anthony.l.nguyen@intel.com \
--cc=intel-wired-lan@osuosl.org \
/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