Skip to content

Add Spectrum-X IPv6 CIDRPool generation - #154

Merged
almaslennikov merged 1 commit into
mainfrom
feat/spectrumx-ipv6-cidrpool
Aug 3, 2026
Merged

Add Spectrum-X IPv6 CIDRPool generation#154
almaslennikov merged 1 commit into
mainfrom
feat/spectrumx-ipv6-cidrpool

Conversation

@almaslennikov

Copy link
Copy Markdown
Collaborator

Summary

  • add standard Spectrum-X IPv6 host-to-leaf allocation using fd02:00PP:RRDD:SSHH::peer
  • render IPv6 /64 static allocations, gateway/exclusion index 2, /40 pools, and plane-aware /32 or /24 routes in all Spectrum-X RA profiles
  • preserve the existing IPv4 allocation and rendering contract
  • cover reference-generator and NVIDIA AIR inputs, topology modes, field validation, rendered YAML, and user/reference/skill documentation

The current topology contract supplies plane, rail, pod, SU, and host indices, so this implements the standard addressing layout from the Spectrum-X deployment guide. Alternative platform-specific layouts that require additional topology fields remain out of scope.

Testing

  • go test -v -race -count=1 ./...
  • make build
  • make build-all
  • go run github.com/golangci/golangci-lint/v2/cmd/golangci-lint@v2.11.0 run ./...
  • mkdocs build --strict

Generate the standard guide-based IPv6 host-to-leaf layout while preserving existing IPv4 output. Render family-specific NV-IPAM settings and routes across all Spectrum-X RA profiles, with allocator, renderer, and documentation coverage.

Signed-off-by: Alexander Maslennikov <amaslennikov@nvidia.com>
@greptile-apps

greptile-apps Bot commented Aug 3, 2026

Copy link
Copy Markdown

Greptile Summary

The PR adds topology-driven Spectrum-X IPv6 CIDRPool generation while preserving existing IPv4 output.

  • Encodes plane, rail, pod, SU, and host indices into per-node IPv6 /64 networks.
  • Generates rail or rail-plane /40 pools, gateway/exclusion index 2, and plane-aware /32 or /24 routes.
  • Parameterizes all Spectrum-X CIDRPool templates for IPv4 and IPv6 and expands tests and documentation.

Confidence Score: 5/5

The PR appears safe to merge; the new IPv6 allocation paths are validated and tested, and the existing IPv4 rendering contract remains intact.

Supported topology fields are range-checked before address construction, generated prefixes are canonicalized, route and pool widths follow the documented plane modes, and templates receive explicit settings for both address families without changing IPv4 values.

Important Files Changed

Filename Overview
pkg/networkoperatorplugin/spectrumx/addressing.go Adds validated IPv6 address construction, generalized pool settings and routes, and a netip-based implementation while retaining equivalent IPv4 behavior.
pkg/networkoperatorplugin/spectrumx/addressing_test.go Covers two- and three-tier IPv6 allocation, plane modes, AIR topology inputs, route widths, and invalid addressing fields.
pkg/networkoperatorplugin/sriov_render_test.go Verifies rendered IPv6 CIDRPool fields, routes, gateways, exclusions, and static allocations.
profiles/spectrum-x/60-cidrpool.yaml Replaces IPv4 constants with generated CIDRPool settings so the profile can render both address families.
profiles/spectrum-x-ra2.2/60-cidrpool.yaml Applies the same address-family-aware CIDRPool rendering to the RA2.2 profile.
profiles/spectrum-x-ra2.1/60-cidrpool.yaml Applies the same address-family-aware CIDRPool rendering to the RA2.1 profile.
docs/user/spectrum-x.md Documents the IPv6 byte layout, prefix sizes, gateway convention, routes, and mode-specific pool grouping.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart LR
    A[Topology JSON] --> B[Normalize host-to-leaf links]
    B --> C{IP version}
    C -->|IPv4| D[Generate per-node /31 allocations]
    C -->|IPv6| E[Encode plane rail pod SU host]
    E --> F[Generate per-node /64 allocations]
    D --> G[Group by rail or rail-plane]
    F --> G
    G --> H[Build CIDRPool settings and routes]
    H --> I[Render Spectrum-X profile manifests]
Loading

Reviews (1): Last reviewed commit: "Add Spectrum-X IPv6 CIDRPool generation" | Re-trigger Greptile

@almaslennikov
almaslennikov merged commit 3770f8d into main Aug 3, 2026
12 checks passed
@almaslennikov
almaslennikov deleted the feat/spectrumx-ipv6-cidrpool branch August 5, 2026 08:26
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.

1 participant