* [Intel-wired-lan] [PATCH net-queue] iavf: schedule watchdog immediately when changing primary MAC
@ 2023-01-10 8:00 Stefan Assmann
2023-01-11 9:42 ` Michal Schmidt
0 siblings, 1 reply; 3+ messages in thread
From: Stefan Assmann @ 2023-01-10 8:00 UTC (permalink / raw)
To: intel-wired-lan; +Cc: netdev, patryk.piotrowski, anthony.l.nguyen, sassmann
From: Stefan Assmann <sassmann@kpanic.de>
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")
Signed-off-by: Stefan Assmann <sassmann@kpanic.de>
---
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(-)
diff --git a/drivers/net/ethernet/intel/iavf/iavf_main.c b/drivers/net/ethernet/intel/iavf/iavf_main.c
index fff06f876c2c..1d3aa740caea 100644
--- a/drivers/net/ethernet/intel/iavf/iavf_main.c
+++ b/drivers/net/ethernet/intel/iavf/iavf_main.c
@@ -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;
--
2.38.1
_______________________________________________
Intel-wired-lan mailing list
Intel-wired-lan@osuosl.org
https://lists.osuosl.org/mailman/listinfo/intel-wired-lan
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [Intel-wired-lan] [PATCH net-queue] iavf: schedule watchdog immediately when changing primary MAC
2023-01-10 8:00 [Intel-wired-lan] [PATCH net-queue] iavf: schedule watchdog immediately when changing primary MAC Stefan Assmann
@ 2023-01-11 9:42 ` Michal Schmidt
2023-01-19 12:21 ` Romanowski, Rafal
0 siblings, 1 reply; 3+ messages in thread
From: Michal Schmidt @ 2023-01-11 9:42 UTC (permalink / raw)
To: Stefan Assmann
Cc: anthony.l.nguyen, netdev, patryk.piotrowski, intel-wired-lan, sassmann
On Tue, Jan 10, 2023 at 9:01 AM Stefan Assmann <sassmann@redhat.com> wrote:
>
> From: Stefan Assmann <sassmann@kpanic.de>
>
> 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")
> Signed-off-by: Stefan Assmann <sassmann@kpanic.de>
> ---
> 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(-)
>
> diff --git a/drivers/net/ethernet/intel/iavf/iavf_main.c b/drivers/net/ethernet/intel/iavf/iavf_main.c
> index fff06f876c2c..1d3aa740caea 100644
> --- a/drivers/net/ethernet/intel/iavf/iavf_main.c
> +++ b/drivers/net/ethernet/intel/iavf/iavf_main.c
> @@ -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;
> --
> 2.38.1
Reviewed-by: Michal Schmidt <mschmidt@redhat.com>
Tested-by: Michal Schmidt <mschmidt@redhat.com>
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
Intel-wired-lan@osuosl.org
https://lists.osuosl.org/mailman/listinfo/intel-wired-lan
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Intel-wired-lan] [PATCH net-queue] iavf: schedule watchdog immediately when changing primary MAC
2023-01-11 9:42 ` Michal Schmidt
@ 2023-01-19 12:21 ` Romanowski, Rafal
0 siblings, 0 replies; 3+ messages in thread
From: Romanowski, Rafal @ 2023-01-19 12:21 UTC (permalink / raw)
To: mschmidt, Stefan Assmann
Cc: netdev, Piotrowski, Patryk, intel-wired-lan, Nguyen, Anthony L, sassmann
> -----Original Message-----
> From: Intel-wired-lan <intel-wired-lan-bounces@osuosl.org> On Behalf Of
> Michal Schmidt
> Sent: środa, 11 stycznia 2023 10:43
> To: Stefan Assmann <sassmann@redhat.com>
> Cc: Nguyen, Anthony L <anthony.l.nguyen@intel.com>;
> netdev@vger.kernel.org; Piotrowski, Patryk <patryk.piotrowski@intel.com>;
> intel-wired-lan@lists.osuosl.org; sassmann@kpanic.de
> Subject: Re: [Intel-wired-lan] [PATCH net-queue] iavf: schedule watchdog
> immediately when changing primary MAC
>
> On Tue, Jan 10, 2023 at 9:01 AM Stefan Assmann <sassmann@redhat.com>
> wrote:
> >
> > From: Stefan Assmann <sassmann@kpanic.de>
> >
> > 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")
> > Signed-off-by: Stefan Assmann <sassmann@kpanic.de>
> > ---
> > 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(-)
> >
> > diff --git a/drivers/net/ethernet/intel/iavf/iavf_main.c
> > b/drivers/net/ethernet/intel/iavf/iavf_main.c
> > index fff06f876c2c..1d3aa740caea 100644
> > --- a/drivers/net/ethernet/intel/iavf/iavf_main.c
> > +++ b/drivers/net/ethernet/intel/iavf/iavf_main.c
Tested-by: Rafal Romanowski <rafal.romanowski@intel.com>
_______________________________________________
Intel-wired-lan mailing list
Intel-wired-lan@osuosl.org
https://lists.osuosl.org/mailman/listinfo/intel-wired-lan
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-01-19 12:22 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-10 8:00 [Intel-wired-lan] [PATCH net-queue] iavf: schedule watchdog immediately when changing primary MAC Stefan Assmann
2023-01-11 9:42 ` Michal Schmidt
2023-01-19 12:21 ` Romanowski, Rafal
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).