summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDeepak S <deepak.s@linux.intel.com>2017-08-14 12:14:16 +0530
committerDeepak S <deepak.s@linux.intel.com>2017-08-14 12:25:46 +0530
commiteaaf57ee5a877c4744afb899e46536e5a281cf7a (patch)
tree8a1dd00160276907a7ff3df6b32b0712ce9646e9
parent71f3317e3bab69a75ef814b187dc704198455bca (diff)
Moving printf under cgnapt_dbg_print
JIRA: SAMPLEVNF-71 Change-Id: Ibcd70008e1657eaa0b2f95aac319483490c290aa Signed-off-by: Deepak S <deepak.s@linux.intel.com>
-rw-r--r--VNFs/vCGNAPT/pipeline/pipeline_cgnapt.c4
-rw-r--r--VNFs/vCGNAPT/pipeline/pipeline_cgnapt_be.c33
-rw-r--r--common/VIL/l2l3_stack/lib_arp.c3
3 files changed, 25 insertions, 15 deletions
diff --git a/VNFs/vCGNAPT/pipeline/pipeline_cgnapt.c b/VNFs/vCGNAPT/pipeline/pipeline_cgnapt.c
index 239d34f9..fb0b95d1 100644
--- a/VNFs/vCGNAPT/pipeline/pipeline_cgnapt.c
+++ b/VNFs/vCGNAPT/pipeline/pipeline_cgnapt.c
@@ -475,7 +475,9 @@ app_pipeline_cgnapt_delete_entry(struct app_params *app,
/* Read response */
if (rsp->status || !rsp->key_found) {
app_msg_free(app, rsp);
- printf("Successfully deleted the entry\n");
+ #ifdef CGNAPT_DBG_PRNT
+ printf("Successfully deleted the entry\n");
+ #endif
return 0;
}
diff --git a/VNFs/vCGNAPT/pipeline/pipeline_cgnapt_be.c b/VNFs/vCGNAPT/pipeline/pipeline_cgnapt_be.c
index 6c9c8f63..eb0aca96 100644
--- a/VNFs/vCGNAPT/pipeline/pipeline_cgnapt_be.c
+++ b/VNFs/vCGNAPT/pipeline/pipeline_cgnapt_be.c
@@ -662,7 +662,7 @@ void hw_checksum(struct rte_mbuf *pkt, enum PKT_TYPE ver)
prot_offset = PROT_OFST_IP4 + temp;
break;
default:
- printf("hw_checksum: pkt version is invalid\n");
+ printf("hw_checksum: pkt version is invalid\n");
}
protocol = (uint8_t *) RTE_MBUF_METADATA_UINT8_PTR(pkt,
prot_offset);
@@ -710,7 +710,9 @@ void hw_checksum(struct rte_mbuf *pkt, enum PKT_TYPE ver)
break;
default:
- printf("hw_checksum() : Neither TCP or UDP pkt\n");
+ #ifdef CGNAPT_DEBUGGING
+ printf("hw_checksum() : Neither TCP or UDP pkt\n");
+ #endif
break;
}
}
@@ -768,7 +770,7 @@ void sw_checksum(struct rte_mbuf *pkt, enum PKT_TYPE ver)
prot_offset = PROT_OFST_IP4 + temp;
break;
default:
- printf("sw_checksum: pkt version is invalid\n");
+ printf("sw_checksum: pkt version is invalid\n");
}
protocol = (uint8_t *) RTE_MBUF_METADATA_UINT8_PTR(pkt,
prot_offset);
@@ -821,7 +823,9 @@ void sw_checksum(struct rte_mbuf *pkt, enum PKT_TYPE ver)
break;
default:
- printf("sw_checksum() : Neither TCP or UDP pkt\n");
+ #ifdef CGNAPT_DEBUGGING
+ printf("sw_checksum() : Neither TCP or UDP pkt\n");
+ #endif
break;
}
}
@@ -868,7 +872,6 @@ static uint8_t check_arp_icmp(
/* ARP outport number */
uint16_t out_port = p_nat->p.n_ports_out - 1;
- printf("check_arp_icmp called*****\n");
uint8_t *protocol;
uint32_t prot_offset;
@@ -1048,8 +1051,10 @@ int napt_port_alloc_init(struct pipeline_cgnapt *p_nat)
uint32_t vnf_set_num = p_nat->vnf_set;
/*uint32_t vnf_set_num = get_vnf_set_num(p_nat->pipeline_num); */
- printf("VNF set number for CGNAPT %d is %d.\n", p_nat->pipeline_num,
- vnf_set_num);
+ #ifdef CGNAPT_DBG_PRNT
+ printf("VNF set number for CGNAPT %d is %d.\n", p_nat->pipeline_num,
+ vnf_set_num);
+ #endif
if (vnf_set_num == 0xFF) {
printf("VNF set number for CGNAPT %d is invalid %d.\n",
p_nat->pipeline_num, vnf_set_num);
@@ -4920,7 +4925,6 @@ pkt4_work_cgnapt_ipv4_pub(
#ifdef CGNAPT_DEBUGGING
p_nat->naptDroppedPktCount3++;
#endif
- printf("causing p_nat->naptDroppedPktCount3\n");
continue;
}
@@ -8861,7 +8865,6 @@ void *pipeline_cgnapt_msg_req_entry_add_handler(struct pipeline *p, void *msg)
printf("PhyPort %d, ttl %u,", rx_port, ttl);
printf("entry_type %d\n", type);
-
#ifdef NAT_ONLY_CONFIG_REQ
if (nat_only_config_flag) {
if (!p_nat->is_static_cgnapt) {
@@ -8889,9 +8892,10 @@ void *pipeline_cgnapt_msg_req_entry_add_handler(struct pipeline *p, void *msg)
return msg;
}
+ #ifdef CGNAPT_DBG_PRNT
printf("Success - pipeline_cgnapt_msg_req_entry_addm_handler");
printf("added %d rule pairs.\n", count);
-
+ #endif
return msg;
}
#endif
@@ -8922,9 +8926,10 @@ void *pipeline_cgnapt_msg_req_entry_add_handler(struct pipeline *p, void *msg)
}
+ #ifdef CGNAPT_DBG_PRNT
printf("\nSuccess - pipeline_cgnapt_msg_req_entry_add_handler "
"added\n");
-
+ #endif
return msg;
}
@@ -9108,7 +9113,6 @@ void *pipeline_cgnapt_msg_req_entry_addm_handler(struct pipeline *p, void *msg)
printf("PhyPort %d, ttl %u, NumUe %d,", rx_port, ttl, max_ue);
printf("mPrvPort %d, mPubPort %d,", max_src_port, max_dest_port);
printf("entry_type %d\n", type);
-
#ifdef NAT_ONLY_CONFIG_REQ
if (nat_only_config_flag) {
if (!p_nat->is_static_cgnapt) {
@@ -9149,8 +9153,10 @@ void *pipeline_cgnapt_msg_req_entry_addm_handler(struct pipeline *p, void *msg)
dest_ip++;
}
+ #ifdef CGNAPT_DBG_PRNT
printf("Success - pipeline_cgnapt_msg_req_entry_addm_handler");
printf("added %d rule pairs.\n", count);
+ #endif
return msg;
}
@@ -9201,9 +9207,10 @@ void *pipeline_cgnapt_msg_req_entry_addm_handler(struct pipeline *p, void *msg)
}
}
+ #ifdef CGNAPT_DBG_PRNT
printf("\nSuccess - pipeline_cgnapt_msg_req_entry_addm_handler added");
printf("%d rule pairs.\n", count);
-
+ #endif
return msg;
}
diff --git a/common/VIL/l2l3_stack/lib_arp.c b/common/VIL/l2l3_stack/lib_arp.c
index 0c597301..c37e486b 100644
--- a/common/VIL/l2l3_stack/lib_arp.c
+++ b/common/VIL/l2l3_stack/lib_arp.c
@@ -1855,7 +1855,8 @@ void process_arpicmp_pkt(struct rte_mbuf *pkt, l2_phy_interface_t *port)
DYNAMIC_ARP);
} else {
- RTE_LOG(INFO, LIBARP,"ARP requested IP address mismatches interface IP - discarding\n");
+ if (ARPICMP_DEBUG)
+ RTE_LOG(INFO, LIBARP,"ARP requested IP address mismatches interface IP - discarding\n");
}
}
/// revise conditionals to allow processing of requests with target ip = this ip and