Commit 3bcf96e0 authored by Steve Wise's avatar Steve Wise Committed by Doug Ledford

iw_cxgb4: do not send RX_DATA_ACK CPLs after close/abort

Function rx_data(), which handles ingress CPL_RX_DATA messages, was
always sending an RX_DATA_ACK with the goal of updating the credits.
However, if the RDMA connection is moved out of FPDU mode abruptly,
then it is possible for iw_cxgb4 to process queued RX_DATA CPLs after HW
has aborted the connection.  These CPLs should not trigger RX_DATA_ACKS.
If they do, HW can see a READ after DELETE of the DB_LE hash entry for
the tid and post a LE_DB HashTblMemCrcError.
Signed-off-by: default avatarSteve Wise <swise@opengridcomputing.com>
Signed-off-by: default avatarDoug Ledford <dledford@redhat.com>
parent c12a67fe
...@@ -1804,20 +1804,21 @@ static int rx_data(struct c4iw_dev *dev, struct sk_buff *skb) ...@@ -1804,20 +1804,21 @@ static int rx_data(struct c4iw_dev *dev, struct sk_buff *skb)
skb_trim(skb, dlen); skb_trim(skb, dlen);
mutex_lock(&ep->com.mutex); mutex_lock(&ep->com.mutex);
/* update RX credits */
update_rx_credits(ep, dlen);
switch (ep->com.state) { switch (ep->com.state) {
case MPA_REQ_SENT: case MPA_REQ_SENT:
update_rx_credits(ep, dlen);
ep->rcv_seq += dlen; ep->rcv_seq += dlen;
disconnect = process_mpa_reply(ep, skb); disconnect = process_mpa_reply(ep, skb);
break; break;
case MPA_REQ_WAIT: case MPA_REQ_WAIT:
update_rx_credits(ep, dlen);
ep->rcv_seq += dlen; ep->rcv_seq += dlen;
disconnect = process_mpa_request(ep, skb); disconnect = process_mpa_request(ep, skb);
break; break;
case FPDU_MODE: { case FPDU_MODE: {
struct c4iw_qp_attributes attrs; struct c4iw_qp_attributes attrs;
update_rx_credits(ep, dlen);
BUG_ON(!ep->com.qp); BUG_ON(!ep->com.qp);
if (status) if (status)
pr_err("%s Unexpected streaming data." \ pr_err("%s Unexpected streaming data." \
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment