From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 7C5A3A00C3; Mon, 3 Oct 2022 16:20:43 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 2997440DFB; Mon, 3 Oct 2022 16:20:43 +0200 (CEST) Received: from shelob.oktetlabs.ru (shelob.oktetlabs.ru [91.220.146.113]) by mails.dpdk.org (Postfix) with ESMTP id 7EA2B40695 for ; Mon, 3 Oct 2022 16:20:41 +0200 (CEST) Received: from [192.168.38.17] (aros.oktetlabs.ru [192.168.38.17]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by shelob.oktetlabs.ru (Postfix) with ESMTPSA id E426466; Mon, 3 Oct 2022 17:20:40 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 shelob.oktetlabs.ru E426466 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=oktetlabs.ru; s=default; t=1664806841; bh=vXRVjK3MMocfMBlHwQq5y+Q1eolJj4fWMC880ijby3g=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=vUaHG8zsqRovVRoL9chQDGknHY3QH66zG35YJ48t8GfHh11wNrlqye17v64yvmbXj koelgytxhy+SX5nE3aAx0Vi6qPS8WZiMmQCo+rNjJq0EWit3633vn8vmYbhSgPW/7g JXQsYJmzogXLCCMBUxEXcJlIEF2Y0+Dslc04x8zc= Message-ID: <59c4a42a-4f90-9585-3f00-0c8d513fcda5@oktetlabs.ru> Date: Mon, 3 Oct 2022 17:20:40 +0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.3.0 Subject: Re: [PATCH v2 13/14] net/idpf: add AVX512 data path for single queue model Content-Language: en-US To: Junfeng Guo , qi.z.zhang@intel.com, jingjing.wu@intel.com, beilei.xing@intel.com Cc: dev@dpdk.org, xiao.w.wang@intel.com, Wenjun Wu , Thomas Monjalon References: <20220803113104.1184059-1-junfeng.guo@intel.com> <20220905105828.3190335-1-junfeng.guo@intel.com> <20220905105828.3190335-14-junfeng.guo@intel.com> From: Andrew Rybchenko Organization: OKTET Labs In-Reply-To: <20220905105828.3190335-14-junfeng.guo@intel.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org On 9/5/22 13:58, Junfeng Guo wrote: > Add support of AVX512 vector data path for single queue model. > > Signed-off-by: Wenjun Wu > Signed-off-by: Junfeng Guo [snip] > +static __rte_always_inline void > +idpf_singleq_rearm(struct idpf_rx_queue *rxq) > +{ [snip] > + const __m512i iova_offsets = _mm512_set1_epi64(offsetof > + (struct rte_mbuf, buf_iova)); > + const __m512i headroom = _mm512_set1_epi64(RTE_PKTMBUF_HEADROOM); > + > +#ifndef RTE_LIBRTE_IDPF_16BYTE_RX_DESC As far as I remember, support for such build time options is deprecated in DPDK and new options are not accepted. Cc Thomas to correct me if I'm wrong. > + /* to shuffle the addresses to correct slots. Values 4-7 will contain > + * zeros, so use 7 for a zero-value. > + */ > + const __m512i permute_idx = _mm512_set_epi64(7, 7, 3, 1, 7, 7, 2, 0); > +#else > + const __m512i permute_idx = _mm512_set_epi64(7, 3, 6, 2, 5, 1, 4, 0); > +#endif [snip] > +#ifdef IDPF_RX_PTYPE_OFFLOAD Same here. > + /** > + * to get packet types, shift 64-bit values down 30 bits > + * and so ptype is in lower 8-bits in each > + */ > + const __m512i ptypes4_7 = _mm512_srli_epi64(desc4_7, 16); > + const __m256i ptypes6_7 = _mm512_extracti64x4_epi64(ptypes4_7, 1); > + const __m256i ptypes4_5 = _mm512_extracti64x4_epi64(ptypes4_7, 0); > + const uint8_t ptype7 = _mm256_extract_epi8(ptypes6_7, 16); > + const uint8_t ptype6 = _mm256_extract_epi8(ptypes6_7, 0); > + const uint8_t ptype5 = _mm256_extract_epi8(ptypes4_5, 16); > + const uint8_t ptype4 = _mm256_extract_epi8(ptypes4_5, 0); > + > + const __m512i ptype4_7 = _mm512_set_epi32 > + (0, 0, 0, type_table[ptype7], > + 0, 0, 0, type_table[ptype6], > + 0, 0, 0, type_table[ptype5], > + 0, 0, 0, type_table[ptype4]); > + mb4_7 = _mm512_mask_blend_epi32(0x1111, mb4_7, ptype4_7); > +#endif [snip]