summaryrefslogtreecommitdiffstats
path: root/src/vlib
diff options
context:
space:
mode:
authorDamjan Marion <damarion@cisco.com>2020-11-25 17:13:38 +0100
committerFlorin Coras <florin.coras@gmail.com>2020-11-25 17:12:53 +0000
commit4a348e86682730a271d6846146d25aaf620e728b (patch)
treebeae2d2bdada74833b7092af056d6eeb1b3c9dbf /src/vlib
parent2113c7f28b154df16af3637f67484971759a00a7 (diff)
pci: add PCIe Gen4 link speed
Type: improvement Change-Id: Iccf4fabe912ab7ac45b6fc082824a67d4fd9f216 Signed-off-by: Damjan Marion <damarion@cisco.com>
Diffstat (limited to 'src/vlib')
-rw-r--r--src/vlib/pci/pci.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/vlib/pci/pci.c b/src/vlib/pci/pci.c
index 2b80533f250..7e96e1f7c6e 100644
--- a/src/vlib/pci/pci.c
+++ b/src/vlib/pci/pci.c
@@ -83,7 +83,7 @@ show_pci_fn (vlib_main_t * vm,
format_unformat_error, input);
}
- vlib_cli_output (vm, "%-13s%-5s%-12s%-13s%-16s%-32s%s",
+ vlib_cli_output (vm, "%-13s%-5s%-12s%-14s%-16s%-32s%s",
"Address", "Sock", "VID:PID", "Link Speed", "Driver",
"Product Name", "Vital Product Data");
@@ -104,7 +104,7 @@ show_pci_fn (vlib_main_t * vm,
if (d->numa_node >= 0)
s = format (s, " %d", d->numa_node);
- vlib_cli_output (vm, "%-13U%-5v%04x:%04x %-13U%-16s%-32v%U",
+ vlib_cli_output (vm, "%-13U%-5v%04x:%04x %-14U%-16s%-32v%U",
format_vlib_pci_addr, addr, s,
d->vendor_id, d->device_id,
format_vlib_pci_link_speed, d,
@@ -164,6 +164,8 @@ format_vlib_pci_link_speed (u8 * s, va_list * va)
return format (s, "5.0 GT/s x%u", width);
if ((r->link_status & 0xf) == 3)
return format (s, "8.0 GT/s x%u", width);
+ if ((r->link_status & 0xf) == 4)
+ return format (s, "16.0 GT/s x%u", width);
return format (s, "unknown");
}