Skip to content

Conversation

@bgallagher-nexthop
Copy link
Contributor

@bgallagher-nexthop bgallagher-nexthop commented Jan 7, 2026

Add support for configuring gearbox line-side and system-side signal integrity settings via the media_settings.json configuration file.

Description

See this PR for the HLD describing the high-level design behind this change.

This allows signal integrity settings to be configured for both the line-side and system-side of a gearbox in the following manner:

{
    "GEARBOX_GLOBAL_MEDIA_SETTINGS": {
        "1-31": {
            "line": {
                "COPPER100": {
                    # pre3, pre2, pre1, main, post1, post2, post3
                }
            },
            "system": {
                "COPPER100": {
                    # pre3, pre2, pre1, main, post1, post2, post3
                }
            },
        }
    },
    "GEARBOX_PORT_MEDIA_SETTINGS": {
        "32": {
            "line": {
                "COPPER100": {
                    # pre3, pre2, pre1, main, post1, post2, post3
                }
            },
            "system": {
                "COPPER100": {
                    # pre3, pre2, pre1, main, post1, post2, post3
                }
            },
        }
    }
}

Motivation and Context

Without this, there is currently no way to configure a gearbox's signal integrity settings via media_settings.json. Instead, configuration is solely managed by the gearbox_config.json file. However, that file does not allow dynamic control of SI settings since it is programmed on gearbox initialization -- if new physical media is used, the values in gearbox_config.json need to be updated manually. The media_settings.json file allows specification of different configurations for different physical media, obviating the need to manually update SI settings when using different physical media. Consolidating signal integrity settings configuration into media_settings.json also simplifies the configuration process overall.

How Has This Been Tested?

Added unit tests, all tests pass.

Performed a manual test on a Nexthop device (device/nexthop/x86_64-nexthop_5010-r0):

Which release branch to backport (provide reason below if selected)

  • 202305
  • 202311
  • 202405
  • 202411
  • 202505
  • 202511

I'd like to backport this change to 202511 in order to remove the need to support two different approaches for configuring gearbox TX taps across releases for Nexthop hardware.

@mssonicbld
Copy link
Collaborator

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

Add support for configuring gearbox line-side and system-side
signal integrity settings via the media_settings.json configuration
file. The changes here are following the direction set in the HLD at
https://github.com/sonic-net/SONiC/blob/39d1069500d8c20b71fef012374ca47c66b62e97/doc/media-settings/Dynamic-gearbox-tuning.md.

This allows signal integrity settings to be configured for both the
line-side and system-side of a gearbox in the following manner:
```
{
    "GEARBOX_GLOBAL_MEDIA_SETTINGS": {
        "1-31": {
            "line": {
                "COPPER100": {
                    # pre3, pre2, pre1, main, post1, post2, post3
                }
            },
            "system": {
                "COPPER100": {
                    # pre3, pre2, pre1, main, post1, post2, post3
                }
            },
        }
    },
    "GEARBOX_PORT_MEDIA_SETTINGS": {
        "32": {
            "line": {
                "COPPER100": {
                    # pre3, pre2, pre1, main, post1, post2, post3
                }
            },
            "system": {
                "COPPER100": {
                    # pre3, pre2, pre1, main, post1, post2, post3
                }
            },
        }
    }
}
```

Without this, there is currently no way to configure a gearbox's
signal integrity settings via media_settings.json. Instead,
configuration is solely managed by the gearbox_config.json file.
However, that file does not allow dynamic control of SI settings
since it is programmed on gearbox initialization -- if new
physical media is used, the values in gearbox_config.json need to
be updated manually. The media_settings.json file allows
specification of different configurations for different physical
media, obviating the need to manually update SI settings when
using different physical media. Consolidating signal integrity
settings configuration into media_settings.json also simplifies
the configuration process overall.

Signed-off-by: Brian Gallagher <[email protected]>
@bgallagher-nexthop bgallagher-nexthop force-pushed the bgallagher.gearbox_si_settings branch from 50035b4 to 88bad8a Compare January 7, 2026 17:27
@mssonicbld
Copy link
Collaborator

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

bgallagher-nexthop added a commit to nexthop-ai/sonic-buildimage that referenced this pull request Jan 7, 2026
These previous PRs add support for defining signal integrity settings
for gearboxes via media_settings.json:
- sonic-net/sonic-platform-daemons#728
- sonic-net/sonic-swss#4113

This commit moves all current signal integrity settings for gearboxes
into the media_settings file in the
`device/nexthop/x86_64-nexthop_5010-r0` directory. It also removes the
older configuration via `gearbox_config.json` so that we only have a
single source of truth for all signal integrity configuration on this
platform.

Signed-off-by: Brian Gallagher <[email protected]>
@bgallagher-nexthop bgallagher-nexthop marked this pull request as ready for review January 9, 2026 17:55
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.

2 participants