mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-02 07:13:54 -06:00
Make Slirp statistics gathering and output conditional to LOG_ENABLED
Add 'info slirp' command to monitor to display statistics Disable Slirp debugging code by default git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3451 c046a42c-6fe2-441c-8c8c-71466251a162
This commit is contained in:
parent
7d294b61ed
commit
31a60e2275
22 changed files with 203 additions and 125 deletions
|
@ -80,7 +80,7 @@ ip_output(so, m0)
|
|||
ip->ip_off &= IP_DF;
|
||||
ip->ip_id = htons(ip_id++);
|
||||
ip->ip_hl = hlen >> 2;
|
||||
ipstat.ips_localout++;
|
||||
STAT(ipstat.ips_localout++);
|
||||
|
||||
/*
|
||||
* Verify that we have any chance at all of being able to queue
|
||||
|
@ -112,7 +112,7 @@ ip_output(so, m0)
|
|||
*/
|
||||
if (ip->ip_off & IP_DF) {
|
||||
error = -1;
|
||||
ipstat.ips_cantfrag++;
|
||||
STAT(ipstat.ips_cantfrag++);
|
||||
goto bad;
|
||||
}
|
||||
|
||||
|
@ -137,7 +137,7 @@ ip_output(so, m0)
|
|||
m = m_get();
|
||||
if (m == 0) {
|
||||
error = -1;
|
||||
ipstat.ips_odropped++;
|
||||
STAT(ipstat.ips_odropped++);
|
||||
goto sendorfree;
|
||||
}
|
||||
m->m_data += if_maxlinkhdr;
|
||||
|
@ -170,7 +170,7 @@ ip_output(so, m0)
|
|||
mhip->ip_sum = cksum(m, mhlen);
|
||||
*mnext = m;
|
||||
mnext = &m->m_nextpkt;
|
||||
ipstat.ips_ofragments++;
|
||||
STAT(ipstat.ips_ofragments++);
|
||||
}
|
||||
/*
|
||||
* Update first fragment by trimming what's been copied out
|
||||
|
@ -193,7 +193,7 @@ sendorfree:
|
|||
}
|
||||
|
||||
if (error == 0)
|
||||
ipstat.ips_fragmented++;
|
||||
STAT(ipstat.ips_fragmented++);
|
||||
}
|
||||
|
||||
done:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue