[ewg] [PATCH] RDMA/nes: Fix for sending MPA reject frame
Tatyana Nikolova
Tatyana.E.Nikolova at intel.com
Tue Jan 17 08:18:56 PST 2012
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>
---
kernel_patches/fixes/nes_0069_mpa_reject_fix.patch | 24 ++++++++++++++++++++
1 files changed, 24 insertions(+), 0 deletions(-)
create mode 100644 kernel_patches/fixes/nes_0069_mpa_reject_fix.patch
diff --git a/kernel_patches/fixes/nes_0069_mpa_reject_fix.patch b/kernel_patches/fixes/nes_0069_mpa_reject_fix.patch
new file mode 100644
index 0000000..1f06b88
--- /dev/null
+++ b/kernel_patches/fixes/nes_0069_mpa_reject_fix.patch
@@ -0,0 +1,24 @@
+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
+
--
1.7.1
More information about the ewg
mailing list