From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 83106A04B0; Fri, 4 Dec 2020 09:59:55 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id D1E2C34F3; Fri, 4 Dec 2020 09:59:53 +0100 (CET) Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by dpdk.org (Postfix) with ESMTP id 603313256 for ; Fri, 4 Dec 2020 09:59:51 +0100 (CET) IronPort-SDR: hQI9yoihr+8ZiSPDZyu28BXVvymtf/MlGA6fBZX1rjcEBUqQGa8pfl57VuGgBQeS3ln4zgF9Rb 9WIwselprqGg== X-IronPort-AV: E=McAfee;i="6000,8403,9824"; a="234954480" X-IronPort-AV: E=Sophos;i="5.78,392,1599548400"; d="scan'208";a="234954480" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga006.jf.intel.com ([10.7.209.51]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Dec 2020 00:59:48 -0800 IronPort-SDR: P/3SrJaPAbiBC9Zx2ucJvgryVQ1ObBYCA/UlcFVKVOO5Ha6MMegu5V8fj/NtMUrJ3S2wKgM6eY rjET31FIkuIQ== X-IronPort-AV: E=Sophos;i="5.78,392,1599548400"; d="scan'208";a="336309033" Received: from fyigit-mobl1.ger.corp.intel.com (HELO [10.213.246.65]) ([10.213.246.65]) by orsmga006-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Dec 2020 00:59:46 -0800 To: George Prekas , Wenzhuo Lu , Beilei Xing , Bernard Iremonger Cc: dev@dpdk.org References: <20201203135954.1127-1-prekageo@amazon.com> From: Ferruh Yigit Message-ID: <4d9e5925-8439-330c-cb27-aac64878fc24@intel.com> Date: Fri, 4 Dec 2020 08:59:42 +0000 MIME-Version: 1.0 In-Reply-To: <20201203135954.1127-1-prekageo@amazon.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH] app/testpmd: fix IP checksum calculation 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On 12/3/2020 1:59 PM, George Prekas wrote: > Insert a compiler barrier to make sure that the IP checksum calculation > happens after setting all the fields of the IP header. > Can you please provide the compiler details, and if there is any specific instruction on how to reproduce this failure? > Signed-off-by: George Prekas > --- > app/test-pmd/flowgen.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/app/test-pmd/flowgen.c b/app/test-pmd/flowgen.c > index acf3e2460..893b4b0b8 100644 > --- a/app/test-pmd/flowgen.c > +++ b/app/test-pmd/flowgen.c > @@ -150,6 +150,7 @@ pkt_burst_flow_gen(struct fwd_stream *fs) > next_flow); > ip_hdr->total_length = RTE_CPU_TO_BE_16(pkt_size - > sizeof(*eth_hdr)); > + rte_compiler_barrier(); > ip_hdr->hdr_checksum = ip_sum((unaligned_uint16_t *)ip_hdr, > sizeof(*ip_hdr)); > >