mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: netdev-bot+sashiko@kernel.org
To: hramamurthy@google.com
Cc: netdev@vger.kernel.org, joshwash@google.com,
	andrew+netdev@lunn.ch, davem@davemloft.net, edumazet@kernel.org,
	kuba@kernel.org, pabeni@redhat.com, jordanrhee@google.com,
	willemb@google.com, przemyslaw.kitszel@intel.com,
	nktgrg@google.com, maolson@google.com, jacob.e.keller@intel.com,
	pkaligineedi@google.com, yangchun@google.com,
	patricion@google.com, awogbemila@google.com,
	stable@vger.kernel.org, linux-kernel@vger.kernel.org,
	treapking@google.com
Subject: Re: [PATCH net v4 4/4] gve: Fix link flap after ethtool ops
Date: Mon, 02 Nov 2026 21:18:43 +0000	[thread overview]
Message-ID: <179365432386.3131.15374369453099115031@kernel.org> (raw)
In-Reply-To: <20261029211634.2232784-5-hramamurthy@google.com>

Thank you for your contribution! Sashiko AI review found more severe
issue(s) in other patches of this series. This mail is only an FYI, in case
you want to address the nit picks below when you respin.

Low priority / nit picks for your consideration:

- [Low] The patch removes `queue_work(priv->gve_wq, &priv->service_task)`
  from the end of gve_queues_start()…

--

gve: Fix link flap after ethtool ops

This patch changes gve_queues_start() to update the carrier state
synchronously through gve_turnup_and_check_status(), instead of queueing
the service task to do it. It also takes netdev_lock() around the link
status update in gve_service_task(), so that update is serialized with
the synchronous path.

> diff --git a/drivers/net/ethernet/google/gve/gve_main.c b/drivers/net/ethernet/google/gve/gve_main.c
> index b5e2f39a903c5..bc7d7c41948c3 100644
> --- a/drivers/net/ethernet/google/gve/gve_main.c
> +++ b/drivers/net/ethernet/google/gve/gve_main.c

[ ... ]

> @@ -1494,8 +1526,7 @@ static int gve_queues_start(struct gve_priv *priv,
>  			  round_jiffies(jiffies +
>  				msecs_to_jiffies(priv->stats_report_timer_period)));
>  
> -	gve_turnup(priv);
> -	queue_work(priv->gve_wq, &priv->service_task);
> +	gve_turnup_and_check_status(priv);
>  	priv->interface_up_cnt++;
>  	return 0;

[Severity: Low]
Commit 3b7cc73628ff added this queue_work() for the link status update,
and the new synchronous check handles that. Does removing it also drop
the service task run that used to follow every reset recovery?

gve_reset() clears the reset flag first and then disables the service
task:

gve_reset() {
    ...
	gve_clear_do_reset(priv);
	gve_set_reset_in_progress(priv);

	if (was_up) {
		gve_turndown(priv);
		...
	}

	disable_work(&priv->service_task);
	...
	enable_work(&priv->service_task);
	err = gve_recover(priv, was_up && !skip_queue_setup);
    ...
}

gve_schedule_reset() could run after gve_clear_do_reset() but before
disable_work(). One way is gve_tx_timeout() from dev_watchdog racing
with gve_turndown(). Another is an RX NAPI error path just before
napi_disable:

gve_schedule_reset() {
	gve_set_do_reset(priv);
	queue_work(priv->gve_wq, &priv->service_task);
}

In that case, disable_work() cancels the queued work, or queue_work()
is rejected while the work is disabled. enable_work() does not queue it
again.

Before this patch, gve_recover()->gve_open()->gve_queues_start() ended
with queue_work(), so a leftover GVE_PRIV_FLAGS_DO_RESET was handled
right after recovery.

After this patch, the service task is not queued again until some
unrelated event, such as a later gve_mgmnt_intr(). When it does run,
gve_service_task()->gve_handle_reset() would perform a full gve_reset()
because of the stale flag. That reset could happen long after, and
unrelated to, the event that set the flag.

gve_suspend() and gve_resume() seem to have the same gap. They call
disable_work_sync() in gve_suspend() and enable_work() before
gve_recover() in gve_resume().

The other parts of this look fine. A missed device REPORT_STATS request
only skips a stats_report_trigger_cnt increment, because
gve_stats_report_schedule() sets do_report_stats on every timer period.
A device RESET request raised inside the disable window is covered by
the reset that is already running.

Could gve_reset() and gve_resume() queue the service task again after
recovery, or re-check gve_get_do_reset() once the work is re-enabled?

-- 
Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261029211634.2232784-1-hramamurthy%40google.com

  reply	other threads:[~2026-11-02 21:18 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-29 21:16 [PATCH net v4 0/4] gve: Fixes for issues discovered via net selftests and Sashiko Harshitha Ramamurthy
2026-10-29 21:16 ` [PATCH net v4 1/4] gve: Fix race between stats query and queue reconfig Harshitha Ramamurthy
2026-11-02 21:18   ` netdev-bot+sashiko
2026-11-03  8:33     ` Pin-yen Lin
2026-10-29 21:16 ` [PATCH net v4 2/4] gve: Fix backward stats when interface goes down or configuration is adjusted Harshitha Ramamurthy
2026-11-02 21:18   ` netdev-bot+sashiko
2026-11-03  8:33     ` Pin-yen Lin
2026-10-29 21:16 ` [PATCH net v4 3/4] gve: Block invalid ring sizes when device options are 0 Harshitha Ramamurthy
2026-11-02 21:18   ` netdev-bot+sashiko
2026-11-03  8:33     ` Pin-yen Lin
2026-10-29 21:16 ` [PATCH net v4 4/4] gve: Fix link flap after ethtool ops Harshitha Ramamurthy
2026-11-02 21:18   ` netdev-bot+sashiko [this message]
2026-11-03  8:33     ` Pin-yen Lin

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=179365432386.3131.15374369453099115031@kernel.org \
    --to=netdev-bot+sashiko@kernel.org \
    --cc=andrew+netdev@lunn.ch \
    --cc=awogbemila@google.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@kernel.org \
    --cc=hramamurthy@google.com \
    --cc=jacob.e.keller@intel.com \
    --cc=jordanrhee@google.com \
    --cc=joshwash@google.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maolson@google.com \
    --cc=netdev@vger.kernel.org \
    --cc=nktgrg@google.com \
    --cc=pabeni@redhat.com \
    --cc=patricion@google.com \
    --cc=pkaligineedi@google.com \
    --cc=przemyslaw.kitszel@intel.com \
    --cc=stable@vger.kernel.org \
    --cc=treapking@google.com \
    --cc=willemb@google.com \
    --cc=yangchun@google.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®