diff options
Diffstat (limited to 'VNFs/DPPD-PROX/stats_task.h')
-rw-r--r-- | VNFs/DPPD-PROX/stats_task.h | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/VNFs/DPPD-PROX/stats_task.h b/VNFs/DPPD-PROX/stats_task.h index 156eb326..001ebbc7 100644 --- a/VNFs/DPPD-PROX/stats_task.h +++ b/VNFs/DPPD-PROX/stats_task.h @@ -17,6 +17,11 @@ #ifndef _STATS_TASK_H_ #define _STATS_TASK_H_ +#include <rte_common.h> +#ifndef __rte_cache_aligned +#include <rte_memory.h> +#endif + #include <inttypes.h> #include "clock.h" @@ -45,6 +50,8 @@ struct task_rt_stats { uint64_t rx_bytes; uint64_t tx_bytes; uint64_t drop_bytes; + uint64_t rx_non_dp; + uint64_t tx_non_dp; } __attribute__((packed)) __rte_cache_aligned; #ifdef PROX_STATS @@ -72,6 +79,14 @@ struct task_rt_stats { (stats)->rx_pkt_count += ntx; \ } while (0) \ +#define TASK_STATS_ADD_RX_NON_DP(stats, ntx) do { \ + (stats)->rx_non_dp += ntx; \ + } while(0) + +#define TASK_STATS_ADD_TX_NON_DP(stats, ntx) do { \ + (stats)->tx_non_dp += ntx; \ + } while(0) + #define TASK_STATS_ADD_RX_BYTES(stats, bytes) do { \ (stats)->rx_bytes += bytes; \ } while (0) \ @@ -109,6 +124,8 @@ struct task_stats_sample { uint64_t rx_bytes; uint64_t tx_bytes; uint64_t drop_bytes; + uint64_t rx_non_dp; + uint64_t tx_non_dp; }; struct task_stats { @@ -117,6 +134,8 @@ struct task_stats { uint64_t tot_drop_discard; uint64_t tot_drop_handled; uint64_t tot_rx_pkt_count; + uint64_t tot_tx_non_dp; + uint64_t tot_rx_non_dp; struct task_stats_sample sample[2]; @@ -139,7 +158,10 @@ void stats_task_get_host_rx_tx_packets(uint64_t *rx, uint64_t *tx, uint64_t *tsc uint64_t stats_core_task_tot_rx(uint8_t lcore_id, uint8_t task_id); uint64_t stats_core_task_tot_tx(uint8_t lcore_id, uint8_t task_id); +uint64_t stats_core_task_tot_tx_fail(uint8_t lcore_id, uint8_t task_id); uint64_t stats_core_task_tot_drop(uint8_t lcore_id, uint8_t task_id); uint64_t stats_core_task_last_tsc(uint8_t lcore_id, uint8_t task_id); +uint64_t stats_core_task_tot_rx_non_dp(uint8_t lcore_id, uint8_t task_id); +uint64_t stats_core_task_tot_tx_non_dp(uint8_t lcore_id, uint8_t task_id); #endif /* _STATS_TASK_H_ */ |