From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id 9D7598F9E for ; Tue, 24 Nov 2015 17:33:39 +0100 (CET) Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga101.jf.intel.com with ESMTP; 24 Nov 2015 08:32:53 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.20,338,1444719600"; d="scan'208";a="828094531" Received: from unknown ([10.217.248.15]) by orsmga001.jf.intel.com with SMTP; 24 Nov 2015 08:32:51 -0800 Received: by (sSMTP sendmail emulation); Tue, 24 Nov 2015 17:31:26 +0100 From: Daniel Mrzyglod To: dev@dpdk.org Date: Tue, 24 Nov 2015 17:31:17 +0100 Message-Id: <1448382678-6060-1-git-send-email-danielx.t.mrzyglod@intel.com> X-Mailer: git-send-email 2.5.3 In-Reply-To: <1448377959-4440-1-git-send-email-danielx.t.mrzyglod@intel.com> References: <1448377959-4440-1-git-send-email-danielx.t.mrzyglod@intel.com> Subject: [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 16:33:40 -0000 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(-) -- 2.5.0