diff options
author | Deepak S <deepak.s@linux.intel.com> | 2017-05-11 11:29:46 +0530 |
---|---|---|
committer | Deepak S <deepak.s@linux.intel.com> | 2017-05-11 10:01:02 +0000 |
commit | d285aad4646fa45d7efa4a4c04ae6a98df5d9ec8 (patch) | |
tree | d437bdcfb5dc917fcf8adc6c414c8646653ce320 /VNFs | |
parent | 0eab7bd9a021ebb5e65c586c54b60c5c406aec0a (diff) |
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 <deepak.s@linux.intel.com>
Diffstat (limited to 'VNFs')
-rw-r--r-- | VNFs/vCGNAPT/Makefile | 2 | ||||
-rw-r--r-- | VNFs/vCGNAPT/pipeline/pipeline_cgnapt_be.c | 36 |
2 files changed, 19 insertions, 19 deletions
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 } } |