提交 7f446abf 编写于 作者: S Steve Wise 提交者: Doug Ledford

iw_cxgb4: limit IRD/ORD advertised to ULP by device max.

The i40iw initiator sends an MPA-request with ird = 63, ord = 63. The
cxgb4 responder sends a RST.  Since the inbound ord=63 and it exceeds
the max_ird/c4iw_max_read_depth (=32 default), chelsio decides to abort.

Instead, cxgb4 should adjust the ord/ird down before presenting it to
the ULP.
Reported-by: NShiraz Saleem <shiraz.saleem@intel.com>
Signed-off-by: NSteve Wise <swise@opengridcomputing.com>
Signed-off-by: NDoug Ledford <dledford@redhat.com>
上级 e0cf75de
...@@ -1827,8 +1827,12 @@ static int process_mpa_request(struct c4iw_ep *ep, struct sk_buff *skb) ...@@ -1827,8 +1827,12 @@ static int process_mpa_request(struct c4iw_ep *ep, struct sk_buff *skb)
(ep->mpa_pkt + sizeof(*mpa)); (ep->mpa_pkt + sizeof(*mpa));
ep->ird = ntohs(mpa_v2_params->ird) & ep->ird = ntohs(mpa_v2_params->ird) &
MPA_V2_IRD_ORD_MASK; MPA_V2_IRD_ORD_MASK;
ep->ird = min_t(u32, ep->ird,
cur_max_read_depth(ep->com.dev));
ep->ord = ntohs(mpa_v2_params->ord) & ep->ord = ntohs(mpa_v2_params->ord) &
MPA_V2_IRD_ORD_MASK; MPA_V2_IRD_ORD_MASK;
ep->ord = min_t(u32, ep->ord,
cur_max_read_depth(ep->com.dev));
PDBG("%s initiator ird %u ord %u\n", __func__, ep->ird, PDBG("%s initiator ird %u ord %u\n", __func__, ep->ird,
ep->ord); ep->ord);
if (ntohs(mpa_v2_params->ird) & MPA_V2_PEER2PEER_MODEL) if (ntohs(mpa_v2_params->ird) & MPA_V2_PEER2PEER_MODEL)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册