From d285aad4646fa45d7efa4a4c04ae6a98df5d9ec8 Mon Sep 17 00:00:00 2001 From: Deepak S Date: Thu, 11 May 2017 11:29:46 +0530 Subject: Allow enable/disable of checksum for cgnapt JIRA: SAMPLEVNF-11 Enable Checksum in makefile add CHECKSUM_REQ --> hw_checksum_req=1 in config for hw_checksum --> hw_checksum_req=0 in config for sw_checksum disable checksum in makefile comment CHECKSUM_REQ Change-Id: I5ebcfe845082ea49acaa13bc963fc07b92b90650 Signed-off-by: Deepak S --- VNFs/vCGNAPT/Makefile | 2 +- VNFs/vCGNAPT/pipeline/pipeline_cgnapt_be.c | 36 +++++++++++++++--------------- 2 files changed, 19 insertions(+), 19 deletions(-) (limited to 'VNFs/vCGNAPT') diff --git a/VNFs/vCGNAPT/Makefile b/VNFs/vCGNAPT/Makefile index 4721cd53..e349f627 100644 --- a/VNFs/vCGNAPT/Makefile +++ b/VNFs/vCGNAPT/Makefile @@ -109,7 +109,7 @@ SRCS-$(CONFIG_RTE_LIBRTE_PIPELINE) += lib_ftp_alg.c CFLAGS += -O3 CFLAGS += -DIPV6 -CFLAGS += -DHW_CHECKSUM_REQ +CFLAGS += -DCHECKSUM_REQ #CFLAGS += -DPCP_ENABLE #CFLAGS += -DSIP_ALG #CFLAGS += -DALG diff --git a/VNFs/vCGNAPT/pipeline/pipeline_cgnapt_be.c b/VNFs/vCGNAPT/pipeline/pipeline_cgnapt_be.c index 9a05a4da..a7f10dbd 100644 --- a/VNFs/vCGNAPT/pipeline/pipeline_cgnapt_be.c +++ b/VNFs/vCGNAPT/pipeline/pipeline_cgnapt_be.c @@ -2465,12 +2465,12 @@ static int cgnapt_in_port_ah_mix(struct rte_pipeline *rte_p, p_nat->naptedPktCount++; - #ifdef HW_CHECKSUM_REQ + #ifdef CHECKSUM_REQ if (p_nat->hw_checksum_reqd) hw_checksum(pkts[pkt_index], pkt_type); else - #endif sw_checksum(pkts[pkt_index], pkt_type); + #endif } if (p_nat->invalid_packets) { @@ -4080,12 +4080,12 @@ pkt_work_cgnapt_ipv4_prv( p_nat->naptedPktCount++; - #ifdef HW_CHECKSUM_REQ + #ifdef CHECKSUM_REQ if (p_nat->hw_checksum_reqd) hw_checksum(pkt, pkt_type); else - #endif sw_checksum(pkt, pkt_type); + #endif } @@ -4490,12 +4490,12 @@ pkt_work_cgnapt_ipv4_pub( p_nat->naptedPktCount++; - #ifdef HW_CHECKSUM_REQ + #ifdef CHECKSUM_REQ if (p_nat->hw_checksum_reqd) hw_checksum(pkt, pkt_type); else - #endif sw_checksum(pkt, pkt_type); + #endif } @@ -4949,12 +4949,12 @@ pkt4_work_cgnapt_ipv4_prv( p_nat->naptedPktCount++; - #ifdef HW_CHECKSUM_REQ + #ifdef CHECKSUM_REQ if (p_nat->hw_checksum_reqd) hw_checksum(pkt, pkt_type); else - #endif sw_checksum(pkt, pkt_type); + #endif } } @@ -5369,12 +5369,12 @@ pkt4_work_cgnapt_ipv4_pub( p_nat->naptedPktCount++; - #ifdef HW_CHECKSUM_REQ + #ifdef CHECKSUM_REQ if (p_nat->hw_checksum_reqd) hw_checksum(pkt, pkt_type); else - #endif sw_checksum(pkt, pkt_type); + #endif } } @@ -6419,12 +6419,12 @@ pkt_work_cgnapt_ipv6_prv( p_nat->naptedPktCount++; - #ifdef HW_CHECKSUM_REQ + #ifdef CHECKSUM_REQ if (p_nat->hw_checksum_reqd) hw_checksum(pkt, pkt_type); else - #endif sw_checksum(pkt, pkt_type); + #endif } @@ -6638,12 +6638,12 @@ pkt_work_cgnapt_ipv6_pub( p_nat->naptedPktCount++; - #ifdef HW_CHECKSUM_REQ + #ifdef CHECKSUM_REQ if (p_nat->hw_checksum_reqd) hw_checksum(pkt, pkt_type); else - #endif sw_checksum(pkt, pkt_type); + #endif } @@ -6945,12 +6945,12 @@ pkt4_work_cgnapt_ipv6_prv( p_nat->naptedPktCount++; - #ifdef HW_CHECKSUM_REQ + #ifdef CHECKSUM_REQ if (p_nat->hw_checksum_reqd) hw_checksum(pkt, pkt_type); else - #endif sw_checksum(pkt, pkt_type); + #endif } } @@ -7170,12 +7170,12 @@ pkt4_work_cgnapt_ipv6_pub( p_nat->naptedPktCount++; - #ifdef HW_CHECKSUM_REQ + #ifdef CHECKSUM_REQ if (p_nat->hw_checksum_reqd) hw_checksum(pkt, pkt_type); else - #endif sw_checksum(pkt, pkt_type); + #endif } } -- cgit 1.2.3-korg