• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /freebsd-12-stable/sys/dev/cxgbe/tom/

Lines Matching refs:tp

102 send_flowc_wr(struct toepcb *toep, struct tcpcb *tp)
116 if (tp != NULL)
159 if (tp) {
161 FLOWC_PARAM(SNDNXT, tp->snd_nxt);
162 FLOWC_PARAM(RCVNXT, tp->rcv_nxt);
168 tp ? tp->snd_nxt : 0, tp ? tp->rcv_nxt : 0);
270 struct tcpcb *tp = intotcpcb(inp); /* don't use if INP_DROPPED */
277 tcpstates[tp->t_state],
301 req->rsvd0 = htobe32(tp->snd_nxt);
324 assign_rxopt(struct tcpcb *tp, uint16_t opt)
326 struct toepcb *toep = tp->t_toe;
327 struct inpcb *inp = tp->t_inpcb;
333 tp->t_maxseg = sc->params.mtus[toep->params.mtu_idx];
335 tp->t_maxseg -= sizeof(struct ip6_hdr) + sizeof(struct tcphdr);
337 tp->t_maxseg -= sizeof(struct ip) + sizeof(struct tcphdr);
339 toep->params.emss = tp->t_maxseg;
343 tp->t_flags |= TF_RCVD_TSTMP; /* timestamps ok */
344 tp->ts_recent = 0; /* hmmm */
345 tp->ts_recent_age = tcp_ts_getticks();
351 tp->t_flags |= TF_SACK_PERMIT; /* should already be set */
354 tp->t_flags &= ~TF_SACK_PERMIT; /* sack disallowed by peer */
358 tp->t_flags |= TF_RCVD_SCALE;
361 if ((tp->t_flags & (TF_RCVD_SCALE | TF_REQ_SCALE)) ==
363 tp->rcv_scale = tp->request_r_scale;
364 tp->snd_scale = G_TCPOPT_SND_WSCALE(opt);
385 struct tcpcb *tp = intotcpcb(inp);
389 KASSERT(tp->t_state == TCPS_SYN_SENT ||
390 tp->t_state == TCPS_SYN_RECEIVED,
391 ("%s: TCP state %s", __func__, tcpstates[tp->t_state]));
393 CTR6(KTR_CXGBE, "%s: tid %d, so %p, inp %p, tp %p, toep %p",
394 __func__, toep->tid, so, inp, tp, toep);
396 tcp_state_change(tp, TCPS_ESTABLISHED);
397 tp->t_starttime = ticks;
400 tp->irs = irs;
401 tcp_rcvseqinit(tp);
402 tp->rcv_wnd = (u_int)toep->params.opt0_bufsize << 10;
403 tp->rcv_adv += tp->rcv_wnd;
404 tp->last_ack_sent = tp->rcv_nxt;
406 tp->iss = iss;
407 tcp_sendseqinit(tp);
408 tp->snd_una = iss + 1;
409 tp->snd_nxt = iss + 1;
410 tp->snd_max = iss + 1;
412 assign_rxopt(tp, tcpopt);
413 send_flowc_wr(toep, tp);
457 t4_rcvd_locked(struct toedev *tod, struct tcpcb *tp)
460 struct inpcb *inp = tp->t_inpcb;
463 struct toepcb *toep = tp->t_toe;
469 rx_credits = sbspace(sb) > tp->rcv_wnd ? sbspace(sb) - tp->rcv_wnd : 0;
471 (tp->rcv_wnd <= 32 * 1024 || rx_credits >= 64 * 1024 ||
472 (rx_credits >= 16 * 1024 && tp->rcv_wnd <= 128 * 1024) ||
473 sbused(sb) + tp->rcv_wnd < sb->sb_lowat)) {
475 tp->rcv_wnd += rx_credits;
476 tp->rcv_adv += rx_credits;
482 t4_rcvd(struct toedev *tod, struct tcpcb *tp)
484 struct inpcb *inp = tp->t_inpcb;
489 t4_rcvd_locked(tod, tp);
687 struct tcpcb *tp = intotcpcb(inp);
705 CTR5(KTR_CXGBE, "%s: tid %d toep flags %#x tp flags %#x drop %d",
706 __func__, toep->tid, toep->flags, tp->t_flags, drop);
835 shove = m == NULL && !(tp->t_flags & TF_MORETOCOME);
893 tp->snd_nxt += plen;
894 tp->snd_max += plen;
952 struct tcpcb *tp = intotcpcb(inp);
1020 shove = !(tp->t_flags & TF_MORETOCOME);
1090 tp->snd_nxt += adjusted_plen;
1091 tp->snd_max += adjusted_plen;
1116 t4_tod_output(struct toedev *tod, struct tcpcb *tp)
1120 struct inpcb *inp = tp->t_inpcb;
1122 struct toepcb *toep = tp->t_toe;
1140 t4_send_fin(struct toedev *tod, struct tcpcb *tp)
1144 struct inpcb *inp = tp->t_inpcb;
1146 struct toepcb *toep = tp->t_toe;
1154 if (tp->t_state >= TCPS_ESTABLISHED) {
1167 t4_send_rst(struct toedev *tod, struct tcpcb *tp)
1171 struct inpcb *inp = tp->t_inpcb;
1173 struct toepcb *toep = tp->t_toe;
1183 __func__, toep->tid, tcpstates[tp->t_state]));
1200 struct tcpcb *tp = NULL;
1228 tp = intotcpcb(inp);
1232 __func__, tid, tp ? tcpstates[tp->t_state] : "no tp", toep->flags,
1238 tp->rcv_nxt++; /* FIN */
1246 handle_ddp_close(toep, tp, cpl->rcv_nxt);
1251 KASSERT(tp->rcv_nxt == be32toh(cpl->rcv_nxt),
1252 ("%s: rcv_nxt mismatch: %u %u", __func__, tp->rcv_nxt,
1256 switch (tp->t_state) {
1258 tp->t_starttime = ticks;
1262 tcp_state_change(tp, TCPS_CLOSE_WAIT);
1266 tcp_state_change(tp, TCPS_CLOSING);
1270 tcp_twstart(tp);
1281 __func__, tid, tp->t_state);
1302 struct tcpcb *tp = NULL;
1317 tp = intotcpcb(inp);
1320 __func__, tid, tp ? tcpstates[tp->t_state] : "no tp", toep->flags);
1326 tp->snd_una = be32toh(cpl->snd_nxt) - 1; /* exclude FIN */
1328 switch (tp->t_state) {
1330 tcp_twstart(tp);
1341 if (tcp_close(tp))
1348 tcp_state_change(tp, TCPS_FIN_WAIT_2);
1354 __func__, tid, tcpstates[tp->t_state]);
1384 abort_status_to_errno(struct tcpcb *tp, unsigned int abort_reason)
1389 return (tp->t_state == TCPS_CLOSE_WAIT ? EPIPE : ECONNRESET);
1412 struct tcpcb *tp;
1438 tp = intotcpcb(inp);
1442 __func__, tid, tp ? tcpstates[tp->t_state] : "no tp", toep->flags,
1460 so_error_set(so, abort_status_to_errno(tp,
1462 tp = tcp_close(tp);
1463 if (tp == NULL)
1519 struct tcpcb *tp;
1554 tp = intotcpcb(inp);
1565 if (__predict_false(tp->rcv_nxt != be32toh(cpl->seq)))
1566 ddp_placed = be32toh(cpl->seq) - tp->rcv_nxt;
1568 tp->rcv_nxt += len;
1569 if (tp->rcv_wnd < len) {
1574 tp->rcv_wnd -= len;
1575 tp->t_rcvtime = ticks;
1595 tp = tcp_drop(tp, ECONNRESET);
1596 if (tp)
1655 rx_credits = sbspace(sb) > tp->rcv_wnd ? sbspace(sb) - tp->rcv_wnd : 0;
1656 if (rx_credits > 0 && sbused(sb) + tp->rcv_wnd < sb->sb_lowat) {
1658 tp->rcv_wnd += rx_credits;
1659 tp->rcv_adv += rx_credits;
1686 struct tcpcb *tp;
1722 tp = intotcpcb(inp);
1728 if (__predict_false(SEQ_LT(snd_una, tp->snd_una))) {
1731 __func__, snd_una, toep->tid, tp->snd_una);
1735 if (tp->snd_una != snd_una) {
1736 tp->snd_una = snd_una;
1737 tp->ts_recent_age = tcp_ts_getticks();
2012 struct tcpcb *tp;
2132 tp = intotcpcb(inp);
2134 tp->t_flags |= TF_MORETOCOME;
2135 error = tp->t_fb->tfb_tcp_output(tp);
2137 tp->t_flags &= ~TF_MORETOCOME;
2238 struct tcpcb *tp;
2242 tp = so_sototcpcb(so);
2243 toep = tp->t_toe;
2262 struct tcpcb *tp = so_sototcpcb(so);
2263 struct toepcb *toep = tp->t_toe;