Skip to content

chore(deps): replace netlink-* crates with procfs#24765

Draft
pront wants to merge 6 commits intomasterfrom
pront-netlink-update
Draft

chore(deps): replace netlink-* crates with procfs#24765
pront wants to merge 6 commits intomasterfrom
pront-netlink-update

Conversation

@pront
Copy link
Member

@pront pront commented Feb 25, 2026

Summary

Replace netlink socket-based implementation with direct /proc filesystem reads using the procfs crate.

procfs advantages:

  • Actively maintained
  • Simple, synchronous API - reads /proc/net/tcp and /proc/net/tcp6 directly
  • Provides identical data: TcpNetEntry includes state, tx_queue, rx_queue
  • Well-tested, widely used in production Rust systems tooling
  • Minimal dependencies compared to netlink stack

Implementation changes:

  • Removed 4 dependencies: netlink-packet-utils, netlink-packet-sock-diag, netlink-packet-core, netlink-sys
  • Added 1 dependency: procfs (with default-features = false for minimal footprint)
  • Simplified tcp.rs (~50% code reduction)
  • Removed complex async netlink socket handling, message serialization, and manual parsing
  • Maintained identical public API - all metric names unchanged, thus not a user facing change

Vector configuration

TODO needs more testing, still a draft

How did you test this PR?

TODO needs more testing, still a draft

Change Type

  • Bug fix
  • New feature
  • Dependencies
  • Non-functional (chore, refactoring, docs)
  • Performance

Is this a breaking change?

  • Yes
  • No

Does this PR include user facing changes?

  • Yes. Please add a changelog fragment based on our guidelines.
  • No. A maintainer will apply the no-changelog label to this PR.

References

Notes

  • Please read our Vector contributor resources.
  • Do not hesitate to use @vectordotdev/vector to reach out to us regarding this PR.
  • Some CI checks run only after we manually approve them.
    • We recommend adding a pre-push hook, please see this template.
    • Alternatively, we recommend running the following locally before pushing to the remote branch:
      • make fmt
      • make check-clippy (if there are failures it's possible some of them can be fixed with make clippy-fix)
      • make test
  • After a review is requested, please avoid force pushes to help us review incrementally.
    • Feel free to push as many commits as you want. They will be squashed into one before merging.
    • For example, you can run git merge origin master and git push.
  • If this PR introduces changes Vector dependencies (modifies Cargo.lock), please
    run make build-licenses to regenerate the license inventory and commit the changes (if any). More details here.

@pront pront requested a review from a team as a code owner February 25, 2026 15:43
@github-actions github-actions bot added the domain: sources Anything related to the Vector's sources label Feb 25, 2026
@pront pront enabled auto-merge February 25, 2026 15:44
@pront pront added domain: deps Anything related to Vector's dependencies no-changelog Changes in this PR do not need user-facing explanations in the release changelog labels Feb 25, 2026
@thomasqueirozb thomasqueirozb changed the title chore(deps): update netlink-* crates and remove depracated netlink-packet-utils chore(deps): update netlink-* crates and remove deprecated netlink-packet-utils Feb 25, 2026
Copy link
Contributor

@thomasqueirozb thomasqueirozb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

@pront pront marked this pull request as draft February 25, 2026 16:10
auto-merge was automatically disabled February 25, 2026 16:10

Pull request was converted to draft

@pront pront changed the title chore(deps): update netlink-* crates and remove deprecated netlink-packet-utils chore(deps): replace netlink-* crates with procfs Feb 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

domain: deps Anything related to Vector's dependencies domain: sources Anything related to the Vector's sources no-changelog Changes in this PR do not need user-facing explanations in the release changelog

Projects

None yet

Development

Successfully merging this pull request may close these issues.

replace netlink-* crates with procfs

2 participants