Skip to content

Add dropped packet counters to network statistics - #964

Merged
JaewonHur merged 2 commits into
apple:mainfrom
JaewonHur:add-drop-counter
Oct 13, 2026
Merged

JaewonHur merged 2 commits into
apple:mainfrom
JaewonHur:add-drop-counter

Conversation

@JaewonHur

Copy link
Copy Markdown
Contributor

Expose the per-interface rx/tx dropped packet counts from
rtnl_link_stats64 through container statistics. Packets can be dropped
by the device (e.g. a full rx ring or tx queue) without being counted
as errors, so receivedErrors/transmittedErrors alone don't show this
loss.

  • Add receivedDropped and transmittedDropped to the NetworkStats proto
    message (fields 8 and 9) and regenerate the Swift bindings.
  • Populate them in vminitd's statistics RPC from the netlink link stats.
  • Surface them on ContainerStatistics.NetworkStatistics. The new
    initializer parameters default to 0, so existing callers keep
    compiling.
  • Add an integration test covering the new counters.

Comment thread Sources/Containerization/ContainerStatistics.swift Outdated
@JaewonHur
JaewonHur merged commit c411138 into apple:main Oct 13, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants