Date: Fri, 6 May 2016 23:49:10 +0000 (UTC) From: John Baldwin <jhb@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r299206 - head/sys/dev/cxgbe/tom Message-ID: <201605062349.u46NnAjs058464@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: jhb Date: Fri May 6 23:49:10 2016 New Revision: 299206 URL: https://svnweb.freebsd.org/changeset/base/299206 Log: Set the correct vnet in TOE event handlers. Differential Revision: https://reviews.freebsd.org/D6152 Modified: head/sys/dev/cxgbe/tom/t4_cpl_io.c head/sys/dev/cxgbe/tom/t4_listen.c Modified: head/sys/dev/cxgbe/tom/t4_cpl_io.c ============================================================================== --- head/sys/dev/cxgbe/tom/t4_cpl_io.c Fri May 6 23:46:35 2016 (r299205) +++ head/sys/dev/cxgbe/tom/t4_cpl_io.c Fri May 6 23:49:10 2016 (r299206) @@ -267,6 +267,7 @@ make_established(struct toepcb *toep, ui 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 @@ make_established(struct toepcb *toep, ui send_flowc_wr(toep, &ftxp); soisconnected(so); + CURVNET_RESTORE(); } static int @@ -1429,6 +1431,7 @@ do_rx_data(struct sge_iq *iq, const stru } /* 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 @@ do_rx_data(struct sge_iq *iq, const stru SOCKBUF_UNLOCK_ASSERT(sb); INP_WUNLOCK(inp); + CURVNET_RESTORE(); return (0); } Modified: head/sys/dev/cxgbe/tom/t4_listen.c ============================================================================== --- head/sys/dev/cxgbe/tom/t4_listen.c Fri May 6 23:46:35 2016 (r299205) +++ head/sys/dev/cxgbe/tom/t4_listen.c Fri May 6 23:49:10 2016 (r299206) @@ -1305,6 +1305,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; @@ -1351,6 +1352,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),
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201605062349.u46NnAjs058464>