PERFORCE change 133938 for review

Andre Oppermann andre at FreeBSD.org
Wed Jan 23 11:57:25 PST 2008


http://perforce.freebsd.org/chv.cgi?CH=133938

Change 133938 by andre at 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;


More information about the p4-projects mailing list