Skip to contentSkip to conversation

iavf: schedule watchdog immediately when changing primary MAC

PATCH In review Stefan Assmann 3 participants 3 messages Jan 10, 2023 – Jan 19, 2023

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 iavf: schedule watchdog immediately when changing primary MAC

From: Stefan Assmann <[email protected]>

iavf_replace_primary_mac() utilizes queue_work() to schedule the watchdog task but that only ensures that the watchdog task is queued to run. To make sure the watchdog is executed asap use mod_delayed_work().

Without this patch it may take up to 2s until the watchdog task gets executed, which may cause long delays when setting the MAC address.

Fixes a3e839d539e0 ("iavf: Add usage of new virtchnl format to set default MAC")

---
Depends on net-queue patch
ca7facb6602f iavf: fix temporary deadlock and failure to set MAC address

 drivers/net/ethernet/intel/iavf/iavf_main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/intel/iavf/iavf_main.c +1 -1
index fff06f876c2c..1d3aa740caea 100644
@@ -1033,7 +1033,7 @@ int iavf_replace_primary_mac(struct iavf_adapter *adapter,
 
 	/* schedule the watchdog task to immediately process the request */
 	if (f) {
-		queue_work(adapter->wq, &adapter->watchdog_task.work);
+		mod_delayed_work(adapter->wq, &adapter->watchdog_task, 0);
 		return 0;
 	}
 	return -ENOMEM;
Signature · 6 lines
2.38.1

_______________________________________________
Intel-wired-lan mailing list
[email protected]
https://lists.osuosl.org/mailman/listinfo/intel-wired-lan
Reviewed-by Tested-by on v1 1/1
#1 lore raw
Quoted 34 lines · Stefan Assmann

From: Stefan Assmann <[email protected]>

iavf_replace_primary_mac() utilizes queue_work() to schedule the watchdog task but that only ensures that the watchdog task is queued to run. To make sure the watchdog is executed asap use mod_delayed_work().

Without this patch it may take up to 2s until the watchdog task gets executed, which may cause long delays when setting the MAC address.

Fixes a3e839d539e0 ("iavf: Add usage of new virtchnl format to set default MAC")

---
Depends on net-queue patch
ca7facb6602f iavf: fix temporary deadlock and failure to set MAC address

 drivers/net/ethernet/intel/iavf/iavf_main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/intel/iavf/iavf_main.c +1 -2
index fff06f876c2c..1d3aa740caea 100644
@@ -1033,7 +1033,7 @@ int iavf_replace_primary_mac(struct iavf_adapter *adapter,
 
        /* schedule the watchdog task to immediately process the request */
        if (f) {
-               queue_work(adapter->wq, &adapter->watchdog_task.work);
+               mod_delayed_work(adapter->wq, &adapter->watchdog_task, 0);
                return 0;
        }
        return -ENOMEM;
--
Quoted 1 line

2.38.1

Beautiful! On my test machine, this takes the time needed to bring up 64 VFs from 92 s down to 7 s.
Michal

_______________________________________________
Intel-wired-lan mailing list
[email protected]
https://lists.osuosl.org/mailman/listinfo/intel-wired-lan

#2 lore raw
Quoted 32 lines

-----Original Message-----
From: Intel-wired-lan <[email protected]> On Behalf Of Michal Schmidt
Sent: środa, 11 stycznia 2023 10:43
To: Stefan Assmann <[email protected]>
Cc: Nguyen, Anthony L <[email protected]>; [email protected]; Piotrowski, Patryk <[email protected]>; [email protected]; [email protected]
Subject: Re: [Intel-wired-lan] [PATCH net-queue] iavf: schedule watchdog immediately when changing primary MAC

Quoted 19 lines · Stefan Assmann

From: Stefan Assmann <[email protected]>

iavf_replace_primary_mac() utilizes queue_work() to schedule the watchdog task but that only ensures that the watchdog task is queued to run. To make sure the watchdog is executed asap use mod_delayed_work().

Without this patch it may take up to 2s until the watchdog task gets executed, which may cause long delays when setting the MAC address.

Fixes a3e839d539e0 ("iavf: Add usage of new virtchnl format to set

default MAC")

---
Depends on net-queue patch
ca7facb6602f iavf: fix temporary deadlock and failure to set MAC address

Quoted 8 lines

drivers/net/ethernet/intel/iavf/iavf_main.c

Quoted 8 lines
 drivers/net/ethernet/intel/iavf/iavf_main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/intel/iavf/iavf_main.c +0 -0
index fff06f876c2c..1d3aa740caea 100644

_______________________________________________
Intel-wired-lan mailing list
[email protected]
https://lists.osuosl.org/mailman/listinfo/intel-wired-lan