summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDeepak S <deepak.s@linux.intel.com>2017-09-28 07:44:52 +0530
committerDeepak S <deepak.s@linux.intel.com>2017-09-28 07:46:36 +0530
commitef8aae7214e0dd14d823b26b54dc7ce8eb4e319f (patch)
tree10edc77bc40464cf2fbb5910d01ee42cde038c45
parent98b9571f6720a0da06b1d430e7338a0734023232 (diff)
Fix the cgnapt pipeline stat issues
Change-Id: I58d4a1b6c47fa204a8af67c725b22f797ec19755 Signed-off-by: Deepak S <deepak.s@linux.intel.com>
-rw-r--r--VNFs/vCGNAPT/pipeline/pipeline_cgnapt_be.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/VNFs/vCGNAPT/pipeline/pipeline_cgnapt_be.c b/VNFs/vCGNAPT/pipeline/pipeline_cgnapt_be.c
index f578587e..aaf558e6 100644
--- a/VNFs/vCGNAPT/pipeline/pipeline_cgnapt_be.c
+++ b/VNFs/vCGNAPT/pipeline/pipeline_cgnapt_be.c
@@ -10502,6 +10502,16 @@ void all_cgnapt_stats(char *buf)
len += sprintf(buf + len, "egress %" PRIu64 "\n", p_nat->enaptedPktCount);
len += sprintf(buf + len, "arpicmp pkts %" PRIu64 "\n", p_nat->arpicmpPktCount);
+ printf("pipeline %d stats:\n", p_nat->pipeline_num);
+ printf("Received %" PRIu64 ",", p_nat->receivedPktCount);
+ printf("Missed %" PRIu64 ",", p_nat->missedPktCount);
+ printf("Dropped %" PRIu64 ",", p_nat->naptDroppedPktCount);
+ printf("Translated %" PRIu64 ",", p_nat->naptedPktCount);
+ printf("ingress %" PRIu64 ",", p_nat->inaptedPktCount);
+ printf("egress %" PRIu64 "\n", p_nat->enaptedPktCount);
+ printf("arpicmp pkts %" PRIu64 "\n", p_nat->arpicmpPktCount);
+
+
#ifdef CGNAPT_DEBUGGING
len += sprintf(buf + len, "\n Drop detail 1:%" PRIu64 ",",
@@ -10546,6 +10556,15 @@ void all_cgnapt_stats(char *buf)
len += sprintf(buf + len, "egress %" PRIu64 "\n", enaptedPktCount);
len += sprintf(buf + len, "arpicmp pkts %" PRIu64 "\n", arpicmpPktCount);
+ printf("\nTotal pipeline stats:\n");
+ printf("Received %" PRIu64 ",", receivedPktCount);
+ printf("Missed %" PRIu64 ",", missedPktCount);
+ printf("Dropped %" PRIu64 ",", naptDroppedPktCount);
+ printf("Translated %" PRIu64 ",", naptedPktCount);
+ printf("ingress %" PRIu64 ",", inaptedPktCount);
+ printf("egress %" PRIu64 "\n", enaptedPktCount);
+ printf("arpicmp pkts %" PRIu64 "\n", arpicmpPktCount);
+
if (!rest_api_supported())
printf("%s\n", buf);
}