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 8E6D61B34F for ; Wed, 1 Nov 2017 21:10:08 +0100 (CET) Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 01 Nov 2017 13:10:07 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.44,330,1505804400"; d="scan'208";a="170670354" Received: from fyigit-mobl1.ger.corp.intel.com (HELO [10.241.226.222]) ([10.241.226.222]) by fmsmga006.fm.intel.com with ESMTP; 01 Nov 2017 13:10:06 -0700 To: Thomas Monjalon , 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 References: <20171024141545.30837-1-akhil.goyal@nxp.com> <20171025150727.30364-1-akhil.goyal@nxp.com> <20171025150727.30364-9-akhil.goyal@nxp.com> <3001236.PBxM8AWuc0@xps> From: Ferruh Yigit Message-ID: <46e2e616-2776-67ae-a055-422abeb98094@intel.com> Date: Wed, 1 Nov 2017 13:10:06 -0700 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 MIME-Version: 1.0 In-Reply-To: <3001236.PBxM8AWuc0@xps> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit 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 20:10:09 -0000 On 11/1/2017 12:58 PM, Thomas Monjalon wrote: > 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? I just get a patch into next-net [1], that should be fixing this build error. [1] http://dpdk.org/browse/next/dpdk-next-net/commit/?id=8bb0ee234e49d1486d4fb63673500c615dbbea1d > > > 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); > ^ >