From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from out4-smtp.messagingengine.com (out4-smtp.messagingengine.com [66.111.4.28]) by dpdk.org (Postfix) with ESMTP id 4F0861B322 for ; Wed, 1 Nov 2017 20:58:55 +0100 (CET) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 4F52420E37; Wed, 1 Nov 2017 15:58:53 -0400 (EDT) Received: from frontend2 ([10.202.2.161]) by compute1.internal (MEProxy); Wed, 01 Nov 2017 15:58:53 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-sender :x-me-sender:x-sasl-enc; s=mesmtp; bh=jrtOfYVxM4km/C2BUvbQfcP5bu ZGKDiDghUxjuY8ZRs=; b=NQK1j07sJnVVQn6z04b1umKF+dT9D0lG0/1wlGfG2X 1pjBvlG+plheYwjAsnISnTQkvqsPfVRBYaXoxL4FKrbKlQifokC/P+glbFBDGfeO Ky6/u48Kcq+JTnKU1uPY2kRIvtd0OEvmFnIq6bcjnQFpzIllmIHANoMWhP0TF1Vt 0= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=jrtOfY VxM4km/C2BUvbQfcP5buZGKDiDghUxjuY8ZRs=; b=aTQC/CIl2R3IDvErC6cAOc uZudbJgXq7sc6eznmNd75UEoQAlwQzhyB6MTegiI73+/msVz4MOSLx2QsTUiLLVc eX/trFaBoBAJpLctZ77Mw7UJ0WSd72VH8Qn1DVGnp5XHbXyoukirQjntUxYSvZYP VZHsHnP2oZMjp3/KJxB53AUR41NEzkSiez61JzNSU0d1/sePczszxVxHX0aR5Uks SN1mYo3RpZQwqMJYML42HgYy8ggp4IwgyIUg4XaolcqVgODYIRkGEILIEHA9JH2q dxYynGh+gkH5hYz73LWZJv5n4sBl8VFq4yPEIyulp+zi6vmJVfG8cjZ13ZAU69+A == X-ME-Sender: Received: from xps.localnet (184.203.134.77.rev.sfr.net [77.134.203.184]) by mail.messagingengine.com (Postfix) with ESMTPA id F3B9C244C7; Wed, 1 Nov 2017 15:58:52 -0400 (EDT) From: Thomas Monjalon To: declan.doherty@intel.com, radu.nicolau@intel.com, konstantin.ananyev@intel.com Cc: dev@dpdk.org, Akhil Goyal , pablo.de.lara.guarch@intel.com, hemant.agrawal@nxp.com, borisp@mellanox.com, aviadye@mellanox.com, sandeep.malik@nxp.com, jerin.jacob@caviumnetworks.com, john.mcnamara@intel.com, shahafs@mellanox.com, olivier.matz@6wind.com Date: Wed, 01 Nov 2017 20:58:52 +0100 Message-ID: <3001236.PBxM8AWuc0@xps> In-Reply-To: <20171025150727.30364-9-akhil.goyal@nxp.com> References: <20171024141545.30837-1-akhil.goyal@nxp.com> <20171025150727.30364-1-akhil.goyal@nxp.com> <20171025150727.30364-9-akhil.goyal@nxp.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [dpdk-dev] [PATCH v6 08/10] net/ixgbe: enable inline ipsec 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, 01 Nov 2017 19:58:55 -0000 Hi, there is compilation error with GCC 4.8.5. It may be a false positive strict aliasing check. Please could you check it below? 25/10/2017 17:07, Akhil Goyal: > From: Radu Nicolau > > Signed-off-by: Radu Nicolau > Signed-off-by: Declan Doherty [...] > --- a/drivers/net/ixgbe/ixgbe_rxtx_vec_sse.c > +++ b/drivers/net/ixgbe/ixgbe_rxtx_vec_sse.c > @@ -123,6 +123,59 @@ ixgbe_rxq_rearm(struct ixgbe_rx_queue *rxq) > } > > static inline void > +desc_to_olflags_v_ipsec(__m128i descs[4], struct rte_mbuf **rx_pkts) > +{ > + __m128i sterr0, sterr1, sterr2, sterr3; > + __m128i tmp1, tmp2, tmp3, tmp4; > + __m128i rearm0, rearm1, rearm2, rearm3; > + > + const __m128i ipsec_sterr_msk = _mm_set_epi32( > + 0, IXGBE_RXDADV_IPSEC_STATUS_SECP | > + IXGBE_RXDADV_IPSEC_ERROR_AUTH_FAILED, > + 0, 0); > + const __m128i ipsec_proc_msk = _mm_set_epi32( > + 0, IXGBE_RXDADV_IPSEC_STATUS_SECP, 0, 0); > + const __m128i ipsec_err_flag = _mm_set_epi32( > + 0, PKT_RX_SEC_OFFLOAD_FAILED | PKT_RX_SEC_OFFLOAD, > + 0, 0); > + const __m128i ipsec_proc_flag = _mm_set_epi32( > + 0, PKT_RX_SEC_OFFLOAD, 0, 0); > + > + rearm0 = _mm_load_si128((__m128i *)&rx_pkts[0]->rearm_data); > + rearm1 = _mm_load_si128((__m128i *)&rx_pkts[1]->rearm_data); > + rearm2 = _mm_load_si128((__m128i *)&rx_pkts[2]->rearm_data); > + rearm3 = _mm_load_si128((__m128i *)&rx_pkts[3]->rearm_data); > + sterr0 = _mm_and_si128(descs[0], ipsec_sterr_msk); > + sterr1 = _mm_and_si128(descs[1], ipsec_sterr_msk); > + sterr2 = _mm_and_si128(descs[2], ipsec_sterr_msk); > + sterr3 = _mm_and_si128(descs[3], ipsec_sterr_msk); > + tmp1 = _mm_cmpeq_epi32(sterr0, ipsec_sterr_msk); > + tmp2 = _mm_cmpeq_epi32(sterr0, ipsec_proc_msk); > + tmp3 = _mm_cmpeq_epi32(sterr1, ipsec_sterr_msk); > + tmp4 = _mm_cmpeq_epi32(sterr1, ipsec_proc_msk); > + sterr0 = _mm_or_si128(_mm_and_si128(tmp1, ipsec_err_flag), > + _mm_and_si128(tmp2, ipsec_proc_flag)); > + sterr1 = _mm_or_si128(_mm_and_si128(tmp3, ipsec_err_flag), > + _mm_and_si128(tmp4, ipsec_proc_flag)); > + tmp1 = _mm_cmpeq_epi32(sterr2, ipsec_sterr_msk); > + tmp2 = _mm_cmpeq_epi32(sterr2, ipsec_proc_msk); > + tmp3 = _mm_cmpeq_epi32(sterr3, ipsec_sterr_msk); > + tmp4 = _mm_cmpeq_epi32(sterr3, ipsec_proc_msk); > + sterr2 = _mm_or_si128(_mm_and_si128(tmp1, ipsec_err_flag), > + _mm_and_si128(tmp2, ipsec_proc_flag)); > + sterr3 = _mm_or_si128(_mm_and_si128(tmp3, ipsec_err_flag), > + _mm_and_si128(tmp4, ipsec_proc_flag)); > + rearm0 = _mm_or_si128(rearm0, sterr0); > + rearm1 = _mm_or_si128(rearm1, sterr1); > + rearm2 = _mm_or_si128(rearm2, sterr2); > + rearm3 = _mm_or_si128(rearm3, sterr3); > + _mm_store_si128((__m128i *)&rx_pkts[0]->rearm_data, rearm0); > + _mm_store_si128((__m128i *)&rx_pkts[1]->rearm_data, rearm1); > + _mm_store_si128((__m128i *)&rx_pkts[2]->rearm_data, rearm2); > + _mm_store_si128((__m128i *)&rx_pkts[3]->rearm_data, rearm3); > +} drivers/net/ixgbe/ixgbe_rxtx_vec_sse.c: In function desc_to_olflags_v_ipsec: drivers/net/ixgbe/ixgbe_rxtx_vec_sse.c:140:2: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing] rearm = _mm_set_epi32(((uint32_t *)rx_pkts[0]->rearm_data)[2], ^ drivers/net/ixgbe/ixgbe_rxtx_vec_sse.c:141:10: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing] ((uint32_t *)rx_pkts[1]->rearm_data)[2], ^ drivers/net/ixgbe/ixgbe_rxtx_vec_sse.c:142:10: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing] ((uint32_t *)rx_pkts[2]->rearm_data)[2], ^ drivers/net/ixgbe/ixgbe_rxtx_vec_sse.c:143:10: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing] ((uint32_t *)rx_pkts[3]->rearm_data)[2]); ^ drivers/net/ixgbe/ixgbe_rxtx_vec_sse.c:154:2: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing] ((uint32_t *)rx_pkts[0]->rearm_data)[2] = _mm_extract_epi32(rearm, 3); ^ drivers/net/ixgbe/ixgbe_rxtx_vec_sse.c:155:2: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing] ((uint32_t *)rx_pkts[1]->rearm_data)[2] = _mm_extract_epi32(rearm, 2); ^ drivers/net/ixgbe/ixgbe_rxtx_vec_sse.c:156:2: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing] ((uint32_t *)rx_pkts[2]->rearm_data)[2] = _mm_extract_epi32(rearm, 1); ^ drivers/net/ixgbe/ixgbe_rxtx_vec_sse.c:157:2: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing] ((uint32_t *)rx_pkts[3]->rearm_data)[2] = _mm_extract_epi32(rearm, 0); ^