X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;f=VNFs%2FDPPD-PROX%2Fstats_task.h;h=362b718cf7786cc188063ed60e6267233590981e;hb=176065b0ffb109f66b0ff4b7fcaa38098c6a1a1d;hp=156eb326ba4880225ddfb71c4a8a7dc7ac7e7e33;hpb=cb94e0036256c6a3fb0aadb682a04d8ad30ddd2a;p=samplevnf.git diff --git a/VNFs/DPPD-PROX/stats_task.h b/VNFs/DPPD-PROX/stats_task.h index 156eb326..362b718c 100644 --- a/VNFs/DPPD-PROX/stats_task.h +++ b/VNFs/DPPD-PROX/stats_task.h @@ -45,6 +45,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 +74,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 +119,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 +129,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]; @@ -141,5 +155,7 @@ 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_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_ */