diff options
author | Tatyana Nikolova <Tatyana.E.Nikolova@intel.com> | 2012-01-17 11:17:30 -0500 |
---|---|---|
committer | Roland Dreier <roland@purestorage.com> | 2012-01-27 12:50:48 -0500 |
commit | 81f99dcc93226c7accfe5c4edad1749b8aebf7db (patch) | |
tree | 8ee5dcd31acd13dbd5ac7d6f7d854bcd75bdf928 /drivers/infiniband/hw/nes | |
parent | dcd6c92267155e70a94b3927bce681ce74b80d1f (diff) |
RDMA/nes: Fix for sending MPA reject frame
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>
Diffstat (limited to 'drivers/infiniband/hw/nes')
-rw-r--r-- | drivers/infiniband/hw/nes/nes_cm.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/infiniband/hw/nes/nes_cm.c b/drivers/infiniband/hw/nes/nes_cm.c index 425065b36b8c..183f7ab120db 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) | |||
233 | u8 *start_ptr = &start_addr; | 233 | u8 *start_ptr = &start_addr; |
234 | u8 **start_buff = &start_ptr; | 234 | u8 **start_buff = &start_ptr; |
235 | u16 buff_len = 0; | 235 | u16 buff_len = 0; |
236 | struct ietf_mpa_v1 *mpa_frame; | ||
236 | 237 | ||
237 | skb = dev_alloc_skb(MAX_CM_BUFFER); | 238 | skb = dev_alloc_skb(MAX_CM_BUFFER); |
238 | if (!skb) { | 239 | if (!skb) { |
@@ -242,6 +243,8 @@ static int send_mpa_reject(struct nes_cm_node *cm_node) | |||
242 | 243 | ||
243 | /* send an MPA reject frame */ | 244 | /* send an MPA reject frame */ |
244 | cm_build_mpa_frame(cm_node, start_buff, &buff_len, NULL, MPA_KEY_REPLY); | 245 | cm_build_mpa_frame(cm_node, start_buff, &buff_len, NULL, MPA_KEY_REPLY); |
246 | mpa_frame = (struct ietf_mpa_v1 *)*start_buff; | ||
247 | mpa_frame->flags |= IETF_MPA_FLAGS_REJECT; | ||
245 | form_cm_frame(skb, cm_node, NULL, 0, *start_buff, buff_len, SET_ACK | SET_FIN); | 248 | form_cm_frame(skb, cm_node, NULL, 0, *start_buff, buff_len, SET_ACK | SET_FIN); |
246 | 249 | ||
247 | cm_node->state = NES_CM_STATE_FIN_WAIT1; | 250 | cm_node->state = NES_CM_STATE_FIN_WAIT1; |