diff options
author | Yaroslav Brustinov <ybrustin@cisco.com> | 2016-08-18 20:34:13 +0300 |
---|---|---|
committer | Yaroslav Brustinov <ybrustin@cisco.com> | 2016-08-18 23:46:32 +0300 |
commit | 08def8d3b3e909b9bbafcb0f4820a84ab7d522ad (patch) | |
tree | 57d87f1ec9161ae9f2f7dc841fec131c7bcd18b6 /src/internal_api/trex_platform_api.h | |
parent | 1069c2c1b67899515e9769aac5f23642cc85410c (diff) |
TRex argument --dump-interfaces <list of PCI> (by default will take interfaces from /etc/trex_cfg.yaml if exists, if does not exists, will show all DPDK interfaces)
get interface speed from DPDK instead of using constants per driver
add script to generate config file /etc/trex_cfg.yaml: sudo ./dpdk_setup_ports.py -c <list of PCI>
show table of interfaces in sudo ./dpdk_setup_ports.py -t
Diffstat (limited to 'src/internal_api/trex_platform_api.h')
-rw-r--r-- | src/internal_api/trex_platform_api.h | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/src/internal_api/trex_platform_api.h b/src/internal_api/trex_platform_api.h index 7a2a0c8a..a55e8cd7 100644 --- a/src/internal_api/trex_platform_api.h +++ b/src/internal_api/trex_platform_api.h @@ -111,13 +111,6 @@ public: IF_STAT_RX_BYTES_COUNT = 8, // Card support counting rx bytes }; - enum driver_speed_e { - SPEED_INVALID, - SPEED_1G, - SPEED_10G, - SPEED_40G, - }; - struct mac_cfg_st { uint8_t hw_macaddr[6]; uint8_t src_macaddr[6]; @@ -130,7 +123,7 @@ public: */ struct intf_info_st { std::string driver_name; - driver_speed_e speed; + uint32_t speed; mac_cfg_st mac_info; std::string pci_addr; int numa_node; @@ -228,7 +221,7 @@ public: virtual void get_interface_info(uint8_t interface_id, intf_info_st &info) const { info.driver_name = "TEST"; - info.speed = TrexPlatformApi::SPEED_10G; + info.speed = 10000; info.has_crc = true; info.numa_node = 0; |