PERFORCE change 133290 for review
Andre Oppermann
andre at FreeBSD.org
Mon Jan 14 16:03:47 PST 2008
http://perforce.freebsd.org/chv.cgi?CH=133290
Change 133290 by andre at andre_flirtbox on 2008/01/15 00:03:16
Fix mbuf accounting.
Affected files ...
.. //depot/projects/tcp_reass/netinet/tcp_reass.c#6 edit
Differences ...
==== //depot/projects/tcp_reass/netinet/tcp_reass.c#6 (text+ko) ====
@@ -142,7 +142,7 @@
struct trq *tqe, *tqen;
struct socket *so = tp->t_inpcb->inp_socket;
struct mbuf *n;
- int i, flags = 0, mcnt = 0;
+ int i, flags = 0, mcnt;
INP_LOCK_ASSERT(tp->t_inpcb);
@@ -184,7 +184,7 @@
}
/* NB: m_adj(m, -i) may free mbufs at the tail of a chain. */
- for (n = m; n; n = n->m_next)
+ for (mcnt = 0, n = m; n; n = n->m_next)
mcnt += (n->m_flags & M_EXT) ? n->m_ext.ext_size : MSIZE;
/* Get rid of packet header and mtags. */
@@ -220,7 +220,7 @@
tcpstat.tcps_rcvpartduppack++;
tcpstat.tcps_rcvpartdupbyte -= i;
/* Update accounting. */
- for (n = m; n; n = n->m_next)
+ for (mcnt = 0, n = m; n; n = n->m_next)
mcnt += (n->m_flags & M_EXT) ?
n->m_ext.ext_size : MSIZE;
}
@@ -307,7 +307,7 @@
tcpstat.tcps_rcvpartduppack++;
tcpstat.tcps_rcvpartdupbyte -= i;
/* Update accounting. */
- for (n = m; n; n = n->m_next)
+ for (mcnt = 0, n = m; n; n = n->m_next)
mcnt += (n->m_flags & M_EXT) ?
n->m_ext.ext_size : MSIZE;
}
More information about the p4-projects
mailing list