diff mbox series

[rdma,v2] RDMA/irdma: change name of interrupts

Message ID 20221115123856.11737-1-michal.swiatkowski@linux.intel.com
State Changes Requested
Headers show
Series [rdma,v2] RDMA/irdma: change name of interrupts | expand

Commit Message

Michal Swiatkowski Nov. 15, 2022, 12:38 p.m. UTC
Add more information in interrupt names.

Before this patch it was:
irdma
CEQ
CEQ
...

Now:
irdma-0000:18:00.0-AEQ
irdma-0000:18:00.0-CEQ-0
irdma-0000:18:00.0-CEQ-1
...

Signed-off-by: Michal Swiatkowski <michal.swiatkowski@linux.intel.com>
Suggested-by: Piotr Raczynski <piotr.raczynski@intel.com>
---
 drivers/infiniband/hw/irdma/defs.h |  2 ++
 drivers/infiniband/hw/irdma/hw.c   | 14 +++++++++++---
 drivers/infiniband/hw/irdma/main.h |  1 +
 3 files changed, 14 insertions(+), 3 deletions(-)

Comments

Saleem, Shiraz Nov. 16, 2022, 2:54 a.m. UTC | #1
> Subject: [PATCH rdma v2] RDMA/irdma: change name of interrupts
> 
> Add more information in interrupt names.
> 
> Before this patch it was:
> irdma
> CEQ
> CEQ
> ...
> 
> Now:
> irdma-0000:18:00.0-AEQ
> irdma-0000:18:00.0-CEQ-0
> irdma-0000:18:00.0-CEQ-1
> ...
> 
> Signed-off-by: Michal Swiatkowski <michal.swiatkowski@linux.intel.com>
> Suggested-by: Piotr Raczynski <piotr.raczynski@intel.com>
> ---
>  drivers/infiniband/hw/irdma/defs.h |  2 ++
>  drivers/infiniband/hw/irdma/hw.c   | 14 +++++++++++---
>  drivers/infiniband/hw/irdma/main.h |  1 +
>  3 files changed, 14 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/infiniband/hw/irdma/defs.h b/drivers/infiniband/hw/irdma/defs.h
> index c1906cab5c8a..2f15d510e39d 100644
> --- a/drivers/infiniband/hw/irdma/defs.h
> +++ b/drivers/infiniband/hw/irdma/defs.h
> @@ -20,6 +20,8 @@
>  #define IRDMA_IRD_HW_SIZE_128	3
>  #define IRDMA_IRD_HW_SIZE_256	4
> 
> +#define IRDMA_IRQ_NAME_STR_LEN (64)
> +

Move this define to main.h


>  enum irdma_protocol_used {
>  	IRDMA_ANY_PROTOCOL = 0,
>  	IRDMA_IWARP_PROTOCOL_ONLY = 1,
> diff --git a/drivers/infiniband/hw/irdma/hw.c b/drivers/infiniband/hw/irdma/hw.c
> index ab246447520b..d2a215ec531c 100644
> --- a/drivers/infiniband/hw/irdma/hw.c
> +++ b/drivers/infiniband/hw/irdma/hw.c
> @@ -1087,14 +1087,20 @@ static int irdma_cfg_ceq_vector(struct irdma_pci_f *rf,
> struct irdma_ceq *iwceq,
>  	int status;
> 
>  	if (rf->msix_shared && !ceq_id) {
> +		snprintf(msix_vec->name, sizeof(msix_vec->name) - 1,
> +			 "irdma-%s-AEQCEQ-%d",
> +			 dev_name(&rf->pcidev->dev), ceq_id);
>  		tasklet_setup(&rf->dpc_tasklet, irdma_dpc);
>  		status = request_irq(msix_vec->irq, irdma_irq_handler, 0,
> -				     "AEQCEQ", rf);
> +				     msix_vec->name, rf);
>  	} else {
> +		snprintf(msix_vec->name, sizeof(msix_vec->name) - 1,
> +			 "irdma-%s-CEQ-%d",
> +			 dev_name(&rf->pcidev->dev), ceq_id);
>  		tasklet_setup(&iwceq->dpc_tasklet, irdma_ceq_dpc);
> 
>  		status = request_irq(msix_vec->irq, irdma_ceq_handler, 0,
> -				     "CEQ", iwceq);
> +				     msix_vec->name, iwceq);
>  	}
>  	cpumask_clear(&msix_vec->mask);
>  	cpumask_set_cpu(msix_vec->cpu_affinity, &msix_vec->mask); @@ -
> 1123,9 +1129,11 @@ static int irdma_cfg_aeq_vector(struct irdma_pci_f *rf)
>  	u32 ret = 0;
> 
>  	if (!rf->msix_shared) {
> +		snprintf(msix_vec->name, sizeof(msix_vec->name) - 1,
> +			 "irdma-%s-AEQ", dev_name(&rf->pcidev->dev));
>  		tasklet_setup(&rf->dpc_tasklet, irdma_dpc);
>  		ret = request_irq(msix_vec->irq, irdma_irq_handler, 0,
> -				  "irdma", rf);
> +				  msix_vec->name, rf);
>  	}
>  	if (ret) {
>  		ibdev_dbg(&rf->iwdev->ibdev, "ERR: aeq irq config fail\n"); diff --
> git a/drivers/infiniband/hw/irdma/main.h b/drivers/infiniband/hw/irdma/main.h
> index 65e966ad3453..2872c7df6e88 100644
> --- a/drivers/infiniband/hw/irdma/main.h
> +++ b/drivers/infiniband/hw/irdma/main.h
> @@ -212,6 +212,7 @@ struct irdma_msix_vector {
>  	u32 cpu_affinity;
>  	u32 ceq_id;
>  	cpumask_t mask;
> +	char name[IRDMA_IRQ_NAME_STR_LEN];
>  };
> 
>  struct irdma_mc_table_info {
> --
> 2.36.1
diff mbox series

Patch

diff --git a/drivers/infiniband/hw/irdma/defs.h b/drivers/infiniband/hw/irdma/defs.h
index c1906cab5c8a..2f15d510e39d 100644
--- a/drivers/infiniband/hw/irdma/defs.h
+++ b/drivers/infiniband/hw/irdma/defs.h
@@ -20,6 +20,8 @@ 
 #define IRDMA_IRD_HW_SIZE_128	3
 #define IRDMA_IRD_HW_SIZE_256	4
 
+#define IRDMA_IRQ_NAME_STR_LEN (64)
+
 enum irdma_protocol_used {
 	IRDMA_ANY_PROTOCOL = 0,
 	IRDMA_IWARP_PROTOCOL_ONLY = 1,
diff --git a/drivers/infiniband/hw/irdma/hw.c b/drivers/infiniband/hw/irdma/hw.c
index ab246447520b..d2a215ec531c 100644
--- a/drivers/infiniband/hw/irdma/hw.c
+++ b/drivers/infiniband/hw/irdma/hw.c
@@ -1087,14 +1087,20 @@  static int irdma_cfg_ceq_vector(struct irdma_pci_f *rf, struct irdma_ceq *iwceq,
 	int status;
 
 	if (rf->msix_shared && !ceq_id) {
+		snprintf(msix_vec->name, sizeof(msix_vec->name) - 1,
+			 "irdma-%s-AEQCEQ-%d",
+			 dev_name(&rf->pcidev->dev), ceq_id);
 		tasklet_setup(&rf->dpc_tasklet, irdma_dpc);
 		status = request_irq(msix_vec->irq, irdma_irq_handler, 0,
-				     "AEQCEQ", rf);
+				     msix_vec->name, rf);
 	} else {
+		snprintf(msix_vec->name, sizeof(msix_vec->name) - 1,
+			 "irdma-%s-CEQ-%d",
+			 dev_name(&rf->pcidev->dev), ceq_id);
 		tasklet_setup(&iwceq->dpc_tasklet, irdma_ceq_dpc);
 
 		status = request_irq(msix_vec->irq, irdma_ceq_handler, 0,
-				     "CEQ", iwceq);
+				     msix_vec->name, iwceq);
 	}
 	cpumask_clear(&msix_vec->mask);
 	cpumask_set_cpu(msix_vec->cpu_affinity, &msix_vec->mask);
@@ -1123,9 +1129,11 @@  static int irdma_cfg_aeq_vector(struct irdma_pci_f *rf)
 	u32 ret = 0;
 
 	if (!rf->msix_shared) {
+		snprintf(msix_vec->name, sizeof(msix_vec->name) - 1,
+			 "irdma-%s-AEQ", dev_name(&rf->pcidev->dev));
 		tasklet_setup(&rf->dpc_tasklet, irdma_dpc);
 		ret = request_irq(msix_vec->irq, irdma_irq_handler, 0,
-				  "irdma", rf);
+				  msix_vec->name, rf);
 	}
 	if (ret) {
 		ibdev_dbg(&rf->iwdev->ibdev, "ERR: aeq irq config fail\n");
diff --git a/drivers/infiniband/hw/irdma/main.h b/drivers/infiniband/hw/irdma/main.h
index 65e966ad3453..2872c7df6e88 100644
--- a/drivers/infiniband/hw/irdma/main.h
+++ b/drivers/infiniband/hw/irdma/main.h
@@ -212,6 +212,7 @@  struct irdma_msix_vector {
 	u32 cpu_affinity;
 	u32 ceq_id;
 	cpumask_t mask;
+	char name[IRDMA_IRQ_NAME_STR_LEN];
 };
 
 struct irdma_mc_table_info {