Date: Sat, 25 Jul 2009 10:33:38 GMT From: Andre Oppermann <andre@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 166543 for review Message-ID: <200907251033.n6PAXcTD080151@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=166543 Change 166543 by andre@andre_t61 on 2009/07/25 10:32:52 Use SYSCTL_PROC() with sysctl_zonelimit to handle zone limit modifications to the reassembly zone. Affected files ... .. //depot/projects/tcp_reass/netinet/tcp_reass.c#49 edit Differences ... ==== //depot/projects/tcp_reass/netinet/tcp_reass.c#49 (text+ko) ==== @@ -115,8 +115,9 @@ "Per connection limit of TCP segment blocks in reassembly queue"); static int tcp_reass_globalmaxblocks = 65535; -SYSCTL_INT(_net_inet_tcp_reass, OID_AUTO, globalmaxblocks, CTLFLAG_RDTUN, - &tcp_reass_globalmaxblocks, 0, +SYSCTL_PROC(_net_inet_tcp_reass, OID_AUTO, globalmaxblocks, + 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; @@ -168,7 +169,7 @@ tcp_reass_zone = uma_zcreate("tcpreass", sizeof(struct tcp_reass_block), NULL, NULL, NULL, NULL, UMA_ALIGN_PTR, 0); uma_zone_set_max(tcp_reass_zone, tcp_reass_globalmaxblocks); - tcp_reass_timeout = 30 * hz; + tcp_reass_timeout = 2 * TCPTV_MSL; } /* @@ -380,8 +381,11 @@ else thflags &= ~TH_FIN; - TCPSTAT_INC(tcps_rcvoopack); - TCPSTAT_ADD(tcps_rcvoobyte, len); + /* Statistics. */ + if (tp->rcv_nxt != th_seq) { + TCPSTAT_INC(tcps_rcvoopack); + TCPSTAT_ADD(tcps_rcvoobyte, len); + } /* * Get rid of packet header and mtags.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200907251033.n6PAXcTD080151>