summaryrefslogtreecommitdiffstats
path: root/VNFs/DPPD-PROX/stats_task.h
diff options
context:
space:
mode:
authorXavier Simonart <xavier.simonart@intel.com>2018-10-22 15:46:23 +0200
committerXavier Simonart <xavier.simonart@intel.com>2018-10-28 16:14:57 +0100
commit085c7a581ff15b46207eb2fe27068f21796a01ca (patch)
treea4b3a0a7b702b31d09b51990b8eb74b4618bd7c1 /VNFs/DPPD-PROX/stats_task.h
parentffdcfa6b834d3ad00188ee9805370d6aefc44b4b (diff)
Add support for counting non dataplane related packets
When performing some zero packet loss performance testing on dataplane, it is important (not) to count non dataplane packets. For instance, one might receive uexpected packets from a switch, or ARP packets. Or one might need to transmit ARP packets. Such packets should not be counted as dataplane packets as for thse packets there is no 1:1 mapping between transmitted packets and received packets. To support this, the counters reporting numbers of transmitted and received packets remain unchanged but two new counters have been added to PROX, counting respectively number of received and number of transmitted non-dataplane packets. On RX side, packets are counsidered as non-dataplane if being ARP or if they do not countain the proper signature On TX side, ARP packets are not considered as dataplane packets. This feature requires configuration of signature. "dp core stats" command has been added Change-Id: I98e113cd02f36d540383d343a433592867ad86a9 Signed-off-by: Xavier Simonart <xavier.simonart@intel.com>
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_ */