PERFORCE change 145790 for review
Marko Zec
zec at FreeBSD.org
Thu Jul 24 11:08:42 UTC 2008
http://perforce.freebsd.org/chv.cgi?CH=145790
Change 145790 by zec at 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 <sys/cdefs.h>
__FBSDID("$FreeBSD: src/sys/netinet/tcp_offload.c,v 1.4 2008/07/21 21:22:56 kmacy Exp $");
+#include "opt_vimage.h"
+
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/types.h>
@@ -37,11 +39,13 @@
#include <sys/mbuf.h>
#include <sys/socket.h>
#include <sys/socketvar.h>
+#include <sys/vimage.h>
#include <net/if.h>
#include <net/if_types.h>
#include <net/if_var.h>
+#include <netinet/vinet.h>
#include <netinet/in.h>
#include <netinet/in_systm.h>
#include <netinet/in_pcb.h>
@@ -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);
}
More information about the p4-projects
mailing list