From 045d0f8f31b2e68b8f726377fabb3205b5d19cf5 Mon Sep 17 00:00:00 2001 From: imarom Date: Tue, 24 Nov 2015 18:40:16 +0200 Subject: added support for percentage on start also added info about the correct interface driver and speed from DPDK layer --- src/internal_api/trex_platform_api.h | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'src/internal_api/trex_platform_api.h') diff --git a/src/internal_api/trex_platform_api.h b/src/internal_api/trex_platform_api.h index 5890a965..343b8004 100644 --- a/src/internal_api/trex_platform_api.h +++ b/src/internal_api/trex_platform_api.h @@ -24,6 +24,7 @@ limitations under the License. #include #include +#include /** * Global stats @@ -97,10 +98,20 @@ public: class TrexPlatformApi { public: + + enum driver_speed_e { + SPEED_INVALID, + SPEED_1G, + SPEED_10G, + SPEED_40G, + }; + virtual void port_id_to_cores(uint8_t port_id, std::vector> &cores_id_list) const = 0; virtual void get_global_stats(TrexPlatformGlobalStats &stats) const = 0; virtual void get_interface_stats(uint8_t interface_id, TrexPlatformInterfaceStats &stats) const = 0; + virtual void get_interface_info(uint8_t interface_id, std::string &driver_name, driver_speed_e &speed) const = 0; virtual uint8_t get_dp_core_count() const = 0; + virtual ~TrexPlatformApi() {} }; @@ -115,7 +126,9 @@ public: void port_id_to_cores(uint8_t port_id, std::vector> &cores_id_list) const; void get_global_stats(TrexPlatformGlobalStats &stats) const; void get_interface_stats(uint8_t interface_id, TrexPlatformInterfaceStats &stats) const; + void get_interface_info(uint8_t interface_id, std::string &driver_name, driver_speed_e &speed) const; uint8_t get_dp_core_count() const; + }; /** @@ -128,6 +141,11 @@ public: void port_id_to_cores(uint8_t port_id, std::vector> &cores_id_list) const {} void get_global_stats(TrexPlatformGlobalStats &stats) const; void get_interface_stats(uint8_t interface_id, TrexPlatformInterfaceStats &stats) const; + void get_interface_info(uint8_t interface_id, std::string &driver_name, driver_speed_e &speed) const { + driver_name = "MOCK"; + speed = SPEED_INVALID; + } + uint8_t get_dp_core_count() const; }; -- cgit 1.2.3-korg