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@google.com,
	kuba@kernel.org, pabeni@redhat.com, ast@kernel.org,
	daniel@iogearbox.net, hawk@kernel.org, john.fastabend@gmail.com,
	sdf@fomichev.me, jordanrhee@google.com, willemb@google.com,
	nktgrg@google.com, maolson@google.com, thostet@google.com,
	jacob.e.keller@intel.com, debarghyak@google.com, kees@kernel.org,
	bpf@vger.kernel.org, linux-kernel@vger.kernel.org,
	przemyslaw.kitszel@intel.com
Subject: Re: [PATCH net-next v7 11/12] gve: add ctrl ops for queue operations
Date: Fri, 18 Sep 2026 07:57:52 +0000	[thread overview]
Message-ID: <178971827222.22033.18083740945510647866@kernel.org> (raw)
In-Reply-To: <20260916165533.2187434-12-hramamurthy@google.com>

Thank you for your contribution! Sashiko AI review found 1 potential
issue(s) to consider:

Critical: 0 · High: 0 · Medium: 0 · Low: 1

- [Low] After this patch converts gve_create_rings()/gve_destroy_rings()
  in drivers/net/ethernet/google/gve/gve_main.c to call…

--

gve: add ctrl ops for queue operations

This adds create_queues and destroy_queues to struct gve_ctrl_ops, moves the
bulk queue create/destroy sequences from gve_create_rings()/gve_destroy_rings()
in gve_main.c into gve_adminq_create_queues()/gve_adminq_destroy_queues(), and
wires them up in gve_adminq_ops. Described as code movement with no functional
change.

> diff --git a/drivers/net/ethernet/google/gve/gve_adminq.c b/drivers/net/ethernet/google/gve/gve_adminq.c
> index f0218d78bc5d1..450341b70968d 100644
> --- a/drivers/net/ethernet/google/gve/gve_adminq.c
> +++ b/drivers/net/ethernet/google/gve/gve_adminq.c
> @@ -943,6 +943,30 @@ static void gve_set_default_rss_sizes(struct gve_priv *priv)
>  	}
>  }
>  
> +int gve_adminq_destroy_queues(struct gve_priv *priv)
> +{
> +	int num_tx_queues = gve_num_tx_queues(priv);
> +	int err;
> +
> +	err = gve_adminq_destroy_tx_queues(priv, 0, num_tx_queues);

[ ... ]

> +	err = gve_adminq_destroy_rx_queues(priv, priv->rx_cfg.num_queues);

[ ... ]

> @@ -1791,3 +1815,29 @@ void gve_adminq_teardown_mgmt_irq(struct gve_priv *priv)
>  		priv->mgmt_irq_requested = false;
>  	}
>  }
> +
> +int gve_adminq_create_queues(struct gve_priv *priv)
> +{
> +	int num_tx_queues = gve_num_tx_queues(priv);
> +	int err;
> +
> +	err = gve_adminq_create_tx_queues(priv, 0, num_tx_queues);

[ ... ]

> +	err = gve_adminq_create_rx_queues(priv, priv->rx_cfg.num_queues);

[ ... ]

> diff --git a/drivers/net/ethernet/google/gve/gve_adminq.h b/drivers/net/ethernet/google/gve/gve_adminq.h
> index 0b48e9f2a82ae..d696e4932a8b9 100644
> --- a/drivers/net/ethernet/google/gve/gve_adminq.h
> +++ b/drivers/net/ethernet/google/gve/gve_adminq.h
> @@ -628,6 +628,8 @@ int gve_adminq_configure_device_resources(struct gve_priv *priv,
>  					  dma_addr_t db_array_bus_addr,
>  					  u32 num_ntfy_blks);
>  int gve_adminq_deconfigure_device_resources(struct gve_priv *priv);
> +int gve_adminq_create_queues(struct gve_priv *priv);
> +int gve_adminq_destroy_queues(struct gve_priv *priv);
>  int gve_adminq_create_tx_queues(struct gve_priv *priv, u32 start_id, u32 num_queues);
>  int gve_adminq_destroy_tx_queues(struct gve_priv *priv, u32 start_id, u32 num_queues);
      ^^^^

[Severity: Low]
This isn't a bug, but after this patch is it still necessary to export the
four bulk helpers from gve_adminq.h?

With gve_create_rings() and gve_destroy_rings() converted to
priv->ctrl_ops->create_queues() / priv->ctrl_ops->destroy_queues(), the only
remaining references to gve_adminq_create_tx_queues(),
gve_adminq_create_rx_queues(), gve_adminq_destroy_tx_queues() and
gve_adminq_destroy_rx_queues() are their definitions in gve_adminq.c and the
calls from the two new wrappers in the same file:

  gve_adminq_create_queues()
      gve_adminq_create_tx_queues()
      gve_adminq_create_rx_queues()

  gve_adminq_destroy_queues()
      gve_adminq_destroy_tx_queues()
      gve_adminq_destroy_rx_queues()

All four definitions precede those call sites, so could they be made static
and their declarations dropped from the header, leaving only the
ctrl_ops-backed gve_adminq_create_queues()/gve_adminq_destroy_queues() in the
shared header? Keeping the AdminQ-specific helpers visible module-wide leaves
an entry point that bypasses the ops indirection this series is introducing.

> diff --git a/drivers/net/ethernet/google/gve/gve_main.c b/drivers/net/ethernet/google/gve/gve_main.c
> index 44669b2f25d7d..33af1437b3c04 100644
> --- a/drivers/net/ethernet/google/gve/gve_main.c
> +++ b/drivers/net/ethernet/google/gve/gve_main.c
> @@ -886,33 +886,16 @@ static int gve_unregister_qpls(struct gve_priv *priv)
>  
>  static int gve_create_rings(struct gve_priv *priv)
>  {
> -	int num_tx_queues = gve_num_tx_queues(priv);
>  	int err;
>  	int i;
>  
> -	err = gve_adminq_create_tx_queues(priv, 0, num_tx_queues);
> +	err = priv->ctrl_ops->create_queues(priv);

[ ... ]

> @@ -1067,26 +1050,12 @@ static int gve_queues_mem_alloc(struct gve_priv *priv,
>  
>  static int gve_destroy_rings(struct gve_priv *priv)
>  {
> -	int num_tx_queues = gve_num_tx_queues(priv);
>  	int err;
>  
> -	err = gve_adminq_destroy_tx_queues(priv, 0, num_tx_queues);
> +	err = priv->ctrl_ops->destroy_queues(priv);

[ ... ]

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

  reply	other threads:[~2026-09-18  7:57 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-16 16:55 [PATCH net-next v7 00/12] gve: AdminQ mode related refactors Harshitha Ramamurthy
2026-09-16 16:55 ` [PATCH net-next v7 01/12] gve: add struct gve_device_info to hold device properties Harshitha Ramamurthy
2026-09-18  7:57   ` netdev-bot+sashiko
2026-09-16 16:55 ` [PATCH net-next v7 02/12] gve: introduce control plane operations structure Harshitha Ramamurthy
2026-09-16 16:55 ` [PATCH net-next v7 03/12] gve: introduce ctrl ops to set vectors and Qs Harshitha Ramamurthy
2026-09-16 16:55 ` [PATCH net-next v7 04/12] gve: introduce gve_adminq_get_device_properties() Harshitha Ramamurthy
2026-09-16 16:55 ` [PATCH net-next v7 05/12] gve: refactor gve_init_priv for reset path Harshitha Ramamurthy
2026-09-18  7:57   ` netdev-bot+sashiko
2026-09-16 16:55 ` [PATCH net-next v7 06/12] gve: simplify reset logic Harshitha Ramamurthy
2026-09-18  7:57   ` netdev-bot+sashiko
2026-09-19  1:28     ` Joshua Washington
2026-09-16 16:55 ` [PATCH net-next v7 07/12] gve: add gve_ctrl_ops for gve initialization/teardown sequences Harshitha Ramamurthy
2026-09-16 16:55 ` [PATCH net-next v7 08/12] gve: split up notify block allocation and setup paths Harshitha Ramamurthy
2026-09-18  7:57   ` netdev-bot+sashiko
2026-09-19  1:49     ` Joshua Washington
2026-09-16 16:55 ` [PATCH net-next v7 09/12] gve: introduce new methods to handle IRQ doorbells Harshitha Ramamurthy
2026-09-18  7:57   ` netdev-bot+sashiko
2026-09-16 16:55 ` [PATCH net-next v7 10/12] gve: setup and teardown management interrupts Harshitha Ramamurthy
2026-09-16 16:55 ` [PATCH net-next v7 11/12] gve: add ctrl ops for queue operations Harshitha Ramamurthy
2026-09-18  7:57   ` netdev-bot+sashiko [this message]
2026-09-16 16:55 ` [PATCH net-next v7 12/12] gve: add link status/speed ctrl ops Harshitha Ramamurthy

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=178971827222.22033.18083740945510647866@kernel.org \
    --to=netdev-bot+sashiko@kernel.org \
    --cc=andrew+netdev@lunn.ch \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=davem@davemloft.net \
    --cc=debarghyak@google.com \
    --cc=edumazet@google.com \
    --cc=hawk@kernel.org \
    --cc=hramamurthy@google.com \
    --cc=jacob.e.keller@intel.com \
    --cc=john.fastabend@gmail.com \
    --cc=jordanrhee@google.com \
    --cc=joshwash@google.com \
    --cc=kees@kernel.org \
    --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=przemyslaw.kitszel@intel.com \
    --cc=sdf@fomichev.me \
    --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

all inboxes | Powered by JetHome®