提交 e2b53ea5 编写于 作者: S Stefan Assmann 提交者: Tony Nguyen

iavf: schedule watchdog immediately when changing primary MAC

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: a3e839d5 ("iavf: Add usage of new virtchnl format to set default MAC")
Signed-off-by: NStefan Assmann <sassmann@kpanic.de>
Reviewed-by: NMichal Schmidt <mschmidt@redhat.com>
Tested-by: NMichal Schmidt <mschmidt@redhat.com>
Tested-by: NRafal Romanowski <rafal.romanowski@intel.com>
Signed-off-by: NTony Nguyen <anthony.l.nguyen@intel.com>
上级 7598f4b4
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册