Skip to content

msft-preview: runtime and runtime-rs: Add support for non-VF physical network devices to both runtime and runtime-rs#441

Open
sharath-srikanth-chellappa wants to merge 10 commits intomsft-previewfrom
sharathsr/msft-preview/non-vf-support
Open

msft-preview: runtime and runtime-rs: Add support for non-VF physical network devices to both runtime and runtime-rs#441
sharath-srikanth-chellappa wants to merge 10 commits intomsft-previewfrom
sharathsr/msft-preview/non-vf-support

Conversation

@sharath-srikanth-chellappa
Copy link
Copy Markdown

@sharath-srikanth-chellappa sharath-srikanth-chellappa commented Apr 2, 2026

  • Fix TestIsPhysicalIface: remove spurious ParentDevBus from Bridge and fetch link from kernel
  • Fix nil netInfo.Link panic in addSingleEndpoint(): resolve link via netlink.LinkByName when nil
  • Add *PhysicalEndpoint to rate-limiter switches to prevent hard failure: VF → no-op, non-VF → tap interface name
  • Fix PhysicalEndpoint.load() to use s.Physical.NetPair, persist/restore IsVF via persistapi.PhysicalEndpoint
  • Update stale comment on isPhysicalIface() to reflect ParentDevBus-based detection
  • Fix typo in removeTxRateLimiter error message ("adding" → "removing")
  • get_bus_type(): only map ErrorKind::NotFound to Ok(None); propagate all other I/O errors (comment 3033974934)
  • Add RxRateLimiter/TxRateLimiter bool fields to PhysicalEndpoint; SetRxRateLimiter()/SetTxRateLimiter() set the flag and return nil for non-VF (comment 3034009975)

Copilot AI review requested due to automatic review settings April 2, 2026 23:42
@sharath-srikanth-chellappa sharath-srikanth-chellappa requested review from a team and Copilot and removed request for Copilot April 2, 2026 23:43
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR extends Kata’s Go runtime (virtcontainers) and Rust runtime (runtime-rs) to support physical network interfaces that are not SR-IOV VFs (e.g., VMBus-backed NICs) by using tap/bridge networking instead of assuming VFIO passthrough.

Changes:

  • Go: Physical endpoint now branches VF vs non-VF behavior (VFIO passthrough vs tap/bridge connect/disconnect) and persists additional physical endpoint networking state.
  • Go: Physical interface detection switches to using netlink ParentDevBus (PCI/VMBus).
  • Rust: Adds bus-type detection (PCI/VMBus), VF detection, and physical endpoint creation that supports non-VF physical NICs.

Reviewed changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
src/runtime/virtcontainers/physical_endpoint.go Adds VF/non-VF branching, sysfs path handling for PCI/VMBus, persists NetPair/BusType.
src/runtime/virtcontainers/physical_endpoint_test.go Expands unit tests for VF vs non-VF behavior, sysfs-path helpers, save/load behavior.
src/runtime/virtcontainers/persist/api/network.go Extends persisted PhysicalEndpoint schema with NetPair and BusType.
src/runtime/virtcontainers/network_linux.go Updates physical detection callsite and link typing for PhysicalEndpoint.
src/runtime-rs/crates/resource/src/network/utils/link/mod.rs Adds bus-type detection, iface sysfs path resolution, and VF detection helpers.
src/runtime-rs/crates/resource/src/network/network_with_netns.rs Updates physical endpoint creation to pass required params for non-VF setup.
src/runtime-rs/crates/resource/src/network/network_pair.rs Adds NetworkPair::new_for_physical() and tests for VF vs non-VF behavior.
src/runtime-rs/crates/resource/src/network/endpoint/physical_endpoint.rs Implements VF vs non-VF attach/detach logic (VFIO vs network device) and persists added state.
src/runtime-rs/crates/resource/src/network/endpoint/endpoint_persist.rs Extends persisted physical endpoint state with VF/bus metadata.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copilot AI and others added 2 commits April 3, 2026 07:46
… fetch link from kernel

Agent-Logs-Url: https://github.com/microsoft/kata-containers/sessions/37741095-6baf-41d0-be28-31710b28dbb4

Co-authored-by: sharath-srikanth-chellappa <115591284+sharath-srikanth-chellappa@users.noreply.github.com>
…/37741095-6baf-41d0-be28-31710b28dbb4

Co-authored-by: sharath-srikanth-chellappa <115591284+sharath-srikanth-chellappa@users.noreply.github.com>
Copilot AI review requested due to automatic review settings April 3, 2026 07:49
@sharath-srikanth-chellappa sharath-srikanth-chellappa review requested due to automatic review settings April 3, 2026 07:49
…) fix, comment update

Agent-Logs-Url: https://github.com/microsoft/kata-containers/sessions/3a97fe22-9884-4104-a6c0-60981cc1f63f

Co-authored-by: sharath-srikanth-chellappa <115591284+sharath-srikanth-chellappa@users.noreply.github.com>
Copilot AI review requested due to automatic review settings April 3, 2026 18:41
@sharath-srikanth-chellappa sharath-srikanth-chellappa review requested due to automatic review settings April 3, 2026 18:41
Use sysIfaceDevicePath when probing physfn

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings April 3, 2026 18:48
… between integer types'

Correcting the strconv function

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 10 out of 11 changed files in this pull request and generated 2 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…hers

Agent-Logs-Url: https://github.com/microsoft/kata-containers/sessions/f9ce4ef3-9e58-4054-aac8-03c4e016b091

Co-authored-by: sharath-srikanth-chellappa <115591284+sharath-srikanth-chellappa@users.noreply.github.com>
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 10 out of 11 changed files in this pull request and generated 2 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

…VF path

Agent-Logs-Url: https://github.com/microsoft/kata-containers/sessions/3019da9e-d213-4361-9226-4e28fe0114be

Co-authored-by: sharath-srikanth-chellappa <115591284+sharath-srikanth-chellappa@users.noreply.github.com>
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.

4 participants