[PATCH v2 13/14] net/idpf: add AVX512 data path for single queue model
Andrew Rybchenko
andrew.rybchenko at oktetlabs.ru
Mon Oct 3 16:20:40 CEST 2022
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 <wenjun1.wu at intel.com>
> Signed-off-by: Junfeng Guo <junfeng.guo at intel.com>
[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]
More information about the dev
mailing list