summaryrefslogtreecommitdiff
path: root/sys/dev/cxgbe/tom/t4_cpl_io.c
diff options
context:
space:
mode:
authorNavdeep Parhar <np@FreeBSD.org>2018-04-14 19:07:56 +0000
committerNavdeep Parhar <np@FreeBSD.org>2018-04-14 19:07:56 +0000
commit1131c927c4c388c75c728d443cab7ff0482a1c50 (patch)
tree61235e95df1bd31f983d62f3d73498251bb80c05 /sys/dev/cxgbe/tom/t4_cpl_io.c
parent23084818ff0f840888490236a1a95bacd11a2a81 (diff)
downloadsrc-test2-1131c927c4c388c75c728d443cab7ff0482a1c50.tar.gz
src-test2-1131c927c4c388c75c728d443cab7ff0482a1c50.zip
Notes
Diffstat (limited to 'sys/dev/cxgbe/tom/t4_cpl_io.c')
-rw-r--r--sys/dev/cxgbe/tom/t4_cpl_io.c17
1 files changed, 12 insertions, 5 deletions
diff --git a/sys/dev/cxgbe/tom/t4_cpl_io.c b/sys/dev/cxgbe/tom/t4_cpl_io.c
index 351a2e3c42d8..11693371c17b 100644
--- a/sys/dev/cxgbe/tom/t4_cpl_io.c
+++ b/sys/dev/cxgbe/tom/t4_cpl_io.c
@@ -121,6 +121,11 @@ send_flowc_wr(struct toepcb *toep, struct flowc_tx_params *ftxp)
nparams++;
if (toep->tls.fcplenmax != 0)
nparams++;
+ if (toep->tc_idx != -1) {
+ MPASS(toep->tc_idx >= 0 &&
+ toep->tc_idx < sc->chip_params->nsched_cls);
+ nparams++;
+ }
flowclen = sizeof(*flowc) + nparams * sizeof(struct fw_flowc_mnemval);
@@ -172,6 +177,8 @@ send_flowc_wr(struct toepcb *toep, struct flowc_tx_params *ftxp)
FLOWC_PARAM(ULP_MODE, toep->ulp_mode);
if (toep->tls.fcplenmax != 0)
FLOWC_PARAM(TXDATAPLEN_MAX, toep->tls.fcplenmax);
+ if (toep->tc_idx != -1)
+ FLOWC_PARAM(SCHEDCLASS, toep->tc_idx);
#undef FLOWC_PARAM
KASSERT(paramidx == nparams, ("nparams mismatch"));
@@ -333,19 +340,19 @@ assign_rxopt(struct tcpcb *tp, unsigned int opt)
n = sizeof(struct ip6_hdr) + sizeof(struct tcphdr);
else
n = sizeof(struct ip) + sizeof(struct tcphdr);
- if (V_tcp_do_rfc1323)
- n += TCPOLEN_TSTAMP_APPA;
tp->t_maxseg = sc->params.mtus[G_TCPOPT_MSS(opt)] - n;
- CTR4(KTR_CXGBE, "%s: tid %d, mtu_idx %u (%u)", __func__, toep->tid,
- G_TCPOPT_MSS(opt), sc->params.mtus[G_TCPOPT_MSS(opt)]);
-
if (G_TCPOPT_TSTAMP(opt)) {
tp->t_flags |= TF_RCVD_TSTMP; /* timestamps ok */
tp->ts_recent = 0; /* hmmm */
tp->ts_recent_age = tcp_ts_getticks();
+ tp->t_maxseg -= TCPOLEN_TSTAMP_APPA;
}
+ CTR5(KTR_CXGBE, "%s: tid %d, mtu_idx %u (%u), mss %u", __func__,
+ toep->tid, G_TCPOPT_MSS(opt), sc->params.mtus[G_TCPOPT_MSS(opt)],
+ tp->t_maxseg);
+
if (G_TCPOPT_SACK(opt))
tp->t_flags |= TF_SACK_PERMIT; /* should already be set */
else