netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next v2] gve: Fix gve interrupt names
@ 2023-02-03 21:20 Praveen Kaligineedi
  2023-02-04  3:48 ` Jakub Kicinski
  2023-02-06 10:10 ` patchwork-bot+netdevbpf
  0 siblings, 2 replies; 3+ messages in thread
From: Praveen Kaligineedi @ 2023-02-03 21:20 UTC (permalink / raw)
  To: netdev; +Cc: davem, kuba, Praveen Kaligineedi, Jeroen de Borst

IRQs are currently requested before the netdevice is registered
and a proper name is assigned to the device. Changing interrupt
name to avoid using the format string in the name.

Interrupt name before change: eth%d-ntfy-block.<blk_id>
Interrupt name after change: gve-ntfy-blk<blk_id>@pci:<pci_name>

Signed-off-by: Praveen Kaligineedi <pkaligineedi@google.com>
Reviewed-by: Jeroen de Borst <jeroendb@google.com>
---
Changed in v2: 
- Updated interrupt names based on the feedback
- Removed Fixes tag
---
 drivers/net/ethernet/google/gve/gve_main.c | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/drivers/net/ethernet/google/gve/gve_main.c b/drivers/net/ethernet/google/gve/gve_main.c
index 5b40f9c53196..07111c241e0e 100644
--- a/drivers/net/ethernet/google/gve/gve_main.c
+++ b/drivers/net/ethernet/google/gve/gve_main.c
@@ -327,7 +327,6 @@ static int gve_napi_poll_dqo(struct napi_struct *napi, int budget)
 static int gve_alloc_notify_blocks(struct gve_priv *priv)
 {
 	int num_vecs_requested = priv->num_ntfy_blks + 1;
-	char *name = priv->dev->name;
 	unsigned int active_cpus;
 	int vecs_enabled;
 	int i, j;
@@ -371,8 +370,8 @@ static int gve_alloc_notify_blocks(struct gve_priv *priv)
 	active_cpus = min_t(int, priv->num_ntfy_blks / 2, num_online_cpus());
 
 	/* Setup Management Vector  - the last vector */
-	snprintf(priv->mgmt_msix_name, sizeof(priv->mgmt_msix_name), "%s-mgmnt",
-		 name);
+	snprintf(priv->mgmt_msix_name, sizeof(priv->mgmt_msix_name), "gve-mgmnt@pci:%s",
+		 pci_name(priv->pdev));
 	err = request_irq(priv->msix_vectors[priv->mgmt_msix_idx].vector,
 			  gve_mgmnt_intr, 0, priv->mgmt_msix_name, priv);
 	if (err) {
@@ -401,8 +400,8 @@ static int gve_alloc_notify_blocks(struct gve_priv *priv)
 		struct gve_notify_block *block = &priv->ntfy_blocks[i];
 		int msix_idx = i;
 
-		snprintf(block->name, sizeof(block->name), "%s-ntfy-block.%d",
-			 name, i);
+		snprintf(block->name, sizeof(block->name), "gve-ntfy-blk%d@pci:%s",
+			 i, pci_name(priv->pdev));
 		block->priv = priv;
 		err = request_irq(priv->msix_vectors[msix_idx].vector,
 				  gve_is_gqi(priv) ? gve_intr : gve_intr_dqo,
-- 
2.39.1.519.gcb327c4b5f-goog


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH net-next v2] gve: Fix gve interrupt names
  2023-02-03 21:20 [PATCH net-next v2] gve: Fix gve interrupt names Praveen Kaligineedi
@ 2023-02-04  3:48 ` Jakub Kicinski
  2023-02-06 10:10 ` patchwork-bot+netdevbpf
  1 sibling, 0 replies; 3+ messages in thread
From: Jakub Kicinski @ 2023-02-04  3:48 UTC (permalink / raw)
  To: Praveen Kaligineedi; +Cc: netdev, davem, Jeroen de Borst

On Fri,  3 Feb 2023 13:20:45 -0800 Praveen Kaligineedi wrote:
> IRQs are currently requested before the netdevice is registered
> and a proper name is assigned to the device. Changing interrupt
> name to avoid using the format string in the name.
> 
> Interrupt name before change: eth%d-ntfy-block.<blk_id>
> Interrupt name after change: gve-ntfy-blk<blk_id>@pci:<pci_name>
> 
> Signed-off-by: Praveen Kaligineedi <pkaligineedi@google.com>
> Reviewed-by: Jeroen de Borst <jeroendb@google.com>

Acked-by: Jakub Kicinski <kuba@kernel.org>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH net-next v2] gve: Fix gve interrupt names
  2023-02-03 21:20 [PATCH net-next v2] gve: Fix gve interrupt names Praveen Kaligineedi
  2023-02-04  3:48 ` Jakub Kicinski
@ 2023-02-06 10:10 ` patchwork-bot+netdevbpf
  1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+netdevbpf @ 2023-02-06 10:10 UTC (permalink / raw)
  To: Praveen Kaligineedi; +Cc: netdev, davem, kuba, jeroendb

Hello:

This patch was applied to netdev/net-next.git (master)
by David S. Miller <davem@davemloft.net>:

On Fri,  3 Feb 2023 13:20:45 -0800 you wrote:
> IRQs are currently requested before the netdevice is registered
> and a proper name is assigned to the device. Changing interrupt
> name to avoid using the format string in the name.
> 
> Interrupt name before change: eth%d-ntfy-block.<blk_id>
> Interrupt name after change: gve-ntfy-blk<blk_id>@pci:<pci_name>
> 
> [...]

Here is the summary with links:
  - [net-next,v2] gve: Fix gve interrupt names
    https://git.kernel.org/netdev/net-next/c/843711459391

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-02-06 10:13 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-02-03 21:20 [PATCH net-next v2] gve: Fix gve interrupt names Praveen Kaligineedi
2023-02-04  3:48 ` Jakub Kicinski
2023-02-06 10:10 ` patchwork-bot+netdevbpf

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).