Skip to content

Commit

Permalink
IPoIB/cm: Set tx_wr.num_sge in connected mode post_send()
Browse files Browse the repository at this point in the history
Commit 7143740 ("IPoIB: Add send gather support") made it possible
for tx_wr.num_sge to be != 1 -- this happens if send gather support is
enabled.  However, the code in the connected mode post_send() function
assumes the old invariant, namely that tx_wr.num_sge is always 1.  Fix
this by explicitly setting tx_wr.num_sge to 1 in the CM post_send().

Signed-off-by: Roland Dreier <rolandd@cisco.com>
  • Loading branch information
Roland Dreier committed Mar 12, 2008
1 parent b3e2749 commit 4200406
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/infiniband/ulp/ipoib/ipoib_cm.c
Original file line number Diff line number Diff line change
Expand Up @@ -637,6 +637,7 @@ static inline int post_send(struct ipoib_dev_priv *priv,
priv->tx_sge[0].addr = addr;
priv->tx_sge[0].length = len;

priv->tx_wr.num_sge = 1;
priv->tx_wr.wr_id = wr_id | IPOIB_OP_CM;

return ib_post_send(tx->qp, &priv->tx_wr, &bad_wr);
Expand Down

0 comments on commit 4200406

Please sign in to comment.