summaryrefslogtreecommitdiffstats
path: root/src/internal_api
diff options
context:
space:
mode:
authorimarom <imarom@cisco.com>2015-11-03 16:29:07 +0200
committerimarom <imarom@cisco.com>2015-11-03 16:29:07 +0200
commitc0a49eef86df00d9497fa5701d5b9d4cbf4bacc2 (patch)
tree70aa7b0d40fd85ea1ea75d53ed29dfcff891f0ef /src/internal_api
parent1be6a146c9dfaf599528e8fde151c25b0bc9cb70 (diff)
now support multiple interfaces / ports
Diffstat (limited to 'src/internal_api')
-rw-r--r--src/internal_api/trex_platform_api.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/internal_api/trex_platform_api.h b/src/internal_api/trex_platform_api.h
index 5c2d42d2..5890a965 100644
--- a/src/internal_api/trex_platform_api.h
+++ b/src/internal_api/trex_platform_api.h
@@ -23,6 +23,7 @@ limitations under the License.
#define __TREX_PLATFORM_API_H__
#include <stdint.h>
+#include <vector>
/**
* Global stats
@@ -96,6 +97,7 @@ public:
class TrexPlatformApi {
public:
+ 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 uint8_t get_dp_core_count() const = 0;
@@ -110,6 +112,7 @@ public:
*/
class TrexDpdkPlatformApi : public TrexPlatformApi {
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;
uint8_t get_dp_core_count() const;
@@ -122,6 +125,7 @@ public:
*/
class TrexMockPlatformApi : public TrexPlatformApi {
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;
uint8_t get_dp_core_count() const;