Skip to content

Nvidia hardware profile - #1382

Open
mrbojangles3 wants to merge 5 commits into
masterfrom
nividia_hardware_profile
Open

Nvidia hardware profile#1382
mrbojangles3 wants to merge 5 commits into
masterfrom
nividia_hardware_profile

Conversation

@mrbojangles3

@mrbojangles3 mrbojangles3 commented Mar 26, 2026

Copy link
Copy Markdown
Contributor

closes #1347
In conversation the goal of the validation is to make sure that we don't commit typos in the profile.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Adds NVIDIA (Spectrum-based) Cumulus switch profiles and related schema/validation adjustments so profiles can be validated and port breakout naming can be translated correctly (helping prevent typos in profile definitions).

Changes:

  • Added NVIDIA Spectrum-2/3 silicon identifiers and two new NVIDIA switch profiles (SN3700C, SN4600) to the default Cumulus catalog.
  • Updated SwitchProfile validation and API↔NOS port mapping to better handle Cumulus (MLX/VX) breakout naming.
  • Extended CRDs/docs (and tests) with a new nosFamily field and added a Cumulus-focused port-mapping test case.

Reviewed changes

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

Show a summary per file
File Description
pkg/ctrl/switchprofile/silicons.go Adds Spectrum 2/3 silicon constants for NVIDIA profiles.
pkg/ctrl/switchprofile/p_nv_msn4600.go Introduces NVIDIA SN4600 SwitchProfile definition (ports, breakouts, pipelines).
pkg/ctrl/switchprofile/p_nv_msn3700c.go Introduces NVIDIA SN3700C SwitchProfile definition (ports, breakouts).
pkg/ctrl/switchprofile/catalog.go Registers the new NVIDIA profiles in the default Cumulus profile list.
pkg/ctrl/switchprofile/README.md Adds guidance for gathering platform info and validating breakouts on Cumulus.
docs/api.md Documents the new nosFamily field on port profiles.
config/crd/bases/wiring.githedgehog.com_switchprofiles.yaml Adds nosFamily to SwitchProfile CRD schema.
config/crd/bases/agent.githedgehog.com_agents.yaml Adds nosFamily to Agent CRD schema (embedded SwitchProfile schema).
api/wiring/v1beta1/switchprofile_types_test.go Adds/updates tests for Cumulus port breakout translation behavior.
api/wiring/v1beta1/switchprofile_types.go Adds nosFamily to API type, adjusts validation rules, and updates breakout mapping for Cumulus.

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

Comment thread pkg/ctrl/switchprofile/p_cmls_nvidia_sn4600.go
Comment thread pkg/ctrl/switchprofile/p_cmls_nvidia_sn3700c.go
Comment on lines +668 to 675
nosNameBaseStr, cut := strings.CutPrefix(port.BaseNOSName, DataPortNOSNamePrefix)
if !cut {
return nil, errors.Errorf("port %q base NOS name %q is invalid (no expected prefix)", portName, port.NOSName)
}
nosNameBase, err := strconv.Atoi(nosNameBaseStr)
if err != nil {
return nil, errors.Errorf("port %q NOS name %q breakout mode %q offset %q is invalid (not a number)", portName, port.NOSName, swBreakout, offsetStr)
return nil, errors.Errorf("port %q base NOS name %q is invalid (suffix isn't a number)", portName, port.NOSName)
}

Copilot AI Mar 26, 2026

Copy link

Choose a reason for hiding this comment

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

These errors are reporting the wrong value: they say “base NOS name %q” but format port.NOSName. This makes debugging invalid BaseNOSName values hard. Use port.BaseNOSName in both messages so the user sees the actual base name that failed parsing.

Copilot uses AI. Check for mistakes.
Comment thread api/wiring/v1beta1/switchprofile_types.go Outdated
Comment thread pkg/ctrl/switchprofile/README.md Outdated
Comment thread api/wiring/v1beta1/switchprofile_types.go Outdated
Comment thread api/wiring/v1beta1/switchprofile_types_test.go Outdated
@mrbojangles3
mrbojangles3 force-pushed the nividia_hardware_profile branch from 1b50e3c to 0b1ab4e Compare March 30, 2026 20:25
@mrbojangles3
mrbojangles3 marked this pull request as ready for review March 30, 2026 20:27
@mrbojangles3
mrbojangles3 requested review from a team as code owners March 30, 2026 20:27

@Frostman Frostman left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Didn't yet had a look at the code, just cosmetics first

Comment thread api/wiring/v1beta1/switchprofile_types.go Outdated
Comment thread pkg/ctrl/switchprofile/p_cmls_nvidia_sn3700c.go
Comment thread pkg/ctrl/switchprofile/p_nv_msn3700c.go Outdated
Comment thread pkg/ctrl/switchprofile/p_nv_msn3700c.go Outdated
Comment thread pkg/ctrl/switchprofile/p_cmls_nvidia_sn3700c.go Outdated
Comment thread pkg/ctrl/switchprofile/p_cmls_nvidia_sn4600.go
Comment thread pkg/ctrl/switchprofile/p_nv_msn4600.go Outdated
Comment thread pkg/ctrl/switchprofile/p_nv_msn4600.go Outdated
Comment thread pkg/ctrl/switchprofile/p_cmls_nvidia_sn4600.go Outdated
Comment thread pkg/ctrl/switchprofile/silicons.go Outdated
@mrbojangles3
mrbojangles3 force-pushed the nividia_hardware_profile branch 3 times, most recently from 9ad497e to 28d4660 Compare April 1, 2026 18:36
@mrbojangles3
mrbojangles3 requested a review from Frostman April 1, 2026 21:31
@mrbojangles3
mrbojangles3 force-pushed the nividia_hardware_profile branch from 6479a45 to 2c6adb5 Compare April 3, 2026 16:25
@github-actions

github-actions Bot commented Apr 3, 2026

Copy link
Copy Markdown

🚀 Temp artifacts published: v0-2c6adb515 🚀

@mrbojangles3
mrbojangles3 force-pushed the nividia_hardware_profile branch from 2c6adb5 to 936eff4 Compare April 3, 2026 16:51
@github-actions

github-actions Bot commented Apr 3, 2026

Copy link
Copy Markdown

🚀 Temp artifacts published: v0-936eff433 🚀

@github-actions

github-actions Bot commented Apr 3, 2026

Copy link
Copy Markdown

🚀 Temp artifacts published: v0-df983ecbf 🚀

@mrbojangles3
mrbojangles3 force-pushed the nividia_hardware_profile branch 3 times, most recently from 6155e34 to 3e64862 Compare April 3, 2026 19:36
@github-actions

github-actions Bot commented Apr 3, 2026

Copy link
Copy Markdown

🚀 Temp artifacts published: v0-3e6486284 🚀

@github-actions

github-actions Bot commented Apr 6, 2026

Copy link
Copy Markdown

🚀 Temp artifacts published: v0-950c5db8b 🚀

@Frostman
Frostman force-pushed the nividia_hardware_profile branch from 950c5db to 38a163f Compare April 7, 2026 17:34
@Frostman
Frostman requested review from Copilot and removed request for Copilot April 7, 2026 17:35
@github-actions

Copy link
Copy Markdown

🚀 Temp artifacts published: v0-84e5f67f6 🚀

@mrbojangles3
mrbojangles3 force-pushed the nividia_hardware_profile branch from 84e5f67 to 4737ddb Compare April 21, 2026 16:11
@github-actions

Copy link
Copy Markdown

🚀 Temp artifacts published: v0-4737ddb46 🚀

@github-actions

Copy link
Copy Markdown

🚀 Temp artifacts published: v0-6c9935981 🚀

@github-actions

Copy link
Copy Markdown

🚀 Temp artifacts published: v0-260859149 🚀

@mrbojangles3
mrbojangles3 force-pushed the nividia_hardware_profile branch from 2608591 to a02d1f2 Compare May 4, 2026 14:57
@github-actions

github-actions Bot commented May 4, 2026

Copy link
Copy Markdown

🚀 Temp artifacts published: v0-a02d1f29a 🚀

@mrbojangles3
mrbojangles3 force-pushed the nividia_hardware_profile branch from a02d1f2 to 8c272be Compare May 4, 2026 15:08
@github-actions

github-actions Bot commented May 4, 2026

Copy link
Copy Markdown

🚀 Temp artifacts published: v0-8c272bec1 🚀

@mrbojangles3
mrbojangles3 force-pushed the nividia_hardware_profile branch from 8c272be to 00410c0 Compare June 1, 2026 19:17
@github-actions

github-actions Bot commented Jun 1, 2026

Copy link
Copy Markdown

🚀 Temp artifacts published: v0-00410c0ce 🚀

@mrbojangles3
mrbojangles3 force-pushed the nividia_hardware_profile branch from 00410c0 to a7b5365 Compare June 1, 2026 21:21
@github-actions

github-actions Bot commented Jun 1, 2026

Copy link
Copy Markdown

🚀 Temp artifacts published: v0-a7b53650b 🚀

@mrbojangles3
mrbojangles3 force-pushed the nividia_hardware_profile branch from a7b5365 to 6cea609 Compare June 2, 2026 01:31
@github-actions

github-actions Bot commented Jun 2, 2026

Copy link
Copy Markdown

🚀 Temp artifacts published: v0-6cea609a2 🚀

@mrbojangles3
mrbojangles3 force-pushed the nividia_hardware_profile branch from 6cea609 to 3729d46 Compare June 2, 2026 02:00
@github-actions

github-actions Bot commented Jun 2, 2026

Copy link
Copy Markdown

🚀 Temp artifacts published: v0-3729d462a 🚀

@mrbojangles3
mrbojangles3 force-pushed the nividia_hardware_profile branch from 3729d46 to c1403ae Compare June 4, 2026 14:10
@github-actions

github-actions Bot commented Jun 4, 2026

Copy link
Copy Markdown

🚀 Temp artifacts published: v0-c1403aed2 🚀

@mrbojangles3
mrbojangles3 force-pushed the nividia_hardware_profile branch from c1403ae to f80edbc Compare June 4, 2026 14:24
@github-actions

github-actions Bot commented Jun 4, 2026

Copy link
Copy Markdown

🚀 Temp artifacts published: v0-f80edbc2c 🚀

Signed-off-by: Logan Blyth <logan@githedgehog.com>
Signed-off-by: Logan Blyth <logan@githedgehog.com>
Signed-off-by: Logan Blyth <logan@githedgehog.com>
Signed-off-by: Logan Blyth <logan@githedgehog.com>
Signed-off-by: Logan Blyth <logan@githedgehog.com>
@mrbojangles3
mrbojangles3 force-pushed the nividia_hardware_profile branch from f80edbc to fe9b992 Compare June 4, 2026 15:44
@github-actions

github-actions Bot commented Jun 4, 2026

Copy link
Copy Markdown

🚀 Temp artifacts published: v0-fe9b992f3 🚀

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.

Switch Profiles for Nvidia Gear

3 participants