Page MenuHomeFreeBSD

Flag hn and storvsc statistics with CTLFLAG_STATS.
ClosedPublic

Authored by dgmorris_earthlink.net on Apr 30 2021, 6:33 PM.
Tags
None
Referenced Files
Unknown Object (File)
Jan 13 2024, 8:42 PM
Unknown Object (File)
Dec 23 2023, 5:14 AM
Unknown Object (File)
Dec 20 2023, 8:28 AM
Unknown Object (File)
Dec 11 2023, 5:19 AM
Unknown Object (File)
Nov 29 2023, 1:53 AM
Unknown Object (File)
Nov 29 2023, 12:06 AM
Unknown Object (File)
Sep 4 2023, 5:00 PM
Unknown Object (File)
Sep 4 2023, 4:56 PM
Subscribers

Details

Summary

Values reported via sysctl as statistics should be so flagged to allow tests, etc. to use the '-W' flag to differentiate such values (and that they are expected to change often).

Initially reported via Dell testing in Azure using a test wrapper around sysctl -aW (pre and post test lists) with the following sysctl's changing/needing to be statistics:

dev.hn.0.csum_ip
dev.hn.0.csum_tcp
dev.hn.0.csum_udp
dev.hn.0.rx.0.packets
dev.hn.0.rx.0.rss_pkts
dev.hn.0.rx.1.packets
dev.hn.0.rx.1.rss_pkts
dev.hn.0.rx.2.packets
dev.hn.0.rx.2.rss_pkts
dev.hn.0.rx.3.packets
dev.hn.0.rx.3.rss_pkts
dev.hn.0.small_pkts
dev.hn.1.csum_ip
dev.hn.1.csum_tcp
dev.hn.1.rx.0.packets
dev.hn.1.rx.0.rss_pkts
dev.hn.1.rx.1.packets
dev.hn.1.rx.1.rss_pkts
dev.hn.1.rx.2.packets
dev.hn.1.rx.2.rss_pkts
dev.hn.1.rx.3.packets
dev.hn.1.rx.3.rss_pkts
dev.hn.1.small_pkts
dev.storvsc.0.data_bio_cnt
dev.storvsc.0.data_vaddr_cnt
dev.storvsc.3.data_bio_cnt

Running on a desktop Hyper-V node on a freshly installed FreeBSD 14 iso (see Test Plan) showed:
Fri Apr 30 10:26:33 PDT 2021
6c6

< dev.hn.0.small_pkts: 49570

dev.hn.0.small_pkts: 50161

9,10c9,10
< dev.hn.0.csum_tcp: 264975

< dev.hn.0.csum_ip: 265096

dev.hn.0.csum_tcp: 265580
dev.hn.0.csum_ip: 265701

16,18c16,18
< dev.hn.0.lro_tried: 264975
< dev.hn.0.lro_flushed: 237314

< dev.hn.0.lro_queued: 264920

dev.hn.0.lro_tried: 265580
dev.hn.0.lro_flushed: 237918
dev.hn.0.lro_queued: 265525

21,22c21,22
< dev.hn.0.rx.3.rss_pkts: 3066

< dev.hn.0.rx.3.packets: 3066

dev.hn.0.rx.3.rss_pkts: 3067
dev.hn.0.rx.3.packets: 3067

29,30c29,30
< dev.hn.0.rx.1.rss_pkts: 51572

< dev.hn.0.rx.1.packets: 51572

dev.hn.0.rx.1.rss_pkts: 52176
dev.hn.0.rx.1.packets: 52176

38,39c38,39
< dev.hn.0.tx_chimney_tried: 232450

< dev.hn.0.tx_chimney: 232450

dev.hn.0.tx_chimney_tried: 233578
dev.hn.0.tx_chimney: 233578

45,46c45,46
< dev.hn.0.tx.3.sends: 2983

< dev.hn.0.tx.3.packets: 3305

dev.hn.0.tx.3.sends: 2984
dev.hn.0.tx.3.packets: 3306

49,50c49,50
< dev.hn.0.tx.1.sends: 79443

< dev.hn.0.tx.1.packets: 82032

dev.hn.0.tx.1.sends: 80570
dev.hn.0.tx.1.packets: 83214

57c57

< dev.storvsc.0.data_vaddr_cnt: 147766

dev.storvsc.0.data_vaddr_cnt: 150603

Test Plan

Run the following command to monitor hn and storvsc for changing sysctl's not already flagged as statistics:

sysctl -aW dev.hn dev.storvsc > first.out ; sleep 120 ; date ; sysctl -aW dev.hn dev.storvsc > second.out ; diff first.out second.out ; rm first.out second.out

Kernel without fix generated output as shown in Summary.

Kernel with fix generates only the date output as expected.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped