From: Paul Menzel <pmenzel@molgen.mpg.de>
To: Jagadeesh Yalapalli <jagadeesharm14@gmail.com>
Cc: Tony Nguyen <anthony.l.nguyen@intel.com>,
Przemek Kitszel <przemyslaw.kitszel@intel.com>,
Andrew Lunn <andrew+netdev@lunn.ch>,
"David S . Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
intel-wired-lan@lists.osuosl.org, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org,
Jagadeesh <jagadeesh.yalapalli@einfochips.com>
Subject: Re: [Intel-wired-lan] [PATCH v1] e1000e: Replace schedule_work with delayed workqueue for watchdog.
Date: Thu, 8 May 2025 18:39:47 +0200 [thread overview]
Message-ID: <8a9fda50-6040-4cca-b99f-46bb9258a6f0@molgen.mpg.de> (raw)
In-Reply-To: <20250508061439.8900-1-jagadeesharm14@gmail.com>
Dear Jagadeesh,
Thank you for your patch.
Am 08.05.25 um 08:14 schrieb Jagadeesh Yalapalli:
> From: Jagadeesh <jagadeesh.yalapalli@einfochips.com>
Is this your full name, or should *Jagadeesh Yalapalli* be used?
git config --global user.name "Jagadeesh Yalapalli"
>
> Replace direct schedule_work() usage with queue_delayed_work() to allow
> better timing control for the watchdog task. This resolves potential
> race conditions during interface reset operations.
What error do you get (without your patch)?
> - Added watchdog_wq workqueue_struct and watchdog_dq delayed_work
> - Updated e1000_watchdog() to use queue_delayed_work()
> - Removed obsolete TODO comment about delayed workqueue
>
> Tested in Qemu :
> / # for i in {1..1000}; do
> > echo 1 > /sys/class/net/eth0/device/reset
> > sleep 0.1
> > done
> [ 726.357499] e1000e 0000:00:02.0: resetting
> [ 726.390737] e1000e 0000:00:02.0: reset done
Please do not copy the output of git show, but send the patch with `git
format-patch` and `git send-email`.
> Signed-off-by: Jagadeesh <jagadeesh.yalapalli@einfochips.com>
> ---
> drivers/net/ethernet/intel/e1000e/e1000.h | 2 ++
> drivers/net/ethernet/intel/e1000e/netdev.c | 3 +--
> 2 files changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/net/ethernet/intel/e1000e/e1000.h b/drivers/net/ethernet/intel/e1000e/e1000.h
> index ba9c19e6994c..1e7b365c4f31 100644
> --- a/drivers/net/ethernet/intel/e1000e/e1000.h
> +++ b/drivers/net/ethernet/intel/e1000e/e1000.h
> @@ -194,6 +194,8 @@ struct e1000_adapter {
> struct timer_list blink_timer;
>
> struct work_struct reset_task;
> + struct workqueue_struct *watchdog_wq;
> + struct delayed_work watchdog_dq;
> struct work_struct watchdog_task;
>
> const struct e1000_info *ei;
> diff --git a/drivers/net/ethernet/intel/e1000e/netdev.c b/drivers/net/ethernet/intel/e1000e/netdev.c
> index 8ebcb6a7d608..87a915d09f4e 100644
> --- a/drivers/net/ethernet/intel/e1000e/netdev.c
> +++ b/drivers/net/ethernet/intel/e1000e/netdev.c
> @@ -5178,9 +5178,8 @@ static void e1000_watchdog(struct timer_list *t)
> struct e1000_adapter *adapter = from_timer(adapter, t, watchdog_timer);
>
> /* Do the rest outside of interrupt context */
> - schedule_work(&adapter->watchdog_task);
> + queue_delayed_work(adapter->watchdog_wq, &adapter->watchdog_dq, 0);
>
> - /* TODO: make this use queue_delayed_work() */
> }
>
> static void e1000_watchdog_task(struct work_struct *work)
Kind regards,
Paul
prev parent reply other threads:[~2025-05-08 16:40 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-08 6:14 Jagadeesh Yalapalli
2025-05-08 9:34 ` Przemek Kitszel
2025-05-08 16:39 ` Paul Menzel [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=8a9fda50-6040-4cca-b99f-46bb9258a6f0@molgen.mpg.de \
--to=pmenzel@molgen.mpg.de \
--cc=andrew+netdev@lunn.ch \
--cc=anthony.l.nguyen@intel.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=intel-wired-lan@lists.osuosl.org \
--cc=jagadeesh.yalapalli@einfochips.com \
--cc=jagadeesharm14@gmail.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=przemyslaw.kitszel@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®