[ewg] [PATCH] compat-rdma/nes: Fixes
Tatyana Nikolova
Tatyana.E.Nikolova at intel.com
Wed May 30 12:00:43 PDT 2012
Fixes for NES driver which have been accepted upstream.
Signed-off-by: Tatyana Nikolova <Tatyana.E.Nikolova at intel.com>
---
patches/nes-0001-Fix-for-mpa-reject.patch | 31 +++++++++++++++++
patches/nes-0002-Fix-for-terminate-timer.patch | 37 +++++++++++++++++++++
patches/nes-0003-Fix-for-ibqp-event-handler.patch | 25 ++++++++++++++
patches/nes-0004-Fix-for-ord-size.patch | 26 ++++++++++++++
4 files changed, 119 insertions(+), 0 deletions(-)
create mode 100644 patches/nes-0001-Fix-for-mpa-reject.patch
create mode 100644 patches/nes-0002-Fix-for-terminate-timer.patch
create mode 100644 patches/nes-0003-Fix-for-ibqp-event-handler.patch
create mode 100644 patches/nes-0004-Fix-for-ord-size.patch
diff --git a/patches/nes-0001-Fix-for-mpa-reject.patch b/patches/nes-0001-Fix-for-mpa-reject.patch
new file mode 100644
index 0000000..8228f85
--- /dev/null
+++ b/patches/nes-0001-Fix-for-mpa-reject.patch
@@ -0,0 +1,31 @@
+Set a reject flag, when sending MPA reject message to inform the peer
+that the application has rejected the connection.
+
+Signed-off-by: Tatyana Nikolova <Tatyana.E.Nikolova at intel.com>
+Signed-off-by: Faisal Latif <Faisal.Latif at intel.com>
+---
+
+diff --git a/drivers/infiniband/hw/nes/nes_cm.c b/drivers/infiniband/hw/nes/nes_cm.c
+index 47713f2..53c7e32 100644
+--- a/drivers/infiniband/hw/nes/nes_cm.c
++++ b/drivers/infiniband/hw/nes/nes_cm.c
+@@ -233,6 +233,7 @@ static int send_mpa_reject(struct nes_cm_node *cm_node)
+ u8 *start_ptr = &start_addr;
+ u8 **start_buff = &start_ptr;
+ u16 buff_len = 0;
++ struct ietf_mpa_v1 *mpa_frame;
+
+ skb = dev_alloc_skb(MAX_CM_BUFFER);
+ if (!skb) {
+@@ -242,6 +243,8 @@ static int send_mpa_reject(struct nes_cm_node *cm_node)
+
+ /* send an MPA reject frame */
+ cm_build_mpa_frame(cm_node, start_buff, &buff_len, NULL, MPA_KEY_REPLY);
++ mpa_frame = (struct ietf_mpa_v1 *)*start_buff;
++ mpa_frame->flags |= IETF_MPA_FLAGS_REJECT;
+ form_cm_frame(skb, cm_node, NULL, 0, *start_buff, buff_len, SET_ACK | SET_FIN);
+
+ cm_node->state = NES_CM_STATE_FIN_WAIT1;
+--
+1.7.1
+
diff --git a/patches/nes-0002-Fix-for-terminate-timer.patch b/patches/nes-0002-Fix-for-terminate-timer.patch
new file mode 100644
index 0000000..f45c178
--- /dev/null
+++ b/patches/nes-0002-Fix-for-terminate-timer.patch
@@ -0,0 +1,37 @@
+Fix for reset which happens right after sending a terminate message.
+Terminate timer is not deleted when the connection is closed.
+
+Signed-off-by: Tatyana Nikolova <Tatyana.E.Nikolova at intel.com>
+Signed-off-by: Faisal Latif <Faisal.Latif at intel.com>
+---
+
+diff --git a/drivers/infiniband/hw/nes/nes_cm.c b/drivers/infiniband/hw/nes/nes_cm.c
+index fc050aa..793ccd6 100644
+--- a/drivers/infiniband/hw/nes/nes_cm.c
++++ b/drivers/infiniband/hw/nes/nes_cm.c
+@@ -2841,6 +2841,7 @@ static int nes_cm_disconn_true(struct nes_qp *nesqp)
+ issue_disconn = 1;
+ issue_close = 1;
+ nesqp->cm_id = NULL;
++ del_timer(&nesqp->terminate_timer);
+ if (nesqp->flush_issued == 0) {
+ nesqp->flush_issued = 1;
+ issue_flush = 1;
+diff --git a/drivers/infiniband/hw/nes/nes_hw.c b/drivers/infiniband/hw/nes/nes_hw.c
+index 355786c..5bcd645 100644
+--- a/drivers/infiniband/hw/nes/nes_hw.c
++++ b/drivers/infiniband/hw/nes/nes_hw.c
+@@ -3619,10 +3619,6 @@ static void nes_process_iwarp_aeqe(struct nes_device *nesdev,
+ }
+ break;
+ case NES_AEQE_AEID_LLP_CLOSE_COMPLETE:
+- if (nesqp->term_flags) {
+- nes_terminate_done(nesqp, 0);
+- return;
+- }
+ spin_lock_irqsave(&nesqp->lock, flags);
+ nesqp->hw_iwarp_state = iwarp_state;
+ nesqp->hw_tcp_state = tcp_state;
+--
+1.7.1
+
diff --git a/patches/nes-0003-Fix-for-ibqp-event-handler.patch b/patches/nes-0003-Fix-for-ibqp-event-handler.patch
new file mode 100644
index 0000000..9d3f2f4
--- /dev/null
+++ b/patches/nes-0003-Fix-for-ibqp-event-handler.patch
@@ -0,0 +1,25 @@
+Fix for ibqp event handler in the case it was NULL (not initialized by ULP).
+
+Signed-off-by: Tatyana Nikolova <Tatyana.E.Nikolova at intel.com>
+Signed-off-by: Donald Wood <Donald.E.Wood at intel.com>
+---
+ drivers/infiniband/hw/nes/nes_cm.c | 3 ++-
+ 1 files changed, 2 insertions(+), 1 deletions(-)
+
+diff --git a/drivers/infiniband/hw/nes/nes_cm.c b/drivers/infiniband/hw/nes/nes_cm.c
+index da2c67d..a9899b1 100644
+--- a/drivers/infiniband/hw/nes/nes_cm.c
++++ b/drivers/infiniband/hw/nes/nes_cm.c
+@@ -2878,7 +2878,8 @@ static int nes_cm_disconn_true(struct nes_qp *nesqp)
+ ibevent.device = nesqp->ibqp.device;
+ ibevent.event = nesqp->terminate_eventtype;
+ ibevent.element.qp = &nesqp->ibqp;
+- nesqp->ibqp.event_handler(&ibevent, nesqp->ibqp.qp_context);
++ if (nesqp->ibqp.event_handler)
++ nesqp->ibqp.event_handler(&ibevent, nesqp->ibqp.qp_context);
+ }
+ }
+
+--
+1.7.1
+
diff --git a/patches/nes-0004-Fix-for-ord-size.patch b/patches/nes-0004-Fix-for-ord-size.patch
new file mode 100644
index 0000000..3c9ad5f
--- /dev/null
+++ b/patches/nes-0004-Fix-for-ord-size.patch
@@ -0,0 +1,26 @@
+Set ORD size to be at least one in order to accommodate RDMA READ Request message.
+
+Signed-off-by: Tatyana Nikolova <Tatyana.E.Nikolova at intel.com>
+Signed-off-by: Donald Wood <Donald.E.Wood at intel.com>
+---
+ drivers/infiniband/hw/nes/nes_cm.c | 4 ++++
+ 1 files changed, 4 insertions(+), 0 deletions(-)
+
+diff --git a/drivers/infiniband/hw/nes/nes_cm.c b/drivers/infiniband/hw/nes/nes_cm.c
+index da2c67d..7cdcefd 100644
+--- a/drivers/infiniband/hw/nes/nes_cm.c
++++ b/drivers/infiniband/hw/nes/nes_cm.c
+@@ -3315,6 +3315,10 @@ int nes_connect(struct iw_cm_id *cm_id, struct iw_cm_conn_param *conn_param)
+
+ nesqp->private_data_len = conn_param->private_data_len;
+ nesqp->nesqp_context->ird_ord_sizes |= cpu_to_le32((u32)conn_param->ord);
++ /* space for rdma0 read msg*/
++ if (conn_param->ord == 0)
++ nesqp->nesqp_context->ird_ord_sizes |= cpu_to_le32(1);
++
+ nes_debug(NES_DBG_CM, "requested ord = 0x%08X.\n", (u32)conn_param->ord);
+ nes_debug(NES_DBG_CM, "mpa private data len =%u\n",
+ conn_param->private_data_len);
+--
+1.7.1
+
--
1.7.1
More information about the ewg
mailing list