diff options
author | 2016-02-08 11:25:07 +0200 | |
---|---|---|
committer | 2016-02-24 14:21:29 +0200 | |
commit | f0ab9eba97221e491cf7b3dd846eb8c23d920ec2 (patch) | |
tree | caf0b2f4f9cc0874a53bb3af813d5bae8d644914 /src/internal_api | |
parent | 252b8ab3f41a18af8561cece71cf07bc9872f39f (diff) |
Rx stat per flow. Low level working for xl710, and partly for i350.
added full clone (with CP VM) to stream
Diffstat (limited to 'src/internal_api')
-rw-r--r-- | src/internal_api/trex_platform_api.h | 25 |
1 files changed, 23 insertions, 2 deletions
diff --git a/src/internal_api/trex_platform_api.h b/src/internal_api/trex_platform_api.h index 67288b19..831fd778 100644 --- a/src/internal_api/trex_platform_api.h +++ b/src/internal_api/trex_platform_api.h @@ -31,6 +31,7 @@ limitations under the License. * * @author imarom (06-Oct-15) */ + class TrexPlatformGlobalStats { public: TrexPlatformGlobalStats() { @@ -98,7 +99,12 @@ public: class TrexPlatformApi { public: - + enum driver_stat_capabilities_e { + IF_STAT_IPV4_ID = 1, + IF_STAT_PAYLOAD = 2, + IF_STAT_IPV6_FLOW_LABEL = 4, + }; + enum driver_speed_e { SPEED_INVALID, SPEED_1G, @@ -116,6 +122,11 @@ public: virtual void publish_async_data_now(uint32_t key) const = 0; virtual uint8_t get_dp_core_count() const = 0; + virtual void get_interface_stat_info(uint8_t interface_id, uint16_t &num_counters, uint16_t &capabilities) const =0; + virtual int get_rx_stats(uint8_t port_id, uint64_t *stats, int index, bool reset) const = 0; + virtual void get_port_num(uint8_t &port_num) const = 0; + virtual int add_rx_flow_stat_rule(uint8_t port_id, uint8_t type, uint16_t proto, uint16_t id) const = 0; + virtual int del_rx_flow_stat_rule(uint8_t port_id, uint8_t type, uint16_t proto, uint16_t id) const = 0; virtual ~TrexPlatformApi() {} }; @@ -139,7 +150,11 @@ public: void publish_async_data_now(uint32_t key) const; uint8_t get_dp_core_count() const; - + void get_interface_stat_info(uint8_t interface_id, uint16_t &num_counters, uint16_t &capabilities) const; + int get_rx_stats(uint8_t port_id, uint64_t *stats, int index, bool reset) const; + void get_port_num(uint8_t &port_num) const; + int add_rx_flow_stat_rule(uint8_t port_id, uint8_t type, uint16_t proto, uint16_t id) const; + int del_rx_flow_stat_rule(uint8_t port_id, uint8_t type, uint16_t proto, uint16_t id) const; }; /** @@ -164,6 +179,12 @@ public: void publish_async_data_now(uint32_t key) const {} uint8_t get_dp_core_count() const; + void get_interface_stat_info(uint8_t interface_id, uint16_t &num_counters, uint16_t &capabilities) const + {num_counters = 0; capabilities = 0;} + int get_rx_stats(uint8_t port_id, uint64_t *stats, int index, bool reset) const {return 0;} + void get_port_num(uint8_t &port_num) const {port_num = 2;}; + int add_rx_flow_stat_rule(uint8_t port_id, uint8_t type, uint16_t proto, uint16_t id) const {return 0;} + int del_rx_flow_stat_rule(uint8_t port_id, uint8_t type, uint16_t proto, uint16_t id) const {return 0;} }; #endif /* __TREX_PLATFORM_API_H__ */ |