libcxgbi.c (152fce5a2371f64c57abf99dbb0600cc18d399d4) libcxgbi.c (586be7cb694fdbb3a35cc35c03387ce0fc534572)
1/*
2 * libcxgbi.c: Chelsio common library for T3/T4 iSCSI driver.
3 *
4 * Copyright (c) 2010-2015 Chelsio Communications, Inc.
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation.

--- 1613 unchanged lines hidden (view full) ---

1622 u32 credits;
1623
1624 log_debug(1 << CXGBI_DBG_PDU_RX,
1625 "csk 0x%p,%u,0x%lx,%u, seq %u, wup %u, thre %u, %u.\n",
1626 csk, csk->state, csk->flags, csk->tid, csk->copied_seq,
1627 csk->rcv_wup, cdev->rx_credit_thres,
1628 csk->rcv_win);
1629
1/*
2 * libcxgbi.c: Chelsio common library for T3/T4 iSCSI driver.
3 *
4 * Copyright (c) 2010-2015 Chelsio Communications, Inc.
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation.

--- 1613 unchanged lines hidden (view full) ---

1622 u32 credits;
1623
1624 log_debug(1 << CXGBI_DBG_PDU_RX,
1625 "csk 0x%p,%u,0x%lx,%u, seq %u, wup %u, thre %u, %u.\n",
1626 csk, csk->state, csk->flags, csk->tid, csk->copied_seq,
1627 csk->rcv_wup, cdev->rx_credit_thres,
1628 csk->rcv_win);
1629
1630 if (!cdev->rx_credit_thres)
1631 return;
1632
1630 if (csk->state != CTP_ESTABLISHED)
1631 return;
1632
1633 credits = csk->copied_seq - csk->rcv_wup;
1634 if (unlikely(!credits))
1635 return;
1633 if (csk->state != CTP_ESTABLISHED)
1634 return;
1635
1636 credits = csk->copied_seq - csk->rcv_wup;
1637 if (unlikely(!credits))
1638 return;
1636 if (unlikely(cdev->rx_credit_thres == 0))
1637 return;
1638
1639 must_send = credits + 16384 >= csk->rcv_win;
1640 if (must_send || credits >= cdev->rx_credit_thres)
1641 csk->rcv_wup += cdev->csk_send_rx_credits(csk, credits);
1642}
1643
1644void cxgbi_conn_pdu_ready(struct cxgbi_sock *csk)
1645{
1646 struct cxgbi_device *cdev = csk->cdev;

--- 1047 unchanged lines hidden ---
1639 must_send = credits + 16384 >= csk->rcv_win;
1640 if (must_send || credits >= cdev->rx_credit_thres)
1641 csk->rcv_wup += cdev->csk_send_rx_credits(csk, credits);
1642}
1643
1644void cxgbi_conn_pdu_ready(struct cxgbi_sock *csk)
1645{
1646 struct cxgbi_device *cdev = csk->cdev;

--- 1047 unchanged lines hidden ---