PERFORCE change 167215 for review
Marko Zec
zec at FreeBSD.org
Tue Aug 11 16:31:36 UTC 2009
http://perforce.freebsd.org/chv.cgi?CH=167215
Change 167215 by zec at zec_tpx32 on 2009/08/11 16:30:55
First whitespace cleanup iteration.
Affected files ...
.. //depot/projects/vimage-commit2/src/sys/netinet/ip_divert.c#37 edit
Differences ...
==== //depot/projects/vimage-commit2/src/sys/netinet/ip_divert.c#37 (text+ko) ====
@@ -131,16 +131,15 @@
static void
div_zone_change(struct vnet *vnet)
{
- VNET_ITERATOR_DECL(vnet_iter);
+ VNET_ITERATOR_DECL(vnet_iter);
- VNET_LIST_RLOCK_NOSLEEP();
- VNET_FOREACH(vnet_iter) {
- CURVNET_SET(vnet_iter);
+ VNET_LIST_RLOCK_NOSLEEP();
+ VNET_FOREACH(vnet_iter) {
+ CURVNET_SET(vnet_iter);
uma_zone_set_max(V_divcbinfo.ipi_zone, maxsockets);
- CURVNET_RESTORE();
- }
- VNET_LIST_RUNLOCK_NOSLEEP();
-
+ CURVNET_RESTORE();
+ }
+ VNET_LIST_RUNLOCK_NOSLEEP();
}
static int
@@ -518,10 +517,10 @@
* XXX -- divert should not be abusing in_pcbind
* and should probably have its own family.
*/
- if (inp->inp_lport != 0 || inp->inp_laddr.s_addr != INADDR_ANY)
- return (EINVAL);
+ if (inp->inp_lport != 0 || inp->inp_laddr.s_addr != INADDR_ANY)
+ return (EINVAL);
/* possibly not needed.. but play safe */
- inp->inp_fport = 0;
+ inp->inp_fport = 0;
inp->inp_faddr.s_addr = INADDR_ANY;
if (nam->sa_family != AF_INET)
@@ -538,7 +537,7 @@
td->td_ucred)) {
error = EADDRNOTAVAIL;
} else {
- inp->inp_lport = ((struct sockaddr_in *)nam)->sin_port;
+ inp->inp_lport = ((struct sockaddr_in *)nam)->sin_port;
if (in_pcbinshash(inp) != 0) {
inp->inp_lport = 0;
error = EAGAIN;
@@ -765,7 +764,7 @@
ip_divert_ptr = divert_packet;
div_evh_tag =
EVENTHANDLER_REGISTER(maxsockets_change, div_zone_change,
- NULL, EVENTHANDLER_PRI_ANY);
+ NULL, EVENTHANDLER_PRI_ANY);
div_loaded = 1;
}
return;
@@ -852,17 +851,16 @@
}
-#define DIV_MAJOR_ORDER SI_SUB_PROTO_IFATTACHDOMAIN
-#define DIV_MODULE_ORDER (SI_ORDER_ANY + 64)
-#define DIV_SYSINIT_ORDER (DIV_MODULE_ORDER + 1)
-#define DIV_VNET_ORDER (DIV_SYSINIT_ORDER + 1 )
+#define DIV_MAJOR_ORDER SI_SUB_PROTO_IFATTACHDOMAIN
+#define DIV_MODULE_ORDER (SI_ORDER_ANY + 64)
+#define DIV_SYSINIT_ORDER (DIV_MODULE_ORDER + 1)
+#define DIV_VNET_ORDER (DIV_SYSINIT_ORDER + 1 )
DECLARE_MODULE(ipdivert, ipdivertmod, DIV_MAJOR_ORDER, DIV_MODULE_ORDER);
MODULE_DEPEND(dummynet, ipfw, 2, 2, 2);
MODULE_VERSION(ipdivert, 1);
-SYSINIT(div_init, DIV_MAJOR_ORDER, DIV_SYSINIT_ORDER,
- div_init, NULL);
+SYSINIT(div_init, DIV_MAJOR_ORDER, DIV_SYSINIT_ORDER, div_init, NULL);
SYSUNINIT(div_uninit, DIV_MAJOR_ORDER, DIV_SYSINIT_ORDER,
div_uninit, NULL);
More information about the p4-projects
mailing list