Date: Thu, 12 May 2022 17:41:51 +0000 From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 237915] "netstat -i" for ixl/lagg shows idrop as 18446744073709551612 (-4) - incorrectly intialized counters? Message-ID: <bug-237915-227-IBEsAdpoqZ@https.bugs.freebsd.org/bugzilla/> In-Reply-To: <bug-237915-227@https.bugs.freebsd.org/bugzilla/>
index | next in thread | previous in thread | raw e-mail
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=237915 Brian Poole <brian90013@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #233858|0 |1 is obsolete| | --- Comment #3 from Brian Poole <brian90013@gmail.com> --- Created attachment 233877 --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=233877&action=edit Revised v2 patch to fix counters My apologies but the first patch should not be used. It placed the vsi_reset_stats() call in initialize_vsi() which gets called every time the interface comes up. Someone watching the interface with 'netstat -I xxx -w 1' will see a jump near 2^64 as the counters are reset. Therefore I moved the vsi_reset_stats() call to if_attach_post() where it is right next to the pf_reset_stats() call. This function is not called when an interface flaps down and then back up. I also removed the call to update_stats_counters() in if_attach_post(). Now the only call to update_stats_counters() is in if_timer(). This matches the behavior of the ice driver and produces the expected results in my testing. Elapsed metrics are all 0 on boot and periodic metrics don't jump when an interface comes up. -- You are receiving this mail because: You are the assignee for the bug.home | help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-237915-227-IBEsAdpoqZ>
