Skip to content

Commit f8197a4

Browse files
Hal RosenstockLinus Torvalds
authored andcommitted
[PATCH] IB: Change saving of user's send wr_id in MAD
Move saving of user's send wr_id to better match layering of received response handling. Signed-off-by: Sean Hefty <[email protected]> Signed-off-by: Hal Rosenstock <[email protected]> Cc: Roland Dreier <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
1 parent 4a0754f commit f8197a4

File tree

1 file changed

+2
-2
lines changed
  • drivers/infiniband/core

1 file changed

+2
-2
lines changed

drivers/infiniband/core/mad.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -847,9 +847,8 @@ static int ib_send_mad(struct ib_mad_agent_private *mad_agent_priv,
847847
unsigned long flags;
848848
int ret;
849849

850-
/* Replace user's WR ID with our own to find WR upon completion */
850+
/* Set WR ID to find mad_send_wr upon completion */
851851
qp_info = mad_agent_priv->qp_info;
852-
mad_send_wr->wr_id = mad_send_wr->send_wr.wr_id;
853852
mad_send_wr->send_wr.wr_id = (unsigned long)&mad_send_wr->mad_list;
854853
mad_send_wr->mad_list.mad_queue = &qp_info->send_queue;
855854

@@ -948,6 +947,7 @@ int ib_post_send_mad(struct ib_mad_agent *mad_agent,
948947
mad_send_wr->send_wr.sg_list = mad_send_wr->sg_list;
949948
memcpy(mad_send_wr->sg_list, send_wr->sg_list,
950949
sizeof *send_wr->sg_list * send_wr->num_sge);
950+
mad_send_wr->wr_id = mad_send_wr->send_wr.wr_id;
951951
mad_send_wr->send_wr.next = NULL;
952952
mad_send_wr->tid = send_wr->wr.ud.mad_hdr->tid;
953953
mad_send_wr->agent = mad_agent;

0 commit comments

Comments
 (0)