diff mbox series

[net-next,1/1] gve: Fix gve interrupt names

Message ID 20230131213714.588281-1-pkaligineedi@google.com (mailing list archive)
State Superseded
Delegated to: Netdev Maintainers
Headers show
Series [net-next,1/1] gve: Fix gve interrupt names | expand

Checks

Context Check Description
netdev/tree_selection success Clearly marked for net-next
netdev/fixes_present success Fixes tag not required for -next series
netdev/subject_prefix success Link
netdev/cover_letter success Single patches do not need cover letters
netdev/patch_count success Link
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 0 this patch: 0
netdev/cc_maintainers fail 4 blamed authors not CCed: lrizzo@google.com willemb@google.com csully@google.com jonolson@google.com; 9 maintainers not CCed: shailend@google.com willemb@google.com pabeni@redhat.com tglx@linutronix.de lrizzo@google.com csully@google.com edumazet@google.com bigeasy@linutronix.de jonolson@google.com
netdev/build_clang success Errors and warnings before: 0 this patch: 0
netdev/module_param success Was 0 now: 0
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/check_selftest success No net selftest shell script
netdev/verify_fixes success Fixes tag looks correct
netdev/build_allmodconfig_warn success Errors and warnings before: 0 this patch: 0
netdev/checkpatch warning WARNING: line length of 81 exceeds 80 columns WARNING: line length of 83 exceeds 80 columns
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0

Commit Message

Praveen Kaligineedi Jan. 31, 2023, 9:37 p.m. UTC
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.

Fixes: 893ce44df565 ("gve: Add basic driver framework for Compute Engine Virtual NIC")
Signed-off-by: Praveen Kaligineedi <pkaligineedi@google.com>
Reviewed-by: Jeroen de Borst <jeroendb@google.com>
---
 drivers/net/ethernet/google/gve/gve_main.c | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

Comments

Jiri Pirko Feb. 1, 2023, 9:11 a.m. UTC | #1
Tue, Jan 31, 2023 at 10:37:14PM CET, pkaligineedi@google.com 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.
>
>Fixes: 893ce44df565 ("gve: Add basic driver framework for Compute Engine Virtual NIC")
>Signed-off-by: Praveen Kaligineedi <pkaligineedi@google.com>
>Reviewed-by: Jeroen de Borst <jeroendb@google.com>

Reviewed-by: Jiri Pirko <jiri@nvidia.com>
Jakub Kicinski Feb. 2, 2023, 5:18 a.m. UTC | #2
On Tue, 31 Jan 2023 13:37:14 -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.

Please provide an example of what the name used to look like and what
it looks like now.

> Fixes: 893ce44df565 ("gve: Add basic driver framework for Compute Engine Virtual NIC")

If it carries a Fixes tag it should go to net, not net-next, 
and describe what the user-visible issue is going to be.
I'd suggest to drop the Fixes tag. It doesn't look like a fix,
it never worked.

> @@ -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%d-mgmnt",
> +		 PCI_SLOT(priv->pdev->devfn));

Why slot? 
Please use the more common "$whatever@pci:%s", pci_name() format.
diff mbox series

Patch

diff --git a/drivers/net/ethernet/google/gve/gve_main.c b/drivers/net/ethernet/google/gve/gve_main.c
index 5b40f9c53196..534d3ce8ec40 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%d-mgmnt",
+		 PCI_SLOT(priv->pdev->devfn));
 	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%d-ntfy-block.%d",
+			 PCI_SLOT(priv->pdev->devfn), i);
 		block->priv = priv;
 		err = request_irq(priv->msix_vectors[msix_idx].vector,
 				  gve_is_gqi(priv) ? gve_intr : gve_intr_dqo,