Date: Sat, 6 Nov 2010 10:21:46 +0000 (UTC) From: Lawrence Stewart <lstewart@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r214864 - in stable/8: share/man/man4 sys/netinet Message-ID: <201011061021.oA6ALk7x026686@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: lstewart Date: Sat Nov 6 10:21:46 2010 New Revision: 214864 URL: http://svn.freebsd.org/changeset/base/214864 Log: MFC r213162: Log the number of segments currently in the reassembly queue. Sponsored by: FreeBSD Foundation Modified: stable/8/share/man/man4/siftr.4 stable/8/sys/netinet/siftr.c Directory Properties: stable/8/share/man/ (props changed) stable/8/share/man/man1/ (props changed) stable/8/share/man/man3/ (props changed) stable/8/share/man/man4/ (props changed) stable/8/share/man/man5/ (props changed) stable/8/share/man/man7/ (props changed) stable/8/share/man/man8/ (props changed) stable/8/share/man/man9/ (props changed) stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/share/man/man4/siftr.4 ============================================================================== --- stable/8/share/man/man4/siftr.4 Sat Nov 6 10:17:43 2010 (r214863) +++ stable/8/share/man/man4/siftr.4 Sat Nov 6 10:21:46 2010 (r214864) @@ -30,7 +30,7 @@ .\" .\" $FreeBSD$ .\" -.Dd June 23, 2010 +.Dd September 25, 2010 .Dt SIFTR 4 .Os .Sh NAME @@ -198,7 +198,7 @@ The data is CSV formatted. .Bd -literal -offset indent o,0xbec491a5,1238556193.463551,172.16.7.28,22,172.16.2.5,55931, \\ 1073725440,172312,6144,66560,66608,8,1,4,1448,936,1,996,255, \\ -33304,208,66608,0,208 +33304,208,66608,0,208,0 .Ed .Pp Field descriptions are as follows: @@ -328,6 +328,10 @@ The current number of bytes in the socke The current number of unacknowledged bytes in-flight. Bytes acknowledged via SACK are not excluded from this count. .El +.Bl -tag -offset indent +.It Va 26 +The current number of segments in the reassembly queue. +.El .Pp The third type of log message is written to the file when the module is disabled and ceases collecting data from the running kernel. Modified: stable/8/sys/netinet/siftr.c ============================================================================== --- stable/8/sys/netinet/siftr.c Sat Nov 6 10:17:43 2010 (r214863) +++ stable/8/sys/netinet/siftr.c Sat Nov 6 10:21:46 2010 (r214864) @@ -55,7 +55,7 @@ * SIFTR should be directed to him via email: lastewart@swin.edu.au * * Initial release date: June 2007 - * Most recent update: June 2010 + * Most recent update: September 2010 ******************************************************/ #include <sys/cdefs.h> @@ -105,7 +105,7 @@ __FBSDID("$FreeBSD$"); */ #define V_MAJOR 1 #define V_BACKBREAK 2 -#define V_BACKCOMPAT 3 +#define V_BACKCOMPAT 4 #define MODVERSION __CONCAT(V_MAJOR, __CONCAT(V_BACKBREAK, V_BACKCOMPAT)) #define MODVERSION_STR __XSTRING(V_MAJOR) "." __XSTRING(V_BACKBREAK) "." \ __XSTRING(V_BACKCOMPAT) @@ -226,6 +226,8 @@ struct pkt_node { u_int rcv_buf_cc; /* Number of bytes inflight that we are waiting on ACKs for. */ u_int sent_inflight_bytes; + /* Number of segments currently in the reassembly queue. */ + int t_segqlen; /* Link to next pkt_node in the list. */ STAILQ_ENTRY(pkt_node) nodes; }; @@ -442,7 +444,7 @@ siftr_process_pkt(struct pkt_node * pkt_ MAX_LOG_MSG_LEN, "%c,0x%08x,%zd.%06ld,%x:%x:%x:%x:%x:%x:%x:%x,%u,%x:%x:%x:" "%x:%x:%x:%x:%x,%u,%ld,%ld,%ld,%ld,%ld,%u,%u,%u,%u,%u,%u," - "%u,%d,%u,%u,%u,%u,%u\n", + "%u,%d,%u,%u,%u,%u,%u,%u\n", direction[pkt_node->direction], pkt_node->hash, pkt_node->tval.tv_sec, @@ -482,7 +484,8 @@ siftr_process_pkt(struct pkt_node * pkt_ pkt_node->snd_buf_cc, pkt_node->rcv_buf_hiwater, pkt_node->rcv_buf_cc, - pkt_node->sent_inflight_bytes); + pkt_node->sent_inflight_bytes, + pkt_node->t_segqlen); } else { /* IPv4 packet */ pkt_node->ip_laddr[0] = FIRST_OCTET(pkt_node->ip_laddr[3]); pkt_node->ip_laddr[1] = SECOND_OCTET(pkt_node->ip_laddr[3]); @@ -498,7 +501,7 @@ siftr_process_pkt(struct pkt_node * pkt_ log_buf->ae_bytesused = snprintf(log_buf->ae_data, MAX_LOG_MSG_LEN, "%c,0x%08x,%jd.%06ld,%u.%u.%u.%u,%u,%u.%u.%u.%u,%u,%ld,%ld," - "%ld,%ld,%ld,%u,%u,%u,%u,%u,%u,%u,%d,%u,%u,%u,%u,%u\n", + "%ld,%ld,%ld,%u,%u,%u,%u,%u,%u,%u,%d,%u,%u,%u,%u,%u,%u\n", direction[pkt_node->direction], pkt_node->hash, (intmax_t)pkt_node->tval.tv_sec, @@ -530,7 +533,8 @@ siftr_process_pkt(struct pkt_node * pkt_ pkt_node->snd_buf_cc, pkt_node->rcv_buf_hiwater, pkt_node->rcv_buf_cc, - pkt_node->sent_inflight_bytes); + pkt_node->sent_inflight_bytes, + pkt_node->t_segqlen); #ifdef SIFTR_IPV6 } #endif @@ -790,6 +794,7 @@ siftr_siftdata(struct pkt_node *pn, stru pn->rcv_buf_hiwater = inp->inp_socket->so_rcv.sb_hiwat; pn->rcv_buf_cc = inp->inp_socket->so_rcv.sb_cc; pn->sent_inflight_bytes = tp->snd_max - tp->snd_una; + pn->t_segqlen = tp->t_segqlen; /* We've finished accessing the tcb so release the lock. */ if (inp_locally_locked)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201011061021.oA6ALk7x026686>