linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jakub Kicinski <kuba@kernel.org>
To: Harshitha Ramamurthy <hramamurthy@google.com>
Cc: netdev@vger.kernel.org, davem@davemloft.net, edumazet@google.com,
	pabeni@redhat.com, jeroendb@google.com, andrew+netdev@lunn.ch,
	willemb@google.com, pkaligineedi@google.com, joshwash@google.com,
	thostet@google.com, jfraker@google.com, awogbemila@google.com,
	linux-kernel@vger.kernel.org, stable@vger.kernel.org
Subject: Re: [PATCH net] gve: Fix stuck TX queue for DQ queue format
Date: Thu, 5 Jun 2025 08:13:01 -0700	[thread overview]
Message-ID: <20250605081301.2659870c@kernel.org> (raw)
In-Reply-To: <20250604201938.1409219-1-hramamurthy@google.com>

On Wed,  4 Jun 2025 20:19:38 +0000 Harshitha Ramamurthy wrote:
> +	netdev_info(dev, "Kicking queue %d", txqueue);
> +	napi_schedule(&block->napi);
> +	tx->last_kick_msec = current_time;
> +	goto out;
>  
>  reset:
>  	gve_schedule_reset(priv);

gotos at the base level of the function are too ugly to exit.

Please refactor this first to move the logic that decides whether
reset should happen to a separate helper, then you can avoid both
gotos/labels.

goto reset should turn into return true
goto out should turn into return false
-- 
pw-bot: cr

  reply	other threads:[~2025-06-05 15:13 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-06-04 20:19 [PATCH net] gve: Fix stuck TX queue for DQ queue format Harshitha Ramamurthy
2025-06-05 15:13 ` Jakub Kicinski [this message]
2025-06-05 17:15   ` Tim Hostetler

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=20250605081301.2659870c@kernel.org \
    --to=kuba@kernel.org \
    --cc=andrew+netdev@lunn.ch \
    --cc=awogbemila@google.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=hramamurthy@google.com \
    --cc=jeroendb@google.com \
    --cc=jfraker@google.com \
    --cc=joshwash@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=pkaligineedi@google.com \
    --cc=stable@vger.kernel.org \
    --cc=thostet@google.com \
    --cc=willemb@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;
as well as URLs for NNTP newsgroup(s).