diff mbox series

[net] net: mana: Fix IRQ name - add PCI and queue number

Message ID 1674161950-19708-1-git-send-email-haiyangz@microsoft.com (mailing list archive)
State Accepted
Commit 20e3028c39a5bf882e91e717da96d14f1acec40e
Delegated to: Netdev Maintainers
Headers show
Series [net] net: mana: Fix IRQ name - add PCI and queue number | expand

Checks

Context Check Description
netdev/tree_selection success Clearly marked for net
netdev/fixes_present success Fixes tag present in non-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: 24 this patch: 24
netdev/cc_maintainers fail 2 blamed authors not CCed: shacharr@microsoft.com stephen@networkplumber.org; 10 maintainers not CCed: shacharr@microsoft.com edumazet@google.com linux-rdma@vger.kernel.org sharmaajay@microsoft.com longli@microsoft.com leon@kernel.org kuba@kernel.org pabeni@redhat.com stephen@networkplumber.org wei.liu@kernel.org
netdev/build_clang success Errors and warnings before: 5 this patch: 5
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: 22 this patch: 22
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 33 lines checked
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0

Commit Message

Haiyang Zhang Jan. 19, 2023, 8:59 p.m. UTC
The PCI and queue number info is missing in IRQ names.

Add PCI and queue number to IRQ names, to allow CPU affinity
tuning scripts to work.

Cc: stable@vger.kernel.org
Fixes: ca9c54d2d6a5 ("net: mana: Add a driver for Microsoft Azure Network Adapter (MANA)")
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
---
 drivers/net/ethernet/microsoft/mana/gdma_main.c | 9 ++++++++-
 include/net/mana/gdma.h                         | 3 +++
 2 files changed, 11 insertions(+), 1 deletion(-)

Comments

Jesse Brandeburg Jan. 20, 2023, 2:14 a.m. UTC | #1
On 1/19/2023 12:59 PM, Haiyang Zhang wrote:
> The PCI and queue number info is missing in IRQ names.
> 
> Add PCI and queue number to IRQ names, to allow CPU affinity
> tuning scripts to work.
> 
> Cc: stable@vger.kernel.org
> Fixes: ca9c54d2d6a5 ("net: mana: Add a driver for Microsoft Azure Network Adapter (MANA)")
> Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>

seems reasonable!

Reviewed-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
patchwork-bot+netdevbpf@kernel.org Jan. 21, 2023, 2:20 a.m. UTC | #2
Hello:

This patch was applied to netdev/net.git (master)
by Jakub Kicinski <kuba@kernel.org>:

On Thu, 19 Jan 2023 12:59:10 -0800 you wrote:
> The PCI and queue number info is missing in IRQ names.
> 
> Add PCI and queue number to IRQ names, to allow CPU affinity
> tuning scripts to work.
> 
> Cc: stable@vger.kernel.org
> Fixes: ca9c54d2d6a5 ("net: mana: Add a driver for Microsoft Azure Network Adapter (MANA)")
> Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
> 
> [...]

Here is the summary with links:
  - [net] net: mana: Fix IRQ name - add PCI and queue number
    https://git.kernel.org/netdev/net/c/20e3028c39a5

You are awesome, thank you!
diff mbox series

Patch

diff --git a/drivers/net/ethernet/microsoft/mana/gdma_main.c b/drivers/net/ethernet/microsoft/mana/gdma_main.c
index e708c2d04983..b144f2237748 100644
--- a/drivers/net/ethernet/microsoft/mana/gdma_main.c
+++ b/drivers/net/ethernet/microsoft/mana/gdma_main.c
@@ -1259,13 +1259,20 @@  static int mana_gd_setup_irqs(struct pci_dev *pdev)
 		gic->handler = NULL;
 		gic->arg = NULL;
 
+		if (!i)
+			snprintf(gic->name, MANA_IRQ_NAME_SZ, "mana_hwc@pci:%s",
+				 pci_name(pdev));
+		else
+			snprintf(gic->name, MANA_IRQ_NAME_SZ, "mana_q%d@pci:%s",
+				 i - 1, pci_name(pdev));
+
 		irq = pci_irq_vector(pdev, i);
 		if (irq < 0) {
 			err = irq;
 			goto free_mask;
 		}
 
-		err = request_irq(irq, mana_gd_intr, 0, "mana_intr", gic);
+		err = request_irq(irq, mana_gd_intr, 0, gic->name, gic);
 		if (err)
 			goto free_mask;
 		irq_set_affinity_and_hint(irq, req_mask);
diff --git a/include/net/mana/gdma.h b/include/net/mana/gdma.h
index b3ba04615caa..56189e4252da 100644
--- a/include/net/mana/gdma.h
+++ b/include/net/mana/gdma.h
@@ -336,9 +336,12 @@  struct gdma_queue_spec {
 	};
 };
 
+#define MANA_IRQ_NAME_SZ 32
+
 struct gdma_irq_context {
 	void (*handler)(void *arg);
 	void *arg;
+	char name[MANA_IRQ_NAME_SZ];
 };
 
 struct gdma_context {