Code Review
/
vpp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
pci: add PCIe Gen4 link speed
[vpp.git]
/
src
/
vlib
/
pci
/
pci.c
diff --git
a/src/vlib/pci/pci.c
b/src/vlib/pci/pci.c
index
2b80533
..
7e96e1f
100644
(file)
--- 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);
}
format_unformat_error, input);
}
- vlib_cli_output (vm, "%-13s%-5s%-12s%-1
3
s%-16s%-32s%s",
+ vlib_cli_output (vm, "%-13s%-5s%-12s%-1
4
s%-16s%-32s%s",
"Address", "Sock", "VID:PID", "Link Speed", "Driver",
"Product Name", "Vital Product Data");
"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);
if (d->numa_node >= 0)
s = format (s, " %d", d->numa_node);
- vlib_cli_output (vm, "%-13U%-5v%04x:%04x %-1
3
U%-16s%-32v%U",
+ vlib_cli_output (vm, "%-13U%-5v%04x:%04x %-1
4
U%-16s%-32v%U",
format_vlib_pci_addr, addr, s,
d->vendor_id, d->device_id,
format_vlib_pci_link_speed, d,
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);
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");
}
return format (s, "unknown");
}