Commit 158c776d authored by Hariprasad S's avatar Hariprasad S Committed by Doug Ledford

iw_cxgb4: pass the ord/ird in connect reply events

This allows client ULPs to get the negotiated ord/ird which is useful
to avoid stalling the SQ due to exceeding the ORD.
Signed-off-by: default avatarHariprasad Shenai <hariprasad@chelsio.com>
Signed-off-by: default avatarDoug Ledford <dledford@redhat.com>
parent 99718e59
...@@ -1196,6 +1196,8 @@ static void connect_reply_upcall(struct c4iw_ep *ep, int status) ...@@ -1196,6 +1196,8 @@ static void connect_reply_upcall(struct c4iw_ep *ep, int status)
if ((status == 0) || (status == -ECONNREFUSED)) { if ((status == 0) || (status == -ECONNREFUSED)) {
if (!ep->tried_with_mpa_v1) { if (!ep->tried_with_mpa_v1) {
/* this means MPA_v2 is used */ /* this means MPA_v2 is used */
event.ord = ep->ird;
event.ird = ep->ord;
event.private_data_len = ep->plen - event.private_data_len = ep->plen -
sizeof(struct mpa_v2_conn_params); sizeof(struct mpa_v2_conn_params);
event.private_data = ep->mpa_pkt + event.private_data = ep->mpa_pkt +
...@@ -1203,6 +1205,8 @@ static void connect_reply_upcall(struct c4iw_ep *ep, int status) ...@@ -1203,6 +1205,8 @@ static void connect_reply_upcall(struct c4iw_ep *ep, int status)
sizeof(struct mpa_v2_conn_params); sizeof(struct mpa_v2_conn_params);
} else { } else {
/* this means MPA_v1 is used */ /* this means MPA_v1 is used */
event.ord = cur_max_read_depth(ep->com.dev);
event.ird = cur_max_read_depth(ep->com.dev);
event.private_data_len = ep->plen; event.private_data_len = ep->plen;
event.private_data = ep->mpa_pkt + event.private_data = ep->mpa_pkt +
sizeof(struct mpa_message); sizeof(struct mpa_message);
......
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