PERFORCE change 148353 for review
Julian Elischer
julian at FreeBSD.org
Mon Aug 25 06:29:07 UTC 2008
http://perforce.freebsd.org/chv.cgi?CH=148353
Change 148353 by julian at julian_trafmon1 on 2008/08/25 06:28:22
merge inthe basic differences between the vimage-commit
and vimage-commit2/3 branches. This basically removes any
remaining reason for the vimage-commit branch
Affected files ...
.. //depot/projects/vimage-commit2/src/sys/contrib/pf/net/pfvar.h#2 edit
.. //depot/projects/vimage-commit2/src/sys/kern/kern_mib.c#8 edit
.. //depot/projects/vimage-commit2/src/sys/kern/tty.c#4 edit
.. //depot/projects/vimage-commit2/src/sys/net/if_ethersubr.c#7 edit
.. //depot/projects/vimage-commit2/src/sys/net/if_gif.c#7 edit
.. //depot/projects/vimage-commit2/src/sys/net/if_mib.c#8 edit
.. //depot/projects/vimage-commit2/src/sys/net/if_tun.c#3 edit
.. //depot/projects/vimage-commit2/src/sys/net/if_vlan.c#8 edit
.. //depot/projects/vimage-commit2/src/sys/net/route.c#8 edit
.. //depot/projects/vimage-commit2/src/sys/net/rtsock.c#9 edit
.. //depot/projects/vimage-commit2/src/sys/netinet/if_ether.c#10 edit
.. //depot/projects/vimage-commit2/src/sys/netinet/igmp.c#7 edit
.. //depot/projects/vimage-commit2/src/sys/netinet/in.c#8 edit
.. //depot/projects/vimage-commit2/src/sys/netinet/in_gif.c#7 edit
.. //depot/projects/vimage-commit2/src/sys/netinet/in_pcb.c#11 edit
.. //depot/projects/vimage-commit2/src/sys/netinet/in_rmx.c#8 edit
.. //depot/projects/vimage-commit2/src/sys/netinet/ip_fastfwd.c#7 edit
.. //depot/projects/vimage-commit2/src/sys/netinet/ip_fw2.c#15 edit
.. //depot/projects/vimage-commit2/src/sys/netinet/ip_icmp.c#7 edit
.. //depot/projects/vimage-commit2/src/sys/netinet/ip_input.c#10 edit
.. //depot/projects/vimage-commit2/src/sys/netinet/tcp_hostcache.c#9 edit
.. //depot/projects/vimage-commit2/src/sys/netinet/tcp_input.c#11 edit
.. //depot/projects/vimage-commit2/src/sys/netinet/tcp_output.c#11 edit
.. //depot/projects/vimage-commit2/src/sys/netinet/tcp_reass.c#7 edit
.. //depot/projects/vimage-commit2/src/sys/netinet/tcp_sack.c#7 edit
.. //depot/projects/vimage-commit2/src/sys/netinet/tcp_subr.c#8 edit
.. //depot/projects/vimage-commit2/src/sys/netinet/tcp_syncache.c#16 edit
.. //depot/projects/vimage-commit2/src/sys/netinet/udp_usrreq.c#16 edit
.. //depot/projects/vimage-commit2/src/sys/netinet6/in6_proto.c#7 edit
.. //depot/projects/vimage-commit2/src/sys/netinet6/ip6_mroute.c#7 edit
.. //depot/projects/vimage-commit2/src/sys/netinet6/nd6.c#10 edit
.. //depot/projects/vimage-commit2/src/sys/netipsec/ipsec.c#11 edit
.. //depot/projects/vimage-commit2/src/sys/netipsec/key.c#10 edit
.. //depot/projects/vimage-commit2/src/sys/netipsec/xform_ah.c#8 edit
.. //depot/projects/vimage-commit2/src/sys/netipsec/xform_esp.c#8 edit
.. //depot/projects/vimage-commit2/src/sys/netipsec/xform_ipcomp.c#7 edit
.. //depot/projects/vimage-commit2/src/sys/netipsec/xform_ipip.c#7 edit
.. //depot/projects/vimage-commit2/src/sys/sys/sysctl.h#5 edit
Differences ...
==== //depot/projects/vimage-commit2/src/sys/contrib/pf/net/pfvar.h#2 (text+ko) ====
@@ -1855,5 +1855,12 @@
struct pf_os_fingerprint *
pf_osfp_validate(void);
+/*
+ * Symbol translation macros
+ */
+#define INIT_VNET_PF(vnet) \
+ INIT_FROM_VNET(vnet, VNET_MOD_PF, struct vnet_pf, vnet_pf)
+
+#define VNET_PF(sym) VSYM(vnet_pf, sym)
#endif /* _NET_PFVAR_H_ */
==== //depot/projects/vimage-commit2/src/sys/kern/kern_mib.c#8 (text+ko) ====
@@ -207,7 +207,9 @@
SYSCTL_STRING(_hw, HW_MACHINE_ARCH, machine_arch, CTLFLAG_RD,
machine_arch, 0, "System architecture");
+#ifndef VIMAGE
char hostname[MAXHOSTNAMELEN];
+#endif
/*
* This mutex is used to protect the hostname and domainname variables, and
@@ -346,7 +348,9 @@
0, 0, sysctl_kern_config, "", "Kernel configuration file");
#endif
+#ifndef VIMAGE
char domainname[MAXHOSTNAMELEN]; /* Protected by hostname_mtx. */
+#endif
static int
sysctl_domainname(SYSCTL_HANDLER_ARGS)
@@ -355,13 +359,13 @@
int error;
mtx_lock(&hostname_mtx);
- bcopy(domainname, tmpdomainname, MAXHOSTNAMELEN);
+ bcopy(V_domainname, tmpdomainname, MAXHOSTNAMELEN);
mtx_unlock(&hostname_mtx);
error = sysctl_handle_string(oidp, tmpdomainname,
sizeof tmpdomainname, req);
if (req->newptr != NULL && error == 0) {
mtx_lock(&hostname_mtx);
- bcopy(tmpdomainname, domainname, MAXHOSTNAMELEN);
+ bcopy(tmpdomainname, V_domainname, MAXHOSTNAMELEN);
mtx_unlock(&hostname_mtx);
}
return (error);
==== //depot/projects/vimage-commit2/src/sys/kern/tty.c#4 (text+ko) ====
@@ -61,6 +61,7 @@
#undef TTYDEFCHARS
#include <sys/ucred.h>
#include <sys/vnode.h>
+#include <sys/vimage.h>
#include <machine/stdarg.h>
@@ -724,6 +725,12 @@
done: tty_unlock(tp);
return (error);
}
+#if 0
+ /* in the old code we did this in the ioctl code.. remember this! */
+ CURVNET_SET(TD_TO_VNET(curthread));
+ /* fumble line discipline */
+ CURVNET_RESTORE();
+#endif
static struct cdevsw ttyil_cdevsw = {
.d_version = D_VERSION,
@@ -1501,8 +1508,6 @@
tty_flush(tp, flags);
return (0);
}
- case TIOCDRAIN:
- /* Drain TTY output. */
return tty_drain(tp);
case TIOCCONS:
/* Set terminal as console TTY. */
==== //depot/projects/vimage-commit2/src/sys/net/if_ethersubr.c#7 (text+ko) ====
@@ -935,8 +935,8 @@
SYSCTL_DECL(_net_link);
SYSCTL_NODE(_net_link, IFT_ETHER, ether, CTLFLAG_RW, 0, "Ethernet");
#if defined(INET) || defined(INET6)
-SYSCTL_INT(_net_link_ether, OID_AUTO, ipfw, CTLFLAG_RW,
- ðer_ipfw,0,"Pass ether pkts through firewall");
+SYSCTL_V_INT(V_NET, vnet_net, _net_link_ether, OID_AUTO, ipfw, CTLFLAG_RW,
+ ether_ipfw, 0, "Pass ether pkts through firewall");
#endif
#if 0
==== //depot/projects/vimage-commit2/src/sys/net/if_gif.c#7 (text+ko) ====
@@ -50,6 +50,7 @@
#include <sys/protosw.h>
#include <sys/conf.h>
#include <sys/vimage.h>
+
#include <machine/cpu.h>
#include <net/if.h>
@@ -123,9 +124,17 @@
*/
#define MAX_GIF_NEST 1
#endif
-static int max_gif_nesting = MAX_GIF_NEST;
-SYSCTL_INT(_net_link_gif, OID_AUTO, max_nesting, CTLFLAG_RW,
- &max_gif_nesting, 0, "Max nested tunnels");
+#ifndef VIMAGE
+static int max_gif_nesting;
+#endif
+SYSCTL_V_INT(V_NET, vnet_gif, _net_link_gif, OID_AUTO, max_nesting,
+ CTLFLAG_RW, max_gif_nesting, 0, "Max nested tunnels");
+
+#ifdef INET6
+SYSCTL_DECL(_net_inet6_ip6);
+SYSCTL_V_INT(V_NET, vnet_gif, _net_inet6_ip6, IPV6CTL_GIF_HLIM,
+ gifhlim, CTLFLAG_RW, ip6_gif_hlim, 0, "");
+#endif
/*
* By default, we disallow creation of multiple tunnels between the same
@@ -137,8 +146,8 @@
#else
static int parallel_tunnels = 0;
#endif
-SYSCTL_INT(_net_link_gif, OID_AUTO, parallel_tunnels, CTLFLAG_RW,
- ¶llel_tunnels, 0, "Allow parallel tunnels?");
+SYSCTL_V_INT(V_NET, vnet_gif, _net_link_gif, OID_AUTO, parallel_tunnels,
+ CTLFLAG_RW, parallel_tunnels, 0, "Allow parallel tunnels?");
/* copy from src/sys/net/if_ethersubr.c */
static const u_char etherbroadcastaddr[ETHER_ADDR_LEN] =
==== //depot/projects/vimage-commit2/src/sys/net/if_mib.c#8 (text+ko) ====
@@ -65,8 +65,10 @@
SYSCTL_DECL(_net_link_generic);
SYSCTL_NODE(_net_link_generic, IFMIB_SYSTEM, system, CTLFLAG_RW, 0,
"Variables global to all interfaces");
-SYSCTL_INT(_net_link_generic_system, IFMIB_IFCOUNT, ifcount, CTLFLAG_RD,
- &if_index, 0, "Number of configured interfaces");
+
+SYSCTL_V_INT(V_NET, vnet_net, _net_link_generic_system, IFMIB_IFCOUNT,
+ ifcount, CTLFLAG_RD, if_index, 0,
+ "Number of configured interfaces");
static int
sysctl_ifdata(SYSCTL_HANDLER_ARGS) /* XXX bad syntax! */
==== //depot/projects/vimage-commit2/src/sys/net/if_tun.c#3 (text+ko) ====
@@ -43,6 +43,7 @@
#include <sys/uio.h>
#include <sys/malloc.h>
#include <sys/random.h>
+#include <sys/vimage.h>
#include <net/if.h>
#include <net/if_clone.h>
@@ -224,6 +225,7 @@
else
append_unit = 0;
+ CURVNET_SET(TD_TO_VNET(curthread));
/* find any existing device, or allocate new unit number */
i = clone_create(&tunclones, &tun_cdevsw, &u, dev, 0);
if (i) {
@@ -242,6 +244,7 @@
}
if_clone_create(name, namelen, NULL);
+ CURVNET_RESTORE();
}
static void
@@ -253,6 +256,7 @@
KASSERT((tp->tun_flags & TUN_OPEN) == 0,
("tununits is out of sync - unit %d", TUN2IFP(tp)->if_dunit));
+ CURVNET_SET(TUN2IFP(tp)->if_vnet);
dev = tp->tun_dev;
bpfdetach(TUN2IFP(tp));
if_detach(TUN2IFP(tp));
@@ -261,6 +265,7 @@
knlist_destroy(&tp->tun_rsel.si_note);
mtx_destroy(&tp->tun_mtx);
free(tp, M_TUN);
+ CURVNET_RESTORE();
}
static void
@@ -447,6 +452,7 @@
/*
* junk all pending output
*/
+ CURVNET_SET(ifp->if_vnet);
s = splimp();
IFQ_PURGE(&ifp->if_snd);
splx(s);
@@ -476,6 +482,7 @@
ifp->if_drv_flags &= ~IFF_DRV_RUNNING;
splx(s);
}
+ CURVNET_RESTORE();
funsetown(&tp->tun_sigio);
selwakeuppri(&tp->tun_rsel, PZERO + 1);
@@ -924,7 +931,9 @@
random_harvest(m, 16, 3, 0, RANDOM_NET);
ifp->if_ibytes += m->m_pkthdr.len;
ifp->if_ipackets++;
+ CURVNET_SET(ifp->if_vnet);
netisr_dispatch(isr, m);
+ CURVNET_RESTORE();
return (0);
}
==== //depot/projects/vimage-commit2/src/sys/net/if_vlan.c#8 (text+ko) ====
@@ -422,6 +422,8 @@
sc = ifp->if_softc;
ifp_p = PARENT(sc);
+ CURVNET_SET_QUIET(ifp_p->if_vnet);
+
bzero((char *)&sdl, sizeof(sdl));
sdl.sdl_len = sizeof(sdl);
sdl.sdl_family = AF_LINK;
@@ -456,6 +458,7 @@
return (error);
}
+ CURVNET_RESTORE();
return (0);
}
==== //depot/projects/vimage-commit2/src/sys/net/route.c#8 (text+ko) ====
@@ -1316,7 +1316,8 @@
{
INIT_VNET_NET(curvnet);
/* XXX dst may be overwritten, can we move this to below */
- struct radix_node_head *rnh = V_rt_tables[rt->rt_fibnum][dst->sa_family];
+ struct radix_node_head *rnh =
+ V_rt_tables[rt->rt_fibnum][dst->sa_family];
int dlen = SA_SIZE(dst), glen = SA_SIZE(gate);
again:
==== //depot/projects/vimage-commit2/src/sys/net/rtsock.c#9 (text+ko) ====
@@ -415,7 +415,8 @@
case RTM_GET:
case RTM_CHANGE:
case RTM_LOCK:
- rnh = V_rt_tables[so->so_fibnum][info.rti_info[RTAX_DST]->sa_family];
+ rnh =
+ V_rt_tables[so->so_fibnum][info.rti_info[RTAX_DST]->sa_family];
if (rnh == NULL)
senderr(EAFNOSUPPORT);
RADIX_NODE_HEAD_LOCK(rnh);
==== //depot/projects/vimage-commit2/src/sys/netinet/if_ether.c#10 (text+ko) ====
@@ -103,12 +103,15 @@
static int useloopback = 1; /* use loopback interface for local traffic */
static int arp_proxyall = 0;
-SYSCTL_INT(_net_link_ether_inet, OID_AUTO, maxtries, CTLFLAG_RW,
- &arp_maxtries, 0, "ARP resolution attempts before returning error");
-SYSCTL_INT(_net_link_ether_inet, OID_AUTO, useloopback, CTLFLAG_RW,
- &useloopback, 0, "Use the loopback interface for local traffic");
-SYSCTL_INT(_net_link_ether_inet, OID_AUTO, proxyall, CTLFLAG_RW,
- &arp_proxyall, 0, "Enable proxy ARP for all suitable requests");
+SYSCTL_V_INT(V_NET, vnet_inet, _net_link_ether_inet, OID_AUTO, maxtries,
+ CTLFLAG_RW, arp_maxtries, 0,
+ "ARP resolution attempts before returning error");
+SYSCTL_V_INT(V_NET, vnet_inet, _net_link_ether_inet, OID_AUTO, useloopback,
+ CTLFLAG_RW, useloopback, 0,
+ "Use the loopback interface for local traffic");
+SYSCTL_V_INT(V_NET, vnet_inet, _net_link_ether_inet, OID_AUTO, proxyall,
+ CTLFLAG_RW, arp_proxyall, 0,
+ "Enable proxy ARP for all suitable requests");
static void arp_init(void);
static void arp_rtrequest(int, struct rtentry *, struct rt_addrinfo *);
==== //depot/projects/vimage-commit2/src/sys/netinet/igmp.c#7 (text+ko) ====
@@ -82,8 +82,8 @@
static struct igmpstat igmpstat;
-SYSCTL_STRUCT(_net_inet_igmp, IGMPCTL_STATS, stats, CTLFLAG_RW, &igmpstat,
- igmpstat, "");
+SYSCTL_V_STRUCT(V_NET, vnet_inet, _net_inet_igmp, IGMPCTL_STATS,
+ stats, CTLFLAG_RW, igmpstat, igmpstat, "");
/*
* igmp_mtx protects all mutable global variables in igmp.c, as well as the
==== //depot/projects/vimage-commit2/src/sys/netinet/in.c#8 (text+ko) ====
@@ -67,11 +67,12 @@
static void in_purgemaddrs(struct ifnet *);
static int subnetsarelocal = 0;
-SYSCTL_INT(_net_inet_ip, OID_AUTO, subnets_are_local, CTLFLAG_RW,
- &subnetsarelocal, 0, "Treat all subnets as directly connected");
+SYSCTL_V_INT(V_NET, vnet_inet, _net_inet_ip, OID_AUTO, subnets_are_local,
+ CTLFLAG_RW, subnetsarelocal, 0,
+ "Treat all subnets as directly connected");
static int sameprefixcarponly = 0;
-SYSCTL_INT(_net_inet_ip, OID_AUTO, same_prefix_carp_only, CTLFLAG_RW,
- &sameprefixcarponly, 0,
+SYSCTL_V_INT(V_NET, vnet_inet, _net_inet_ip, OID_AUTO, same_prefix_carp_only,
+ CTLFLAG_RW, sameprefixcarponly, 0,
"Refuse to create same prefixes on different interfaces");
extern struct inpcbinfo ripcbinfo;
==== //depot/projects/vimage-commit2/src/sys/netinet/in_gif.c#7 (text+ko) ====
@@ -45,7 +45,6 @@
#include <sys/kernel.h>
#include <sys/sysctl.h>
#include <sys/protosw.h>
-
#include <sys/malloc.h>
#include <sys/vimage.h>
@@ -87,8 +86,8 @@
};
static int ip_gif_ttl = GIF_TTL;
-SYSCTL_INT(_net_inet_ip, IPCTL_GIF_TTL, gifttl, CTLFLAG_RW,
- &ip_gif_ttl, 0, "");
+SYSCTL_V_INT(V_NET, vnet_gif, _net_inet_ip, IPCTL_GIF_TTL, gifttl,
+ CTLFLAG_RW, ip_gif_ttl, 0, "");
int
in_gif_output(struct ifnet *ifp, int family, struct mbuf *m)
==== //depot/projects/vimage-commit2/src/sys/netinet/in_pcb.c#11 (text+ko) ====
@@ -136,30 +136,37 @@
SYSCTL_NODE(_net_inet_ip, IPPROTO_IP, portrange, CTLFLAG_RW, 0, "IP Ports");
-SYSCTL_PROC(_net_inet_ip_portrange, OID_AUTO, lowfirst, CTLTYPE_INT|CTLFLAG_RW,
- &ipport_lowfirstauto, 0, &sysctl_net_ipport_check, "I", "");
-SYSCTL_PROC(_net_inet_ip_portrange, OID_AUTO, lowlast, CTLTYPE_INT|CTLFLAG_RW,
- &ipport_lowlastauto, 0, &sysctl_net_ipport_check, "I", "");
-SYSCTL_PROC(_net_inet_ip_portrange, OID_AUTO, first, CTLTYPE_INT|CTLFLAG_RW,
- &ipport_firstauto, 0, &sysctl_net_ipport_check, "I", "");
-SYSCTL_PROC(_net_inet_ip_portrange, OID_AUTO, last, CTLTYPE_INT|CTLFLAG_RW,
- &ipport_lastauto, 0, &sysctl_net_ipport_check, "I", "");
-SYSCTL_PROC(_net_inet_ip_portrange, OID_AUTO, hifirst, CTLTYPE_INT|CTLFLAG_RW,
- &ipport_hifirstauto, 0, &sysctl_net_ipport_check, "I", "");
-SYSCTL_PROC(_net_inet_ip_portrange, OID_AUTO, hilast, CTLTYPE_INT|CTLFLAG_RW,
- &ipport_hilastauto, 0, &sysctl_net_ipport_check, "I", "");
-SYSCTL_INT(_net_inet_ip_portrange, OID_AUTO, reservedhigh,
- CTLFLAG_RW|CTLFLAG_SECURE, &ipport_reservedhigh, 0, "");
-SYSCTL_INT(_net_inet_ip_portrange, OID_AUTO, reservedlow,
- CTLFLAG_RW|CTLFLAG_SECURE, &ipport_reservedlow, 0, "");
-SYSCTL_INT(_net_inet_ip_portrange, OID_AUTO, randomized, CTLFLAG_RW,
- &ipport_randomized, 0, "Enable random port allocation");
-SYSCTL_INT(_net_inet_ip_portrange, OID_AUTO, randomcps, CTLFLAG_RW,
- &ipport_randomcps, 0, "Maximum number of random port "
- "allocations before switching to a sequental one");
-SYSCTL_INT(_net_inet_ip_portrange, OID_AUTO, randomtime, CTLFLAG_RW,
- &ipport_randomtime, 0, "Minimum time to keep sequental port "
- "allocation before switching to a random one");
+SYSCTL_V_PROC(V_NET, vnet_inet, _net_inet_ip_portrange, OID_AUTO,
+ lowfirst, CTLTYPE_INT|CTLFLAG_RW, ipport_lowfirstauto, 0,
+ &sysctl_net_ipport_check, "I", "");
+SYSCTL_V_PROC(V_NET, vnet_inet, _net_inet_ip_portrange, OID_AUTO,
+ lowlast, CTLTYPE_INT|CTLFLAG_RW, ipport_lowlastauto, 0,
+ &sysctl_net_ipport_check, "I", "");
+SYSCTL_V_PROC(V_NET, vnet_inet, _net_inet_ip_portrange, OID_AUTO,
+ first, CTLTYPE_INT|CTLFLAG_RW, ipport_firstauto, 0,
+ &sysctl_net_ipport_check, "I", "");
+SYSCTL_V_PROC(V_NET, vnet_inet, _net_inet_ip_portrange, OID_AUTO,
+ last, CTLTYPE_INT|CTLFLAG_RW, ipport_lastauto, 0,
+ &sysctl_net_ipport_check, "I", "");
+SYSCTL_V_PROC(V_NET, vnet_inet, _net_inet_ip_portrange, OID_AUTO,
+ hifirst, CTLTYPE_INT|CTLFLAG_RW, ipport_hifirstauto, 0,
+ &sysctl_net_ipport_check, "I", "");
+SYSCTL_V_PROC(V_NET, vnet_inet, _net_inet_ip_portrange, OID_AUTO,
+ hilast, CTLTYPE_INT|CTLFLAG_RW, ipport_hilastauto, 0,
+ &sysctl_net_ipport_check, "I", "");
+SYSCTL_V_INT(V_NET, vnet_inet, _net_inet_ip_portrange, OID_AUTO,
+ reservedhigh, CTLFLAG_RW|CTLFLAG_SECURE, ipport_reservedhigh, 0, "");
+SYSCTL_V_INT(V_NET, vnet_inet, _net_inet_ip_portrange, OID_AUTO, reservedlow,
+ CTLFLAG_RW|CTLFLAG_SECURE, ipport_reservedlow, 0, "");
+SYSCTL_V_INT(V_NET, vnet_inet, _net_inet_ip_portrange, OID_AUTO, randomized,
+ CTLFLAG_RW, ipport_randomized, 0, "Enable random port allocation");
+SYSCTL_V_INT(V_NET, vnet_inet, _net_inet_ip_portrange, OID_AUTO, randomcps,
+ CTLFLAG_RW, ipport_randomcps, 0, "Maximum number of random port "
+ "allocations before switching to a sequental one");
+SYSCTL_V_INT(V_NET, vnet_inet, _net_inet_ip_portrange, OID_AUTO, randomtime,
+ CTLFLAG_RW, ipport_randomtime, 0,
+ "Minimum time to keep sequental port "
+ "allocation before switching to a random one");
/*
* in_pcb.c: manage the Protocol Control Blocks.
==== //depot/projects/vimage-commit2/src/sys/netinet/in_rmx.c#8 (text+ko) ====
@@ -152,17 +152,19 @@
}
static int rtq_reallyold = 60*60; /* one hour is "really old" */
-SYSCTL_INT(_net_inet_ip, IPCTL_RTEXPIRE, rtexpire, CTLFLAG_RW,
- &rtq_reallyold, 0, "Default expiration time on dynamically learned routes");
+SYSCTL_V_INT(V_NET, vnet_inet, _net_inet_ip, IPCTL_RTEXPIRE, rtexpire,
+ CTLFLAG_RW, rtq_reallyold, 0,
+ "Default expiration time on dynamically learned routes");
static int rtq_minreallyold = 10; /* never automatically crank down to less */
-SYSCTL_INT(_net_inet_ip, IPCTL_RTMINEXPIRE, rtminexpire, CTLFLAG_RW,
- &rtq_minreallyold, 0,
+SYSCTL_V_INT(V_NET, vnet_inet, _net_inet_ip, IPCTL_RTMINEXPIRE,
+ rtminexpire, CTLFLAG_RW, rtq_minreallyold, 0,
"Minimum time to attempt to hold onto dynamically learned routes");
static int rtq_toomany = 128; /* 128 cached routes is "too many" */
-SYSCTL_INT(_net_inet_ip, IPCTL_RTMAXCACHE, rtmaxcache, CTLFLAG_RW,
- &rtq_toomany, 0, "Upper limit on dynamically learned routes");
+SYSCTL_V_INT(V_NET, vnet_inet, _net_inet_ip, IPCTL_RTMAXCACHE,
+ rtmaxcache, CTLFLAG_RW, rtq_toomany, 0,
+ "Upper limit on dynamically learned routes");
/*
* On last reference drop, mark the route as belong to us so that it can be
==== //depot/projects/vimage-commit2/src/sys/netinet/ip_fastfwd.c#7 (text+ko) ====
@@ -107,8 +107,8 @@
#include <machine/in_cksum.h>
static int ipfastforward_active = 0;
-SYSCTL_INT(_net_inet_ip, OID_AUTO, fastforwarding, CTLFLAG_RW,
- &ipfastforward_active, 0, "Enable fast IP forwarding");
+SYSCTL_V_INT(V_NET, vnet_inet, _net_inet_ip, OID_AUTO, fastforwarding,
+ CTLFLAG_RW, ipfastforward_active, 0, "Enable fast IP forwarding");
static struct sockaddr_in *
ip_findroute(struct route *ro, struct in_addr dest, struct mbuf *m)
==== //depot/projects/vimage-commit2/src/sys/netinet/ip_fw2.c#15 (text+ko) ====
@@ -65,6 +65,7 @@
#include <sys/syslog.h>
#include <sys/ucred.h>
#include <sys/vimage.h>
+
#include <net/if.h>
#include <net/radix.h>
#include <net/route.h>
@@ -164,22 +165,22 @@
#ifdef SYSCTL_NODE
SYSCTL_NODE(_net_inet_ip, OID_AUTO, fw, CTLFLAG_RW, 0, "Firewall");
-SYSCTL_PROC(_net_inet_ip_fw, OID_AUTO, enable,
- CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_SECURE3, &fw_enable, 0,
+SYSCTL_V_PROC(V_NET, vnet_ipfw, _net_inet_ip_fw, OID_AUTO, enable,
+ CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_SECURE3, fw_enable, 0,
ipfw_chg_hook, "I", "Enable ipfw");
-SYSCTL_INT(_net_inet_ip_fw, OID_AUTO, autoinc_step, CTLFLAG_RW,
- &autoinc_step, 0, "Rule number autincrement step");
-SYSCTL_INT(_net_inet_ip_fw, OID_AUTO, one_pass,
- CTLFLAG_RW | CTLFLAG_SECURE3,
- &fw_one_pass, 0,
+SYSCTL_V_INT(V_NET, vnet_ipfw, _net_inet_ip_fw, OID_AUTO, autoinc_step,
+ CTLFLAG_RW, autoinc_step, 0, "Rule number autincrement step");
+SYSCTL_V_INT(V_NET, vnet_ipfw, _net_inet_ip_fw, OID_AUTO, one_pass,
+ CTLFLAG_RW | CTLFLAG_SECURE3, fw_one_pass, 0,
"Only do a single pass through ipfw when using dummynet(4)");
-SYSCTL_INT(_net_inet_ip_fw, OID_AUTO, debug, CTLFLAG_RW,
- &fw_debug, 0, "Enable printing of debug ip_fw statements");
-SYSCTL_INT(_net_inet_ip_fw, OID_AUTO, verbose,
+SYSCTL_V_INT(V_NET, vnet_ipfw, _net_inet_ip_fw, OID_AUTO, debug, CTLFLAG_RW,
+ fw_debug, 0, "Enable printing of debug ip_fw statements");
+SYSCTL_V_INT(V_NET, vnet_ipfw, _net_inet_ip_fw, OID_AUTO, verbose,
CTLFLAG_RW | CTLFLAG_SECURE3,
- &fw_verbose, 0, "Log matches to ipfw rules");
-SYSCTL_INT(_net_inet_ip_fw, OID_AUTO, verbose_limit, CTLFLAG_RW,
- &verbose_limit, 0, "Set upper limit of matches of ipfw rules logged");
+ fw_verbose, 0, "Log matches to ipfw rules");
+SYSCTL_V_INT(V_NET, vnet_ipfw, _net_inet_ip_fw, OID_AUTO, verbose_limit,
+ CTLFLAG_RW,
+ verbose_limit, 0, "Set upper limit of matches of ipfw rules logged");
/*
* Description of dynamic rules.
@@ -256,30 +257,32 @@
static u_int32_t dyn_count; /* # of dynamic rules */
static u_int32_t dyn_max = 4096; /* max # of dynamic rules */
-SYSCTL_INT(_net_inet_ip_fw, OID_AUTO, dyn_buckets, CTLFLAG_RW,
- &dyn_buckets, 0, "Number of dyn. buckets");
-SYSCTL_INT(_net_inet_ip_fw, OID_AUTO, curr_dyn_buckets, CTLFLAG_RD,
- &curr_dyn_buckets, 0, "Current Number of dyn. buckets");
-SYSCTL_INT(_net_inet_ip_fw, OID_AUTO, dyn_count, CTLFLAG_RD,
- &dyn_count, 0, "Number of dyn. rules");
-SYSCTL_INT(_net_inet_ip_fw, OID_AUTO, dyn_max, CTLFLAG_RW,
- &dyn_max, 0, "Max number of dyn. rules");
-SYSCTL_INT(_net_inet_ip_fw, OID_AUTO, static_count, CTLFLAG_RD,
- &static_count, 0, "Number of static rules");
-SYSCTL_INT(_net_inet_ip_fw, OID_AUTO, dyn_ack_lifetime, CTLFLAG_RW,
- &dyn_ack_lifetime, 0, "Lifetime of dyn. rules for acks");
-SYSCTL_INT(_net_inet_ip_fw, OID_AUTO, dyn_syn_lifetime, CTLFLAG_RW,
- &dyn_syn_lifetime, 0, "Lifetime of dyn. rules for syn");
-SYSCTL_INT(_net_inet_ip_fw, OID_AUTO, dyn_fin_lifetime, CTLFLAG_RW,
- &dyn_fin_lifetime, 0, "Lifetime of dyn. rules for fin");
-SYSCTL_INT(_net_inet_ip_fw, OID_AUTO, dyn_rst_lifetime, CTLFLAG_RW,
- &dyn_rst_lifetime, 0, "Lifetime of dyn. rules for rst");
-SYSCTL_INT(_net_inet_ip_fw, OID_AUTO, dyn_udp_lifetime, CTLFLAG_RW,
- &dyn_udp_lifetime, 0, "Lifetime of dyn. rules for UDP");
-SYSCTL_INT(_net_inet_ip_fw, OID_AUTO, dyn_short_lifetime, CTLFLAG_RW,
- &dyn_short_lifetime, 0, "Lifetime of dyn. rules for other situations");
-SYSCTL_INT(_net_inet_ip_fw, OID_AUTO, dyn_keepalive, CTLFLAG_RW,
- &dyn_keepalive, 0, "Enable keepalives for dyn. rules");
+SYSCTL_V_INT(V_NET, vnet_ipfw, _net_inet_ip_fw, OID_AUTO, dyn_buckets,
+ CTLFLAG_RW, dyn_buckets, 0, "Number of dyn. buckets");
+SYSCTL_V_INT(V_NET, vnet_ipfw, _net_inet_ip_fw, OID_AUTO, curr_dyn_buckets,
+ CTLFLAG_RD, curr_dyn_buckets, 0, "Current Number of dyn. buckets");
+SYSCTL_V_INT(V_NET, vnet_ipfw, _net_inet_ip_fw, OID_AUTO, dyn_count,
+ CTLFLAG_RD, dyn_count, 0, "Number of dyn. rules");
+SYSCTL_V_INT(V_NET, vnet_ipfw, _net_inet_ip_fw, OID_AUTO, dyn_max,
+ CTLFLAG_RW, dyn_max, 0, "Max number of dyn. rules");
+SYSCTL_V_INT(V_NET, vnet_ipfw, _net_inet_ip_fw, OID_AUTO, static_count,
+ CTLFLAG_RD, static_count, 0, "Number of static rules");
+SYSCTL_V_INT(V_NET, vnet_ipfw, _net_inet_ip_fw, OID_AUTO, dyn_ack_lifetime,
+ CTLFLAG_RW, dyn_ack_lifetime, 0, "Lifetime of dyn. rules for acks");
+SYSCTL_V_INT(V_NET, vnet_ipfw, _net_inet_ip_fw, OID_AUTO, dyn_syn_lifetime,
+ CTLFLAG_RW, dyn_syn_lifetime, 0, "Lifetime of dyn. rules for syn");
+SYSCTL_V_INT(V_NET, vnet_ipfw, _net_inet_ip_fw, OID_AUTO, dyn_fin_lifetime,
+ CTLFLAG_RW, dyn_fin_lifetime, 0, "Lifetime of dyn. rules for fin");
+SYSCTL_V_INT(V_NET, vnet_ipfw, _net_inet_ip_fw, OID_AUTO, dyn_rst_lifetime,
+ CTLFLAG_RW, dyn_rst_lifetime, 0, "Lifetime of dyn. rules for rst");
+SYSCTL_V_INT(V_NET, vnet_ipfw, _net_inet_ip_fw, OID_AUTO, dyn_udp_lifetime,
+ CTLFLAG_RW, dyn_udp_lifetime, 0, "Lifetime of dyn. rules for UDP");
+SYSCTL_V_INT(V_NET, vnet_ipfw, _net_inet_ip_fw, OID_AUTO, dyn_short_lifetime,
+ CTLFLAG_RW, dyn_short_lifetime, 0,
+ "Lifetime of dyn. rules for other situations");
+SYSCTL_V_INT(V_NET, vnet_ipfw, _net_inet_ip_fw, OID_AUTO, dyn_keepalive,
+ CTLFLAG_RW, dyn_keepalive, 0, "Enable keepalives for dyn. rules");
+
#ifdef INET6
/*
@@ -4482,7 +4485,7 @@
continue;
if ( (q->state & BOTH_SYN) != BOTH_SYN)
continue;
- if (TIME_LEQ( time_uptime+V_dyn_keepalive_interval,
+ if (TIME_LEQ( time_uptime + V_dyn_keepalive_interval,
q->expire))
continue; /* too early */
if (TIME_LEQ(q->expire, time_uptime))
==== //depot/projects/vimage-commit2/src/sys/netinet/ip_icmp.c#7 (text+ko) ====
@@ -78,8 +78,8 @@
*/
struct icmpstat icmpstat;
-SYSCTL_STRUCT(_net_inet_icmp, ICMPCTL_STATS, stats, CTLFLAG_RW,
- &icmpstat, icmpstat, "");
+SYSCTL_V_STRUCT(V_NET, vnet_inet, _net_inet_icmp, ICMPCTL_STATS, stats,
+ CTLFLAG_RW, icmpstat, icmpstat, "");
static int icmpmaskrepl = 0;
SYSCTL_INT(_net_inet_icmp, ICMPCTL_MASKREPL, maskrepl, CTLFLAG_RW,
==== //depot/projects/vimage-commit2/src/sys/netinet/ip_input.c#10 (text+ko) ====
@@ -88,31 +88,32 @@
int rsvp_on = 0;
int ipforwarding = 0;
-SYSCTL_INT(_net_inet_ip, IPCTL_FORWARDING, forwarding, CTLFLAG_RW,
- &ipforwarding, 0, "Enable IP forwarding between interfaces");
+SYSCTL_V_INT(V_NET, vnet_inet, _net_inet_ip, IPCTL_FORWARDING,
+ forwarding, CTLFLAG_RW, ipforwarding, 0,
+ "Enable IP forwarding between interfaces");
static int ipsendredirects = 1; /* XXX */
-SYSCTL_INT(_net_inet_ip, IPCTL_SENDREDIRECTS, redirect, CTLFLAG_RW,
- &ipsendredirects, 0, "Enable sending IP redirects");
+SYSCTL_V_INT(V_NET, vnet_inet, _net_inet_ip, IPCTL_SENDREDIRECTS,
+ redirect, CTLFLAG_RW, ipsendredirects, 0,
+ "Enable sending IP redirects");
int ip_defttl = IPDEFTTL;
-SYSCTL_INT(_net_inet_ip, IPCTL_DEFTTL, ttl, CTLFLAG_RW,
- &ip_defttl, 0, "Maximum TTL on IP packets");
+SYSCTL_V_INT(V_NET, vnet_inet, _net_inet_ip, IPCTL_DEFTTL,
+ ttl, CTLFLAG_RW, ip_defttl, 0, "Maximum TTL on IP packets");
static int ip_keepfaith = 0;
-SYSCTL_INT(_net_inet_ip, IPCTL_KEEPFAITH, keepfaith, CTLFLAG_RW,
- &ip_keepfaith, 0,
+SYSCTL_V_INT(V_NET, vnet_inet, _net_inet_ip, IPCTL_KEEPFAITH,
+ keepfaith, CTLFLAG_RW, ip_keepfaith, 0,
"Enable packet capture for FAITH IPv4->IPv6 translater daemon");
static int ip_sendsourcequench = 0;
-SYSCTL_INT(_net_inet_ip, OID_AUTO, sendsourcequench, CTLFLAG_RW,
- &ip_sendsourcequench, 0,
+SYSCTL_V_INT(V_NET, vnet_inet, _net_inet_ip, OID_AUTO,
+ sendsourcequench, CTLFLAG_RW, ip_sendsourcequench, 0,
"Enable the transmission of source quench packets");
int ip_do_randomid = 0;
-SYSCTL_INT(_net_inet_ip, OID_AUTO, random_id, CTLFLAG_RW,
- &ip_do_randomid, 0,
- "Assign random ip_id values");
+SYSCTL_V_INT(V_NET, vnet_inet, _net_inet_ip, OID_AUTO, random_id,
+ CTLFLAG_RW, ip_do_randomid, 0, "Assign random ip_id values");
/*
* XXX - Setting ip_checkinterface mostly implements the receive side of
@@ -128,8 +129,9 @@
* packets for those addresses are received.
*/
static int ip_checkinterface = 0;
-SYSCTL_INT(_net_inet_ip, OID_AUTO, check_interface, CTLFLAG_RW,
- &ip_checkinterface, 0, "Verify packet arrives on correct interface");
+SYSCTL_V_INT(V_NET, vnet_inet, _net_inet_ip, OID_AUTO,
+ check_interface, CTLFLAG_RW, ip_checkinterface, 0,
+ "Verify packet arrives on correct interface");
struct pfil_head inet_pfil_hook; /* Packet filter hooks */
@@ -150,8 +152,8 @@
"Number of packets dropped from the IP input queue");
struct ipstat ipstat;
-SYSCTL_STRUCT(_net_inet_ip, IPCTL_STATS, stats, CTLFLAG_RW,
- &ipstat, ipstat, "IP statistics (struct ipstat, netinet/ip_var.h)");
+SYSCTL_V_STRUCT(V_NET, vnet_inet, _net_inet_ip, IPCTL_STATS, stats, CTLFLAG_RW,
+ ipstat, ipstat, "IP statistics (struct ipstat, netinet/ip_var.h)");
/*
* IP datagram reassembly.
@@ -176,12 +178,13 @@
static int maxnipq; /* Administrative limit on # reass queues. */
static int nipq = 0; /* Total # of reass queues */
-SYSCTL_INT(_net_inet_ip, OID_AUTO, fragpackets, CTLFLAG_RD,
- &nipq, 0, "Current number of IPv4 fragment reassembly queue entries");
+SYSCTL_V_INT(V_NET, vnet_inet, _net_inet_ip, OID_AUTO, fragpackets,
+ CTLFLAG_RD, nipq, 0,
+ "Current number of IPv4 fragment reassembly queue entries");
static int maxfragsperpacket;
-SYSCTL_INT(_net_inet_ip, OID_AUTO, maxfragsperpacket, CTLFLAG_RW,
- &maxfragsperpacket, 0,
+SYSCTL_V_INT(V_NET, vnet_inet, _net_inet_ip, OID_AUTO, maxfragsperpacket,
+ CTLFLAG_RW, maxfragsperpacket, 0,
"Maximum number of IPv4 fragments allowed per packet");
struct callout ipport_tick_callout;
@@ -193,8 +196,8 @@
#ifdef IPSTEALTH
int ipstealth = 0;
-SYSCTL_INT(_net_inet_ip, OID_AUTO, stealth, CTLFLAG_RW,
- &ipstealth, 0, "IP stealth mode, no TTL decrementation on forwarding");
+SYSCTL_V_INT(V_NET, vnet_inet, _net_inet_ip, OID_AUTO, stealth, CTLFLAG_RW,
+ ipstealth, 0, "IP stealth mode, no TTL decrementation on forwarding");
#endif
/*
==== //depot/projects/vimage-commit2/src/sys/netinet/tcp_hostcache.c#9 (text+ko) ====
@@ -155,28 +155,35 @@
static int sysctl_tcp_hc_list(SYSCTL_HANDLER_ARGS);
static void tcp_hc_purge(void *);
-SYSCTL_NODE(_net_inet_tcp, OID_AUTO, hostcache, CTLFLAG_RW, 0, "TCP Host cache");
+SYSCTL_NODE(_net_inet_tcp, OID_AUTO, hostcache, CTLFLAG_RW, 0,
+ "TCP Host cache");
-SYSCTL_INT(_net_inet_tcp_hostcache, OID_AUTO, cachelimit, CTLFLAG_RDTUN,
- &tcp_hostcache.cache_limit, 0, "Overall entry limit for hostcache");
+SYSCTL_V_INT(V_NET, vnet_inet, _net_inet_tcp_hostcache, OID_AUTO, cachelimit,
+ CTLFLAG_RDTUN, tcp_hostcache.cache_limit, 0,
+ "Overall entry limit for hostcache");
-SYSCTL_INT(_net_inet_tcp_hostcache, OID_AUTO, hashsize, CTLFLAG_RDTUN,
- &tcp_hostcache.hashsize, 0, "Size of TCP hostcache hashtable");
+SYSCTL_V_INT(V_NET, vnet_inet, _net_inet_tcp_hostcache, OID_AUTO, hashsize,
+ CTLFLAG_RDTUN, tcp_hostcache.hashsize, 0,
+ "Size of TCP hostcache hashtable");
-SYSCTL_INT(_net_inet_tcp_hostcache, OID_AUTO, bucketlimit, CTLFLAG_RDTUN,
- &tcp_hostcache.bucket_limit, 0, "Per-bucket hash limit for hostcache");
+SYSCTL_V_INT(V_NET, vnet_inet, _net_inet_tcp_hostcache, OID_AUTO, bucketlimit,
+ CTLFLAG_RDTUN, tcp_hostcache.bucket_limit, 0,
+ "Per-bucket hash limit for hostcache");
-SYSCTL_INT(_net_inet_tcp_hostcache, OID_AUTO, count, CTLFLAG_RD,
- &tcp_hostcache.cache_count, 0, "Current number of entries in hostcache");
+SYSCTL_V_INT(V_NET, vnet_inet, _net_inet_tcp_hostcache, OID_AUTO, count,
+ CTLFLAG_RD, tcp_hostcache.cache_count, 0,
+ "Current number of entries in hostcache");
-SYSCTL_INT(_net_inet_tcp_hostcache, OID_AUTO, expire, CTLFLAG_RW,
- &tcp_hostcache.expire, 0, "Expire time of TCP hostcache entries");
+SYSCTL_V_INT(V_NET, vnet_inet, _net_inet_tcp_hostcache, OID_AUTO, expire,
+ CTLFLAG_RW, tcp_hostcache.expire, 0,
+ "Expire time of TCP hostcache entries");
-SYSCTL_INT(_net_inet_tcp_hostcache, OID_AUTO, prune, CTLFLAG_RW,
- &tcp_hostcache.prune, 0, "Time between purge runs");
+SYSCTL_V_INT(V_NET, vnet_inet, _net_inet_tcp_hostcache, OID_AUTO, prune,
+ CTLFLAG_RW, tcp_hostcache.prune, 0, "Time between purge runs");
-SYSCTL_INT(_net_inet_tcp_hostcache, OID_AUTO, purge, CTLFLAG_RW,
- &tcp_hostcache.purgeall, 0, "Expire all entires on next purge run");
+SYSCTL_V_INT(V_NET, vnet_inet, _net_inet_tcp_hostcache, OID_AUTO, purge,
+ CTLFLAG_RW, tcp_hostcache.purgeall, 0,
+ "Expire all entires on next purge run");
SYSCTL_PROC(_net_inet_tcp_hostcache, OID_AUTO, list,
CTLTYPE_STRING | CTLFLAG_RD | CTLFLAG_SKIP, 0, 0,
==== //depot/projects/vimage-commit2/src/sys/netinet/tcp_input.c#11 (text+ko) ====
@@ -100,60 +100,65 @@
static const int tcprexmtthresh = 3;
struct tcpstat tcpstat;
-SYSCTL_STRUCT(_net_inet_tcp, TCPCTL_STATS, stats, CTLFLAG_RW,
- &tcpstat , tcpstat, "TCP statistics (struct tcpstat, netinet/tcp_var.h)");
+SYSCTL_V_STRUCT(V_NET, vnet_inet, _net_inet_tcp, TCPCTL_STATS, stats,
+ CTLFLAG_RW, tcpstat , tcpstat,
+ "TCP statistics (struct tcpstat, netinet/tcp_var.h)");
int tcp_log_in_vain = 0;
SYSCTL_INT(_net_inet_tcp, OID_AUTO, log_in_vain, CTLFLAG_RW,
&tcp_log_in_vain, 0, "Log all incoming TCP segments to closed ports");
static int blackhole = 0;
-SYSCTL_INT(_net_inet_tcp, OID_AUTO, blackhole, CTLFLAG_RW,
- &blackhole, 0, "Do not send RST on segments to closed ports");
+SYSCTL_V_INT(V_NET, vnet_inet, _net_inet_tcp, OID_AUTO, blackhole, CTLFLAG_RW,
+ blackhole, 0, "Do not send RST on segments to closed ports");
int tcp_delack_enabled = 1;
-SYSCTL_INT(_net_inet_tcp, OID_AUTO, delayed_ack, CTLFLAG_RW,
- &tcp_delack_enabled, 0,
+SYSCTL_V_INT(V_NET, vnet_inet, _net_inet_tcp, OID_AUTO, delayed_ack,
+ CTLFLAG_RW, tcp_delack_enabled, 0,
"Delay ACK to try and piggyback it onto a data packet");
static int drop_synfin = 0;
-SYSCTL_INT(_net_inet_tcp, OID_AUTO, drop_synfin, CTLFLAG_RW,
- &drop_synfin, 0, "Drop TCP packets with SYN+FIN set");
+SYSCTL_V_INT(V_NET, vnet_inet, _net_inet_tcp, OID_AUTO, drop_synfin,
+ CTLFLAG_RW, drop_synfin, 0, "Drop TCP packets with SYN+FIN set");
static int tcp_do_rfc3042 = 1;
-SYSCTL_INT(_net_inet_tcp, OID_AUTO, rfc3042, CTLFLAG_RW,
- &tcp_do_rfc3042, 0, "Enable RFC 3042 (Limited Transmit)");
+SYSCTL_V_INT(V_NET, vnet_inet, _net_inet_tcp, OID_AUTO, rfc3042, CTLFLAG_RW,
+ tcp_do_rfc3042, 0, "Enable RFC 3042 (Limited Transmit)");
static int tcp_do_rfc3390 = 1;
-SYSCTL_INT(_net_inet_tcp, OID_AUTO, rfc3390, CTLFLAG_RW,
- &tcp_do_rfc3390, 0,
+SYSCTL_V_INT(V_NET, vnet_inet, _net_inet_tcp, OID_AUTO, rfc3390, CTLFLAG_RW,
+ tcp_do_rfc3390, 0,
"Enable RFC 3390 (Increasing TCP's Initial Congestion Window)");
-int tcp_do_ecn = 0;
-int tcp_ecn_maxretries = 1;
SYSCTL_NODE(_net_inet_tcp, OID_AUTO, ecn, CTLFLAG_RW, 0, "TCP ECN");
-SYSCTL_INT(_net_inet_tcp_ecn, OID_AUTO, enable, CTLFLAG_RW,
- &tcp_do_ecn, 0, "TCP ECN support");
-SYSCTL_INT(_net_inet_tcp_ecn, OID_AUTO, maxretries, CTLFLAG_RW,
- &tcp_ecn_maxretries, 0, "Max retries before giving up on ECN");
+
+int tcp_do_ecn = 0;
+SYSCTL_V_INT(V_NET, vnet_inet, _net_inet_tcp_ecn, OID_AUTO, enable,
+ CTLFLAG_RW, tcp_do_ecn, 0, "TCP ECN support");
+
+int tcp_ecn_maxretries = 1;
+SYSCTL_V_INT(V_NET, vnet_inet, _net_inet_tcp_ecn, OID_AUTO, maxretries,
+ CTLFLAG_RW, tcp_ecn_maxretries, 0, "Max retries before giving up on ECN");
static int tcp_insecure_rst = 0;
-SYSCTL_INT(_net_inet_tcp, OID_AUTO, insecure_rst, CTLFLAG_RW,
- &tcp_insecure_rst, 0,
+SYSCTL_V_INT(V_NET, vnet_inet, _net_inet_tcp, OID_AUTO, insecure_rst,
+ CTLFLAG_RW, tcp_insecure_rst, 0,
"Follow the old (insecure) criteria for accepting RST packets");
int tcp_do_autorcvbuf = 1;
-SYSCTL_INT(_net_inet_tcp, OID_AUTO, recvbuf_auto, CTLFLAG_RW,
- &tcp_do_autorcvbuf, 0, "Enable automatic receive buffer sizing");
+SYSCTL_V_INT(V_NET, vnet_inet, _net_inet_tcp, OID_AUTO, recvbuf_auto,
+ CTLFLAG_RW, tcp_do_autorcvbuf, 0,
+ "Enable automatic receive buffer sizing");
int tcp_autorcvbuf_inc = 16*1024;
-SYSCTL_INT(_net_inet_tcp, OID_AUTO, recvbuf_inc, CTLFLAG_RW,
- &tcp_autorcvbuf_inc, 0,
+SYSCTL_V_INT(V_NET, vnet_inet, _net_inet_tcp, OID_AUTO, recvbuf_inc,
+ CTLFLAG_RW, tcp_autorcvbuf_inc, 0,
"Incrementor step size of automatic receive buffer");
int tcp_autorcvbuf_max = 256*1024;
-SYSCTL_INT(_net_inet_tcp, OID_AUTO, recvbuf_max, CTLFLAG_RW,
- &tcp_autorcvbuf_max, 0, "Max size of automatic receive buffer");
+SYSCTL_V_INT(V_NET, vnet_inet, _net_inet_tcp, OID_AUTO, recvbuf_max,
+ CTLFLAG_RW, tcp_autorcvbuf_max, 0,
+ "Max size of automatic receive buffer");
struct inpcbhead tcb;
#define tcb6 tcb /* for KAME src sync over BSD*'s */
==== //depot/projects/vimage-commit2/src/sys/netinet/tcp_output.c#11 (text+ko) ====
@@ -88,36 +88,42 @@
#endif
int path_mtu_discovery = 1;
-SYSCTL_INT(_net_inet_tcp, OID_AUTO, path_mtu_discovery, CTLFLAG_RW,
- &path_mtu_discovery, 1, "Enable Path MTU Discovery");
+
+SYSCTL_V_INT(V_NET, vnet_inet, _net_inet_tcp, OID_AUTO, path_mtu_discovery,
+ CTLFLAG_RW, path_mtu_discovery, 1, "Enable Path MTU Discovery");
int ss_fltsz = 1;
-SYSCTL_INT(_net_inet_tcp, OID_AUTO, slowstart_flightsize, CTLFLAG_RW,
- &ss_fltsz, 1, "Slow start flight size");
+SYSCTL_V_INT(V_NET, vnet_inet, _net_inet_tcp, OID_AUTO,
+ slowstart_flightsize, CTLFLAG_RW,
+ ss_fltsz, 1, "Slow start flight size");
int ss_fltsz_local = 4;
-SYSCTL_INT(_net_inet_tcp, OID_AUTO, local_slowstart_flightsize, CTLFLAG_RW,
- &ss_fltsz_local, 1, "Slow start flight size for local networks");
+SYSCTL_V_INT(V_NET, vnet_inet, _net_inet_tcp, OID_AUTO,
+ local_slowstart_flightsize, CTLFLAG_RW,
+ ss_fltsz_local, 1, "Slow start flight size for local networks");
int tcp_do_newreno = 1;
-SYSCTL_INT(_net_inet_tcp, OID_AUTO, newreno, CTLFLAG_RW,
- &tcp_do_newreno, 0, "Enable NewReno Algorithms");
+SYSCTL_V_INT(V_NET, vnet_inet, _net_inet_tcp, OID_AUTO, newreno, CTLFLAG_RW,
+ tcp_do_newreno, 0, "Enable NewReno Algorithms");
int tcp_do_tso = 1;
-SYSCTL_INT(_net_inet_tcp, OID_AUTO, tso, CTLFLAG_RW,
- &tcp_do_tso, 0, "Enable TCP Segmentation Offload");
+SYSCTL_V_INT(V_NET, vnet_inet, _net_inet_tcp, OID_AUTO, tso, CTLFLAG_RW,
+ tcp_do_tso, 0, "Enable TCP Segmentation Offload");
int tcp_do_autosndbuf = 1;
-SYSCTL_INT(_net_inet_tcp, OID_AUTO, sendbuf_auto, CTLFLAG_RW,
- &tcp_do_autosndbuf, 0, "Enable automatic send buffer sizing");
+SYSCTL_V_INT(V_NET, vnet_inet, _net_inet_tcp, OID_AUTO, sendbuf_auto,
+ CTLFLAG_RW,
+ tcp_do_autosndbuf, 0, "Enable automatic send buffer sizing");
int tcp_autosndbuf_inc = 8*1024;
-SYSCTL_INT(_net_inet_tcp, OID_AUTO, sendbuf_inc, CTLFLAG_RW,
- &tcp_autosndbuf_inc, 0, "Incrementor step size of automatic send buffer");
+SYSCTL_V_INT(V_NET, vnet_inet, _net_inet_tcp, OID_AUTO, sendbuf_inc,
+ CTLFLAG_RW, tcp_autosndbuf_inc, 0,
+ "Incrementor step size of automatic send buffer");
int tcp_autosndbuf_max = 256*1024;
-SYSCTL_INT(_net_inet_tcp, OID_AUTO, sendbuf_max, CTLFLAG_RW,
- &tcp_autosndbuf_max, 0, "Max size of automatic send buffer");
+SYSCTL_V_INT(V_NET, vnet_inet, _net_inet_tcp, OID_AUTO, sendbuf_max,
+ CTLFLAG_RW, tcp_autosndbuf_max, 0,
+ "Max size of automatic send buffer");
/*
==== //depot/projects/vimage-commit2/src/sys/netinet/tcp_reass.c#7 (text+ko) ====
@@ -78,29 +78,30 @@
"TCP Segment Reassembly Queue");
static int tcp_reass_maxseg = 0;
-SYSCTL_INT(_net_inet_tcp_reass, OID_AUTO, maxsegments, CTLFLAG_RDTUN,
- &tcp_reass_maxseg, 0,
+SYSCTL_V_INT(V_NET, vnet_inet, _net_inet_tcp_reass, OID_AUTO, maxsegments,
+ CTLFLAG_RDTUN, tcp_reass_maxseg, 0,
"Global maximum number of TCP Segments in Reassembly Queue");
int tcp_reass_qsize = 0;
-SYSCTL_INT(_net_inet_tcp_reass, OID_AUTO, cursegments, CTLFLAG_RD,
- &tcp_reass_qsize, 0,
+SYSCTL_V_INT(V_NET, vnet_inet, _net_inet_tcp_reass, OID_AUTO, cursegments,
+ CTLFLAG_RD, tcp_reass_qsize, 0,
"Global number of TCP Segments currently in Reassembly Queue");
static int tcp_reass_maxqlen = 48;
-SYSCTL_INT(_net_inet_tcp_reass, OID_AUTO, maxqlen, CTLFLAG_RW,
- &tcp_reass_maxqlen, 0,
+SYSCTL_V_INT(V_NET, vnet_inet, _net_inet_tcp_reass, OID_AUTO, maxqlen,
+ CTLFLAG_RW, tcp_reass_maxqlen, 0,
"Maximum number of TCP Segments per individual Reassembly Queue");
static int tcp_reass_overflows = 0;
-SYSCTL_INT(_net_inet_tcp_reass, OID_AUTO, overflows, CTLFLAG_RD,
- &tcp_reass_overflows, 0,
+SYSCTL_V_INT(V_NET, vnet_inet, _net_inet_tcp_reass, OID_AUTO, overflows,
+ CTLFLAG_RD, tcp_reass_overflows, 0,
"Global number of TCP Segment Reassembly Queue Overflows");
/* Initialize TCP reassembly queue */
static void
tcp_reass_zone_change(void *tag)
{
+ INIT_VNET_INET(curvnet);
V_tcp_reass_maxseg = nmbclusters / 16;
uma_zone_set_max(tcp_reass_zone, V_tcp_reass_maxseg);
==== //depot/projects/vimage-commit2/src/sys/netinet/tcp_sack.c#7 (text+ko) ====
@@ -126,23 +126,23 @@
SYSCTL_NODE(_net_inet_tcp, OID_AUTO, sack, CTLFLAG_RW, 0, "TCP SACK");
>>> TRUNCATED FOR MAIL (1000 lines) <<<
More information about the p4-projects
mailing list