t4_cpl_io.c (274421) | t4_cpl_io.c (275329) |
---|---|
1/*- 2 * Copyright (c) 2012 Chelsio Communications, Inc. 3 * All rights reserved. 4 * Written by: Navdeep Parhar <np@FreeBSD.org> 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions 8 * are met: --- 12 unchanged lines hidden (view full) --- 21 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 22 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 23 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 24 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 25 * SUCH DAMAGE. 26 */ 27 28#include <sys/cdefs.h> | 1/*- 2 * Copyright (c) 2012 Chelsio Communications, Inc. 3 * All rights reserved. 4 * Written by: Navdeep Parhar <np@FreeBSD.org> 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions 8 * are met: --- 12 unchanged lines hidden (view full) --- 21 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 22 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 23 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 24 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 25 * SUCH DAMAGE. 26 */ 27 28#include <sys/cdefs.h> |
29__FBSDID("$FreeBSD: head/sys/dev/cxgbe/tom/t4_cpl_io.c 274421 2014-11-12 09:57:15Z glebius $"); | 29__FBSDID("$FreeBSD: head/sys/dev/cxgbe/tom/t4_cpl_io.c 275329 2014-11-30 13:24:21Z glebius $"); |
30 31#include "opt_inet.h" 32 33#ifdef TCP_OFFLOAD 34#include <sys/param.h> 35#include <sys/types.h> 36#include <sys/kernel.h> 37#include <sys/ktr.h> --- 1043 unchanged lines hidden (view full) --- 1081 1082 KASSERT(toep->sb_cc >= sbused(sb), 1083 ("%s: sb %p has more data (%d) than last time (%d).", 1084 __func__, sb, sbused(sb), toep->sb_cc)); 1085 toep->rx_credits += toep->sb_cc - sbused(sb); 1086#ifdef USE_DDP_RX_FLOW_CONTROL 1087 toep->rx_credits -= m->m_len; /* adjust for F_RX_FC_DDP */ 1088#endif | 30 31#include "opt_inet.h" 32 33#ifdef TCP_OFFLOAD 34#include <sys/param.h> 35#include <sys/types.h> 36#include <sys/kernel.h> 37#include <sys/ktr.h> --- 1043 unchanged lines hidden (view full) --- 1081 1082 KASSERT(toep->sb_cc >= sbused(sb), 1083 ("%s: sb %p has more data (%d) than last time (%d).", 1084 __func__, sb, sbused(sb), toep->sb_cc)); 1085 toep->rx_credits += toep->sb_cc - sbused(sb); 1086#ifdef USE_DDP_RX_FLOW_CONTROL 1087 toep->rx_credits -= m->m_len; /* adjust for F_RX_FC_DDP */ 1088#endif |
1089 sbappendstream_locked(sb, m); | 1089 sbappendstream_locked(sb, m, 0); |
1090 toep->sb_cc = sbused(sb); 1091 } 1092 socantrcvmore_locked(so); /* unlocks the sockbuf */ 1093 1094 if (toep->ulp_mode != ULP_MODE_RDMA) { 1095 KASSERT(tp->rcv_nxt == be32toh(cpl->rcv_nxt), 1096 ("%s: rcv_nxt mismatch: %u %u", __func__, tp->rcv_nxt, 1097 be32toh(cpl->rcv_nxt))); --- 483 unchanged lines hidden (view full) --- 1581 enable_ddp(sc, toep); 1582 } 1583 } 1584 1585 KASSERT(toep->sb_cc >= sbused(sb), 1586 ("%s: sb %p has more data (%d) than last time (%d).", 1587 __func__, sb, sbused(sb), toep->sb_cc)); 1588 toep->rx_credits += toep->sb_cc - sbused(sb); | 1090 toep->sb_cc = sbused(sb); 1091 } 1092 socantrcvmore_locked(so); /* unlocks the sockbuf */ 1093 1094 if (toep->ulp_mode != ULP_MODE_RDMA) { 1095 KASSERT(tp->rcv_nxt == be32toh(cpl->rcv_nxt), 1096 ("%s: rcv_nxt mismatch: %u %u", __func__, tp->rcv_nxt, 1097 be32toh(cpl->rcv_nxt))); --- 483 unchanged lines hidden (view full) --- 1581 enable_ddp(sc, toep); 1582 } 1583 } 1584 1585 KASSERT(toep->sb_cc >= sbused(sb), 1586 ("%s: sb %p has more data (%d) than last time (%d).", 1587 __func__, sb, sbused(sb), toep->sb_cc)); 1588 toep->rx_credits += toep->sb_cc - sbused(sb); |
1589 sbappendstream_locked(sb, m); | 1589 sbappendstream_locked(sb, m, 0); |
1590 toep->sb_cc = sbused(sb); 1591 sorwakeup_locked(so); 1592 SOCKBUF_UNLOCK_ASSERT(sb); 1593 1594 INP_WUNLOCK(inp); 1595 return (0); 1596} 1597 --- 207 unchanged lines hidden --- | 1590 toep->sb_cc = sbused(sb); 1591 sorwakeup_locked(so); 1592 SOCKBUF_UNLOCK_ASSERT(sb); 1593 1594 INP_WUNLOCK(inp); 1595 return (0); 1596} 1597 --- 207 unchanged lines hidden --- |