summaryrefslogtreecommitdiffstats
path: root/VNFs/DPPD-PROX/prox_cksum.c
diff options
context:
space:
mode:
authorXavier Simonart <xavier.simonart@intel.com>2018-10-27 16:26:26 +0200
committerDeepak S <deepak.s@linux.intel.com>2018-11-01 04:38:34 +0530
commit5d0595c955eb37af44b68098b6fd4f33f18e7755 (patch)
treea0319ae58232efecfa1bea9e7f361ed36ff0efec /VNFs/DPPD-PROX/prox_cksum.c
parent2d8609495ff4a58ceae13746f067fec6b0d5cf03 (diff)
Support for DPDK 18.05 and DPDK 18.08
Improve DPDK 18.05 support introduced by 3e532aca. Support for DPDK 18.08. Change-Id: Ide712ee94254b506a0ad88c95a7e01b789f99d48 Signed-off-by: Xavier Simonart <xavier.simonart@intel.com>
Diffstat (limited to 'VNFs/DPPD-PROX/prox_cksum.c')
-rw-r--r--VNFs/DPPD-PROX/prox_cksum.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/VNFs/DPPD-PROX/prox_cksum.c b/VNFs/DPPD-PROX/prox_cksum.c
index 9a05097e..10dc3a80 100644
--- a/VNFs/DPPD-PROX/prox_cksum.c
+++ b/VNFs/DPPD-PROX/prox_cksum.c
@@ -81,13 +81,13 @@ static void prox_write_tcp_pseudo_hdr(struct tcp_hdr *tcp, uint16_t len, uint32_
void prox_ip_udp_cksum(struct rte_mbuf *mbuf, struct ipv4_hdr *pip, uint16_t l2_len, uint16_t l3_len, int cksum_offload)
{
- prox_ip_cksum(mbuf, pip, l2_len, l3_len, cksum_offload & IPV4_CKSUM);
+ prox_ip_cksum(mbuf, pip, l2_len, l3_len, cksum_offload & DEV_TX_OFFLOAD_IPV4_CKSUM);
uint32_t l4_len = rte_bswap16(pip->total_length) - l3_len;
if (pip->next_proto_id == IPPROTO_UDP) {
struct udp_hdr *udp = (struct udp_hdr *)(((uint8_t*)pip) + l3_len);
#ifndef SOFT_CRC
- if (cksum_offload & UDP_CKSUM) {
+ if (cksum_offload & DEV_TX_OFFLOAD_UDP_CKSUM) {
mbuf->ol_flags |= PKT_TX_UDP_CKSUM;
prox_write_udp_pseudo_hdr(udp, l4_len, pip->src_addr, pip->dst_addr);
} else
@@ -96,7 +96,7 @@ void prox_ip_udp_cksum(struct rte_mbuf *mbuf, struct ipv4_hdr *pip, uint16_t l2_
} else if (pip->next_proto_id == IPPROTO_TCP) {
struct tcp_hdr *tcp = (struct tcp_hdr *)(((uint8_t*)pip) + l3_len);
#ifndef SOFT_CRC
- if (cksum_offload & UDP_CKSUM) {
+ if (cksum_offload & DEV_TX_OFFLOAD_TCP_CKSUM) {
prox_write_tcp_pseudo_hdr(tcp, l4_len, pip->src_addr, pip->dst_addr);
mbuf->ol_flags |= PKT_TX_UDP_CKSUM;
} else