| Summary: | ifOutOctets are always zero for Xen xn interfaces | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | Base System | Reporter: | Trond Endrestøl <Trond.Endrestol> | ||||||
| Component: | kern | Assignee: | freebsd-xen (Nobody) <xen> | ||||||
| Status: | Closed FIXED | ||||||||
| Severity: | Affects Only Me | CC: | ae, royger | ||||||
| Priority: | --- | Keywords: | patch | ||||||
| Version: | 11.0-STABLE | ||||||||
| Hardware: | amd64 | ||||||||
| OS: | Any | ||||||||
| Attachments: |
|
||||||||
|
Description
Trond Endrestøl
2016-10-13 09:16:16 UTC
Created attachment 175694 [details]
Proposed patch (untested)
Hi,
can you test this patch?
Created attachment 175696 [details]
Proposed patch (untested)
I think this version is more correct, because after xn_txeof() mbuf should be freed. Also removed duplicate OPACKETS accounting.
Could you please upload the patch to reviews.freebsd.org and add me (royger) and liuw_liuw.name as reviewers? Thanks. (In reply to Andrey V. Elsukov from comment #2) I tried the second proposed patch on an identical and least busy system: root@[WITHHELD]:~ # uname -a FreeBSD [WITHHELD] 11.0-STABLE FreeBSD 11.0-STABLE #2 r307213M: Thu Oct 13 16:28:54 CEST 2016 root@[WITHHELD]:/usr/obj/usr/src/sys/XENGUEST amd64 root@[WITHHELD]:~ # snmpget -v 2c -c public localhost 1.3.6.1.2.1.2.2.1.2.2 IF-MIB::ifDescr.2 = STRING: xn0 root@[WITHHELD]:~ # snmpget -v 2c -c public localhost 1.3.6.1.2.1.2.2.1.10.2 IF-MIB::ifInOctets.2 = Counter32: 29079 root@[WITHHELD]:~ # snmpget -v 2c -c public localhost 1.3.6.1.2.1.2.2.1.16.2 IF-MIB::ifOutOctets.2 = Counter32: 24659 root@[WITHHELD]:~ # snmpget -v 2c -c public localhost 1.3.6.1.2.1.2.2.1.2.3 IF-MIB::ifDescr.3 = STRING: xn1 root@[WITHHELD]:~ # snmpget -v 2c -c public localhost 1.3.6.1.2.1.2.2.1.10.3 IF-MIB::ifInOctets.3 = Counter32: 10450 root@[WITHHELD]:~ # snmpget -v 2c -c public localhost 1.3.6.1.2.1.2.2.1.16.3 IF-MIB::ifOutOctets.3 = Counter32: 696 After running for a while, I got this: root@[WITHHELD]:~ # snmpget -v 2c -c public localhost 1.3.6.1.2.1.2.2.1.2.2 ; snmpget -v 2c -c public localhost 1.3.6.1.2.1.2.2.1.10.2 ; snmpget -v 2c -c public localhost 1.3.6.1.2.1.2.2.1.16.2 IF-MIB::ifDescr.2 = STRING: xn0 IF-MIB::ifInOctets.2 = Counter32: 115769 IF-MIB::ifOutOctets.2 = Counter32: 117953 root@[WITHHELD]:~ # snmpget -v 2c -c public localhost 1.3.6.1.2.1.2.2.1.2.3 ; snmpget -v 2c -c public localhost 1.3.6.1.2.1.2.2.1.10.3 ; snmpget -v 2c -c public localhost 1.3.6.1.2.1.2.2.1.16.3 IF-MIB::ifDescr.3 = STRING: xn1 IF-MIB::ifInOctets.3 = Counter32: 67898 IF-MIB::ifOutOctets.3 = Counter32: 696 The low count on ifOutOctets.3 is due to pf filtering and low activity on the xn1 interface. This patch looks promising. I guess this patch can be committed after some more testing. (In reply to Trond.Endrestol from comment #4) I managed to squeeze in a small maintenance window and updated the remaining virtual machines. All worries are gone. The patch allows MRTG to plot outgoing octets and not only incoming octets. xenbot go, to paraphrase the zettabot on the openzfs developer list. Patch look fine to me, do you want me to commit it Andrey? (In reply to Roger Pau Monné from comment #6) > Patch look fine to me, do you want me to commit it Andrey? Yes, please, do it if you think it is good enough, I'm busy with other task now. A commit references this bug: Author: royger Date: Mon Oct 31 11:31:11 UTC 2016 New revision: 308126 URL: https://svnweb.freebsd.org/changeset/base/308126 Log: xen/netfront: fix statistics Fix the statistics used by netfront. Reported by: Trond.Endrestol@ximalas.info Submitted by: ae Reviewed by: royger, Wei Liu <wei.liu2@citrix.com> MFC after: 4 weeks PR: 213439 Changes: head/sys/dev/xen/netfront/netfront.c A commit references this bug: Author: royger Date: Thu Mar 16 09:40:54 UTC 2017 New revision: 315403 URL: https://svnweb.freebsd.org/changeset/base/315403 Log: MFC r308126: xen/netfront: fix statistics PR: 213439 Changes: _U stable/11/ stable/11/sys/dev/xen/netfront/netfront.c batch change of PRs untouched in 2018 marked "in progress" back to open. (In reply to Eitan Adler from comment #10) The patch was committed a long time ago, and everything's fine as far as I can tell. |