[Intel-wired-lan] [PATCH net v1 2/2] iavf: Fix call trace during removing iavf driver
Jagielski, Jedrzej
jedrzej.jagielski at intel.com
Wed Jun 8 09:29:33 UTC 2022
>On 5/27/2022 1:09 AM, Jedrzej Jagielski wrote:
>> From: Grzegorz Szczurek <grzegorzx.szczurek at 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 at intel.com>
>> Signed-off-by: Jedrzej Jagielski <jedrzej.jagielski at 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?
Because we want the tc resources to be cleared at first - that is
delete queue_channel section which restores the deafult txrx ques values.
Then there is goto jump and after that our check is added.
Also that check blocks the final txrx update so place it there seems to be
sensible.
>
>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.
>
Sure these two patches will be splitted and applied to different trees.
>Thanks,
>Tony
>
>> return ret;
>> }
Thanks,
Jedrzej
More information about the Intel-wired-lan
mailing list