Skip to content

Commit

Permalink
RDMA/nes: Fix for sending MPA reject frame
Browse files Browse the repository at this point in the history
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@intel.com>
Signed-off-by: Faisal Latif <Faisal.Latif@intel.com>
Signed-off-by: Roland Dreier <roland@purestorage.com>
  • Loading branch information
Tatyana Nikolova authored and Roland Dreier committed Jan 27, 2012
1 parent dcd6c92 commit 81f99dc
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions drivers/infiniband/hw/nes/nes_cm.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -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;
Expand Down

0 comments on commit 81f99dc

Please sign in to comment.