From owner-p4-projects@FreeBSD.ORG Thu Jul 24 11:08:42 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 25E5D1065672; Thu, 24 Jul 2008 11:08:42 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DD5BC106566B for ; Thu, 24 Jul 2008 11:08:41 +0000 (UTC) (envelope-from zec@tel.fer.hr) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id BC9768FC0C for ; Thu, 24 Jul 2008 11:08:41 +0000 (UTC) (envelope-from zec@tel.fer.hr) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.2/8.14.2) with ESMTP id m6OB8fbm032189 for ; Thu, 24 Jul 2008 11:08:41 GMT (envelope-from zec@tel.fer.hr) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.2/8.14.1/Submit) id m6OB8fnu032187 for perforce@freebsd.org; Thu, 24 Jul 2008 11:08:41 GMT (envelope-from zec@tel.fer.hr) Date: Thu, 24 Jul 2008 11:08:41 GMT Message-Id: <200807241108.m6OB8fnu032187@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to zec@tel.fer.hr using -f From: Marko Zec To: Perforce Change Reviews Cc: Subject: PERFORCE change 145790 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 Jul 2008 11:08:42 -0000 http://perforce.freebsd.org/chv.cgi?CH=145790 Change 145790 by zec@zec_tpx32 on 2008/07/24 11:08:36 Unbreak VIMAGE build. Affected files ... .. //depot/projects/vimage/src/sys/netinet/in_pcb.c#25 edit .. //depot/projects/vimage/src/sys/netinet/tcp_offload.c#3 edit .. //depot/projects/vimage/src/sys/netinet/tcp_syncache.c#29 edit Differences ... ==== //depot/projects/vimage/src/sys/netinet/in_pcb.c#25 (text+ko) ==== @@ -1281,15 +1281,16 @@ void inp_apply_all(void (*func)(struct inpcb *, void *), void *arg) { + INIT_VNET_INET(curvnet); struct inpcb *inp; - INP_INFO_RLOCK(&tcbinfo); - LIST_FOREACH(inp, tcbinfo.ipi_listhead, inp_list) { + INP_INFO_RLOCK(&V_tcbinfo); + LIST_FOREACH(inp, V_tcbinfo.ipi_listhead, inp_list) { INP_WLOCK(inp); func(inp, arg); INP_WUNLOCK(inp); } - INP_INFO_RUNLOCK(&tcbinfo); + INP_INFO_RUNLOCK(&V_tcbinfo); } struct socket * ==== //depot/projects/vimage/src/sys/netinet/tcp_offload.c#3 (text+ko) ==== @@ -28,6 +28,8 @@ #include __FBSDID("$FreeBSD: src/sys/netinet/tcp_offload.c,v 1.4 2008/07/21 21:22:56 kmacy Exp $"); +#include "opt_vimage.h" + #include #include #include @@ -37,11 +39,13 @@ #include #include #include +#include #include #include #include +#include #include #include #include @@ -101,21 +105,23 @@ void tcp_offload_twstart(struct tcpcb *tp) { + INIT_VNET_INET(curvnet); - INP_INFO_WLOCK(&tcbinfo); + INP_INFO_WLOCK(&V_tcbinfo); INP_WLOCK(tp->t_inpcb); tcp_twstart(tp); - INP_INFO_WUNLOCK(&tcbinfo); + INP_INFO_WUNLOCK(&V_tcbinfo); } struct tcpcb * tcp_offload_close(struct tcpcb *tp) { + INIT_VNET_INET(curvnet); - INP_INFO_WLOCK(&tcbinfo); + INP_INFO_WLOCK(&V_tcbinfo); INP_WLOCK(tp->t_inpcb); tp = tcp_close(tp); - INP_INFO_WUNLOCK(&tcbinfo); + INP_INFO_WUNLOCK(&V_tcbinfo); if (tp) INP_WUNLOCK(tp->t_inpcb); @@ -125,11 +131,12 @@ struct tcpcb * tcp_offload_drop(struct tcpcb *tp, int error) { + INIT_VNET_INET(curvnet); - INP_INFO_WLOCK(&tcbinfo); + INP_INFO_WLOCK(&V_tcbinfo); INP_WLOCK(tp->t_inpcb); tp = tcp_drop(tp, error); - INP_INFO_WUNLOCK(&tcbinfo); + INP_INFO_WUNLOCK(&V_tcbinfo); if (tp) INP_WUNLOCK(tp->t_inpcb); ==== //depot/projects/vimage/src/sys/netinet/tcp_syncache.c#29 (text+ko) ==== @@ -944,11 +944,12 @@ tcp_offload_syncache_expand(struct in_conninfo *inc, struct tcpopt *to, struct tcphdr *th, struct socket **lsop, struct mbuf *m) { + INIT_VNET_INET(curvnet); int rc; - INP_INFO_WLOCK(&tcbinfo); + INP_INFO_WLOCK(&V_tcbinfo); rc = syncache_expand(inc, to, th, lsop, m); - INP_INFO_WUNLOCK(&tcbinfo); + INP_INFO_WUNLOCK(&V_tcbinfo); return (rc); }