Index: head/sys/dev/cxgbe/tom/t4_cpl_io.c =================================================================== --- head/sys/dev/cxgbe/tom/t4_cpl_io.c +++ head/sys/dev/cxgbe/tom/t4_cpl_io.c @@ -267,6 +267,7 @@ 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, @@ -317,6 +318,7 @@ send_flowc_wr(toep, &ftxp); soisconnected(so); + CURVNET_RESTORE(); } static int @@ -1429,6 +1431,7 @@ } /* 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 && @@ -1517,6 +1520,7 @@ SOCKBUF_UNLOCK_ASSERT(sb); INP_WUNLOCK(inp); + CURVNET_RESTORE(); return (0); } Index: head/sys/dev/cxgbe/tom/t4_listen.c =================================================================== --- head/sys/dev/cxgbe/tom/t4_listen.c +++ head/sys/dev/cxgbe/tom/t4_listen.c @@ -1305,6 +1305,7 @@ 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; @@ -1351,6 +1352,7 @@ */ 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),