r8169: improve handling task scheduling
authorHeiner Kallweit <hkallweit1@gmail.com>
Mon, 27 Nov 2023 17:20:11 +0000 (18:20 +0100)
committerJakub Kicinski <kuba@kernel.org>
Thu, 30 Nov 2023 03:46:22 +0000 (19:46 -0800)
commit127532cd0f060ebc3c4cbca81b6438728ad5896e
tree2cb2f9f805233438f783513264bc7c8c12069a13
parentee7546390aedf12856ff4a35fa654889130a3fe3
r8169: improve handling task scheduling

If we know that the task is going to be a no-op, don't even schedule it.
And remove the check for netif_running() in the worker function, the
check for flag RTL_FLAG_TASK_ENABLED is sufficient. Note that we can't
remove the check for flag RTL_FLAG_TASK_ENABLED in the worker function
because we have no guarantee when it will be executed.

Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Reviewed-by: Przemek Kitszel <przemyslaw.kitszel@intel.com>
Link: https://lore.kernel.org/r/c65873a3-7394-4107-99a7-83f20030779c@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/realtek/r8169_main.c