diff options
-rw-r--r-- | sys/dev/cxgbe/firmware/t4fw_cfg.txt | 5 | ||||
-rw-r--r-- | sys/dev/cxgbe/firmware/t5fw_cfg.txt | 5 | ||||
-rw-r--r-- | sys/dev/cxgbe/tom/t4_cpl_io.c | 12 | ||||
-rw-r--r-- | sys/dev/cxgbe/tom/t4_listen.c | 2 |
4 files changed, 20 insertions, 4 deletions
diff --git a/sys/dev/cxgbe/firmware/t4fw_cfg.txt b/sys/dev/cxgbe/firmware/t4fw_cfg.txt index f417abb..78caa28 100644 --- a/sys/dev/cxgbe/firmware/t4fw_cfg.txt +++ b/sys/dev/cxgbe/firmware/t4fw_cfg.txt @@ -33,6 +33,9 @@ tp_pmrx_pagesize = 64K tp_pmtx_pagesize = 64K + # cluster, lan, or wan. + tp_tcptuning = lan + # TP OFLD MTUs tp_mtus = 88, 256, 512, 576, 808, 1024, 1280, 1488, 1500, 2002, 2048, 4096, 4352, 8192, 9000, 9600 @@ -160,7 +163,7 @@ [fini] version = 0x1 - checksum = 0xb4168add + checksum = 0xc5e9ef34 # # $FreeBSD$ # diff --git a/sys/dev/cxgbe/firmware/t5fw_cfg.txt b/sys/dev/cxgbe/firmware/t5fw_cfg.txt index 59ca453..ad50df4 100644 --- a/sys/dev/cxgbe/firmware/t5fw_cfg.txt +++ b/sys/dev/cxgbe/firmware/t5fw_cfg.txt @@ -42,6 +42,9 @@ tp_pmrx_pagesize = 64K tp_pmtx_pagesize = 64K + # cluster, lan, or wan. + tp_tcptuning = lan + # TP OFLD MTUs tp_mtus = 88, 256, 512, 576, 808, 1024, 1280, 1488, 1500, 2002, 2048, 4096, 4352, 8192, 9000, 9600 @@ -173,7 +176,7 @@ [fini] version = 0x1 - checksum = 0x4f45e608 + checksum = 0x6b54f66d # # $FreeBSD$ # diff --git a/sys/dev/cxgbe/tom/t4_cpl_io.c b/sys/dev/cxgbe/tom/t4_cpl_io.c index c553f42..4444ebb 100644 --- a/sys/dev/cxgbe/tom/t4_cpl_io.c +++ b/sys/dev/cxgbe/tom/t4_cpl_io.c @@ -295,6 +295,7 @@ make_established(struct toepcb *toep, uint32_t snd_isn, uint32_t rcv_isn, uint16_t tcpopt = be16toh(opt); struct flowc_tx_params ftxp; + CURVNET_SET(so->so_vnet); INP_WLOCK_ASSERT(inp); KASSERT(tp->t_state == TCPS_SYN_SENT || tp->t_state == TCPS_SYN_RECEIVED, @@ -345,6 +346,7 @@ make_established(struct toepcb *toep, uint32_t snd_isn, uint32_t rcv_isn, send_flowc_wr(toep, &ftxp); soisconnected(so); + CURVNET_RESTORE(); } static int @@ -676,7 +678,6 @@ t4_push_frames(struct adapter *sc, struct toepcb *toep, int drop) } } - shove = m == NULL && !(tp->t_flags & TF_MORETOCOME); space = sbspace(sb); if (space <= sb->sb_hiwat * 3 / 8 && @@ -713,6 +714,7 @@ t4_push_frames(struct adapter *sc, struct toepcb *toep, int drop) if (__predict_false(toep->flags & TPF_FIN_SENT)) panic("%s: excess tx.", __func__); + shove = m == NULL && !(tp->t_flags & TF_MORETOCOME); if (plen <= max_imm) { /* Immediate data tx */ @@ -1501,7 +1503,11 @@ do_rx_data(struct sge_iq *iq, const struct rss_header *rss, struct mbuf *m) ddp_placed = be32toh(cpl->seq) - tp->rcv_nxt; tp->rcv_nxt += len; - KASSERT(tp->rcv_wnd >= len, ("%s: negative window size", __func__)); + if (tp->rcv_wnd < len) { + KASSERT(toep->ulp_mode == ULP_MODE_RDMA, + ("%s: negative window size", __func__)); + } + tp->rcv_wnd -= len; tp->t_rcvtime = ticks; @@ -1527,6 +1533,7 @@ do_rx_data(struct sge_iq *iq, const struct rss_header *rss, struct mbuf *m) } /* receive buffer autosize */ + CURVNET_SET(so->so_vnet); if (sb->sb_flags & SB_AUTOSIZE && V_tcp_do_autorcvbuf && sb->sb_hiwat < V_tcp_autorcvbuf_max && @@ -1615,6 +1622,7 @@ do_rx_data(struct sge_iq *iq, const struct rss_header *rss, struct mbuf *m) SOCKBUF_UNLOCK_ASSERT(sb); INP_WUNLOCK(inp); + CURVNET_RESTORE(); return (0); } diff --git a/sys/dev/cxgbe/tom/t4_listen.c b/sys/dev/cxgbe/tom/t4_listen.c index fa2385d..317bf8a 100644 --- a/sys/dev/cxgbe/tom/t4_listen.c +++ b/sys/dev/cxgbe/tom/t4_listen.c @@ -1357,6 +1357,7 @@ found: REJECT_PASS_ACCEPT(); } so = inp->inp_socket; + CURVNET_SET(so->so_vnet); mtu_idx = find_best_mtu_idx(sc, &inc, be16toh(cpl->tcpopt.mss)); rscale = cpl->tcpopt.wsf && V_tcp_do_rfc1323 ? select_rcv_wscale() : 0; @@ -1403,6 +1404,7 @@ found: */ toe_syncache_add(&inc, &to, &th, inp, tod, synqe); INP_UNLOCK_ASSERT(inp); /* ok to assert, we have a ref on the inp */ + CURVNET_RESTORE(); /* * If we replied during syncache_add (synqe->wr has been consumed), |