Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 23 Jan 2008 19:57:24 GMT
From:      Andre Oppermann <andre@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 133938 for review
Message-ID:  <200801231957.m0NJvOdT080512@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=133938

Change 133938 by andre@andre_flirtbox on 2008/01/23 19:56:30

	Account for the cluster and its mbuf, not only the cluster.

Affected files ...

.. //depot/projects/tcp_reass/netinet/tcp_reass.c#13 edit

Differences ...

==== //depot/projects/tcp_reass/netinet/tcp_reass.c#13 (text+ko) ====

@@ -253,7 +253,8 @@
 
 	/* NB: m_adj(m, -i) may free mbufs at the tail of a chain. */
 	for (mcnt = 0, n = m; n; n = n->m_next)
-		mcnt += (n->m_flags & M_EXT) ? n->m_ext.ext_size : MSIZE;
+		mcnt += (n->m_flags & M_EXT) ?
+		    n->m_ext.ext_size + MSIZE : MSIZE;
 
 	/* Check if this segment attaches to the end. */
 	tqe = TAILQ_LAST(&tp->t_trq, trq_head);
@@ -297,7 +298,7 @@
 				/* Update accounting. */
 				for (mcnt = 0, n = m; n; n = n->m_next)
 					mcnt += (n->m_flags & M_EXT) ?
-					    n->m_ext.ext_size : MSIZE;
+					    n->m_ext.ext_size + MSIZE : MSIZE;
 			}
 			tqe->trq_len += *tlenp;
 			tqe->trq_mcnt += mcnt;
@@ -373,7 +374,7 @@
 				/* Update accounting. */
 				for (mcnt = 0, n = m; n; n = n->m_next)
 					mcnt += (n->m_flags & M_EXT) ?
-					    n->m_ext.ext_size : MSIZE;
+					    n->m_ext.ext_size + MSIZE : MSIZE;
 			}
 			tqe->trq_len += *tlenp;
 			tqe->trq_mcnt += mcnt;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200801231957.m0NJvOdT080512>