On Thu, Aug 16, 2018 at 10:51:25AM +1000, Jason Tubnor wrote:
> Hi,
> 
> Not sure if anyone else here is using SNMP for obtaining VXLAN(4) adapter
> throughput but after some testing (clamping with PF queues), I have
> discovered that throughput on VXLAN interfaces via SNMP are reporting
> exactly double the data throughput than what is measured either through
> iperf or pfctl -vvsq .  Regular interfaces on the machine below (vmx) are
> reporting correctly.
> 
> Am I missing something here or could it be a potential bug in the VXLAN
> code in how it reports into snmpd?

The vxlan driver counts something that the network stack does for it
now. The diff below fixes the problem if you want to try it, but I will
be committing it soon.

Cheers,
dlg

Index: if_vxlan.c
===================================================================
RCS file: /cvs/src/sys/net/if_vxlan.c,v
retrieving revision 1.67
diff -u -p -r1.67 if_vxlan.c
--- if_vxlan.c  20 Feb 2018 01:20:37 -0000      1.67
+++ if_vxlan.c  17 Aug 2018 01:36:55 -0000
@@ -929,9 +929,6 @@ vxlan_output(struct ifnet *ifp, struct m
                bridge_tunneluntag(m);
 #endif
 
-       ifp->if_opackets++;
-       ifp->if_obytes += m->m_pkthdr.len;
-
        m->m_pkthdr.ph_rtableid = sc->sc_rdomain;
 
 #if NPF > 0

Reply via email to