summaryrefslogtreecommitdiffstats
path: root/VNFs/DPPD-PROX/stats_task.h
diff options
context:
space:
mode:
authorDeepak S <deepak.s@linux.intel.com>2018-10-31 17:45:16 +0000
committerGerrit Code Review <gerrit@opnfv.org>2018-10-31 17:45:16 +0000
commit9e5b1c09840e5536ad74b4143e31cbd04d7e966c (patch)
treea0319ae58232efecfa1bea9e7f361ed36ff0efec /VNFs/DPPD-PROX/stats_task.h
parent6d005f74525630cd63a759bff8cf2e9ae6b02e88 (diff)
parent085c7a581ff15b46207eb2fe27068f21796a01ca (diff)
Merge "Add support for counting non dataplane related packets"
Diffstat (limited to 'VNFs/DPPD-PROX/stats_task.h')
-rw-r--r--VNFs/DPPD-PROX/stats_task.h16
1 files changed, 16 insertions, 0 deletions
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_ */