Fix the cgnapt pipeline stat issues 29/43429/1
authorDeepak S <deepak.s@linux.intel.com>
Thu, 28 Sep 2017 02:14:52 +0000 (07:44 +0530)
committerDeepak S <deepak.s@linux.intel.com>
Thu, 28 Sep 2017 02:16:36 +0000 (07:46 +0530)
Change-Id: I58d4a1b6c47fa204a8af67c725b22f797ec19755
Signed-off-by: Deepak S <deepak.s@linux.intel.com>
VNFs/vCGNAPT/pipeline/pipeline_cgnapt_be.c

index f578587..aaf558e 100644 (file)
@@ -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);
 }