MCPcopy Create free account
hub / github.com/F-Stack/f-stack / port_summary_display

Function port_summary_display

dpdk/app/test-pmd/config.c:968–999  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

966}
967
968void
969port_summary_display(portid_t port_id)
970{
971 struct rte_ether_addr mac_addr;
972 struct rte_eth_link link;
973 struct rte_eth_dev_info dev_info;
974 char name[RTE_ETH_NAME_MAX_LEN];
975 int ret;
976
977 if (port_id_is_invalid(port_id, ENABLED_WARN)) {
978 print_valid_ports();
979 return;
980 }
981
982 ret = eth_link_get_nowait_print_err(port_id, &link);
983 if (ret < 0)
984 return;
985
986 ret = eth_dev_info_get_print_err(port_id, &dev_info);
987 if (ret != 0)
988 return;
989
990 rte_eth_dev_get_name_by_port(port_id, name);
991 ret = eth_macaddr_get_print_err(port_id, &mac_addr);
992 if (ret != 0)
993 return;
994
995 printf("%-4d " RTE_ETHER_ADDR_PRT_FMT " %-12s %-14s %-8s %s\n",
996 port_id, RTE_ETHER_ADDR_BYTES(&mac_addr), name,
997 dev_info.driver_name, (link.link_status) ? ("up") : ("down"),
998 rte_eth_link_speed_to_str(link.link_speed));
999}
1000
1001void
1002port_eeprom_display(portid_t port_id)

Callers 1

cmd_showport_parsedFunction · 0.85

Calls 8

port_id_is_invalidFunction · 0.85
print_valid_portsFunction · 0.85
printfFunction · 0.50

Tested by

no test coverage detected