* [PATCH rdma-rc 0/4] *** irdma 6.8 rc fixes ***
@ 2024-01-31 23:38 Sindhu Devale
2024-01-31 23:38 ` [PATCH rdma-rc 1/4] RDMA/irdma: Fix KASAN issue with tasklet Sindhu Devale
` (4 more replies)
0 siblings, 5 replies; 6+ messages in thread
From: Sindhu Devale @ 2024-01-31 23:38 UTC (permalink / raw)
To: jgg, leon; +Cc: linux-rdma, sindhu.devale
Small set of fixes for the irdma driver.
Mike Marciniszyn (1):
RDMA/irdma: Fix KASAN issue with tasklet
Mustafa Ismail (2):
RDMA/irdma: Set the CQ read threshold for GEN 1
RDMA/irdma: Add AE for too many RNRS
Shiraz Saleem (1):
RDMA/irdma: Validate max_send_wr and max_recv_wr
drivers/infiniband/hw/irdma/defs.h | 1 +
drivers/infiniband/hw/irdma/hw.c | 8 ++++++++
drivers/infiniband/hw/irdma/verbs.c | 9 +++++----
3 files changed, 14 insertions(+), 4 deletions(-)
--
2.42.0
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH rdma-rc 1/4] RDMA/irdma: Fix KASAN issue with tasklet
2024-01-31 23:38 [PATCH rdma-rc 0/4] *** irdma 6.8 rc fixes *** Sindhu Devale
@ 2024-01-31 23:38 ` Sindhu Devale
2024-01-31 23:38 ` [PATCH rdma-rc 2/4] RDMA/irdma: Validate max_send_wr and max_recv_wr Sindhu Devale
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: Sindhu Devale @ 2024-01-31 23:38 UTC (permalink / raw)
To: jgg, leon; +Cc: linux-rdma, sindhu.devale, Mike Marciniszyn
From: Mike Marciniszyn <mike.marciniszyn@intel.com>
KASAN testing revealed the following issue assocated with freeing an IRQ.
[50006.466686] Call Trace:
[50006.466691] <IRQ>
[50006.489538] dump_stack+0x5c/0x80
[50006.493475] print_address_description.constprop.6+0x1a/0x150
[50006.499872] ? irdma_sc_process_ceq+0x483/0x790 [irdma]
[50006.505742] ? irdma_sc_process_ceq+0x483/0x790 [irdma]
[50006.511644] kasan_report.cold.11+0x7f/0x118
[50006.516572] ? irdma_sc_process_ceq+0x483/0x790 [irdma]
[50006.522473] irdma_sc_process_ceq+0x483/0x790 [irdma]
[50006.528232] irdma_process_ceq+0xb2/0x400 [irdma]
[50006.533601] ? irdma_hw_flush_wqes_callback+0x370/0x370 [irdma]
[50006.540298] irdma_ceq_dpc+0x44/0x100 [irdma]
[50006.545306] tasklet_action_common.isra.14+0x148/0x2c0
[50006.551096] __do_softirq+0x1d0/0xaf8
[50006.555396] irq_exit_rcu+0x219/0x260
[50006.559670] irq_exit+0xa/0x20
[50006.563320] smp_apic_timer_interrupt+0x1bf/0x690
[50006.568645] apic_timer_interrupt+0xf/0x20
[50006.573341] </IRQ>
The issue is that a tasklet could be pending on another core racing
the delete of the irq.
Fix by insuring any scheduled tasklet is killed after deleting the
irq.
Fixes: 44d9e52977a1 ("RDMA/irdma: Implement device initialization definitions")
Signed-off-by: Mike Marciniszyn <mike.marciniszyn@intel.com>
Signed-off-by: Shiraz Saleem <shiraz.saleem@intel.com>
Signed-off-by: Sindhu Devale <sindhu.devale@intel.com>
---
drivers/infiniband/hw/irdma/hw.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/drivers/infiniband/hw/irdma/hw.c b/drivers/infiniband/hw/irdma/hw.c
index bd4b2b896444..2f8d18d8be3b 100644
--- a/drivers/infiniband/hw/irdma/hw.c
+++ b/drivers/infiniband/hw/irdma/hw.c
@@ -570,6 +570,13 @@ static void irdma_destroy_irq(struct irdma_pci_f *rf,
dev->irq_ops->irdma_dis_irq(dev, msix_vec->idx);
irq_update_affinity_hint(msix_vec->irq, NULL);
free_irq(msix_vec->irq, dev_id);
+ if (rf == dev_id) {
+ tasklet_kill(&rf->dpc_tasklet);
+ } else {
+ struct irdma_ceq *iwceq = (struct irdma_ceq *)dev_id;
+
+ tasklet_kill(&iwceq->dpc_tasklet);
+ }
}
/**
--
2.42.0
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH rdma-rc 2/4] RDMA/irdma: Validate max_send_wr and max_recv_wr
2024-01-31 23:38 [PATCH rdma-rc 0/4] *** irdma 6.8 rc fixes *** Sindhu Devale
2024-01-31 23:38 ` [PATCH rdma-rc 1/4] RDMA/irdma: Fix KASAN issue with tasklet Sindhu Devale
@ 2024-01-31 23:38 ` Sindhu Devale
2024-01-31 23:38 ` [PATCH rdma-rc 3/4] RDMA/irdma: Set the CQ read threshold for GEN 1 Sindhu Devale
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: Sindhu Devale @ 2024-01-31 23:38 UTC (permalink / raw)
To: jgg, leon; +Cc: linux-rdma, sindhu.devale, Shiraz Saleem
From: Shiraz Saleem <shiraz.saleem@intel.com>
Validate that max_send_wr and max_recv_wr is within the
supported range.
Fixes: b48c24c2d710 ("RDMA/irdma: Implement device supported verb APIs")
Change-Id: I2fc8b10292b641fddd20b36986a9dae90a93f4be
Signed-off-by: Shiraz Saleem <shiraz.saleem@intel.com>
Signed-off-by: Sindhu Devale <sindhu.devale@intel.com>
---
drivers/infiniband/hw/irdma/verbs.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/infiniband/hw/irdma/verbs.c b/drivers/infiniband/hw/irdma/verbs.c
index b5eb8d421988..cb828e3da478 100644
--- a/drivers/infiniband/hw/irdma/verbs.c
+++ b/drivers/infiniband/hw/irdma/verbs.c
@@ -839,7 +839,9 @@ static int irdma_validate_qp_attrs(struct ib_qp_init_attr *init_attr,
if (init_attr->cap.max_inline_data > uk_attrs->max_hw_inline ||
init_attr->cap.max_send_sge > uk_attrs->max_hw_wq_frags ||
- init_attr->cap.max_recv_sge > uk_attrs->max_hw_wq_frags)
+ init_attr->cap.max_recv_sge > uk_attrs->max_hw_wq_frags ||
+ init_attr->cap.max_send_wr > uk_attrs->max_hw_wq_quanta ||
+ init_attr->cap.max_recv_wr > uk_attrs->max_hw_rq_quanta)
return -EINVAL;
if (rdma_protocol_roce(&iwdev->ibdev, 1)) {
--
2.42.0
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH rdma-rc 3/4] RDMA/irdma: Set the CQ read threshold for GEN 1
2024-01-31 23:38 [PATCH rdma-rc 0/4] *** irdma 6.8 rc fixes *** Sindhu Devale
2024-01-31 23:38 ` [PATCH rdma-rc 1/4] RDMA/irdma: Fix KASAN issue with tasklet Sindhu Devale
2024-01-31 23:38 ` [PATCH rdma-rc 2/4] RDMA/irdma: Validate max_send_wr and max_recv_wr Sindhu Devale
@ 2024-01-31 23:38 ` Sindhu Devale
2024-01-31 23:38 ` [PATCH rdma-rc 4/4] RDMA/irdma: Add AE for too many RNRS Sindhu Devale
2024-02-04 9:37 ` [PATCH rdma-rc 0/4] *** irdma 6.8 rc fixes *** Leon Romanovsky
4 siblings, 0 replies; 6+ messages in thread
From: Sindhu Devale @ 2024-01-31 23:38 UTC (permalink / raw)
To: jgg, leon; +Cc: linux-rdma, sindhu.devale, Mustafa Ismail
From: Mustafa Ismail <mustafa.ismail@intel.com>
The CQ shadow read threshold is currently not set for GEN 2.
This could cause an invalid CQ overflow condition, so remove
the GEN check that exclused GEN 1.
Fixes: b48c24c2d710 ("RDMA/irdma: Implement device supported verb APIs")
Signed-off-by: Mustafa Ismail <mustafa.ismail@intel.com>
Signed-off-by: Shiraz Saleem <shiraz.saleem@intel.com>
Signed-off-by: Sindhu Devale <sindhu.devale@intel.com>
---
drivers/infiniband/hw/irdma/verbs.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/drivers/infiniband/hw/irdma/verbs.c b/drivers/infiniband/hw/irdma/verbs.c
index cb828e3da478..0b046c061742 100644
--- a/drivers/infiniband/hw/irdma/verbs.c
+++ b/drivers/infiniband/hw/irdma/verbs.c
@@ -2186,9 +2186,8 @@ static int irdma_create_cq(struct ib_cq *ibcq,
info.cq_base_pa = iwcq->kmem.pa;
}
- if (dev->hw_attrs.uk_attrs.hw_rev >= IRDMA_GEN_2)
- info.shadow_read_threshold = min(info.cq_uk_init_info.cq_size / 2,
- (u32)IRDMA_MAX_CQ_READ_THRESH);
+ info.shadow_read_threshold = min(info.cq_uk_init_info.cq_size / 2,
+ (u32)IRDMA_MAX_CQ_READ_THRESH);
if (irdma_sc_cq_init(cq, &info)) {
ibdev_dbg(&iwdev->ibdev, "VERBS: init cq fail\n");
--
2.42.0
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH rdma-rc 4/4] RDMA/irdma: Add AE for too many RNRS
2024-01-31 23:38 [PATCH rdma-rc 0/4] *** irdma 6.8 rc fixes *** Sindhu Devale
` (2 preceding siblings ...)
2024-01-31 23:38 ` [PATCH rdma-rc 3/4] RDMA/irdma: Set the CQ read threshold for GEN 1 Sindhu Devale
@ 2024-01-31 23:38 ` Sindhu Devale
2024-02-04 9:37 ` [PATCH rdma-rc 0/4] *** irdma 6.8 rc fixes *** Leon Romanovsky
4 siblings, 0 replies; 6+ messages in thread
From: Sindhu Devale @ 2024-01-31 23:38 UTC (permalink / raw)
To: jgg, leon; +Cc: linux-rdma, sindhu.devale, Mustafa Ismail
From: Mustafa Ismail <mustafa.ismail@intel.com>
Add IRDMA_AE_LLP_TOO_MANY_RNRS to the list of AE's processed
as an abnormal asyncronous event.
Fixes: b48c24c ("RDMA/irdma: Implement device supported verb APIs")
Signed-off-by: Mustafa Ismail <mustafa.ismail@intel.com>
Signed-off-by: Shiraz Saleem <shiraz.saleem@intel.com>
Signed-off-by: Sindhu Devale <sindhu.devale@gmail.com>
---
drivers/infiniband/hw/irdma/defs.h | 1 +
drivers/infiniband/hw/irdma/hw.c | 1 +
2 files changed, 2 insertions(+)
diff --git a/drivers/infiniband/hw/irdma/defs.h b/drivers/infiniband/hw/irdma/defs.h
index 8fb752f2eda2..2cb4b96db721 100644
--- a/drivers/infiniband/hw/irdma/defs.h
+++ b/drivers/infiniband/hw/irdma/defs.h
@@ -346,6 +346,7 @@ enum irdma_cqp_op_type {
#define IRDMA_AE_LLP_TOO_MANY_KEEPALIVE_RETRIES 0x050b
#define IRDMA_AE_LLP_DOUBT_REACHABILITY 0x050c
#define IRDMA_AE_LLP_CONNECTION_ESTABLISHED 0x050e
+#define IRDMA_AE_LLP_TOO_MANY_RNRS 0x050f
#define IRDMA_AE_RESOURCE_EXHAUSTION 0x0520
#define IRDMA_AE_RESET_SENT 0x0601
#define IRDMA_AE_TERMINATE_SENT 0x0602
diff --git a/drivers/infiniband/hw/irdma/hw.c b/drivers/infiniband/hw/irdma/hw.c
index 2f8d18d8be3b..ad50b77282f8 100644
--- a/drivers/infiniband/hw/irdma/hw.c
+++ b/drivers/infiniband/hw/irdma/hw.c
@@ -387,6 +387,7 @@ static void irdma_process_aeq(struct irdma_pci_f *rf)
case IRDMA_AE_LLP_TOO_MANY_RETRIES:
case IRDMA_AE_LCE_QP_CATASTROPHIC:
case IRDMA_AE_LCE_FUNCTION_CATASTROPHIC:
+ case IRDMA_AE_LLP_TOO_MANY_RNRS:
case IRDMA_AE_LCE_CQ_CATASTROPHIC:
case IRDMA_AE_UDA_XMIT_DGRAM_TOO_LONG:
default:
--
2.42.0
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH rdma-rc 0/4] *** irdma 6.8 rc fixes ***
2024-01-31 23:38 [PATCH rdma-rc 0/4] *** irdma 6.8 rc fixes *** Sindhu Devale
` (3 preceding siblings ...)
2024-01-31 23:38 ` [PATCH rdma-rc 4/4] RDMA/irdma: Add AE for too many RNRS Sindhu Devale
@ 2024-02-04 9:37 ` Leon Romanovsky
4 siblings, 0 replies; 6+ messages in thread
From: Leon Romanovsky @ 2024-02-04 9:37 UTC (permalink / raw)
To: Jason Gunthorpe, Sindhu Devale; +Cc: linux-rdma
On Wed, 31 Jan 2024 17:38:45 -0600, Sindhu Devale wrote:
> Small set of fixes for the irdma driver.
>
> Mike Marciniszyn (1):
> RDMA/irdma: Fix KASAN issue with tasklet
>
> Mustafa Ismail (2):
> RDMA/irdma: Set the CQ read threshold for GEN 1
> RDMA/irdma: Add AE for too many RNRS
>
> [...]
Applied, thanks!
[1/4] RDMA/irdma: Fix KASAN issue with tasklet
https://git.kernel.org/rdma/rdma/c/bd97cea7b18a0a
[2/4] RDMA/irdma: Validate max_send_wr and max_recv_wr
https://git.kernel.org/rdma/rdma/c/ee107186bcfd25
[3/4] RDMA/irdma: Set the CQ read threshold for GEN 1
https://git.kernel.org/rdma/rdma/c/4823a004d8301d
[4/4] RDMA/irdma: Add AE for too many RNRS
https://git.kernel.org/rdma/rdma/c/772e5fb3884306
Best regards,
--
Leon Romanovsky <leon@kernel.org>
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2024-02-04 9:37 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-01-31 23:38 [PATCH rdma-rc 0/4] *** irdma 6.8 rc fixes *** Sindhu Devale
2024-01-31 23:38 ` [PATCH rdma-rc 1/4] RDMA/irdma: Fix KASAN issue with tasklet Sindhu Devale
2024-01-31 23:38 ` [PATCH rdma-rc 2/4] RDMA/irdma: Validate max_send_wr and max_recv_wr Sindhu Devale
2024-01-31 23:38 ` [PATCH rdma-rc 3/4] RDMA/irdma: Set the CQ read threshold for GEN 1 Sindhu Devale
2024-01-31 23:38 ` [PATCH rdma-rc 4/4] RDMA/irdma: Add AE for too many RNRS Sindhu Devale
2024-02-04 9:37 ` [PATCH rdma-rc 0/4] *** irdma 6.8 rc fixes *** Leon Romanovsky
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.