← Back to Pull requests

oke: give pods IPvlan children with static addresses on an IPv6 fabric #394

Closed
unknown closed this pull request without merging on Oct 28, 2026 18:45 UTC
View on GitHub
unknown unknown commented on Oct 20, 2026 05:09 UTC
Author

What type of PR is this?

/kind feature

What this PR does / why we need it:

On an IPv6 RDMA fabric (oke.dra.net/rdmaFabricIpv6: true, e.g. BM.GPU.B300.8), the rail routers advertise one /64 per RDMA NIC of each host, and the host autoconfigures the NIC from it. The oke-rdma profile had no IPv6 support. GetDeviceConfig returned nothing for these NICs, so a claim moved the RDMA NIC into the pod and took it from the host. The node health checks read it there: on multi-planar shapes the check requires every rdma_vf_rail<N> in the host namespace with its address and RA default route.

This PR resolves the profile on an IPv6 fabric into an IPvlan child, as it already does on an IPv4 fabric, using only what the host already has. No router advertisement reaches the pod and no SLAAC runs there. The driver and the API are unchanged; everything is in pkg/cloudprovider/oke.

  • GetDeviceConfig advertises the profile for two kinds of NIC:

  • - Ethernet rdmaN NICs;
    - the rail VFs of multi-planar shapes, rdma_vf_rail<N>. They get it regardless of the fabric metadata, because the inventory can be scanned before IMDS answers.

    A PCI function that carries several netdevs, one of them with an RDMA name, gets the profile without a type, like a native InfiniBand NIC. Examples: the PF of a rail with its rdma_p<P>_rail<N> plane netdevs and the rdma<N> PF or representor, or a PF in switchdev mode with VF representors. A claim for it then fails instead of moving it.

  • GetProfileConfig on an IPv6 fabric returns:

  • - The child. An IPvlan child with one static address in the parent's autoconfigured /64. The interface identifier is a SHA-256 of the claim UID and the parent name, so a retried prepare gets the same address and the next claim a new one. RFC 5453 reserved identifiers and the parent's own addresses are skipped.
    - acceptRA: 0. A pod namespace left at the kernel defaults then does not autoconfigure a second address, GID and default route next to the static one.
    - Source routing, as on an IPv4 fabric. A link route for the /64 and the default route through the parent's IPv6 default router go in a table of their own, plus a rule from the child's address:
    - table 100+N for rdmaN, 116+N for rdma_vf_rail<N>;
    - one table per NIC is what keeps the rails apart, since every rail's default route is ::/0;
    - RoCE resolves a GID's peers with the GID's address as the source, so each child reaches its peers through its own rail.
  • Host data.

  • - Prefix. The /64 comes from a usable parent address. Deprecated, tentative and DAD-failed addresses are ignored, so the old prefix of a renumbered fabric does not count while it expires.
    - Router. It comes from the parent's IPv6 default route in any table. On multi-planar hosts RA routes land in the parent's VRF table, and multipath routes are included.
    - When either is missing, prepare fails and Kubernetes retries it. If the only default routes are ones whose next hop the profile cannot read (for example through a nexthop object), the error says so.
    - Both are read once per claim (see the working conditions below).
  • Rejected:

  • - as before: Passthrough, DHCP, unnumbered addressing and claim addresses;
    - new: an acceptRA other than 0;
    - new: interface.vrf. Joining a VRF cycles the child, and the kernel drops its IPv6 addresses on the way down unless keep_addr_on_down is set (#390).

    Claim routes/rules still make the routing the claim's own.

  • IPv4 fabrics: two new refusals, both of which used to move the netdev into the pod:

  • - A PCI function shared with an RDMA netdev is refused on every fabric. That includes a PF in switchdev mode with VF representors.
    - A claim for an rdma_vf_rail<N> VF fails on an IPv4 fabric with its own error, instead of being resolved with the OCA layout meant for rdmaN.

    Nothing else on an IPv4 fabric changes, and the existing IPv4 checks keep their order.

  • Docs: a new "IPv6 RDMA fabrics" section in site/content/docs/user/oci-oke-rdma.md, and the refusals in the profile section.
  • Working conditions

    | Condition | Status |
    |---|---|
    | IPv6 RDMA fabric, multi-planar rail VFs (rdma_vf_rail<N>) | Works, tested on hardware |
    | IPv6 RDMA fabric, rdmaN NIC with a PCI function of its own | Unit tests only: no such hardware was available |
    | RDMA subsystem in shared netns mode (netns_mode=1) | Required; exclusive mode fails the claim, as on IPv4 |
    | Pod network namespace with IPv6 enabled, single-stack IPv4 cluster (Cilium, enable-ipv6=false) | Works, tested on hardware |
    | Pod network namespace with IPv6 enabled, dual-stack cluster | Expected to work: the child's traffic is source-routed in its own table. Not tested |
    | Pod network namespace with IPv6 disabled by the CNI (disable_ipv6=1 on all/default, as the OCI VCN-Native CNI does on IPv4-only clusters) | Does not work: the pod never starts, with failed to set up address …: permission denied. Reproduced on hardware. A stacked follow-up PR fixes it with interface.disableIPv6 |
    | Fabric renumbers the prefix, or the rail router changes, while the pod runs | The child keeps the old prefix/router until the pod is recreated (it ignores RAs by design); the host follows the new RAs |
    | interface.vrf on the claim | Refused until #390 keeps the addresses |
    | Host default route only through a nexthop object (e.g. installed by FRR) | Refused with an error saying so; kernel RA routes are not affected |

    Which issue(s) this PR is related to:

    N/A — no tracking issue. Related:

  • #325: the fabric discovery that publishes rdmaFabricIpv6.

  • #341: acceptRA.

  • #390: keeps IPv6 addresses across a VRF join, which would let this profile allow interface.vrf.

  • #371 and #391: SLAAC addressing, which this profile does not need.
  • Special notes for your reviewer:

  • Tested live on two BM.GPU.B300.8 nodes: a multi-planar IPv6 fabric with 8 rdma_vf_rail<N> VFs each, the RDMA subsystem in shared netns mode, and Cilium on an IPv4-only cluster. The claims set only interface.type: IPVLAN; the profile did the rest.

  • - This revision (2026-10-20): ib_write_bw between two pods' children on all 8 rails: 464.7–465.0 Gb/s on 7 rails. Rail 2 read 112 Gb/s in the 8-rail run and 464.8 Gb/s when rerun alone with a new claim. That looks like a transient fabric dip: the site's own multi-node health checks were running ib_write_bw on other nodes at the time, though that was not confirmed. Every child had one global address, GID index 5, accept_ra=0 and its table 116+N, and pinged its peer.
    - IPv6-disabled pod namespace, emulated with pod sysctls net.ipv6.conf.{all,default}.disable_ipv6=1: both pods stayed in ContainerCreating, with failed to set up address fdcd:…/64: permission denied on every rail. The harness deleted the claims and pods; afterward the host check passed and no IPvlan link was left on either host.
    - Earlier revision, same emitted config: a 16-rank NCCL all_reduce across the two nodes, on the pod network and unprivileged, reached 707–714 GB/s busbw over three runs. It used NCCL_IB_ADDR_FAMILY=AF_INET6 and left NCCL_IB_GID_INDEX unset; NCCL picked the child's RoCE v2 GID, index 5. This revision changes only error paths and docs, and the unit-test expectations for the emitted config are unchanged.
    - Host VFs: they kept their address, RA default route and GID index 3 throughout. This was checked with a replica of the site health check before, during and after each run.
    - SLAAC is not required for the fabric to route the child: the rail router handles the whole /64. For comparison, the software-SLAAC series (#390, #391 and its driver follow-up) and the pod kernel's own RA processing reached the same rates on the same nodes.
  • Behaviour to know:

  • - Traffic other than RoCE must use the child's address as its source. A socket bound only to the interface finds no route, as with the IPv4 profile.
    - The static address goes through DAD, so an app binding within about a second of start can get EADDRNOTAVAIL. Skipping DAD needs a driver API field and is left for a follow-up.
    - On an IPv6 fabric the profile owns the rail VFs, so the other addressing modes (e.g. Unnumbered) are refused there, as on IPv4.
  • The IPv6 link route keeps Scope: RT_SCOPE_LINK, although the kernel ignores the scope of an IPv6 route. The driver's validation requires a gateway on a universe-scope route and applies link routes first; without the scope the merged config fails validation. The new namespaced test caught that.

  • Tests:

  • - Unit tests in pkg/cloudprovider/oke (ipv6_test.go). Expected addresses are pinned from an independent computation. They cover:
    - route filtering, including unreadable nexthop-object routes;
    - address flags;
    - the fail-closed guards and rejections;
    - both refusals on an IPv4 fabric.
    - New namespaced driver test TestSubinterface_IPVlanIPv6SourceRouting. It merges the profile's output into a claim that sets only the type, then checks:
    - the IPvlan child is created;
    - the table routes through a link-local router are applied;
    - the priority-32000 rule exists;
    - a lookup from the child's address goes through the router, and one without a source gets ENETUNREACH.
    - Suite results: golangci-lint reports 0 issues. go test ./pkg/... ./internal/... ./cmd/... in a privileged container passes except TestPrepareResourceClaim, which fails identically on main (eb20f65).

    Does this PR introduce a user-facing change?

    ``release-note
    OKE: on an IPv6 RDMA fabric, claims for RDMA NICs (rdmaN) and multi-planar rail VFs (rdma_vf_rail<N>) now get an IPvlan child with a static address in the NIC's /64, acceptRA 0 and per-NIC source routing, instead of moving the NIC into the pod. Requires the RDMA subsystem in shared netns mode and IPv6 enabled in the pod network namespace. On every fabric, a claim for a PCI function that carries several netdevs, one of them an RDMA netdev (such as a rail PF or a switchdev PF with VF representors), now fails instead of moving it into the pod; on an IPv4 fabric a claim for a rail VF fails.
    ``

    Diff: 650 lines (+487 / -163) across 8 files Reviewer: aojea Review duration: 12336m
    All Vouch review confidence checks passed
    Residual risk 0.22 = Change Risk (0.52) × (1 − Review Confidence (0.57)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.52 · 650 lines diff across 8 files
    0.52
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.17 · 1 substantive comment(s)
    0.17
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    56%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Diff Size diff_size
    0.388
    Shallow Review Depth shallow_review_depth
    0.289
    Real PR Conversation Timeline
    1 comments
    "Review active on #394"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 56.8% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 52% (MEDIUM) · Higher = larger blast radius
    52%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 56.8% · Lower = rushed or shallow review
    56.8%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 22.5% · Safe to merge
    22.5%