summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorKonstantin Ananyev <konstantin.ananyev@intel.com>2018-06-06 13:04:01 +0100
committerPablo de Lara <pablo.de.lara.guarch@intel.com>2018-07-24 01:48:10 +0200
commitb45be46dfd4548acd8f130841d02e97ab7bc7eb8 (patch)
tree44ae8215af8f3a9b9ed2345a0fe75e9667e4832b /examples
parentbb44fb6fe7713ddcd023d5b9bacadf074d68092e (diff)
downloaddpdk-b45be46dfd4548acd8f130841d02e97ab7bc7eb8.zip
dpdk-b45be46dfd4548acd8f130841d02e97ab7bc7eb8.tar.gz
dpdk-b45be46dfd4548acd8f130841d02e97ab7bc7eb8.tar.xz
examples/ipsec-secgw: fix IPv4 checksum at Tx
For ESP transport and BYPASS mode the app might generate output packets with invalid IPv4 header checksum. At least such behavior was observed on few Intel NICs. The reason is that the app didn't set ipv4 header checksum to zero before passing it to the HW. Fixes: 906257e965b7 ("examples/ipsec-secgw: support IPv6") Cc: stable@dpdk.org Signed-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com> Acked-by: Radu Nicolau <radu.nicolau@intel.com>
Diffstat (limited to 'examples')
-rw-r--r--examples/ipsec-secgw/ipsec-secgw.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/examples/ipsec-secgw/ipsec-secgw.c b/examples/ipsec-secgw/ipsec-secgw.c
index ff576eb..a0faddf 100644
--- a/examples/ipsec-secgw/ipsec-secgw.c
+++ b/examples/ipsec-secgw/ipsec-secgw.c
@@ -330,6 +330,7 @@ prepare_tx_pkt(struct rte_mbuf *pkt, uint16_t port)
pkt->l3_len = sizeof(struct ip);
pkt->l2_len = ETHER_HDR_LEN;
+ ip->ip_sum = 0;
ethhdr->ether_type = rte_cpu_to_be_16(ETHER_TYPE_IPv4);
} else {
pkt->ol_flags |= PKT_TX_IPV6;