Re: Interface counter inaccurate

2021-02-16 Thread Daniel Ponte
On Tue, Feb 16, 2021 at 10:39:28AM +0100, Kristof Provost wrote:
[...]
> Even stranger, in that you appear to only have the issue on one of your igb0
> interfaces.
> My initial guess was that there was a driver bug causing it to double count
> the packets.
> 
> That machine has 4 ethernet ports, does it have 4 igbX interfaces as well?
> Are there any vlans configured? (My current thinking is still that it’s a
> driver issue, manifesting only on one of the interfaces because of a
> configuration difference.)
> 
> It may also be useful to try capturing packets on igb0 and correlating the
> number of captured packets with the counters.
> 
> I’m not all that familiar with the igb driver code, so I don’t know if I’ll
> be able to help much.
> 
> Best regards,
> Kristof

It indeed has 4x igb interfaces.

I have been able to further correlate this. The issue is with incoming
packet counters on either interface. When the flow reverses (upload
speedtest vs download speedtest), the inside interface's ingress counter
starts counting double instead.

There is a single, seldom-used vlan, but it is only on the inside
interface. Destroying it made no difference.

Dan
___
freebsd-current@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"


Re: Interface counter inaccurate

2021-02-16 Thread Kristof Provost

On 16 Feb 2021, at 0:58, Daniel Ponte wrote:

On Mon, Feb 15, 2021 at 10:25:47PM +0100, Kristof Provost wrote:

On 15 Feb 2021, at 22:09, Daniel Ponte wrote:
I've noticed that since upgrading to stable/13-n244514-18097ee2fb7c 
from

12.2-STABLE, throughput on my WAN interface (the box runs pf) is
incorrectly showing double in systat -if, as well as in vnstat and 
pftop

from ports. The LAN interface does not appear to be so afflicted.

`systat -if` doesn’t read the pf counters, so I wouldn’t expect 
that to be

related.

Those are the interface counters.
What network card and driver do you use?

Kristof


I, too, questioned the relation. They are igb(4) I210 builtin 
interfaces

(in a Protectli Vault 4).


systat -if during said speed test:

   igb1  in 11.670 Mb/s 11.670 Mb/s
1.067 GB
 out   319.975 Mb/s320.458 Mb/s
2.062 GB


   igb0  in640.120 Mb/s640.690 Mb/s
6.351 GB
 out 5.824 Mb/s  5.824 Mb/s  
987.050 MB


igb1 is inside, igb0 is outside. The 6GB:2GB difference in totals seen 
above
is indeed real; this machine did not initiate that much traffic on its 
own.


Even stranger, in that you appear to only have the issue on one of your 
igb0 interfaces.
My initial guess was that there was a driver bug causing it to double 
count the packets.


That machine has 4 ethernet ports, does it have 4 igbX interfaces as 
well? Are there any vlans configured? (My current thinking is still that 
it’s a driver issue, manifesting only on one of the interfaces because 
of a configuration difference.)


It may also be useful to try capturing packets on igb0 and correlating 
the number of captured packets with the counters.


I’m not all that familiar with the igb driver code, so I don’t know 
if I’ll be able to help much.


Best regards,
Kristof
___
freebsd-current@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"


Re: Interface counter inaccurate

2021-02-15 Thread Daniel Ponte
On Mon, Feb 15, 2021 at 10:25:47PM +0100, Kristof Provost wrote:
> On 15 Feb 2021, at 22:09, Daniel Ponte wrote:
> > I've noticed that since upgrading to stable/13-n244514-18097ee2fb7c from
> > 12.2-STABLE, throughput on my WAN interface (the box runs pf) is
> > incorrectly showing double in systat -if, as well as in vnstat and pftop
> > from ports. The LAN interface does not appear to be so afflicted.
> > 
> `systat -if` doesn’t read the pf counters, so I wouldn’t expect that to be
> related.
> 
> Those are the interface counters.
> What network card and driver do you use?
> 
> Kristof

I, too, questioned the relation. They are igb(4) I210 builtin interfaces
(in a Protectli Vault 4).


systat -if during said speed test:

   igb1  in 11.670 Mb/s 11.670 Mb/s1.067 GB
 out   319.975 Mb/s320.458 Mb/s2.062 GB

   igb0  in640.120 Mb/s640.690 Mb/s6.351 GB
 out 5.824 Mb/s  5.824 Mb/s  987.050 MB 

igb1 is inside, igb0 is outside. The 6GB:2GB difference in totals seen above
is indeed real; this machine did not initiate that much traffic on its own.
___
freebsd-current@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"


Re: Interface counter inaccurate

2021-02-15 Thread Kristof Provost

On 15 Feb 2021, at 22:09, Daniel Ponte wrote:
I've noticed that since upgrading to stable/13-n244514-18097ee2fb7c 
from

12.2-STABLE, throughput on my WAN interface (the box runs pf) is
incorrectly showing double in systat -if, as well as in vnstat and 
pftop

from ports. The LAN interface does not appear to be so afflicted.

`systat -if` doesn’t read the pf counters, so I wouldn’t expect that 
to be related.


Those are the interface counters.
What network card and driver do you use?

Kristof
___
freebsd-current@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"


Interface counter inaccurate

2021-02-15 Thread Daniel Ponte
All,

I've noticed that since upgrading to stable/13-n244514-18097ee2fb7c from
12.2-STABLE, throughput on my WAN interface (the box runs pf) is
incorrectly showing double in systat -if, as well as in vnstat and pftop
from ports. The LAN interface does not appear to be so afflicted.

Running a speedtest on my 300Mb connection shows correctly in systat on a 12.2
client on the LAN, but on the router running 13-STABLE that it traverses, it
shows ~600Mb. Someone suggested I send email here, as the pf counter code has
recently been worked on.

I'm happy to perform further testing, if desired.

Thanks,
Dan
___
freebsd-current@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"