summaryrefslogtreecommitdiffstats
path: root/sys/net/if_gif.c
diff options
context:
space:
mode:
authorbz <bz@FreeBSD.org>2008-08-17 23:27:27 +0000
committerbz <bz@FreeBSD.org>2008-08-17 23:27:27 +0000
commit1021d43b569bfc8d2c5544bde2f540fa432b011f (patch)
tree1496da534aec03cf2f9d2d0735d80e4c1e3b5715 /sys/net/if_gif.c
parent7fc341305a3e341fca7f202fc1219358f8d9dbbd (diff)
downloadFreeBSD-src-1021d43b569bfc8d2c5544bde2f540fa432b011f.zip
FreeBSD-src-1021d43b569bfc8d2c5544bde2f540fa432b011f.tar.gz
Commit step 1 of the vimage project, (network stack)
virtualization work done by Marko Zec (zec@). This is the first in a series of commits over the course of the next few weeks. Mark all uses of global variables to be virtualized with a V_ prefix. Use macros to map them back to their global names for now, so this is a NOP change only. We hope to have caught at least 85-90% of what is needed so we do not invalidate a lot of outstanding patches again. Obtained from: //depot/projects/vimage-commit2/... Reviewed by: brooks, des, ed, mav, julian, jamie, kris, rwatson, zec, ... (various people I forgot, different versions) md5 (with a bit of help) Sponsored by: NLnet Foundation, The FreeBSD Foundation X-MFC after: never V_Commit_Message_Reviewed_By: more people than the patch
Diffstat (limited to 'sys/net/if_gif.c')
-rw-r--r--sys/net/if_gif.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/sys/net/if_gif.c b/sys/net/if_gif.c
index 8310881..685f282 100644
--- a/sys/net/if_gif.c
+++ b/sys/net/if_gif.c
@@ -49,6 +49,7 @@
#include <sys/proc.h>
#include <sys/protosw.h>
#include <sys/conf.h>
+#include <sys/vimage.h>
#include <machine/cpu.h>
#include <net/if.h>
@@ -187,7 +188,7 @@ gif_clone_create(ifc, unit, params)
(*ng_gif_attach_p)(GIF2IFP(sc));
mtx_lock(&gif_mtx);
- LIST_INSERT_HEAD(&gif_softc_list, sc, gif_list);
+ LIST_INSERT_HEAD(&V_gif_softc_list, sc, gif_list);
mtx_unlock(&gif_mtx);
return (0);
@@ -239,11 +240,11 @@ gifmodevent(mod, type, data)
switch (type) {
case MOD_LOAD:
mtx_init(&gif_mtx, "gif_mtx", NULL, MTX_DEF);
- LIST_INIT(&gif_softc_list);
+ LIST_INIT(&V_gif_softc_list);
if_clone_attach(&gif_cloner);
#ifdef INET6
- ip6_gif_hlim = GIF_HLIM;
+ V_ip6_gif_hlim = GIF_HLIM;
#endif
break;
@@ -251,7 +252,7 @@ gifmodevent(mod, type, data)
if_clone_detach(&gif_cloner);
mtx_destroy(&gif_mtx);
#ifdef INET6
- ip6_gif_hlim = 0;
+ V_ip6_gif_hlim = 0;
#endif
break;
default:
@@ -398,7 +399,7 @@ gif_output(ifp, m, dst, rt)
mtag = m_tag_locate(m, MTAG_GIF, MTAG_GIF_CALLED, mtag);
gif_called++;
}
- if (gif_called > max_gif_nesting) {
+ if (gif_called > V_max_gif_nesting) {
log(LOG_NOTICE,
"gif_output: recursively called too many times(%d)\n",
gif_called);
@@ -859,7 +860,7 @@ gif_set_tunnel(ifp, src, dst)
int error = 0;
mtx_lock(&gif_mtx);
- LIST_FOREACH(sc2, &gif_softc_list, gif_list) {
+ LIST_FOREACH(sc2, &V_gif_softc_list, gif_list) {
if (sc2 == sc)
continue;
if (!sc2->gif_pdst || !sc2->gif_psrc)
@@ -874,7 +875,7 @@ gif_set_tunnel(ifp, src, dst)
* Disallow parallel tunnels unless instructed
* otherwise.
*/
- if (!parallel_tunnels &&
+ if (!V_parallel_tunnels &&
bcmp(sc2->gif_pdst, dst, dst->sa_len) == 0 &&
bcmp(sc2->gif_psrc, src, src->sa_len) == 0) {
error = EADDRNOTAVAIL;
OpenPOWER on IntegriCloud