From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pa0-f54.google.com (mail-pa0-f54.google.com [209.85.220.54]) by dpdk.org (Postfix) with ESMTP id DE5F23772 for ; Tue, 24 Nov 2015 23:42:36 +0100 (CET) Received: by pacdm15 with SMTP id dm15so35470724pac.3 for ; Tue, 24 Nov 2015 14:42:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-type:content-transfer-encoding; bh=W6EgANJdWHPFCL6CzflVGM1PBTLw4hNbhC7OUGMb39c=; b=zjR/jw1KGTOFNw3iZ780RNY3c2eLuOTKMpG52h0jYh9kSF4ghlkxWPizf3bvMNMfUL 6AtiDoPfCHOssUAYnukSoI5nlmgekkuq4kXBmbNUy/ptxjXoc3Cye7KN7mY391ynCoiz nP4iIk+ZLQxbcU4Z1+JUzCjb5aRYsmEbvLYj3xOXUWu5t3JGWhpcRhDaHM487agHGZeh AvfhuGZWidVV9BSp9z4HdsQFcC84Wt9o6regapXe0V1tuNXysAdJ5smyHfR/nQb8nTDA 1NUiv02IOGYD+V6mZ/nQlfvKhIp9ZSURUIOv9oHa4exqcpl6aW8Lvf/FOw4sxg1Dk+qv 4bQA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-type:content-transfer-encoding; bh=W6EgANJdWHPFCL6CzflVGM1PBTLw4hNbhC7OUGMb39c=; b=DezlLgVuw3JDCYvrzgxusdti0IPWgTIXCQrid3SxtfBwstoo3cD8dpbntCGrUSbfWs BYuDF2LIZhtjj/2B1DgGUGBKMd1vK0tZ2lOtI6mCTB8K3NPU+JL72PGrUwmFVeLZq17x pcrfOezywvEN8QHtHOhvVKW6dKo/N4zrZf0wuyx6a1OZvMe4G2cT8lBAcjYIF9AVNC34 UcfnqhEcsfhWJF9zks8056AVUxEiVWR8Qd7a0709POYkTe9POHEpcYqOfMK64PSef5co LU8AeohkjOlCrZc51//U/q6w4tb3Mo9D78j+9e8RN82glwl/UfVdjRCV/yLiwjM3/k31 ztJQ== X-Gm-Message-State: ALoCoQn/FSRpmieqJsIOhopP4ykBKNZ7tDkLsch+bJaIsVBte+54ecb/b0mRjza8D8NT9rSGqWdn X-Received: by 10.98.79.202 with SMTP id f71mr26684271pfj.21.1448404956212; Tue, 24 Nov 2015 14:42:36 -0800 (PST) Received: from xeon-e3 (static-50-53-82-155.bvtn.or.frontiernet.net. [50.53.82.155]) by smtp.gmail.com with ESMTPSA id g73sm16429564pfd.81.2015.11.24.14.42.35 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 24 Nov 2015 14:42:35 -0800 (PST) Date: Tue, 24 Nov 2015 14:42:44 -0800 From: Stephen Hemminger To: Daniel Mrzyglod Message-ID: <20151124144244.0ecf7627@xeon-e3> In-Reply-To: <1448382678-6060-1-git-send-email-danielx.t.mrzyglod@intel.com> References: <1448377959-4440-1-git-send-email-danielx.t.mrzyglod@intel.com> <1448382678-6060-1-git-send-email-danielx.t.mrzyglod@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: dev@dpdk.org Subject: Re: [dpdk-dev] [PATCH v2] net: fix build with gcc 4.4.7 and strict aliasing X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Nov 2015 22:42:37 -0000 On Tue, 24 Nov 2015 17:31:17 +0100 Daniel Mrzyglod wrote: > This fix is for IPv6 checksum offload error on RHEL65. > Any optimalisation above -O0 provide error in IPv6 checksum > flag "-fstrict-aliasing" is default for optimalisation above -O0. > The solution is to add typedef with __attribute__((__may_alias__) for uint16_t. > > Step 1 : start testpmd > ./testpmd -c 0x6 -n 4 -- -i --portmask=0x3 --disable-hw-vlan --enable-rx-cksum --crc-strip --txqflags=0 > > Step 2 : settings and start > set verbose 1 > set fwd csum > start > > Step 3 : send scapy with bad checksum IPv6/TCP packet > Ether(src="52:00:00:00:00:00", dst="90:e2:ba:4a:33:5d")/IPv6(src="::1")/TCP(chksum=0xf)/("X"*46) > > Step 4 : Recieved packets: > RESULTS: > IPv6/TCP': ['0xd41'] or other unexpected. > > EXPECTED RESULTS: > IPv6/TCP': ['0x9f5e'] > > Daniel Mrzyglod (1): > net: fix build with gcc 4.4.7 and strict aliasing > > lib/librte_net/rte_ip.h | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > An alternative way of fixing it (without resorting to attributes) would be to use a union.