* [Intel-wired-lan] [net-next] irdma: change name of interrupts
@ 2022-11-14 8:20 Michal Swiatkowski
2022-11-14 16:19 ` Saleem, Shiraz
0 siblings, 1 reply; 3+ messages in thread
From: Michal Swiatkowski @ 2022-11-14 8:20 UTC (permalink / raw)
To: intel-wired-lan; +Cc: mustafa.ismail, shiraz.saleem
Add more information in interrupt names.
Before this patch it was:
irdma
CEQ
CEQ
...
Now:
irdma-ice-AEQ
irdma-ice-CEQ-0
irdma-ice-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..09e4aba31b64 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_INT_NAME_STR_LEN (32)
+
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..46665624e515 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_driver_string(&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_driver_string(&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_driver_string(&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..2d88b0bf18b6 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_INT_NAME_STR_LEN];
};
struct irdma_mc_table_info {
--
2.36.1
_______________________________________________
Intel-wired-lan mailing list
Intel-wired-lan@osuosl.org
https://lists.osuosl.org/mailman/listinfo/intel-wired-lan
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [Intel-wired-lan] [net-next] irdma: change name of interrupts
2022-11-14 8:20 [Intel-wired-lan] [net-next] irdma: change name of interrupts Michal Swiatkowski
@ 2022-11-14 16:19 ` Saleem, Shiraz
2022-11-15 12:47 ` Michal Swiatkowski
0 siblings, 1 reply; 3+ messages in thread
From: Saleem, Shiraz @ 2022-11-14 16:19 UTC (permalink / raw)
To: Michal Swiatkowski, intel-wired-lan@lists.osuosl.org
Cc: Barrera, Ivan D, Ismail, Mustafa, Bednarz, Christopher N
> Subject: [net-next] irdma: change name of interrupts
>
This cant go through net-next. It needs to go through the rdma tree. I will co-ordinate w. Tony on it.
Use "RDMA/irdma: change name of interrupts" for the subject.
> Add more information in interrupt names.
>
> Before this patch it was:
> irdma
> CEQ
> CEQ
> ...
>
> Now:
> irdma-ice-AEQ
> irdma-ice-CEQ-0
> irdma-ice-CEQ-1
This is better for sure. But we need to add the device name. Not sure if adding "ice" is adding any value.
Ideally, for the RDMA drivers, this should be ib_device name. But there is a limitation in RDMA subsystem that doesn't
set the name till after the ib device is registered which happens later in the drv.probe() flow.
So I think our best option is to use the PCI device name.
> ...
>
> 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..09e4aba31b64 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_INT_NAME_STR_LEN (32)
INT to IRQ which is more used in this driver to reflect interrupt. Drop the (). And move to this main.h where the irdma_msix_vector struct is defined.
> +
> 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..46665624e515 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_driver_string(&rf->pcidev->dev), ceq_id);
As per previous comment, I think dev_name((&rf->pcidev->dev) is better. Given this should we make the msix_vec.name be a 64b variable?
Shiraz
_______________________________________________
Intel-wired-lan mailing list
Intel-wired-lan@osuosl.org
https://lists.osuosl.org/mailman/listinfo/intel-wired-lan
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [Intel-wired-lan] [net-next] irdma: change name of interrupts
2022-11-14 16:19 ` Saleem, Shiraz
@ 2022-11-15 12:47 ` Michal Swiatkowski
0 siblings, 0 replies; 3+ messages in thread
From: Michal Swiatkowski @ 2022-11-15 12:47 UTC (permalink / raw)
To: Saleem, Shiraz
Cc: Ismail, Mustafa, Bednarz, Christopher N, Barrera, Ivan D,
intel-wired-lan@lists.osuosl.org
On Mon, Nov 14, 2022 at 04:19:20PM +0000, Saleem, Shiraz wrote:
> > Subject: [net-next] irdma: change name of interrupts
> >
>
> This cant go through net-next. It needs to go through the rdma tree. I will co-ordinate w. Tony on it.
>
> Use "RDMA/irdma: change name of interrupts" for the subject.
>
I will remember, is "rdma" the name of tree?
> > Add more information in interrupt names.
> >
> > Before this patch it was:
> > irdma
> > CEQ
> > CEQ
> > ...
> >
> > Now:
> > irdma-ice-AEQ
> > irdma-ice-CEQ-0
> > irdma-ice-CEQ-1
>
> This is better for sure. But we need to add the device name. Not sure if adding "ice" is adding any value.
>
> Ideally, for the RDMA drivers, this should be ib_device name. But there is a limitation in RDMA subsystem that doesn't
> set the name till after the ib device is registered which happens later in the drv.probe() flow.
>
> So I think our best option is to use the PCI device name.
>
Sure, will change it, thanks.
> > ...
> >
> > 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..09e4aba31b64 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_INT_NAME_STR_LEN (32)
>
> INT to IRQ which is more used in this driver to reflect interrupt. Drop the (). And move to this main.h where the irdma_msix_vector struct is defined.
>
Done
> > +
> > 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..46665624e515 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_driver_string(&rf->pcidev->dev), ceq_id);
>
> As per previous comment, I think dev_name((&rf->pcidev->dev) is better. Given this should we make the msix_vec.name be a 64b variable?
>
Yeah, it looks better, thanks. I changed name to 64b.
> Shiraz
>
>
_______________________________________________
Intel-wired-lan mailing list
Intel-wired-lan@osuosl.org
https://lists.osuosl.org/mailman/listinfo/intel-wired-lan
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-11-15 12:47 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-11-14 8:20 [Intel-wired-lan] [net-next] irdma: change name of interrupts Michal Swiatkowski
2022-11-14 16:19 ` Saleem, Shiraz
2022-11-15 12:47 ` Michal Swiatkowski
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox