From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by dpdk.space (Postfix) with ESMTP id 42AEDA00E6 for ; Fri, 22 Mar 2019 10:30:21 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 25E171B586; Fri, 22 Mar 2019 10:30:19 +0100 (CET) Received: from hqmgw1.hq.eso.org (hqmgw1.hq.eso.org [134.171.42.201]) by dpdk.org (Postfix) with ESMTP id 9A38B1B586 for ; Fri, 22 Mar 2019 10:30:18 +0100 (CET) X-IronPort-AV: E=Sophos;i="5.60,256,1549926000"; d="scan'208";a="48548894" Received: from mxroute01.hq.eso.org ([134.171.15.33]) by hqmgw1.hq.eso.org with ESMTP; 22 Mar 2019 10:30:17 +0100 Received: from mxadauth03.hq.eso.org (mxadauth03.hq.eso.org [134.171.42.80]) by mxroute01.hq.eso.org (Postfix) with ESMTP id D2EEB120004; Fri, 22 Mar 2019 10:30:17 +0100 (CET) Received: from [127.0.0.1] (hq-000-kemp01.hq.eso.org [134.171.42.9]) (using TLSv1.2 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) (Authenticated sender: nbenes) by mxadauth03.hq.eso.org (Postfix) with ESMTPSA id CD2BD2099F; Fri, 22 Mar 2019 10:30:17 +0100 (CET) From: "N. Benes" To: users@dpdk.org References: Message-ID: <0f3b13ee-f78f-eebe-268c-1dd47d7e9f49@eso.org> Date: Fri, 22 Mar 2019 09:30:00 +0000 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-users] Bug in IPv4 header checksum computation? X-BeenThere: users@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK usage discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: users-bounces@dpdk.org Sender: "users" N. Benes: > Example to generate a PCAP with 0x0000 IPv4 header checksum and > (correct) UDP payload with 0 checksum: > > text2pcap -n -e 0800 ipcks.txt ipcks.pcapng >> 0000 45 00 00 20 12 34 00 00 10 11 00 00 0a 00 00 01 >> 0010 0a 00 00 02 01 00 00 16 00 0c 00 00 00 00 00 00 As an improvement to the above example, here's a valid IPv4/UDP packet with IPv4 header checksum resulting in 0x0000 (IPv4 identification chosen accordingly): > 0000 45 00 00 20 96 cb 00 00 10 11 00 00 0a 00 00 01 > 0010 0a 00 00 02 01 00 00 16 00 0c 00 00 00 00 00 00 This packet is shown as fully correct in Wireshark, but DPDK's rte_ipv4_cksum() would set the checksum to 0xffff.