net build fixes
Subsystems (2)
cover net build fixes
Some fixes following make support removal.
The first patch is a real fix.
The other two are cleanups so I did not mark them for backport.
Signature · 16 lines
David Marchand David Marchand (3): net/hinic: restore vectorised code net/i40e: remove vector config net/fm10k: remove vector config drivers/net/fm10k/meson.build | 1 - drivers/net/hinic/hinic_pmd_rx.c | 6 ++-- drivers/net/hinic/hinic_pmd_tx.c | 10 +++--- drivers/net/i40e/i40e_rxtx.c | 52 -------------------------------- drivers/net/i40e/meson.build | 3 -- 5 files changed, 8 insertions(+), 64 deletions(-) -- 2.23.0
PATCH 1/3 net/hinic: restore vectorised code
Following make support removal, the vectorised code is not built anymore, fix the build flag check.
--- drivers/net/hinic/hinic_pmd_rx.c | 6 +++--- drivers/net/hinic/hinic_pmd_tx.c | 10 +++++----- 2 files changed, 8 insertions(+), 8 deletions(-)
drivers/net/hinic/hinic_pmd_rx.c +3 -3
@@ -4,7 +4,7 @@#include <rte_ether.h> #include <rte_mbuf.h> -#ifdef __ARM64_NEON__ +#ifdef RTE_ARCH_ARM64 #include <arm_neon.h> #endif
@@ -762,7 +762,7 @@ void hinic_free_all_rx_mbufs(struct hinic_rxq *rxq)static inline void hinic_rq_cqe_be_to_cpu32 (void *dst_le32,volatile void *src_be32) { -#if defined(__X86_64_SSE__) +#if defined(RTE_ARCH_X86_64 )volatile __m128i *wqe_be = (volatile __m128i *)src_be32;__m128i *wqe_le = (__m128i *)dst_le32; __m128i shuf_mask = _mm_set_epi8(12, 13, 14, 15, 8, 9, 10,
@@ -770,7 +770,7 @@ static inline void hinic_rq_cqe_be_to_cpu32(void *dst_le32,/* l2nic just use first 128 bits */ wqe_le[0 ] =_mm_shuffle_epi8 (wqe_be[0 ], shuf_mask); -#elif defined(__ARM64_NEON__) +#elif defined(RTE_ARCH_ARM64 )volatile uint8x16_t *wqe_be = (volatile uint8x16_t *)src_be32;uint8x16_t *wqe_le = (uint8x16_t *)dst_le32; const uint8x16_t shuf_mask = {3, 2, 1, 0, 7, 6, 5, 4, 11, 10,
drivers/net/hinic/hinic_pmd_tx.c +5 -5
@@ -7,7 +7,7 @@#include <rte_sctp.h> #include <rte_udp.h> #include <rte_ip.h> -#ifdef __ARM64_NEON__ +#ifdef RTE_ARCH_ARM64 #include <arm_neon.h> #endif
@@ -203,7 +203,7 @@static inline void hinic_sq_wqe_cpu_to_be32 (void *data,int nr_wqebb) { -#if defined(__X86_64_SSE__) +#if defined(RTE_ARCH_X86_64 )int i;__m128i *wqe_line = (__m128i *)data; __m128i shuf_mask = _mm_set_epi8(12, 13, 14, 15, 8, 9, 10,
@@ -217,7 +217,7 @@ static inline void hinic_sq_wqe_cpu_to_be32(void *data, int nr_wqebb) wqe_line[3 ] =_mm_shuffle_epi8 (wqe_line[3 ], shuf_mask); wqe_line +=4 ; } -#elif defined(__ARM64_NEON__) +#elif defined(RTE_ARCH_ARM64 )int i;uint8x16_t *wqe_line = (uint8x16_t *)data; const uint8x16_t shuf_mask = {3, 2, 1, 0, 7, 6, 5, 4, 11, 10,
@@ -237,7 +237,7 @@ static inline void hinic_sq_wqe_cpu_to_be32(void *data, int nr_wqebb)static inline void hinic_sge_cpu_to_be32 (void *data,int nr_sge) { -#if defined(__X86_64_SSE__) +#if defined(RTE_ARCH_X86_64 )int i;__m128i *sge_line = (__m128i *)data; __m128i shuf_mask = _mm_set_epi8(12, 13, 14, 15, 8, 9, 10,
@@ -248,7 +248,7 @@ static inline void hinic_sge_cpu_to_be32(void *data, int nr_sge) *sge_line =_mm_shuffle_epi8 (*sge_line, shuf_mask); sge_line++; } -#elif defined(__ARM64_NEON__) +#elif defined(RTE_ARCH_ARM64 )int i;uint8x16_t *sge_line = (uint8x16_t *)data; const uint8x16_t shuf_mask = {3, 2, 1, 0, 7, 6, 5, 4, 11, 10,
Signature · 1 line
2.23.0
Re: [dpdk-dev] [PATCH 1/3] net/hinic: restore vectorised code
Quoted 30 lines
-----Original Message-----
From: David Marchand <[email protected]>
Sent: Friday, January 15, 2021 9:40 PM
To: [email protected]
Cc: [email protected]; [email protected]; Ziyang Xuan <[email protected]>; Xiaoyun Wang <[email protected]>; Guoyang Zhou <[email protected]>; Ciara Power <[email protected]>; Ruifeng Wang <[email protected]>; [email protected]
Subject: [PATCH 1/3] net/hinic: restore vectorised codeFollowing make support removal, the vectorised code is not built anymore, fix the build flag check.
Fixes 3cc6ecfdfe85 ("build: remove makefiles")Signed-off-by David Marchand <[email protected]>--- drivers/net/hinic/hinic_pmd_rx.c | 6 +++--- drivers/net/hinic/hinic_pmd_tx.c | 10 +++++----- 2 files changed, 8 insertions(+), 8 deletions(-)drivers/net/hinic/hinic_pmd_rx.c +0
-0
drivers/net/hinic/hinic_pmd_rx.c line 7
Quoted 5 lines
drivers/net/hinic/hinic_pmd_rx.c +1
-1@@ -4,7 +4,7 @@#include <rte_ether.h> #include <rte_mbuf.h> -#ifdef __ARM64_NEON__ +#ifdef RTE_ARCH_ARM64
We can test '__ARM_NEON' which will be defined by compilers.
https://developer.arm.com/documentation/ihi0053/latest/
Quoted 73 lines
drivers/net/hinic/hinic_pmd_rx.c +1
-1#include <arm_neon.h> #endif @@ -762,7 +762,7 @@ void hinic_free_all_rx_mbufs(struct hinic_rxq *rxq)static inline void hinic_rq_cqe_be_to_cpu32 (void *dst_le32,volatile void *src_be32) { -#if defined(__X86_64_SSE__) +#if defined(RTE_ARCH_X86_64 )volatile __m128i *wqe_be = (volatile __m128i *)src_be32;__m128i *wqe_le = (__m128i *)dst_le32; __m128i shuf_mask = _mm_set_epi8(12, 13, 14, 15, 8, 9, 10, @@ -770,7 +770,7 @@ static inline void hinic_rq_cqe_be_to_cpu32(void
*dst_le32,drivers/net/hinic/hinic_pmd_rx.c +0
-0/* l2nic just use first 128 bits */ wqe_le[0] = _mm_shuffle_epi8(wqe_be[0], shuf_mask); -#elif
defined(__ARM64_NEON__)drivers/net/hinic/hinic_pmd_rx.c +1
-0+#elif defined(RTE_ARCH_ARM64) volatile uint8x16_t *wqe_be = (volatile uint8x16_t *)src_be32; uint8x16_t *wqe_le = (uint8x16_t *)dst_le32; const uint8x16_t shuf_mask = {3, 2, 1, 0, 7, 6, 5, 4, 11, 10, diff --git
a/drivers/net/hinic/hinic_pmd_tx.cb/drivers/net/hinic/hinic_pmd_tx.cindex9d0264e67a..669f82389c100644drivers/net/hinic/hinic_pmd_tx.c +2
-1@@ -7,7 +7,7 @@#include <rte_sctp.h> #include <rte_udp.h> #include <rte_ip.h> -#ifdef __ARM64_NEON__ +#ifdef RTE_ARCH_ARM64 #include <arm_neon.h> #endif @@ -203,7 +203,7 @@ static inline void hinic_sq_wqe_cpu_to_be32(void *data, int nr_wqebb) { -#if defined(__X86_64_SSE__) +#if defined(RTE_ARCH_X86_64 )int i;__m128i *wqe_line = (__m128i *)data; __m128i shuf_mask = _mm_set_epi8(12, 13, 14, 15, 8, 9, 10, @@ -217,7 +217,7 @@ static inline void
hinic_sq_wqe_cpu_to_be32(void *data, int nr_wqebb)drivers/net/hinic/hinic_pmd_tx.c +2
-1wqe_line[3] = _mm_shuffle_epi8(wqe_line[3], shuf_mask); wqe_line += 4; } -#elif defined(__ARM64_NEON__) +#elif defined(RTE_ARCH_ARM64) int i; uint8x16_t *wqe_line = (uint8x16_t *)data; const uint8x16_t shuf_mask = {3, 2, 1, 0, 7, 6, 5, 4, 11, 10, @@ -237,7 +237,7 @@ static inline void hinic_sq_wqe_cpu_to_be32(void *data, int
nr_wqebb)static inline void
hinic_sge_cpu_to_be32(void *data, int nr_sge){ -#ifdefined(__X86_64_SSE__)drivers/net/hinic/hinic_pmd_tx.c +1
-0+#if defined(RTE_ARCH_X86_64 )int i;__m128i *sge_line = (__m128i *)data; __m128i shuf_mask = _mm_set_epi8(12, 13, 14, 15, 8, 9, 10, @@ -248,7 +248,7 @@ static inline void
hinic_sge_cpu_to_be32(void *data, int nr_sge)drivers/net/hinic/hinic_pmd_tx.c +1
-2*sge_line =_mm_shuffle_epi8 (*sge_line, shuf_mask); sge_line++; } -#elif defined(__ARM64_NEON__) +#elif defined(RTE_ARCH_ARM64 )int i;uint8x16_t *sge_line = (uint8x16_t *)data; const uint8x16_t shuf_mask = {3, 2, 1, 0, 7, 6, 5, 4, 11, 10, --2.23.0
Re: [dpdk-dev] [PATCH 1/3] net/hinic: restore vectorised code
Quoted 21 lines · Ruifeng Wang
Quoted 21 lines
Subject: [PATCH 1/3] net/hinic: restore vectorised code
Following make support removal, the vectorised code is not built anymore, fix the build flag check.
Fixes 3cc6ecfdfe85 ("build: remove makefiles")Signed-off-by David Marchand <[email protected]>--- drivers/net/hinic/hinic_pmd_rx.c | 6 +++--- drivers/net/hinic/hinic_pmd_tx.c | 10 +++++----- 2 files changed, 8 insertions(+), 8 deletions(-)drivers/net/hinic/hinic_pmd_rx.c +0
-0@@ -4,7 +4,7 @@
Quoted 7 lines
drivers/net/hinic/hinic_pmd_rx.c line 7
Quoted 4 lines
drivers/net/hinic/hinic_pmd_rx.c +1
-1#include <rte_ether.h> #include <rte_mbuf.h> -#ifdef __ARM64_NEON__ +#ifdef RTE_ARCH_ARM64 We can test '
__ARM_NEON' which will be defined by compilers.
https://developer.arm.com/documentation/ihi0053/latest/
On the principle, I agree, but this was not what was tested before.
The activation was only gated by checking for the arm architecture.
See: https://git.dpdk.org/dpdk/tree/drivers/net/hinic/Makefile?id=05b6eee7bdabf7c17ed69c44515e0cd7d6e1da23#n14
So I restored the test as it was before make removal.
What you propose can be done in a followup from the hinic developers, but the minimal fix is still this current patch.
Signature · 1 line
David Marchand
Ruifeng Wang
Reviewed-byRe: [dpdk-dev] [PATCH 1/3] net/hinic: restore vectorised code
Quoted 45 lines
-----Original Message-----
From: David Marchand <[email protected]>
Sent: Monday, January 18, 2021 4:18 PM
To: Ruifeng Wang <[email protected]>
Cc: [email protected]; [email protected]; [email protected]; Ziyang Xuan <[email protected]>; Xiaoyun Wang <[email protected]>; Guoyang Zhou <[email protected]>; Ciara Power <[email protected]>; [email protected]; nd <[email protected]>
Subject: Re: [PATCH 1/3] net/hinic: restore vectorised codeQuoted 21 lines · Ruifeng Wang
Quoted 21 lines
Subject: [PATCH 1/3] net/hinic: restore vectorised code
Following make support removal, the vectorised code is not built anymore, fix the build flag check.
Fixes 3cc6ecfdfe85 ("build: remove makefiles")Signed-off-by David Marchand <[email protected]>--- drivers/net/hinic/hinic_pmd_rx.c | 6 +++--- drivers/net/hinic/hinic_pmd_tx.c | 10 +++++----- 2 files changed, 8 insertions(+), 8 deletions(-)drivers/net/hinic/hinic_pmd_rx.c +0
-0@@ -4,7 +4,7 @@Quoted 7 lines
drivers/net/hinic/hinic_pmd_rx.c line 7
Quoted 4 lines
drivers/net/hinic/hinic_pmd_rx.c +1
-1#include <rte_ether.h> #include <rte_mbuf.h> -#ifdef __ARM64_NEON__ +#ifdef RTE_ARCH_ARM64 We can test '
__ARM_NEON' which will be defined by compilers.
https://developer.arm.com/documentation/ihi0053/latest/On the principle, I agree, but this was not what was tested before.
Quoted 8 lines
The activation was only gated by checking for the arm architecture. See:
https://git.dpdk.org/dpdk/tree/drivers/net/hinic/Makefile?id=05b6eee7bda
bf7c17ed69c44515e0cd7d6e1da23#n14
So I restored the test as it was before make removal.What you propose can be done in a followup from the hinic developers, but the minimal fix is still this current patch.
I'm OK with this.
Quoted 4 lines
--
David Marchand
PATCH 2/3 net/i40e: remove vector config
In reply to David MarchandThis config item is not exposed anymore now that we removed make support.
Note: all architectures provide vectorised functions.
--- drivers/net/i40e/i40e_rxtx.c | 52 ------------------------------------ drivers/net/i40e/meson.build | 3 --- 2 files changed, 55 deletions(-)
drivers/net/i40e/i40e_rxtx.c +0 -52
@@ -3444,58 +3444,6 @@ i40e_set_default_pctype_table(struct rte_eth_dev *dev) } } -#ifndef RTE_LIBRTE_I40E_INC_VECTOR -int -i40e_rx_vec_dev_conf_condition_check(struct rte_eth_dev __rte_unused *dev) -{ -return -1 ; -} - -uint16_t -i40e_recv_pkts_vec ( - void __rte_unused *rx_queue, - struct rte_mbuf __rte_unused **rx_pkts, - uint16_t __rte_unused nb_pkts) -{ -return 0 ; -} - -uint16_t -i40e_recv_scattered_pkts_vec ( - void __rte_unused *rx_queue, - struct rte_mbuf __rte_unused **rx_pkts, - uint16_t __rte_unused nb_pkts) -{ -return 0 ; -} - -int -i40e_rxq_vec_setup(struct i40e_rx_queue __rte_unused *rxq) -{ -return -1 ; -} - -int -i40e_txq_vec_setup(struct i40e_tx_queue __rte_unused *txq) -{ -return -1 ; -} - -void -i40e_rx_queue_release_mbufs_vec(struct i40e_rx_queue __rte_unused*rxq) -{ -return ; -} - -uint16_t -i40e_xmit_fixed_burst_vec(void __rte_unused * tx_queue, - struct rte_mbuf __rte_unused **tx_pkts, - uint16_t __rte_unused nb_pkts) -{ -return 0 ; -} -#endif /* ifndef RTE_LIBRTE_I40E_INC_VECTOR */ -#ifndef CC_AVX2_SUPPORT uint16_t i40e_recv_pkts_vec_avx2(void __rte_unused *rx_queue,
drivers/net/i40e/meson.build +0 -3
@@ -26,7 +26,6 @@ deps += ['hash'] includes += include_directories('base') if arch_subdir == 'x86' - dpdk_conf.set('RTE_LIBRTE_I40E_INC_VECTOR', 1) sources += files('i40e_rxtx_vec_sse.c') # compile AVX2 version if either:
@@ -46,10 +45,8 @@ if arch_subdir == 'x86' objs += i40e_avx2_lib.extract_objects('i40e_rxtx_vec_avx2.c') endif elif arch_subdir == 'ppc' - dpdk_conf.set('RTE_LIBRTE_I40E_INC_VECTOR', 1) sources += files('i40e_rxtx_vec_altivec.c') elif arch_subdir == 'arm' - dpdk_conf.set('RTE_LIBRTE_I40E_INC_VECTOR', 1) sources += files('i40e_rxtx_vec_neon.c') endif
Signature · 1 line
2.23.0
Re: [dpdk-dev] [PATCH 2/3] net/i40e: remove vector config
Quoted 5 lines · David Marchand
This config item is not exposed anymore now that we removed make support.
Note: all architectures provide vectorised functions.Signed-off-by David Marchand <[email protected]>
PATCH 3/3 net/fm10k: remove vector config
In reply to David MarchandThis config item is not exposed anymore now that we removed make support.
--- drivers/net/fm10k/meson.build | 1 - 1 file changed, 1 deletion(-)
drivers/net/fm10k/meson.build +0 -1
@@ -15,7 +15,6 @@ sources = files( 'fm10k_rxtx.c', ) if arch_subdir == 'x86' - dpdk_conf.set('RTE_LIBRTE_FM10K_INC_VECTOR', 1) sources += files('fm10k_rxtx_vec.c') endif
Signature · 1 line
2.23.0
Re: [dpdk-dev] [PATCH 3/3] net/fm10k: remove vector config
Quoted 4 lines · David Marchand
This config item is not exposed anymore now that we removed make support.
Signed-off-by David Marchand <[email protected]>
Quoted 4 lines · David Marchand
Some fixes following make support removal.
The first patch is a real fix.
The other two are cleanups so I did not mark them for backport.
Series applied to dpdk-next-net/main, thanks.