From ef8aae7214e0dd14d823b26b54dc7ce8eb4e319f Mon Sep 17 00:00:00 2001
From: Deepak S <deepak.s@linux.intel.com>
Date: Thu, 28 Sep 2017 07:44:52 +0530
Subject: Fix the cgnapt pipeline stat issues

Change-Id: I58d4a1b6c47fa204a8af67c725b22f797ec19755
Signed-off-by: Deepak S <deepak.s@linux.intel.com>
---
 VNFs/vCGNAPT/pipeline/pipeline_cgnapt_be.c | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)

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);
 }
-- 
cgit