Page MenuHomeFreeBSD

iflib: Make txq mp ring stats persistent
Needs ReviewPublic

Authored by zlei on Sun, Sep 22, 5:13 PM.

Details

Reviewers
jhb
erj
shurd
Group Reviewers
iflib
Summary

Those stats get reset on every iflib_stop(), e.g., ifconfig em0 -tso.
However it is harmless if they persist. Currenty they are retrived only
via sysctl. A upcoming fix will make use of drops to correctly report
output dropped packets of an interface. With this change we will not
have to save the drops stat on every iflib_stop(), then the code will
be simpler.

MFC after: 2 weeks

Test Plan

Verify the txq mp ring stats persist after changing interface flags.

# sysctl dev.igc.0 | grep txq | grep enqueues
dev.igc.0.iflib.txq3.r_enqueues: 0
dev.igc.0.iflib.txq2.r_enqueues: 0
dev.igc.0.iflib.txq1.r_enqueues: 0
dev.igc.0.iflib.txq0.r_enqueues: 4

# ifconfig igc0 -tso
# sysctl dev.igc.0 | grep txq | grep enqueues
dev.igc.0.iflib.txq3.r_enqueues: 0
dev.igc.0.iflib.txq2.r_enqueues: 0
dev.igc.0.iflib.txq1.r_enqueues: 0
dev.igc.0.iflib.txq0.r_enqueues: 4

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped