summaryrefslogtreecommitdiffstats
path: root/src/internal_api/trex_platform_api.h
diff options
context:
space:
mode:
authorimarom <imarom@cisco.com>2015-11-24 18:40:16 +0200
committerimarom <imarom@cisco.com>2015-11-24 18:40:16 +0200
commit045d0f8f31b2e68b8f726377fabb3205b5d19cf5 (patch)
tree763f96d4bb15f32c64d3e1ec35e82e3309af1faa /src/internal_api/trex_platform_api.h
parentac6f8e7c7c4e957a31c19c1fe4a0997009c6e733 (diff)
added support for percentage on start
also added info about the correct interface driver and speed from DPDK layer
Diffstat (limited to 'src/internal_api/trex_platform_api.h')
-rw-r--r--src/internal_api/trex_platform_api.h18
1 files changed, 18 insertions, 0 deletions
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 <stdint.h>
#include <vector>
+#include <string>
/**
* 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<std::pair<uint8_t, uint8_t>> &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<std::pair<uint8_t, uint8_t>> &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<std::pair<uint8_t, uint8_t>> &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;
};