From patchwork Wed Jun 6 12:04:01 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Ananyev, Konstantin" X-Patchwork-Id: 40689 X-Patchwork-Delegate: pablo.de.lara.guarch@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) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga107.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 06 Jun 2018 05:04:15 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.49,483,1520924400"; d="scan'208";a="55195387" Received: from sivswdev02.ir.intel.com (HELO localhost.localdomain) ([10.237.217.46]) by FMSMGA003.fm.intel.com with ESMTP; 06 Jun 2018 05:04:14 -0700 From: Konstantin Ananyev To: dev@dpdk.org Cc: Konstantin Ananyev , radu.nicolau@intel.com Date: Wed, 6 Jun 2018 13:04:01 +0100 Message-Id: <1528286641-27668-1-git-send-email-konstantin.ananyev@intel.com> X-Mailer: git-send-email 1.7.0.7 To: dev@dpdk.org Subject: [dpdk-dev] [PATCH] examples/ipsec-secgw: fix incorrect IPv4 checksum at TX X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Jun 2018 12:04:18 -0000 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 Acked-by: Radu Nicolau --- 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;