PERFORCE change 166553 for review
Andre Oppermann
andre at FreeBSD.org
Sat Jul 25 13:12:34 UTC 2009
http://perforce.freebsd.org/chv.cgi?CH=166553
Change 166553 by andre at andre_flirtbox on 2009/07/25 13:12:31
For sysctl_zonelimit() the zone has to be passed by reference.
Affected files ...
.. //depot/projects/tcp_reass/kern/kern_sysctl.c#9 edit
.. //depot/projects/tcp_reass/netinet/tcp_reass.c#50 edit
Differences ...
==== //depot/projects/tcp_reass/kern/kern_sysctl.c#9 (text+ko) ====
@@ -972,9 +972,10 @@
sysctl_zonelimit(SYSCTL_HANDLER_ARGS)
{
int error, nitems;
- uma_zone_t zone = (uma_zone_t)arg1;
+ uma_zone_t *zone;
+ zone = (uma_zone_t *)arg1;
- nitems = uma_zone_get_max(zone);
+ nitems = uma_zone_get_max(*zone);
error = sysctl_handle_int(oidp, &nitems, 0, req);
if (error || !req->newptr)
@@ -983,7 +984,7 @@
if (nitems < 1)
return (EINVAL);
- uma_zone_set_max(zone, nitems);
+ uma_zone_set_max(*zone, nitems);
return (error);
}
==== //depot/projects/tcp_reass/netinet/tcp_reass.c#50 (text+ko) ====
@@ -63,7 +63,6 @@
*
* TODO:
* - Improve comments and annotate RFC references.
- * - Resizing of tcp_reass_globalmaxblocks through sysctl.
* - Style improvements.
* - Lots of testing.
*/
@@ -99,7 +98,7 @@
#include <netinet/tcp_var.h>
#include <netinet/tcpip.h>
-VNET_DEFINE(uma_zone_t, tcp_reass_zone);
+uma_zone_t tcp_reass_zone;
SYSCTL_NODE(_net_inet_tcp, OID_AUTO, reass, CTLFLAG_RW, 0,
"TCP Segment Reassembly Queue");
@@ -116,8 +115,8 @@
static int tcp_reass_globalmaxblocks = 65535;
SYSCTL_PROC(_net_inet_tcp_reass, OID_AUTO, globalmaxblocks,
- CTLTYPE_INT|CTLFLAG_RW|CTLFLAG_TUN, tcp_reass_zone,
- 0, sysctl_zonelimit, "I",
+ CTLTYPE_INT|CTLFLAG_RW|CTLFLAG_TUN, &tcp_reass_zone, 0,
+ sysctl_zonelimit, "I",
"Global limit of TCP segment blocks in reassembly queue");
static int tcp_reass_timeout = 0;
More information about the p4-projects
mailing list