Skip to content

swadm link serdes set tx-eq should require at least one gain value #145

@bnaecker

Description

@bnaecker

See:

dendrite/swadm/src/link.rs

Lines 214 to 233 in b3cdd09

/// Update the tx equalization settings for this port. Only the main setting is
/// required. All others will default to 0. Note: to set a negative value,
/// you must use the "=" option syntax. e.g., "--pre1=-1"
#[clap(visible_alias = "txeq")]
TxEq {
/// The link path, specified as `switch_port/link`.
///
/// For example `rear0/0` is the first link on the rear0 switch port.
link_path: LinkPath,
#[clap(long)]
pre2: Option<i32>,
#[clap(long)]
pre1: Option<i32>,
#[clap(long)]
main: Option<i32>,
#[clap(long)]
post1: Option<i32>,
#[clap(long)]
post2: Option<i32>,
},

The comment says that swadm link serdes set tx-eq requires at least one value for the gains. That's a good idea, but the code actually lets you set none of them, in which case they're all defaulted to zero. We should disallow that, and require at least one.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions