Skip to content

cli: tag DATA column in 'show interface' summary#1495

Open
troglobit wants to merge 2 commits into
mainfrom
speed-duplex
Open

cli: tag DATA column in 'show interface' summary#1495
troglobit wants to merge 2 commits into
mainfrom
speed-duplex

Conversation

@troglobit
Copy link
Copy Markdown
Contributor

Description

The DATA column in show interface summary previously held a single bare value (MAC for ethernet/veth/gretap/vxlan, empty for gre, etc.). This made it impossible to see operational facts like negotiated speed/duplex without opening the detail view per port.

DATA now carries one or more key:value tokens per row, populating the fields each row type actually has:

Row type DATA
ethernet mac:<MAC> and speed:<rate>-<DUP> when linked
veth mac:<MAC>
vlan vid:<N> (replaces the parent's MAC, which duplicated the └ parent row already drawn underneath)
gre remote:<addr>
gretap mac:<MAC> and remote:<addr>
vxlan mac:<MAC> and vni:<N>

Speed uses a compact <rate>-<DUP> token: 100M-FDX, 1G-FDX, 25G-FDX, HDX for half-duplex. Unit hop M→G at 1 Gbps. Token is omitted when ethtool can't report — no link, no SFP, admin-disabled.

The detail view (show interface <name>) is unchanged and still spells out auto-negotiation, duplex, and speed (Mbps) in full.

Bridge ports, wireguard, wifi, lag, container, and loopback rows already carried the right info — left untouched.

Second commit catches up on a long-overdue show interfacesshow interface rename in docs and the landing page (the plural form was removed from klish years ago; user-facing examples were missed).

Example

admin@rpi-42-a6-03:/> show interface 
⚑ INTERFACE       PROTOCOL   STATE       DATA                                     
  lo              loopback   UP          
                  ipv4                   127.0.0.1/8 (static)
                  ipv6                   ::1/128 (static)
  eth0            ethernet   UP          mac:dc:a6:32:42:a6:03 speed:1G-FDX       
                  ipv6                   fdc2:e5c2:ef3:4a6c:dea6:32ff:fe42:a603/64 (link-layer)
                  ipv6                   fe80::dea6:32ff:fe42:a603/64 (link-layer)
  wifi0           ethernet   DOWN        mac:dc:a6:32:42:a6:04                    
                  wifi                   Station, ssid: ------

Checklist

Tick relevant boxes, this PR is-a or has-a:

  • Bugfix
    • Regression tests
    • ChangeLog updates (for next release)
  • Feature
    • YANG model change => revision updated?
    • Regression tests added?
    • ChangeLog updates (for next release)
    • Documentation added?
  • Test changes
    • Checked in changed Readme.adoc (make test-spec)
    • Added new test to group Readme.adoc and yaml file
  • Code style update (formatting, renaming)
  • Refactoring (please detail in commit messages)
  • Build related changes
  • Documentation content changes
    • ChangeLog updated (for major changes)
  • Other (please describe):

troglobit added 2 commits May 10, 2026 04:23
The summary view's DATA column previously held a single bare value
(MAC for ethernet/veth/gretap/vxlan, empty for gre, etc.).  Add a
key:value-per-token format on the row types where DATA was thin or
actively misleading:

  - ethernet:  mac:<MAC> [speed:<rate>-<DUP>]
  - veth:      mac:<MAC>
  - vlan:      vid:<N>     (was: parent's MAC, duplicate of the
                            └ parent row drawn underneath)
  - gre:       remote:<addr>
  - gretap:    mac:<MAC> [remote:<addr>]
  - vxlan:     mac:<MAC> [vni:<N>]

Speed/duplex use a compact summary token: 100M-FDX, 1G-FDX, 25G-FDX,
HDX for half-duplex.  Unit hop M->G at 1 Gbps.  Token omitted when
ethtool can't report (no link, no SFP).  Detail view (show interface
<name>) is unchanged and still spells out auto-negotiation, duplex,
and speed in full.

Bridge ports, wireguard, wifi, lag, container, and loopback rows
already carried the right info; left untouched.  Updates affected
unit-test snapshots under test/case/statd/* and doc/*.md screenshots.

Closes #530

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
The CLI command was renamed long ago when the plural form was
removed from klish (now only `show interface [name]` exists), but
docs and the landing page still showed the old plural form.  Update
all user-facing examples to match.

Internal subcommand names (cli_pretty's `-t show-interfaces`, test
fixture filenames) and historical ChangeLog entries are intentionally
left as-is.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
@troglobit troglobit linked an issue May 10, 2026 that may be closed by this pull request
@troglobit troglobit requested review from jovatn and rical May 10, 2026 02:59
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.

cli: list speed/duplex of Ethernet ports in show interface

1 participant