Deleted Added
full compact
cxgb_cpl_io.c (176507) cxgb_cpl_io.c (177340)
1/**************************************************************************
2
3Copyright (c) 2007, Chelsio Inc.
4All rights reserved.
5
6Redistribution and use in source and binary forms, with or without
7modification, are permitted provided that the following conditions are met:
8

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

23INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
24CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
25ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
26POSSIBILITY OF SUCH DAMAGE.
27
28***************************************************************************/
29
30#include <sys/cdefs.h>
1/**************************************************************************
2
3Copyright (c) 2007, Chelsio Inc.
4All rights reserved.
5
6Redistribution and use in source and binary forms, with or without
7modification, are permitted provided that the following conditions are met:
8

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

23INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
24CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
25ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
26POSSIBILITY OF SUCH DAMAGE.
27
28***************************************************************************/
29
30#include <sys/cdefs.h>
31__FBSDID("$FreeBSD: head/sys/dev/cxgb/ulp/tom/cxgb_cpl_io.c 176507 2008-02-24 07:19:31Z kmacy $");
31__FBSDID("$FreeBSD: head/sys/dev/cxgb/ulp/tom/cxgb_cpl_io.c 177340 2008-03-18 03:55:12Z kmacy $");
32
33#include <sys/param.h>
34#include <sys/systm.h>
35#include <sys/fcntl.h>
36#include <sys/kernel.h>
37#include <sys/limits.h>
38#include <sys/ktr.h>
39#include <sys/lock.h>

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

633do_rx_urg_notify(struct t3cdev *cdev, struct mbuf *m, void *ctx)
634{
635 struct toepcb *toep = (struct toepcb *)ctx;
636
637 rx_urg_notify(toep, m);
638 return (0);
639}
640
32
33#include <sys/param.h>
34#include <sys/systm.h>
35#include <sys/fcntl.h>
36#include <sys/kernel.h>
37#include <sys/limits.h>
38#include <sys/ktr.h>
39#include <sys/lock.h>

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

633do_rx_urg_notify(struct t3cdev *cdev, struct mbuf *m, void *ctx)
634{
635 struct toepcb *toep = (struct toepcb *)ctx;
636
637 rx_urg_notify(toep, m);
638 return (0);
639}
640
641static __inline int
642is_delack_mode_valid(struct toedev *dev, struct toepcb *toep)
643{
644 return (toep->tp_ulp_mode ||
645 (toep->tp_ulp_mode == ULP_MODE_TCPDDP &&
646 dev->tod_ttid >= TOE_ID_CHELSIO_T3));
647}
648
641/*
642 * Set of states for which we should return RX credits.
643 */
644#define CREDIT_RETURN_STATE (TCPF_ESTABLISHED | TCPF_FIN_WAIT1 | TCPF_FIN_WAIT2)
645
646/*
647 * Called after some received data has been read. It returns RX credits
648 * to the HW for the amount of data processed.

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

697 return;
698
699 dev = toep->tp_toedev;
700 thres = TOM_TUNABLE(dev, rx_credit_thres);
701
702 if (__predict_false(thres == 0))
703 return;
704
649/*
650 * Set of states for which we should return RX credits.
651 */
652#define CREDIT_RETURN_STATE (TCPF_ESTABLISHED | TCPF_FIN_WAIT1 | TCPF_FIN_WAIT2)
653
654/*
655 * Called after some received data has been read. It returns RX credits
656 * to the HW for the amount of data processed.

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

705 return;
706
707 dev = toep->tp_toedev;
708 thres = TOM_TUNABLE(dev, rx_credit_thres);
709
710 if (__predict_false(thres == 0))
711 return;
712
705 if (toep->tp_ulp_mode)
706 dack = F_RX_DACK_CHANGE | V_RX_DACK_MODE(1);
707 else {
713 if (is_delack_mode_valid(dev, toep)) {
708 dack_mode = TOM_TUNABLE(dev, delack);
709 if (__predict_false(dack_mode != toep->tp_delack_mode)) {
710 u32 r = tp->rcv_nxt - toep->tp_delack_seq;
711
712 if (r >= tp->rcv_wnd || r >= 16 * toep->tp_mss_clamp)
713 dack = F_RX_DACK_CHANGE |
714 V_RX_DACK_MODE(dack_mode);
715 }
714 dack_mode = TOM_TUNABLE(dev, delack);
715 if (__predict_false(dack_mode != toep->tp_delack_mode)) {
716 u32 r = tp->rcv_nxt - toep->tp_delack_seq;
717
718 if (r >= tp->rcv_wnd || r >= 16 * toep->tp_mss_clamp)
719 dack = F_RX_DACK_CHANGE |
720 V_RX_DACK_MODE(dack_mode);
721 }
716 }
717
722 } else
723 dack = F_RX_DACK_CHANGE | V_RX_DACK_MODE(1);
724
718 /*
719 * For coalescing to work effectively ensure the receive window has
720 * at least 16KB left.
721 */
722 must_send = credits + 16384 >= tp->rcv_wnd;
723
724 if (must_send || credits >= thres)
725 toep->tp_rcv_wup += t3_send_rx_credits(tp, credits, dack, must_send);

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

882}
883
884void
885t3_set_rcv_coalesce_enable(struct socket *so, int on_off)
886{
887 set_tcb_tflag(so, S_TF_RCV_COALESCE_ENABLE, on_off);
888}
889
725 /*
726 * For coalescing to work effectively ensure the receive window has
727 * at least 16KB left.
728 */
729 must_send = credits + 16384 >= tp->rcv_wnd;
730
731 if (must_send || credits >= thres)
732 toep->tp_rcv_wup += t3_send_rx_credits(tp, credits, dack, must_send);

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

889}
890
891void
892t3_set_rcv_coalesce_enable(struct socket *so, int on_off)
893{
894 set_tcb_tflag(so, S_TF_RCV_COALESCE_ENABLE, on_off);
895}
896
897void
898t3_set_dack_mss(struct socket *so, int on_off)
899{
900 set_tcb_tflag(so, S_TF_DACK_MSS, on_off);
901}
902
890/*
891 * Send a SET_TCB_FIELD CPL message to change a connection's TOS setting.
892 */
893static void
894t3_set_tos(struct socket *so)
895{
896 t3_set_tcb_field(so, W_TCB_TOS, V_TCB_TOS(M_TCB_TOS),
897 V_TCB_TOS(SO_TOS(so)));

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

2047{
2048 struct tcpcb *tp;
2049 struct ddp_state *q;
2050 struct ddp_buf_state *bsp;
2051 struct cpl_rx_data_ddp *hdr;
2052 unsigned int ddp_len, rcv_nxt, ddp_report, end_offset, buf_idx;
2053 struct socket *so = toeptoso(toep);
2054 int nomoredata = 0;
903/*
904 * Send a SET_TCB_FIELD CPL message to change a connection's TOS setting.
905 */
906static void
907t3_set_tos(struct socket *so)
908{
909 t3_set_tcb_field(so, W_TCB_TOS, V_TCB_TOS(M_TCB_TOS),
910 V_TCB_TOS(SO_TOS(so)));

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

2060{
2061 struct tcpcb *tp;
2062 struct ddp_state *q;
2063 struct ddp_buf_state *bsp;
2064 struct cpl_rx_data_ddp *hdr;
2065 unsigned int ddp_len, rcv_nxt, ddp_report, end_offset, buf_idx;
2066 struct socket *so = toeptoso(toep);
2067 int nomoredata = 0;
2068 unsigned int delack_mode;
2055
2056 tp = sototcpcb(so);
2057
2058 INP_LOCK(tp->t_inpcb);
2059 if (__predict_false(so_no_receive(so))) {
2060
2061 handle_excess_rx(toep, m);
2062 INP_UNLOCK(tp->t_inpcb);

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

2086 ntohs(hdr->len));
2087 CTR3(KTR_TOM,
2088 "new_rx_data_ddp: offset %u ddp_report 0x%x buf_idx=%d",
2089 G_DDP_OFFSET(ddp_report), ddp_report, buf_idx);
2090
2091 ddp_len = ntohs(hdr->len);
2092 rcv_nxt = ntohl(hdr->seq) + ddp_len;
2093
2069
2070 tp = sototcpcb(so);
2071
2072 INP_LOCK(tp->t_inpcb);
2073 if (__predict_false(so_no_receive(so))) {
2074
2075 handle_excess_rx(toep, m);
2076 INP_UNLOCK(tp->t_inpcb);

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

2100 ntohs(hdr->len));
2101 CTR3(KTR_TOM,
2102 "new_rx_data_ddp: offset %u ddp_report 0x%x buf_idx=%d",
2103 G_DDP_OFFSET(ddp_report), ddp_report, buf_idx);
2104
2105 ddp_len = ntohs(hdr->len);
2106 rcv_nxt = ntohl(hdr->seq) + ddp_len;
2107
2108 delack_mode = G_DDP_DACK_MODE(ddp_report);
2109 if (__predict_false(G_DDP_DACK_MODE(ddp_report) != toep->tp_delack_mode)) {
2110 toep->tp_delack_mode = delack_mode;
2111 toep->tp_delack_seq = tp->rcv_nxt;
2112 }
2113
2094 m->m_seq = tp->rcv_nxt;
2095 tp->rcv_nxt = rcv_nxt;
2096
2097 tp->t_rcvtime = ticks;
2098 /*
2099 * Store the length in m->m_len. We are changing the meaning of
2100 * m->m_len here, we need to be very careful that nothing from now on
2101 * interprets ->len of this packet the usual way.

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

2148 bsp->flags &= ~DDP_BF_NOCOPY;
2149 }
2150
2151 if (ddp_report & F_DDP_PSH)
2152 m->m_ddp_flags |= DDP_BF_PSH;
2153 if (nomoredata)
2154 m->m_ddp_flags |= DDP_BF_NODATA;
2155
2114 m->m_seq = tp->rcv_nxt;
2115 tp->rcv_nxt = rcv_nxt;
2116
2117 tp->t_rcvtime = ticks;
2118 /*
2119 * Store the length in m->m_len. We are changing the meaning of
2120 * m->m_len here, we need to be very careful that nothing from now on
2121 * interprets ->len of this packet the usual way.

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

2168 bsp->flags &= ~DDP_BF_NOCOPY;
2169 }
2170
2171 if (ddp_report & F_DDP_PSH)
2172 m->m_ddp_flags |= DDP_BF_PSH;
2173 if (nomoredata)
2174 m->m_ddp_flags |= DDP_BF_NODATA;
2175
2156 if (__predict_false(G_DDP_DACK_MODE(ddp_report) != toep->tp_delack_mode)) {
2157 toep->tp_delack_mode = G_DDP_DACK_MODE(ddp_report);
2158 toep->tp_delack_seq = tp->rcv_nxt;
2159 }
2160
2176#ifdef notyet
2177 skb_reset_transport_header(skb);
2178 tcp_hdr(skb)->fin = 0; /* changes original hdr->ddp_report */
2179#endif
2161 SBAPPEND(&so->so_rcv, m);
2162
2163 if ((so->so_state & SS_NOFDREF) == 0)
2164 sorwakeup_locked(so);
2165 else
2166 SOCKBUF_UNLOCK(&so->so_rcv);
2167}
2168

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

2197static void
2198process_ddp_complete(struct toepcb *toep, struct mbuf *m)
2199{
2200 struct tcpcb *tp = toep->tp_tp;
2201 struct socket *so = toeptoso(toep);
2202 struct ddp_state *q;
2203 struct ddp_buf_state *bsp;
2204 struct cpl_rx_ddp_complete *hdr;
2180 SBAPPEND(&so->so_rcv, m);
2181
2182 if ((so->so_state & SS_NOFDREF) == 0)
2183 sorwakeup_locked(so);
2184 else
2185 SOCKBUF_UNLOCK(&so->so_rcv);
2186}
2187

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

2216static void
2217process_ddp_complete(struct toepcb *toep, struct mbuf *m)
2218{
2219 struct tcpcb *tp = toep->tp_tp;
2220 struct socket *so = toeptoso(toep);
2221 struct ddp_state *q;
2222 struct ddp_buf_state *bsp;
2223 struct cpl_rx_ddp_complete *hdr;
2205 unsigned int ddp_report, buf_idx, when;
2224 unsigned int ddp_report, buf_idx, when, delack_mode;
2206 int nomoredata = 0;
2207
2208 INP_LOCK(tp->t_inpcb);
2209 if (__predict_false(so_no_receive(so))) {
2210 struct inpcb *inp = sotoinpcb(so);
2211
2212 handle_excess_rx(toep, m);
2213 INP_UNLOCK(inp);

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

2221
2222
2223 SOCKBUF_LOCK(&so->so_rcv);
2224 bsp = &q->buf_state[buf_idx];
2225 when = bsp->cur_offset;
2226 m->m_len = m->m_pkthdr.len = G_DDP_OFFSET(ddp_report) - when;
2227 tp->rcv_nxt += m->m_len;
2228 tp->t_rcvtime = ticks;
2225 int nomoredata = 0;
2226
2227 INP_LOCK(tp->t_inpcb);
2228 if (__predict_false(so_no_receive(so))) {
2229 struct inpcb *inp = sotoinpcb(so);
2230
2231 handle_excess_rx(toep, m);
2232 INP_UNLOCK(inp);

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

2240
2241
2242 SOCKBUF_LOCK(&so->so_rcv);
2243 bsp = &q->buf_state[buf_idx];
2244 when = bsp->cur_offset;
2245 m->m_len = m->m_pkthdr.len = G_DDP_OFFSET(ddp_report) - when;
2246 tp->rcv_nxt += m->m_len;
2247 tp->t_rcvtime = ticks;
2248
2249 delack_mode = G_DDP_DACK_MODE(ddp_report);
2250 if (__predict_false(G_DDP_DACK_MODE(ddp_report) != toep->tp_delack_mode)) {
2251 toep->tp_delack_mode = delack_mode;
2252 toep->tp_delack_seq = tp->rcv_nxt;
2253 }
2254#ifdef notyet
2255 skb_reset_transport_header(skb);
2256 tcp_hdr(skb)->fin = 0; /* changes valid memory past CPL */
2257#endif
2229 INP_UNLOCK(tp->t_inpcb);
2230
2231 KASSERT(m->m_len > 0, ("%s m_len=%d", __FUNCTION__, m->m_len));
2258 INP_UNLOCK(tp->t_inpcb);
2259
2260 KASSERT(m->m_len > 0, ("%s m_len=%d", __FUNCTION__, m->m_len));
2232#ifdef T3_TRACE
2233 T3_TRACE5(TIDTB(sk),
2234 "process_ddp_complete: tp->rcv_nxt 0x%x cur_offset %u "
2235 "ddp_report 0x%x offset %u, len %u",
2236 tp->rcv_nxt, bsp->cur_offset, ddp_report,
2237 G_DDP_OFFSET(ddp_report), skb->len);
2238#endif
2239 CTR5(KTR_TOM,
2240 "process_ddp_complete: tp->rcv_nxt 0x%x cur_offset %u "
2241 "ddp_report 0x%x offset %u, len %u",
2242 tp->rcv_nxt, bsp->cur_offset, ddp_report,
2243 G_DDP_OFFSET(ddp_report), m->m_len);
2244
2245 bsp->cur_offset += m->m_len;
2246
2247 if (!(bsp->flags & DDP_BF_NOFLIP)) {
2248 q->cur_buf ^= 1; /* flip buffers */
2249 if (G_DDP_OFFSET(ddp_report) < q->kbuf[0]->dgl_length)
2250 nomoredata=1;
2251 }
2252
2261 CTR5(KTR_TOM,
2262 "process_ddp_complete: tp->rcv_nxt 0x%x cur_offset %u "
2263 "ddp_report 0x%x offset %u, len %u",
2264 tp->rcv_nxt, bsp->cur_offset, ddp_report,
2265 G_DDP_OFFSET(ddp_report), m->m_len);
2266
2267 bsp->cur_offset += m->m_len;
2268
2269 if (!(bsp->flags & DDP_BF_NOFLIP)) {
2270 q->cur_buf ^= 1; /* flip buffers */
2271 if (G_DDP_OFFSET(ddp_report) < q->kbuf[0]->dgl_length)
2272 nomoredata=1;
2273 }
2274
2253#ifdef T3_TRACE
2254 T3_TRACE4(TIDTB(sk),
2255 "process_ddp_complete: tp->rcv_nxt 0x%x cur_offset %u "
2256 "ddp_report %u offset %u",
2257 tp->rcv_nxt, bsp->cur_offset, ddp_report,
2258 G_DDP_OFFSET(ddp_report));
2259#endif
2260 CTR4(KTR_TOM,
2261 "process_ddp_complete: tp->rcv_nxt 0x%x cur_offset %u "
2262 "ddp_report %u offset %u",
2263 tp->rcv_nxt, bsp->cur_offset, ddp_report,
2264 G_DDP_OFFSET(ddp_report));
2265
2266 m->m_ddp_gl = (unsigned char *)bsp->gl;
2267 m->m_flags |= M_DDP;
2268 m->m_ddp_flags = (bsp->flags & DDP_BF_NOCOPY) | 1;
2269 if (bsp->flags & DDP_BF_NOCOPY)
2270 bsp->flags &= ~DDP_BF_NOCOPY;
2271 if (nomoredata)
2272 m->m_ddp_flags |= DDP_BF_NODATA;
2273
2275 CTR4(KTR_TOM,
2276 "process_ddp_complete: tp->rcv_nxt 0x%x cur_offset %u "
2277 "ddp_report %u offset %u",
2278 tp->rcv_nxt, bsp->cur_offset, ddp_report,
2279 G_DDP_OFFSET(ddp_report));
2280
2281 m->m_ddp_gl = (unsigned char *)bsp->gl;
2282 m->m_flags |= M_DDP;
2283 m->m_ddp_flags = (bsp->flags & DDP_BF_NOCOPY) | 1;
2284 if (bsp->flags & DDP_BF_NOCOPY)
2285 bsp->flags &= ~DDP_BF_NOCOPY;
2286 if (nomoredata)
2287 m->m_ddp_flags |= DDP_BF_NODATA;
2288
2289
2274 SBAPPEND(&so->so_rcv, m);
2275
2276 if ((so->so_state & SS_NOFDREF) == 0)
2277 sorwakeup_locked(so);
2278 else
2279 SOCKBUF_UNLOCK(&so->so_rcv);
2280}
2281

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

2364 m->m_cur_offset = bsp->cur_offset;
2365 m->m_ddp_flags =
2366 DDP_BF_PSH | (bsp->flags & DDP_BF_NOCOPY) | 1;
2367 m->m_seq = tp->rcv_nxt;
2368 tp->rcv_nxt = rcv_nxt;
2369 bsp->cur_offset += m->m_pkthdr.len;
2370 if (!(bsp->flags & DDP_BF_NOFLIP))
2371 q->cur_buf ^= 1;
2290 SBAPPEND(&so->so_rcv, m);
2291
2292 if ((so->so_state & SS_NOFDREF) == 0)
2293 sorwakeup_locked(so);
2294 else
2295 SOCKBUF_UNLOCK(&so->so_rcv);
2296}
2297

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

2380 m->m_cur_offset = bsp->cur_offset;
2381 m->m_ddp_flags =
2382 DDP_BF_PSH | (bsp->flags & DDP_BF_NOCOPY) | 1;
2383 m->m_seq = tp->rcv_nxt;
2384 tp->rcv_nxt = rcv_nxt;
2385 bsp->cur_offset += m->m_pkthdr.len;
2386 if (!(bsp->flags & DDP_BF_NOFLIP))
2387 q->cur_buf ^= 1;
2388#ifdef notyet
2389 skb_reset_transport_header(skb);
2390 tcp_hdr(skb)->fin = 0; /* changes valid memory past CPL */
2391#endif
2372 tp->t_rcvtime = ticks;
2373 SBAPPEND(&so->so_rcv, m);
2374 if (__predict_true((so->so_state & SS_NOFDREF) == 0))
2375 sorwakeup_locked(so);
2376 else
2377 SOCKBUF_UNLOCK(&so->so_rcv);
2378 return (1);
2379}

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

4001 req->mask = htobe64(mask);
4002 req->val = htobe64(val);
4003}
4004
4005/*
4006 * Build a CPL_RX_DATA_ACK message as payload of a ULP_TX_PKT command.
4007 */
4008static void
2392 tp->t_rcvtime = ticks;
2393 SBAPPEND(&so->so_rcv, m);
2394 if (__predict_true((so->so_state & SS_NOFDREF) == 0))
2395 sorwakeup_locked(so);
2396 else
2397 SOCKBUF_UNLOCK(&so->so_rcv);
2398 return (1);
2399}

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

4021 req->mask = htobe64(mask);
4022 req->val = htobe64(val);
4023}
4024
4025/*
4026 * Build a CPL_RX_DATA_ACK message as payload of a ULP_TX_PKT command.
4027 */
4028static void
4009mk_rx_data_ack_ulp(struct cpl_rx_data_ack *ack, unsigned int tid, unsigned int credits)
4029mk_rx_data_ack_ulp(struct socket *so,struct cpl_rx_data_ack *ack,
4030 unsigned int tid, unsigned int credits)
4010{
4011 struct ulp_txpkt *txpkt = (struct ulp_txpkt *)ack;
4012
4013 txpkt->cmd_dest = htonl(V_ULPTX_CMD(ULP_TXPKT));
4014 txpkt->len = htonl(V_ULPTX_NFLITS(sizeof(*ack) / 8));
4015 OPCODE_TID(ack) = htonl(MK_OPCODE_TID(CPL_RX_DATA_ACK, tid));
4016 ack->credit_dack = htonl(F_RX_MODULATE | F_RX_DACK_CHANGE |
4031{
4032 struct ulp_txpkt *txpkt = (struct ulp_txpkt *)ack;
4033
4034 txpkt->cmd_dest = htonl(V_ULPTX_CMD(ULP_TXPKT));
4035 txpkt->len = htonl(V_ULPTX_NFLITS(sizeof(*ack) / 8));
4036 OPCODE_TID(ack) = htonl(MK_OPCODE_TID(CPL_RX_DATA_ACK, tid));
4037 ack->credit_dack = htonl(F_RX_MODULATE | F_RX_DACK_CHANGE |
4017 V_RX_DACK_MODE(1) | V_RX_CREDITS(credits));
4038 V_RX_DACK_MODE(TOM_TUNABLE(TOE_DEV(so), delack)) |
4039 V_RX_CREDITS(credits));
4018}
4019
4020void
4021t3_cancel_ddpbuf(struct toepcb *toep, unsigned int bufidx)
4022{
4023 unsigned int wrlen;
4024 struct mbuf *m;
4025 struct work_request_hdr *wr;

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

4211 V_TCB_RX_DDP_BUF1_LEN((uint64_t)len1) << 32);
4212 req++;
4213 }
4214
4215 mk_set_tcb_field_ulp(req, toep->tp_tid, W_TCB_RX_DDP_FLAGS, flag_mask,
4216 ddp_flags);
4217
4218 if (modulate) {
4040}
4041
4042void
4043t3_cancel_ddpbuf(struct toepcb *toep, unsigned int bufidx)
4044{
4045 unsigned int wrlen;
4046 struct mbuf *m;
4047 struct work_request_hdr *wr;

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

4233 V_TCB_RX_DDP_BUF1_LEN((uint64_t)len1) << 32);
4234 req++;
4235 }
4236
4237 mk_set_tcb_field_ulp(req, toep->tp_tid, W_TCB_RX_DDP_FLAGS, flag_mask,
4238 ddp_flags);
4239
4240 if (modulate) {
4219 mk_rx_data_ack_ulp((struct cpl_rx_data_ack *)(req + 1), toep->tp_tid,
4220 toep->tp_copied_seq - toep->tp_rcv_wup);
4241 mk_rx_data_ack_ulp(toeptoso(toep),
4242 (struct cpl_rx_data_ack *)(req + 1), toep->tp_tid,
4243 toep->tp_copied_seq - toep->tp_rcv_wup);
4221 toep->tp_rcv_wup = toep->tp_copied_seq;
4222 }
4223
4224#ifdef T3_TRACE
4225 T3_TRACE5(TIDTB(sk),
4226 "t3_setup_ddpbufs: len0 %u len1 %u ddp_flags 0x%08x%08x "
4227 "modulate %d",
4228 len0, len1, ddp_flags >> 32, ddp_flags & 0xffffffff,

--- 58 unchanged lines hidden ---
4244 toep->tp_rcv_wup = toep->tp_copied_seq;
4245 }
4246
4247#ifdef T3_TRACE
4248 T3_TRACE5(TIDTB(sk),
4249 "t3_setup_ddpbufs: len0 %u len1 %u ddp_flags 0x%08x%08x "
4250 "modulate %d",
4251 len0, len1, ddp_flags >> 32, ddp_flags & 0xffffffff,

--- 58 unchanged lines hidden ---