From mboxrd@z Thu Jan 1 00:00:00 1970 From: Konstantin Ananyev Subject: [PATCH] examples/ipsec-secgw: fix incorrect IPv4 checksum at TX Date: Wed, 6 Jun 2018 13:04:01 +0100 Message-ID: <1528286641-27668-1-git-send-email-konstantin.ananyev@intel.com> Cc: Konstantin Ananyev , radu.nicolau@intel.com Return-path: Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by dpdk.org (Postfix) with ESMTP id E4C651CE53 for ; Wed, 6 Jun 2018 14:04:16 +0200 (CEST) To: dev@dpdk.org To: dev@dpdk.org List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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") Signed-off-by: Konstantin Ananyev --- examples/ipsec-secgw/ipsec-secgw.c | 1 + 1 file changed, 1 insertion(+) diff --git a/examples/ipsec-secgw/ipsec-secgw.c b/examples/ipsec-secgw/ipsec-secgw.c index 5d7071657..38933341b 100644 --- a/examples/ipsec-secgw/ipsec-secgw.c +++ b/examples/ipsec-secgw/ipsec-secgw.c @@ -331,6 +331,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; -- 2.13.6