From owner-p4-projects@FreeBSD.ORG Sat Aug 16 08:21:44 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id AC6F21065693; Sat, 16 Aug 2008 08:21:44 +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 726B9106568F for ; Sat, 16 Aug 2008 08:21:44 +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 6750D8FC13 for ; Sat, 16 Aug 2008 08:21:44 +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 m7G8Liim062312 for ; Sat, 16 Aug 2008 08:21:44 GMT (envelope-from zec@tel.fer.hr) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.2/8.14.1/Submit) id m7G8LhpL062310 for perforce@freebsd.org; Sat, 16 Aug 2008 08:21:43 GMT (envelope-from zec@tel.fer.hr) Date: Sat, 16 Aug 2008 08:21:43 GMT Message-Id: <200808160821.m7G8LhpL062310@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 147511 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: Sat, 16 Aug 2008 08:21:44 -0000 http://perforce.freebsd.org/chv.cgi?CH=147511 Change 147511 by zec@zec_tpx32 on 2008/08/16 08:21:37 Unbreax cxgb build, the joys of option VIMAGE landing in opt_global.h (but it went much smoother than I anticipated!) Affected files ... .. //depot/projects/vimage/src/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb.c#2 edit .. //depot/projects/vimage/src/sys/dev/cxgb/ulp/tom/cxgb_cpl_io.c#7 edit Differences ... ==== //depot/projects/vimage/src/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb.c#2 (text+ko) ==== @@ -53,7 +53,9 @@ #include #include #include +#include +#include #include #include @@ -237,9 +239,12 @@ /* Register existing TOE interfaces by walking the ifnet chain */ IFNET_RLOCK(); - TAILQ_FOREACH(ifp, &ifnet, if_link) { + VNET_ITERLOOP_BEGIN(); + INIT_VNET_NET(curvnet); + TAILQ_FOREACH(ifp, &V_ifnet, if_link) { (void)ifaddr_event_handler(NULL, ifp); } + VNET_ITERLOOP_END(); IFNET_RUNLOCK(); return 0; } ==== //depot/projects/vimage/src/sys/dev/cxgb/ulp/tom/cxgb_cpl_io.c#7 (text+ko) ==== @@ -48,10 +48,12 @@ #include #include #include +#include #include #include +#include #include #include #include @@ -262,6 +264,7 @@ static inline void make_tx_data_wr(struct socket *so, struct mbuf *m, int len, struct mbuf *tail) { + INIT_VNET_INET(so->so_vnet); struct tcpcb *tp = so_sototcpcb(so); struct toepcb *toep = tp->t_toe; struct tx_data_wr *req; @@ -289,8 +292,8 @@ /* Sendbuffer is in units of 32KB. */ - if (tcp_do_autosndbuf && snd->sb_flags & SB_AUTOSIZE) - req->param |= htonl(V_TX_SNDBUF(tcp_autosndbuf_max >> 15)); + if (V_tcp_do_autosndbuf && snd->sb_flags & SB_AUTOSIZE) + req->param |= htonl(V_TX_SNDBUF(V_tcp_autosndbuf_max >> 15)); else { req->param |= htonl(V_TX_SNDBUF(snd->sb_hiwat >> 15)); } @@ -1223,6 +1226,7 @@ static unsigned long select_rcv_wnd(struct toedev *dev, struct socket *so) { + INIT_VNET_INET(so->so_vnet); struct tom_data *d = TOM_DATA(dev); unsigned int wnd; unsigned int max_rcv_wnd; @@ -1230,8 +1234,8 @@ rcv = so_sockbuf_rcv(so); - if (tcp_do_autorcvbuf) - wnd = tcp_autorcvbuf_max; + if (V_tcp_do_autorcvbuf) + wnd = V_tcp_autorcvbuf_max; else wnd = rcv->sb_hiwat; @@ -3768,6 +3772,7 @@ static void socket_act_establish(struct socket *so, struct mbuf *m) { + INIT_VNET_INET(so->so_vnet); struct cpl_act_establish *req = cplhdr(m); u32 rcv_isn = ntohl(req->rcv_isn); /* real RCV_ISN + 1 */ struct tcpcb *tp = so_sototcpcb(so); @@ -3817,7 +3822,7 @@ #endif toep->tp_state = tp->t_state; - tcpstat.tcps_connects++; + V_tcpstat.tcps_connects++; }