*** fix native clang compiling errors on ARM64 ***
cover *** fix native clang compiling errors on ARM64 ***
*** The patches are for fixing the native clang compiling errors on ARM64 building hosts.***
Gavin Hu (4):
app: add LDFLAGS -latomic to link atomic lib
Driver/Mellanox: fix PMD compiling issue
cryptodev: fix the clang compiling issue
ifpgai_rawdev: fix the clang compiling issue
drivers/net/mlx5/mlx5_rxtx_vec_neon.h | 12 ++++++------ drivers/raw/ifpga_rawdev/base/ifpga_defines.h | 3 ++- lib/librte_eventdev/rte_event_crypto_adapter.c | 2 +- mk/rte.app.mk | 1 + 4 files changed, 10 insertions(+), 8 deletions(-)
Signature · 1 line
2.1.4
PATCH 1/4 app: add LDFLAGS -latomic to link atomic lib
For ARM64 platform, libdpdk.a includes the librte_pmd_octeontx_ssovf.a, which requires the libatomic.a support.The atomic lib is built-in in the gcc toolchain, but for clang it has to be explicitly linked.
For more details, please refer to https://clang.llvm.org/docs/Toolchain.html
~/dpdk/build/lib/librte_pmd_octeontx_ssovf.a(timvf_worker.o): In function `timvf_timer_cancel_burst':
timvf_worker.c:(.text+0x80): undefined reference to __atomic_fetch_add_8' /home/gavin/arm_repo/dpdk/build/lib/librte_pmd_octeontx_ssovf.a(timvf_worker.o): In function timvf_timer_arm_burst_sp':
timvf_worker.c:(.text+0x200): undefined reference to __atomic_fetch_add_8' timvf_worker.c:(.text+0x244): undefined reference to __atomic_store_2' timvf_worker.c:(.text+0x278): undefined reference to __atomic_fetch_add_4' timvf_worker.c:(.text+0x30c): undefined reference to __atomic_store_2'
--- mk/rte.app.mk | 1 + 1 file changed, 1 insertion(+)
mk/rte.app.mk +1 -0
@@ -51,6 +51,7 @@ endif # Link only the libraries used in the application LDFLAGS += --as-needed +LDFLAGS += -latomic # default path for libs _LDLIBS-y += -L$(RTE_SDK_BIN)/lib
Signature · 1 line
2.1.4
Re: [PATCH 1/4] app: add LDFLAGS -latomic to link atomic lib
Quoted 13 lines · Gavin Hu
For ARM64 platform, libdpdk.a includes the librte_pmd_octeontx_ssovf.a, which requires the libatomic.a support.The atomic lib is built-in in the gcc toolchain, but for clang it has to be explicitly linked.
For more details, please refer to https://clang.llvm.org/docs/Toolchain.html~/dpdk/build/lib/librte_pmd_octeontx_ssovf.a(timvf_worker.o): In function `timvf_timer_cancel_burst':
timvf_worker.c:(.text+0x80): undefined reference to__atomic_fetch_add_8' /home/gavin/arm_repo/dpdk/build/lib/librte_pmd_octeontx_ssovf.a(timvf_worker.o): In functiontimvf_timer_arm_burst_sp':
timvf_worker.c:(.text+0x200): undefined reference to__atomic_fetch_add_8' timvf_worker.c:(.text+0x244): undefined reference to__atomic_store_2' timvf_worker.c:(.text+0x278): undefined reference to__atomic_fetch_add_4' timvf_worker.c:(.text+0x30c): undefined reference to__atomic_store_2'
Quoted 3 lines
Signed-off-by Gavin Hu <[email protected]>Reviewed-by Honnappa Nagarahalli <[email protected]>---
Is an equivalent change also needed for the meson build too?
/Bruce
Re: [PATCH 1/4] app: add LDFLAGS -latomic to link atomic lib
Hi Bruce,
CC=clang Meson build did not hit this issue.
The GNU Makefile using clang hit this issue:
make config T=arm64-armv8a-linuxapp-clang
Best Regards,
Gavin
-----Original Message-----
From: Bruce Richardson <[email protected]>
Sent: Tuesday, May 15, 2018 5:00 PM
To: Gavin Hu <[email protected]>
Cc: [email protected]
Subject: Re: [dpdk-dev] [PATCH 1/4] app: add LDFLAGS -latomic to link atomic lib
Quoted 14 lines · Gavin Hu
For ARM64 platform, libdpdk.a includes the
librte_pmd_octeontx_ssovf.a, which requires the libatomic.a
support.The atomic lib is built-in in the gcc toolchain, but for clang it has to be explicitly linked. For more details, please refer to
https://clang.llvm.org/docs/Toolchain.html~/dpdk/build/lib/librte_pmd_octeontx_ssovf.a(timvf_worker.o): In function `timvf_timer_cancel_burst':
timvf_worker.c:(.text+0x80): undefined reference to__atomic_fetch_add_8' /home/gavin/arm_repo/dpdk/build/lib/librte_pmd_octeontx_ssovf.a(timvf_worker.o): In functiontimvf_timer_arm_burst_sp':
timvf_worker.c:(.text+0x200): undefined reference to__atomic_fetch_add_8' timvf_worker.c:(.text+0x244): undefined reference to__atomic_store_2' timvf_worker.c:(.text+0x278): undefined reference to__atomic_fetch_add_4' timvf_worker.c:(.text+0x30c): undefined reference to__atomic_store_2'
Quoted 3 lines
Signed-off-by Gavin Hu <[email protected]>Reviewed-by Honnappa Nagarahalli <[email protected]>---
Is an equivalent change also needed for the meson build too?
/Bruce
IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.
Re: [PATCH 1/4] app: add LDFLAGS -latomic to link atomic lib
In reply to Gavin Hu-----Original Message-----
Quoted 19 lines
Date: Tue, 15 May 2018 04:28:41 -0400
From: Gavin Hu <[email protected]>
To: [email protected]
Subject: [dpdk-dev] [PATCH 1/4] app: add LDFLAGS -latomic to link atomic lib
X-Mailer: git-send-email 2.1.4For ARM64 platform, libdpdk.a includes the librte_pmd_octeontx_ssovf.a, which requires the libatomic.a support.The atomic lib is built-in in the gcc toolchain, but for clang it has to be explicitly linked.
For more details, please refer to https://clang.llvm.org/docs/Toolchain.html~/dpdk/build/lib/librte_pmd_octeontx_ssovf.a(timvf_worker.o): In function `timvf_timer_cancel_burst':
timvf_worker.c:(.text+0x80): undefined reference to__atomic_fetch_add_8' /home/gavin/arm_repo/dpdk/build/lib/librte_pmd_octeontx_ssovf.a(timvf_worker.o): In functiontimvf_timer_arm_burst_sp':
timvf_worker.c:(.text+0x200): undefined reference to__atomic_fetch_add_8' timvf_worker.c:(.text+0x244): undefined reference to__atomic_store_2' timvf_worker.c:(.text+0x278): undefined reference to__atomic_fetch_add_4' timvf_worker.c:(.text+0x30c): undefined reference to__atomic_store_2'
Quoted 2 lines
Signed-off-by Gavin Hu <[email protected]>Reviewed-by Honnappa Nagarahalli <[email protected]>
Following patch is part of upstream. Are you testing with following patch/upstream.
commit 55fbc92d7800100628579643c9ee2770614fef10
Author: Pavan Nikhilesh <[email protected]> Date: Wed May 9 02:56:00 2018 +0530
event/octeontx: fix build with clang 6
Clang 6 & 7 fail to naturally align packed structs due to this clang can't use 8byte atomic primitives and splits them into lesser atomic primitives. To use lesser atomic primitives we need to link
libatomic
(-latomic), instead supply alignment attribute to the compiler.
timvf_worker.c:(.text+0x498): undefined reference to
`__atomic_fetch_add_8'
timvf_worker.c:(.text+0x525): undefined reference to
`__atomic_store_2'
timvf_worker.c:(.text+0x557): undefined reference to
`__atomic_fetch_add_4'
timvf_worker.c:(.text+0x5de): undefined reference to`__atomic_store_2'
adapter")
Quoted 19 lines
--- mk/rte.app.mk | 1 + 1 file changed, 1 insertion(+)mk/rte.app.mk +1
-0@@ -51,6 +51,7 @@ endif # Link only the libraries used in the application LDFLAGS += --as-needed +LDFLAGS += -latomic # default path for libs _LDLIBS-y += -L$(RTE_SDK_BIN)/libSignature · 1 line
2.1.4
PATCH 2/4 Driver/Mellanox: fix PMD compiling issue
In reply to Gavin Hu--- drivers/net/mlx5/mlx5_rxtx_vec_neon.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)
drivers/net/mlx5/mlx5_rxtx_vec_neon.h +6 -6
@@ -167,8 +167,8 @@ txq_scatter_v(struct mlx5_txq_data *txq, struct rte_mbuf **pkts,vst1q_u8 ((void *)t_wqe, ctrl);/* Fill ESEG in the header. */ vst1q_u16 ((void *)(t_wqe +1 ), - (uint16x8_t ) {0 ,0 , cs_flags,rte_cpu_to_be_16 (len), -0 ,0 ,0 ,0 }); + ((uint16x8_t ) {0 ,0 , cs_flags,rte_cpu_to_be_16 (len), +0 ,0 ,0 ,0 })); txq->wqe_ci = wqe_ci; }if (!n)
@@ -300,10 +300,10 @@ txq_burst_v(struct mlx5_txq_data *txq, struct rte_mbuf **pkts, uint16_t pkts_n,vst1q_u8 ((void *)t_wqe, ctrl);/* Fill ESEG in the header. */ vst1q_u8 ((void *)(t_wqe +1 ), - (uint8x16_t ) {0 ,0 ,0 ,0 , - cs_flags,0 ,0 ,0 , -0 ,0 ,0 ,0 , -0 ,0 ,0 ,0 }); + ((uint8x16_t ) {0 ,0 ,0 ,0 , + cs_flags,0 ,0 ,0 , +0 ,0 ,0 ,0 , +0 ,0 ,0 ,0 }));#ifdef MLX5_PMD_SOFT_COUNTERS txq->stats.opackets += pkts_n;#endif
Signature · 1 line
2.1.4
Re: [PATCH 2/4] Driver/Mellanox: fix PMD compiling issue
-----Original Message-----
Quoted 6 lines
Date: Tue, 15 May 2018 04:28:42 -0400
From: Gavin Hu <[email protected]>
To: [email protected]
CC: Sirshak Das <[email protected]>
Subject: [dpdk-dev] [PATCH 2/4] Driver/Mellanox: fix PMD compiling issue
X-Mailer: git-send-email 2.1.4
Please add the reason and compilation error log.
and make sure to fix check patch.sh and check-gitlog.sh errors.
Quoted 42 lines
Signed-off-by Gavin Hu <[email protected]>Signed-off-by Sirshak Das <[email protected]>Reviewed-by Phil Yang <[email protected]>Reviewed-by Honnappa Nagarahalli <[email protected]>--- drivers/net/mlx5/mlx5_rxtx_vec_neon.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)drivers/net/mlx5/mlx5_rxtx_vec_neon.h +6
-6@@ -167,8 +167,8 @@ txq_scatter_v(struct mlx5_txq_data *txq, struct rte_mbuf **pkts,vst1q_u8 ((void *)t_wqe, ctrl);/* Fill ESEG in the header. */ vst1q_u16 ((void *)(t_wqe +1 ), - (uint16x8_t ) {0 ,0 , cs_flags,rte_cpu_to_be_16 (len), -0 ,0 ,0 ,0 }); + ((uint16x8_t ) {0 ,0 , cs_flags,rte_cpu_to_be_16 (len), +0 ,0 ,0 ,0 })); txq->wqe_ci = wqe_ci; }if (!n)@@ -300,10 +300,10 @@ txq_burst_v(struct mlx5_txq_data *txq, struct rte_mbuf **pkts, uint16_t pkts_n,vst1q_u8 ((void *)t_wqe, ctrl);/* Fill ESEG in the header. */ vst1q_u8 ((void *)(t_wqe +1 ), - (uint8x16_t ) {0 ,0 ,0 ,0 , - cs_flags,0 ,0 ,0 , -0 ,0 ,0 ,0 , -0 ,0 ,0 ,0 }); + ((uint8x16_t ) {0 ,0 ,0 ,0 , + cs_flags,0 ,0 ,0 , +0 ,0 ,0 ,0 , +0 ,0 ,0 ,0 }));#ifdef MLX5_PMD_SOFT_COUNTERS txq->stats.opackets += pkts_n;#endif Signature · 1 line
2.1.4
PATCH 3/4 cryptodev: fix the clang compiling issue
In reply to Gavin Hu~/dpdk/lib/librte_eventdev/rte_event_crypto_adapter.c:530:49: error: 'rte_memcpy' call operates on objects of type 'struct rte_event' while the size is based on a different type
'struct rte_event *' [-Werror,-Wsizeof-pointer-memaccess]
rte_memcpy(ev, &m_data->response_info, sizeof(ev));
~~ ^~~/arm_repo/dpdk/lib/librte_eventdev/rte_event_crypto_adapter.c:530:49: note: did you mean to dereference the argument to 'sizeof' (and multiply it by the number of elements)?
rte_memcpy(ev, &m_data->response_info, sizeof(ev));
--- lib/librte_eventdev/rte_event_crypto_adapter.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
lib/librte_eventdev/rte_event_crypto_adapter.c +1 -1
@@ -527,7 +527,7 @@ eca_ops_enqueue_burst(struct rte_event_crypto_adapter *adapter,continue ; } -rte_memcpy (ev, &m_data->response_info,sizeof (ev)); +rte_memcpy (ev, &m_data->response_info,sizeof (struct rte_event )); ev->event_ptr = ops[i]; ev->event_type =RTE_EVENT_TYPE_CRYPTODEV ;if (adapter->implicit_release_disabled)
Signature · 1 line
2.1.4
PATCH 4/4 ifpgai_rawdev: fix the clang compiling issue
In reply to Gavin HuNewly introduced #pragma pack(1) in the header file caused comipiling issues for the files who included it.
In file included from ~/dpdk/drivers/raw/ifpga_rawdev/base/ifpga_fme_dperf.c:5:
In file included from ~/dpdk/drivers/raw/ifpga_rawdev/base/ifpga_feature_dev.h:8:~/dpdk/drivers/raw/ifpga_rawdev/base/ifpga_hw.h:8:10: error: the current #pragma pack aligment value is modified in the included file [-Werror,-Wpragma-pack] ~/dpdk/drivers/raw/ifpga_rawdev/base/ifpga_defines.h:100:9: note: previous '#pragma pack' directive that modifies alignment is here.
The fix is to change the #pragma pack alignment locally and not have effect on other files who included this header file.
--- drivers/raw/ifpga_rawdev/base/ifpga_defines.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/raw/ifpga_rawdev/base/ifpga_defines.h +2 -1
@@ -97,7 +97,7 @@ enum port_feature_id {/* * All headers and structures must be byte-packed to match the spec. */ -#pragma pack(1) +#pragma pack(push,1) struct feature_header { union {
@@ -1659,4 +1659,5 @@ struct bts_header { (((bts_hdr)->guid_h ==GBS_GUID_H ) && \ ((bts_hdr)->guid_l == GBS_GUID_L)) +#pragma pack(pop)#endif /* _BASE_IFPGA_DEFINES_H_ */
Signature · 1 line
2.1.4
PATCH v2 1/4 app: add LDFLAGS -latomic to link atomic lib
In reply to Gavin HuFor ARM64 platform, libdpdk.a includes the librte_pmd_octeontx_ssovf.a, which requires the libatomic.a support.The atomic lib is built-in in the gcc toolchain, but for clang it has to be explicitly linked.
For more details, please refer to https://clang.llvm.org/docs/Toolchain.html
~/dpdk/build/lib/librte_pmd_octeontx_ssovf.a(timvf_worker.o): In function `timvf_timer_cancel_burst':
timvf_worker.c:(.text+0x80): undefined reference to `__atomic_fetch_add_8' /home/gavin/arm_repo/dpdk/build/lib/librte_pmd_octeontx_ssovf.a(timvf_worker.o):
In function `timvf_timer_arm_burst_sp':
timvf_worker.c:(.text+0x200): undefined reference to __atomic_fetch_add_8' timvf_worker.c:(.text+0x244): undefined reference to __atomic_store_2' timvf_worker.c:(.text+0x278): undefined reference to __atomic_fetch_add_4' timvf_worker.c:(.text+0x30c): undefined reference to __atomic_store_2'
--- mk/rte.app.mk | 1 + 1 file changed, 1 insertion(+)
mk/rte.app.mk +1 -0
@@ -51,6 +51,7 @@ endif # Link only the libraries used in the application LDFLAGS += --as-needed +LDFLAGS += -latomic # default path for libs _LDLIBS-y += -L$(RTE_SDK_BIN)/lib
Signature · 1 line
2.1.4
PATCH v2 2/4 Driver/Mellanox: fix PMD compiling issue
--- drivers/net/mlx5/mlx5_rxtx_vec_neon.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)
drivers/net/mlx5/mlx5_rxtx_vec_neon.h +6 -6
@@ -167,8 +167,8 @@ txq_scatter_v(struct mlx5_txq_data *txq, struct rte_mbuf **pkts,vst1q_u8 ((void *)t_wqe, ctrl);/* Fill ESEG in the header. */ vst1q_u16 ((void *)(t_wqe +1 ), - (uint16x8_t ) {0 ,0 , cs_flags,rte_cpu_to_be_16 (len), -0 ,0 ,0 ,0 }); + ((uint16x8_t ) {0 ,0 , cs_flags,rte_cpu_to_be_16 (len), +0 ,0 ,0 ,0 })); txq->wqe_ci = wqe_ci; }if (!n)
@@ -300,10 +300,10 @@ txq_burst_v(struct mlx5_txq_data *txq, struct rte_mbuf **pkts, uint16_t pkts_n,vst1q_u8 ((void *)t_wqe, ctrl);/* Fill ESEG in the header. */ vst1q_u8 ((void *)(t_wqe +1 ), - (uint8x16_t ) {0 ,0 ,0 ,0 , - cs_flags,0 ,0 ,0 , -0 ,0 ,0 ,0 , -0 ,0 ,0 ,0 }); + ((uint8x16_t ) {0 ,0 ,0 ,0 , + cs_flags,0 ,0 ,0 , +0 ,0 ,0 ,0 , +0 ,0 ,0 ,0 }));#ifdef MLX5_PMD_SOFT_COUNTERS txq->stats.opackets += pkts_n;#endif
Signature · 1 line
2.1.4
Re: [PATCH v2 2/4] Driver/Mellanox: fix PMD compiling issue
Quoted 2 lines · Gavin Hu
The title should start from 'net/mlx5: ...' and please be more specific why that pair of parentheses is needed. Add more commit messages and it'd be better to add the error messages like you do in the other commit.
To me, it still looks unnecessary.
Thanks,
Yongseok
Quoted 41 lines
Signed-off-by Gavin Hu <[email protected]>Signed-off-by Sirshak Das <[email protected]>Reviewed-by Phil Yang <[email protected]>Reviewed-by Honnappa Nagarahalli <[email protected]>---
drivers/net/mlx5/mlx5_rxtx_vec_neon.h| 12 ++++++------1 file changed, 6 insertions(+), 6 deletions(-)drivers/net/mlx5/mlx5_rxtx_vec_neon.h +6
-6@@ -167,8 +167,8 @@ txq_scatter_v(struct mlx5_txq_data *txq, struct rte_mbuf **pkts,vst1q_u8 ((void *)t_wqe, ctrl);/* Fill ESEG in the header. */ vst1q_u16 ((void *)(t_wqe +1 ), - (uint16x8_t ) {0 ,0 , cs_flags,rte_cpu_to_be_16 (len), -0 ,0 ,0 ,0 }); + ((uint16x8_t ) {0 ,0 , cs_flags,rte_cpu_to_be_16 (len), +0 ,0 ,0 ,0 })); txq->wqe_ci = wqe_ci; }if (!n)@@ -300,10 +300,10 @@ txq_burst_v(struct mlx5_txq_data *txq, struct rte_mbuf **pkts, uint16_t pkts_n,vst1q_u8 ((void *)t_wqe, ctrl);/* Fill ESEG in the header. */ vst1q_u8 ((void *)(t_wqe +1 ), - (uint8x16_t ) {0 ,0 ,0 ,0 , - cs_flags,0 ,0 ,0 , -0 ,0 ,0 ,0 , -0 ,0 ,0 ,0 }); + ((uint8x16_t ) {0 ,0 ,0 ,0 , + cs_flags,0 ,0 ,0 , +0 ,0 ,0 ,0 , +0 ,0 ,0 ,0 }));#ifdef MLX5_PMD_SOFT_COUNTERS txq->stats.opackets += pkts_n;#endif Signature · 1 line
2.1.4
Re: [PATCH v2 2/4] Driver/Mellanox: fix PMD compiling issue
Hi Yongseok,
We will make the commit message more verbose.
As for the error: This is a clang compiler issue:drivers/net/mlx5/mlx5_rxtx_vec.c:37:/home/sirdas/code/commitc/dpdk-stable-18.02.1/drivers/net/mlx5/mlx5_rxtx_vec_neon.h:170:24: error: too many arguments provided to function-like macro invocation
(uint16x8_t) { 0, 0, cs_flags,
rte_cpu_to_be_16(len),Thank you
Sirshak Das.
Quoted 52 lines · Yongseok Koh
Quoted 1 line · Gavin Hu
The title should start from 'net/mlx5: ...' and please be more specific why that pair of parentheses is needed. Add more commit messages and it'd be better to add the error messages like you do in the other commit.
To me, it still looks unnecessary.
Thanks,
YongseokQuoted 41 lines
Signed-off-by Gavin Hu <[email protected]>Signed-off-by Sirshak Das <[email protected]>Reviewed-by Phil Yang <[email protected]>Reviewed-by Honnappa Nagarahalli <[email protected]>---
drivers/net/mlx5/mlx5_rxtx_vec_neon.h| 12 ++++++------1 file changed, 6 insertions(+), 6 deletions(-)drivers/net/mlx5/mlx5_rxtx_vec_neon.h +6
-6@@ -167,8 +167,8 @@ txq_scatter_v(struct mlx5_txq_data *txq, struct rte_mbuf **pkts,vst1q_u8 ((void *)t_wqe, ctrl);/* Fill ESEG in the header. */ vst1q_u16 ((void *)(t_wqe +1 ), - (uint16x8_t ) {0 ,0 , cs_flags,rte_cpu_to_be_16 (len), -0 ,0 ,0 ,0 }); + ((uint16x8_t ) {0 ,0 , cs_flags,rte_cpu_to_be_16 (len), +0 ,0 ,0 ,0 })); txq->wqe_ci = wqe_ci; }if (!n)@@ -300,10 +300,10 @@ txq_burst_v(struct mlx5_txq_data *txq, struct rte_mbuf **pkts, uint16_t pkts_n,vst1q_u8 ((void *)t_wqe, ctrl);/* Fill ESEG in the header. */ vst1q_u8 ((void *)(t_wqe +1 ), - (uint8x16_t ) {0 ,0 ,0 ,0 , - cs_flags,0 ,0 ,0 , -0 ,0 ,0 ,0 , -0 ,0 ,0 ,0 }); + ((uint8x16_t ) {0 ,0 ,0 ,0 , + cs_flags,0 ,0 ,0 , +0 ,0 ,0 ,0 , +0 ,0 ,0 ,0 }));#ifdef MLX5_PMD_SOFT_COUNTERS txq->stats.opackets += pkts_n;#endif Signature · 1 line
2.1.4
Yongseok Koh
Acked-byRe: [PATCH v2 2/4] Driver/Mellanox: fix PMD compiling issue
Quoted 11 lines · Sirshak Das
Hi Yongseok,
We will make the commit message more verbose.
As for the error: This is a clang compiler issue:drivers/net/mlx5/mlx5_rxtx_vec.c:37:/home/sirdas/code/commitc/dpdk-stable-18.02.1/drivers/net/mlx5/mlx5_rxtx_vec_neon.h:170:24: error: too many arguments provided to function-like macro invocation(uint16x8_t) { 0, 0, cs_flags, rte_cpu_to_be_16(len),
Thanks for explanation.
Please add my acked-by tag when you submit the new version with
a) title change b) verbose commit message.
Thank you for contribution!
Yongseok
Quoted 55 lines
Quoted 52 lines · Yongseok Koh
Quoted 1 line · Gavin Hu
The title should start from 'net/mlx5: ...' and please be more specific why that pair of parentheses is needed. Add more commit messages and it'd be better to add the error messages like you do in the other commit.
To me, it still looks unnecessary.
Thanks,
YongseokQuoted 41 lines
Signed-off-by Gavin Hu <[email protected]>Signed-off-by Sirshak Das <[email protected]>Reviewed-by Phil Yang <[email protected]>Reviewed-by Honnappa Nagarahalli <[email protected]>---
drivers/net/mlx5/mlx5_rxtx_vec_neon.h| 12 ++++++------1 file changed, 6 insertions(+), 6 deletions(-)drivers/net/mlx5/mlx5_rxtx_vec_neon.h +6
-6@@ -167,8 +167,8 @@ txq_scatter_v(struct mlx5_txq_data *txq, struct rte_mbuf **pkts,vst1q_u8 ((void *)t_wqe, ctrl);/* Fill ESEG in the header. */ vst1q_u16 ((void *)(t_wqe +1 ), - (uint16x8_t ) {0 ,0 , cs_flags,rte_cpu_to_be_16 (len), -0 ,0 ,0 ,0 }); + ((uint16x8_t ) {0 ,0 , cs_flags,rte_cpu_to_be_16 (len), +0 ,0 ,0 ,0 })); txq->wqe_ci = wqe_ci; }if (!n)@@ -300,10 +300,10 @@ txq_burst_v(struct mlx5_txq_data *txq, struct rte_mbuf **pkts, uint16_t pkts_n,vst1q_u8 ((void *)t_wqe, ctrl);/* Fill ESEG in the header. */ vst1q_u8 ((void *)(t_wqe +1 ), - (uint8x16_t ) {0 ,0 ,0 ,0 , - cs_flags,0 ,0 ,0 , -0 ,0 ,0 ,0 , -0 ,0 ,0 ,0 }); + ((uint8x16_t ) {0 ,0 ,0 ,0 , + cs_flags,0 ,0 ,0 , +0 ,0 ,0 ,0 , +0 ,0 ,0 ,0 }));#ifdef MLX5_PMD_SOFT_COUNTERS txq->stats.opackets += pkts_n;#endif Signature · 1 line
2.1.4
PATCH v2 3/4 cryptodev: fix the clang compiling issue
In reply to Gavin Hu~/dpdk/lib/librte_eventdev/rte_event_crypto_adapter.c:530:49: error:
'rte_memcpy' call operates on objects of type 'struct rte_event' while the size is based on a different type
'struct rte_event *' [-Werror,-Wsizeof-pointer-memaccess]
rte_memcpy(ev, &m_data->response_info, sizeof(ev));~/arm_repo/dpdk/lib/librte_eventdev/rte_event_crypto_adapter.c:530:49:
note: did you mean to dereference the argument to 'sizeof' (and multiply it by the number of elements)?
rte_memcpy(ev, &m_data->response_info, sizeof(ev));
--- lib/librte_eventdev/rte_event_crypto_adapter.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
lib/librte_eventdev/rte_event_crypto_adapter.c +2 -1
@@ -527,7 +527,8 @@ eca_ops_enqueue_burst(struct rte_event_crypto_adapter *adapter,continue ; } -rte_memcpy (ev, &m_data->response_info,sizeof (ev)); +rte_memcpy (ev, &m_data->response_info, +sizeof (struct rte_event )); ev->event_ptr = ops[i]; ev->event_type =RTE_EVENT_TYPE_CRYPTODEV ;if (adapter->implicit_release_disabled)
Signature · 1 line
2.1.4
Re: [PATCH v2 3/4] cryptodev: fix the clang compiling issue
-----Original Message-----
Quoted 27 lines
Date: Tue, 15 May 2018 05:23:46 -0400
From: Gavin Hu <[email protected]>
To: [email protected]
Subject: [dpdk-dev] [PATCH v2 3/4] cryptodev: fix the clang compiling issue
X-Mailer: git-send-email 2.1.4
~/dpdk/lib/librte_eventdev/rte_event_crypto_adapter.c:530:49: error:
'rte_memcpy' call operates on objects of type 'structrte_event' while the size is based on a different type
'structrte_event*' [-Werror,-Wsizeof-pointer-memaccess]
rte_memcpy(ev, &m_data->response_info, sizeof(ev));~/arm_repo/dpdk/lib/librte_eventdev/rte_event_crypto_adapter.c:530:49:
note: did you mean to dereference the argument to 'sizeof' (and multiply it by the number of elements)?rte_memcpy(ev, &m_data->response_info, sizeof(ev));Signed-off-by Gavin Hu <[email protected]>Reviewed-by Honnappa Nagarahalli <[email protected]>--- lib/librte_eventdev/rte_event_crypto_adapter.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)lib/librte_eventdev/rte_event_crypto_adapter.c +0
-0
lib/librte_eventdev/rte_event_crypto_adapter.c eca_ops_enqueue_burst(struct rte_event_crypto_adapter *adapter, · line 531
Quoted 6 lines
lib/librte_eventdev/rte_event_crypto_adapter.c +2
-1@@ -527,7 +527,8 @@ eca_ops_enqueue_burst(struct rte_event_crypto_adapter *adapter,continue ; } -rte_memcpy (ev, &m_data->response_info,sizeof (ev)); +rte_memcpy (ev, &m_data->response_info, +sizeof (struct rte_event ));
Following could be a shorter replacement.
rte_memcpy(ev, &m_data->response_info, sizeof(*ev));
Quoted 6 lines
lib/librte_eventdev/rte_event_crypto_adapter.c +0
-0ev->event_ptr = ops[i]; ev->event_type =RTE_EVENT_TYPE_CRYPTODEV ;if (adapter->implicit_release_disabled)Signature · 1 line
2.1.4
Re: [PATCH v2 3/4] cryptodev: fix the clang compiling issue
Quoted 16 lines
-----Original Message-----
From: dev [mailto:[email protected]] On Behalf Of Jerin Jacob
Sent: Tuesday, May 15, 2018 12:42 PM
To: Gavin Hu <[email protected]>
Cc: [email protected]
Subject: Re: [dpdk-dev] [PATCH v2 3/4] cryptodev: fix the clang compiling issue-----Original Message-----
Quoted 6 lines
Date: Tue, 15 May 2018 05:23:46 -0400
From: Gavin Hu <[email protected]>
To: [email protected]
Subject: [dpdk-dev] [PATCH v2 3/4] cryptodev: fix the clang compiling issue
X-Mailer: git-send-email 2.1.4
Wrong title, should be "eventdev: fix clang build".
Quoted 41 lines
lib/librte_eventdev/rte_event_crypto_adapter.c eca_ops_enqueue_burst(struct
Quoted 23 lines
~/dpdk/lib/librte_eventdev/rte_event_crypto_adapter.c:530:49: error:
'rte_memcpy' call operates on objects of type 'structrte_event' while the size is based on a different type
'structrte_event*' [-Werror,-Wsizeof-pointer-memaccess]
rte_memcpy(ev, &m_data->response_info, sizeof(ev));~/arm_repo/dpdk/lib/librte_eventdev/rte_event_crypto_adapter.c:530:49:
note: did you mean to dereference the argument to 'sizeof' (and multiply it by the number of elements)?rte_memcpy(ev, &m_data->response_info, sizeof(ev));Signed-off-by Gavin Hu <[email protected]>Reviewed-by Honnappa Nagarahalli <[email protected]>--- lib/librte_eventdev/rte_event_crypto_adapter.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)lib/librte_eventdev/rte_event_crypto_adapter.c +0
-0@@ -527,7 +527,8 @@ eca_ops_enqueue_burst(struct
rte_event_crypto_adapter*adapter,lib/librte_eventdev/rte_event_crypto_adapter.c eca_ops_enqueue_burst(struct rte_event_crypto_adapter *adapter, · line 531
Quoted 6 lines
lib/librte_eventdev/rte_event_crypto_adapter.c +2
-1continue ; } -rte_memcpy (ev, &m_data->response_info,sizeof (ev)); +rte_memcpy (ev, &m_data->response_info, +sizeof (struct rte_event ));Following could be a shorter replacement.
rte_memcpy(ev, &m_data->response_info, sizeof(*ev));Quoted 6 lines
lib/librte_eventdev/rte_event_crypto_adapter.c +0
-1ev->event_ptr = ops[i]; ev->event_type =RTE_EVENT_TYPE_CRYPTODEV ;if (adapter->implicit_release_disabled) --2.1.4
PATCH v2 4/4 ifpgai_rawdev: fix the clang compiling issue
In reply to Gavin HuNewly introduced #pragma pack(1) in the header file caused comipiling issues for the files who included it.
In file included from ~/dpdk/drivers/raw/ifpga_rawdev/base/ifpga_fme_dperf.c:5:
In file included from ~/dpdk/drivers/raw/ifpga_rawdev/base/ifpga_feature_dev.h:8:~/dpdk/drivers/raw/ifpga_rawdev/base/ifpga_hw.h:8:10: error: the current #pragma pack aligment value is modified in the included file [-Werror,-Wpragma-pack] ~/dpdk/drivers/raw/ifpga_rawdev/base/ifpga_defines.h:100:9: note: previous '#pragma pack' directive that modifies alignment is here.
The fix is to change the #pragma pack alignment locally and not have effect on other files who included this header file.
--- drivers/raw/ifpga_rawdev/base/ifpga_defines.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/raw/ifpga_rawdev/base/ifpga_defines.h +2 -1
@@ -97,7 +97,7 @@ enum port_feature_id {/* * All headers and structures must be byte-packed to match the spec. */ -#pragma pack(1) +#pragma pack(push, 1) struct feature_header { union {
@@ -1659,4 +1659,5 @@ struct bts_header { (((bts_hdr)->guid_h ==GBS_GUID_H ) && \ ((bts_hdr)->guid_l == GBS_GUID_L)) +#pragma pack(pop)#endif /* _BASE_IFPGA_DEFINES_H_ */
Signature · 1 line
2.1.4
Re: [PATCH v2 4/4] ifpgai_rawdev: fix the clang compiling issue
-----Original Message-----
Quoted 17 lines
Date: Tue, 15 May 2018 05:23:47 -0400
From: Gavin Hu <[email protected]>
To: [email protected]
Subject: [dpdk-dev] [PATCH v2 4/4]ifpgai_rawdev: fix the clang compiling
issue
X-Mailer: git-send-email 2.1.4Newly introduced #pragma pack(1) in the header file caused comipiling issues for the files who included it.
In file included from
~/dpdk/drivers/raw/ifpga_rawdev/base/ifpga_fme_dperf.c:5:
In file included from~/dpdk/drivers/raw/ifpga_rawdev/base/ifpga_feature_dev.h:8:~/dpdk/drivers/raw/ifpga_rawdev/base/ifpga_hw.h:8:10: error: the current #pragma pack aligment value is modified in the included file [-Werror,-Wpragma-pack]~/dpdk/drivers/raw/ifpga_rawdev/base/ifpga_defines.h:100:9: note: previous '#pragma pack' directive that modifies alignment is here.
Quoted 5 lines
The fix is to change the #pragma pack alignment locally and not have effect on other files who included this header file.
Signed-off-by Gavin Hu <[email protected]>Reviewed-by Honnappa Nagarahalli <[email protected]>
Perhaps this fixes compilation issues clang6 + x86 too.
Please change the subject line to start with raw/ifpga:....
With above change:
Quoted 26 lines
--- drivers/raw/ifpga_rawdev/base/ifpga_defines.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)drivers/raw/ifpga_rawdev/base/ifpga_defines.h +2
-1@@ -97,7 +97,7 @@ enum port_feature_id {/* * All headers and structures must be byte-packed to match the spec. */ -#pragma pack(1) +#pragma pack(push, 1) struct feature_header { union {@@ -1659,4 +1659,5 @@ struct bts_header { (((bts_hdr)->guid_h ==GBS_GUID_H ) && \ ((bts_hdr)->guid_l == GBS_GUID_L)) +#pragma pack(pop)#endif /* _BASE_IFPGA_DEFINES_H_ */ Signature · 1 line
2.1.4
Re: [PATCH v2 1/4] app: add LDFLAGS -latomic to link atomic lib
In reply to Gavin Hu-----Original Message-----
Quoted 22 lines
Date: Tue, 15 May 2018 05:23:44 -0400
From: Gavin Hu <[email protected]>
To: [email protected]
Subject: [dpdk-dev] [PATCH v2 1/4] app: add LDFLAGS -latomic to link atomic
lib
X-Mailer: git-send-email 2.1.4For ARM64 platform, libdpdk.a includes the librte_pmd_octeontx_ssovf.a, which requires the libatomic.a support.The atomic lib is built-in in the gcc toolchain, but for clang it has to be explicitly linked.
For more details, please refer to https://clang.llvm.org/docs/Toolchain.html~/dpdk/build/lib/librte_pmd_octeontx_ssovf.a(timvf_worker.o): In function `timvf_timer_cancel_burst':
timvf_worker.c:(.text+0x80): undefined reference to `__atomic_fetch_add_8' /home/gavin/arm_repo/dpdk/build/lib/librte_pmd_octeontx_ssovf.a(timvf_worker.o):
In function `timvf_timer_arm_burst_sp':
timvf_worker.c:(.text+0x200): undefined reference to__atomic_fetch_add_8' timvf_worker.c:(.text+0x244): undefined reference to__atomic_store_2' timvf_worker.c:(.text+0x278): undefined reference to__atomic_fetch_add_4' timvf_worker.c:(.text+0x30c): undefined reference to__atomic_store_2'
Quoted 2 lines
Signed-off-by Gavin Hu <[email protected]>Reviewed-by Honnappa Nagarahalli <[email protected]>
Following comments are not addressed in v2.
https://dpdk.org/ml/archives/dev/2018-May/101799.html
https://dpdk.org/ml/archives/dev/2018-May/101802.html
Quoted 19 lines
--- mk/rte.app.mk | 1 + 1 file changed, 1 insertion(+)mk/rte.app.mk +1
-0@@ -51,6 +51,7 @@ endif # Link only the libraries used in the application LDFLAGS += --as-needed +LDFLAGS += -latomic # default path for libs _LDLIBS-y += -L$(RTE_SDK_BIN)/libSignature · 1 line
2.1.4
PATCH v3 1/3 net/mlx5: fix the clang compiling issue
In reply to Gavin HuFrom: gavin hu <[email protected]>
This patch adds a pair of "()" to embrace the argument input to the function-like macro invocation.
drivers/net/mlx5/mlx5_rxtx_vec.c:37:drivers/net/mlx5/mlx5_rxtx_vec_neon.h:170:24: error: too many arguments provided to function-like macro invocation
(uint16x8_t) { 0, 0, cs_flags,
rte_cpu_to_be_16(len),--- drivers/net/mlx5/mlx5_rxtx_vec_neon.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)
drivers/net/mlx5/mlx5_rxtx_vec_neon.h +6 -6
@@ -167,8 +167,8 @@ txq_scatter_v(struct mlx5_txq_data *txq, struct rte_mbuf **pkts,vst1q_u8 ((void *)t_wqe, ctrl);/* Fill ESEG in the header. */ vst1q_u16 ((void *)(t_wqe +1 ), - (uint16x8_t ) {0 ,0 , cs_flags,rte_cpu_to_be_16 (len), -0 ,0 ,0 ,0 }); + ((uint16x8_t ) {0 ,0 , cs_flags,rte_cpu_to_be_16 (len), +0 ,0 ,0 ,0 })); txq->wqe_ci = wqe_ci; }if (!n)
@@ -300,10 +300,10 @@ txq_burst_v(struct mlx5_txq_data *txq, struct rte_mbuf **pkts, uint16_t pkts_n,vst1q_u8 ((void *)t_wqe, ctrl);/* Fill ESEG in the header. */ vst1q_u8 ((void *)(t_wqe +1 ), - (uint8x16_t ) {0 ,0 ,0 ,0 , - cs_flags,0 ,0 ,0 , -0 ,0 ,0 ,0 , -0 ,0 ,0 ,0 }); + ((uint8x16_t ) {0 ,0 ,0 ,0 , + cs_flags,0 ,0 ,0 , +0 ,0 ,0 ,0 , +0 ,0 ,0 ,0 }));#ifdef MLX5_PMD_SOFT_COUNTERS txq->stats.opackets += pkts_n;#endif
Signature · 1 line
2.17.0
PATCH v3 2/3 eventdev: fix the clang compiling issue
From: gavin hu <[email protected]>
This patch fix the clang compiling issue reported on the ARM64 builing host. ev is a pointer in size of 64bit, but the herein it should be the size of its content.
~/dpdk/lib/librte_eventdev/rte_event_crypto_adapter.c:530:49: error:
'rte_memcpy' call operates on objects of type 'struct rte_event' while the size is based on a different type
'struct rte_event *' [-Werror,-Wsizeof-pointer-memaccess]
rte_memcpy(ev, &m_data->response_info, sizeof(ev));~/arm_repo/dpdk/lib/librte_eventdev/rte_event_crypto_adapter.c:530:49:
note: did you mean to dereference the argument to 'sizeof' (and multiply it by the number of elements)?
rte_memcpy(ev, &m_data->response_info, sizeof(ev));
--- lib/librte_eventdev/rte_event_crypto_adapter.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
lib/librte_eventdev/rte_event_crypto_adapter.c +1 -1
@@ -527,7 +527,7 @@ eca_ops_enqueue_burst(struct rte_event_crypto_adapter *adapter,continue ; } -rte_memcpy (ev, &m_data->response_info,sizeof (ev)); +rte_memcpy (ev, &m_data->response_info,sizeof (*ev)); ev->event_ptr = ops[i]; ev->event_type =RTE_EVENT_TYPE_CRYPTODEV ;if (adapter->implicit_release_disabled)
Signature · 1 line
2.17.0
PATCH v3 3/3 raw/ifpga_rawdev: fix the clang compiling issue
In reply to Gavin HuFrom: gavin hu <[email protected]>
The patch fixes the compile issue with clang on ARM64.
Newly introduced #pragma pack(1) in the header file caused comipiling issues for the files who included it.
In file included from ~/dpdk/drivers/raw/ifpga_rawdev/base/ ifpga_fme_dperf.c:5:
In file included from ~/dpdk/drivers/raw/ifpga_rawdev/base/ ifpga_feature_dev.h:8:~/dpdk/drivers/raw/ifpga_rawdev/base/ifpga_hw.h:8:10: error:
the current #pragma
pack alignment value is modified in the included file [-Werror, -Wpragma-pack] ~/dpdk/drivers/raw/ifpga_rawdev/base/ifpga_defines.h:100:9: note:
previous '#pragma pack' directive that modifies alignment is here.
The fix is to change the #pragma pack alignment locally and not have effect on other files who included this header file.
--- drivers/raw/ifpga_rawdev/base/ifpga_defines.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/raw/ifpga_rawdev/base/ifpga_defines.h +2 -1
@@ -97,7 +97,7 @@ enum port_feature_id {/* * All headers and structures must be byte-packed to match the spec. */ -#pragma pack(1) +#pragma pack(push, 1) struct feature_header { union {
@@ -1659,4 +1659,5 @@ struct bts_header { (((bts_hdr)->guid_h ==GBS_GUID_H ) && \ ((bts_hdr)->guid_l == GBS_GUID_L)) +#pragma pack(pop)#endif /* _BASE_IFPGA_DEFINES_H_ */
Signature · 1 line
2.17.0
Re: [PATCH v3 3/3] raw/ifpga_rawdev: fix the clang compiling issue
-----Original Message-----
Quoted 11 lines
Date: Wed, 16 May 2018 14:08:02 +0800
From: Gavin Hu <[email protected]>
To: [email protected]
CC: gavin hu <[email protected]>
Subject: [dpdk-dev] [PATCH v3 3/3] raw/ifpga_rawdev: fix the clang
compiling issue
X-Mailer: git-send-email 2.17.0From: gavin hu <[email protected]>
The patch fixes the compile issue with clang on ARM64.
Even ARM64 gcc 8.1 could detect this as an error and this patch fixes too.
Quoted 15 lines
Newly introduced #pragma pack(1) in the header file caused comipiling issues for the files who included it.
In file included from ~/dpdk/drivers/raw/ifpga_rawdev/base/ ifpga_fme_dperf.c:5:
In file included from ~/dpdk/drivers/raw/ifpga_rawdev/base/ ifpga_feature_dev.h:8:~/dpdk/drivers/raw/ifpga_rawdev/base/ifpga_hw.h:8:10: error:
the current #pragma
pack alignment value is modified in the included file [-Werror, -Wpragma-pack]~/dpdk/drivers/raw/ifpga_rawdev/base/ifpga_defines.h:100:9: note:
previous '#pragma pack' directive that modifies alignment is here.
Quoted 7 lines
The fix is to change the #pragma pack alignment locally and not have effect on other files who included this header file.
Fixes 56bb54ea1bdf ("raw/ifpga/base: add Intel FPGA OPAE share code")Signed-off-by Gavin Hu <[email protected]>Reviewed-by Honnappa Nagarahalli <[email protected]>
The subject could change to raw/ifpga: if Maintainer wishes to do so to maintain the consistency.
Quoted 26 lines
--- drivers/raw/ifpga_rawdev/base/ifpga_defines.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)drivers/raw/ifpga_rawdev/base/ifpga_defines.h +2
-1@@ -97,7 +97,7 @@ enum port_feature_id {/* * All headers and structures must be byte-packed to match the spec. */ -#pragma pack(1) +#pragma pack(push, 1) struct feature_header { union {@@ -1659,4 +1659,5 @@ struct bts_header { (((bts_hdr)->guid_h ==GBS_GUID_H ) && \ ((bts_hdr)->guid_l == GBS_GUID_L)) +#pragma pack(pop)#endif /* _BASE_IFPGA_DEFINES_H_ */ Signature · 1 line
2.17.0
Gavin Hu
Acked-by Jerin JacobRe: [PATCH v3 3/3] raw/ifpga_rawdev: fix the clang compiling issue
If the subject changes to raw/ifpga, it will get a Wrong headline prefix(can be ignored?) warning when running git-log-fixes.h
Wrong headline prefix:
raw/ifpga: fix the clang compiling issue
-----Original Message-----
From: Jerin Jacob <[email protected]>
Sent: Wednesday, May 16, 2018 2:46 PM
To: Gavin Hu <[email protected]>
Cc: [email protected]
Subject: Re: [dpdk-dev] [PATCH v3 3/3] raw/ifpga_rawdev: fix the clang compiling issue
-----Original Message-----
Quoted 11 lines
Date: Wed, 16 May 2018 14:08:02 +0800
From: Gavin Hu <[email protected]>
To: [email protected]
CC: gavin hu <[email protected]>
Subject: [dpdk-dev] [PATCH v3 3/3] raw/ifpga_rawdev: fix the clang compiling issue
X-Mailer: git-send-email 2.17.0From: gavin hu <[email protected]>
The patch fixes the compile issue with clang on ARM64.
Even ARM64 gcc 8.1 could detect this as an error and this patch fixes too.
Quoted 15 lines
Newly introduced #pragma pack(1) in the header file caused comipiling issues for the files who included it.
In file included from ~/dpdk/drivers/raw/ifpga_rawdev/base/ ifpga_fme_dperf.c:5:
In file included from ~/dpdk/drivers/raw/ifpga_rawdev/base/ ifpga_feature_dev.h:8:~/dpdk/drivers/raw/ifpga_rawdev/base/ifpga_hw.h:8:10: error:
the current #pragma
pack alignment value is modified in the included file [-Werror, -Wpragma-pack]~/dpdk/drivers/raw/ifpga_rawdev/base/ifpga_defines.h:100:9: note:
previous '#pragma pack' directive that modifies alignment is here.
Quoted 7 lines
The fix is to change the #pragma pack alignment locally and not have effect on other files who included this header file.
Fixes 56bb54ea1bdf ("raw/ifpga/base: add Intel FPGA OPAE share code")Signed-off-by Gavin Hu <[email protected]>Reviewed-by Honnappa Nagarahalli <[email protected]>
The subject could change to raw/ifpga: if Maintainer wishes to do so to maintain the consistency.
Quoted 25 lines
--- drivers/raw/ifpga_rawdev/base/ifpga_defines.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)drivers/raw/ifpga_rawdev/base/ifpga_defines.h +2
-2@@ -97,7 +97,7 @@ enum port_feature_id {/* * All headers and structures must be byte-packed to match the spec. */ -#pragma pack(1) +#pragma pack(push, 1) struct feature_header { union {@@ -1659,4 +1659,5 @@ struct bts_header { (((bts_hdr)->guid_h ==GBS_GUID_H ) &&\ ((bts_hdr)->guid_l == GBS_GUID_L)) +#pragma pack(pop)#endif /* _BASE_IFPGA_DEFINES_H_ */ --
Quoted 2 lines
2.17.0
IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.
Re: [PATCH v3 3/3] raw/ifpga_rawdev: fix the clang compiling issue
17/05/2018 03:47, Gavin Hu:
Quoted 1 line
If the subject changes to raw/ifpga, it will get a Wrong headline prefix(can be ignored?) warning when running
git-log-fixes.h
Yes, this warning can be ignored.
PATCH v4 1/3 net/mlx5: fix the clang compiling issue
In reply to Gavin HuFrom: gavin hu <[email protected]>
This patch adds a pair of "()" to embrace the argument input to the function-like macro invocation.
drivers/net/mlx5/mlx5_rxtx_vec.c:37:drivers/net/mlx5/mlx5_rxtx_vec_neon.h:170:24: error: too many arguments provided to function-like macro invocation
(uint16x8_t) { 0, 0, cs_flags,
rte_cpu_to_be_16(len),--- drivers/net/mlx5/mlx5_rxtx_vec_neon.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)
drivers/net/mlx5/mlx5_rxtx_vec_neon.h +6 -6
@@ -167,8 +167,8 @@ txq_scatter_v(struct mlx5_txq_data *txq, struct rte_mbuf **pkts,vst1q_u8 ((void *)t_wqe, ctrl);/* Fill ESEG in the header. */ vst1q_u16 ((void *)(t_wqe +1 ), - (uint16x8_t ) {0 ,0 , cs_flags,rte_cpu_to_be_16 (len), -0 ,0 ,0 ,0 }); + ((uint16x8_t ) {0 ,0 , cs_flags,rte_cpu_to_be_16 (len), +0 ,0 ,0 ,0 })); txq->wqe_ci = wqe_ci; }if (!n)
@@ -300,10 +300,10 @@ txq_burst_v(struct mlx5_txq_data *txq, struct rte_mbuf **pkts, uint16_t pkts_n,vst1q_u8 ((void *)t_wqe, ctrl);/* Fill ESEG in the header. */ vst1q_u8 ((void *)(t_wqe +1 ), - (uint8x16_t ) {0 ,0 ,0 ,0 , - cs_flags,0 ,0 ,0 , -0 ,0 ,0 ,0 , -0 ,0 ,0 ,0 }); + ((uint8x16_t ) {0 ,0 ,0 ,0 , + cs_flags,0 ,0 ,0 , +0 ,0 ,0 ,0 , +0 ,0 ,0 ,0 }));#ifdef MLX5_PMD_SOFT_COUNTERS txq->stats.opackets += pkts_n;#endif
Signature · 1 line
2.17.0
PATCH v4 2/3 eventdev: fix the clang compiling issue
From: gavin hu <[email protected]>
This patch fix the clang compiling issue reported on the ARM64 builing hosts. ev is a pointer in size of 64bit, but herein it should be the size of its content.
~/dpdk/lib/librte_eventdev/rte_event_crypto_adapter.c:530:49: error:
'rte_memcpy' call operates on objects of type 'struct rte_event' while the size is based on a different type
'struct rte_event *' [-Werror,-Wsizeof-pointer-memaccess]
rte_memcpy(ev, &m_data->response_info, sizeof(ev));~/arm_repo/dpdk/lib/librte_eventdev/rte_event_crypto_adapter.c:530:49:
note: did you mean to dereference the argument to 'sizeof' (and multiply it by the number of elements)?
rte_memcpy(ev, &m_data->response_info, sizeof(ev));
--- lib/librte_eventdev/rte_event_crypto_adapter.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
lib/librte_eventdev/rte_event_crypto_adapter.c +1 -1
@@ -527,7 +527,7 @@ eca_ops_enqueue_burst(struct rte_event_crypto_adapter *adapter,continue ; } -rte_memcpy (ev, &m_data->response_info,sizeof (ev)); +rte_memcpy (ev, &m_data->response_info,sizeof (*ev)); ev->event_ptr = ops[i]; ev->event_type =RTE_EVENT_TYPE_CRYPTODEV ;if (adapter->implicit_release_disabled)
Signature · 1 line
2.17.0
PATCH v4 3/3 raw/ifpga: fix the clang compiling issue
In reply to Gavin HuFrom: gavin hu <[email protected]>
The patch fixes the compile issue with clang on ARM64, as well as clang + X86 builing hosts.
Newly introduced #pragma pack(1) in the header file caused comipiling issues for the files who included it.
In file included from ~/dpdk/drivers/raw/ifpga_rawdev/base/ ifpga_fme_dperf.c:5:
In file included from ~/dpdk/drivers/raw/ifpga_rawdev/base/ ifpga_feature_dev.h:8:~/dpdk/drivers/raw/ifpga_rawdev/base/ifpga_hw.h:8:10: error:
the current #pragma
pack alignment value is modified in the included file [-Werror, -Wpragma-pack] ~/dpdk/drivers/raw/ifpga_rawdev/base/ifpga_defines.h:100:9: note:
previous '#pragma pack' directive that modifies alignment is here.
The fix is to change the #pragma pack alignment locally and not have effect on other files who included this header file.
--- drivers/raw/ifpga_rawdev/base/ifpga_defines.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/raw/ifpga_rawdev/base/ifpga_defines.h +2 -1
@@ -97,7 +97,7 @@ enum port_feature_id {/* * All headers and structures must be byte-packed to match the spec. */ -#pragma pack(1) +#pragma pack(push, 1) struct feature_header { union {
@@ -1659,4 +1659,5 @@ struct bts_header { (((bts_hdr)->guid_h ==GBS_GUID_H ) && \ ((bts_hdr)->guid_l == GBS_GUID_L)) +#pragma pack(pop)#endif /* _BASE_IFPGA_DEFINES_H_ */
Signature · 1 line
2.17.0
Re: [PATCH v4 1/3] net/mlx5: fix the clang compiling issue
In reply to Gavin Hu17/05/2018 04:46, Gavin Hu:
Quoted 14 lines
From: gavin hu <[email protected]>
This patch adds a pair of "()" to embrace the argument input to the function-like macro invocation.
drivers/net/mlx5/mlx5_rxtx_vec.c:37:drivers/net/mlx5/mlx5_rxtx_vec_neon.h:170:24: error: too many arguments provided to function-like macro invocation(uint16x8_t) { 0, 0, cs_flags, rte_cpu_to_be_16(len),Fixes 570acdb1da ("net/mlx5: add vectorized Rx/Tx burst for ARM")
Quoted 6 lines
Signed-off-by Gavin Hu <[email protected]>Signed-off-by Sirshak Das <[email protected]>Reviewed-by Phil Yang <[email protected]>Reviewed-by Honnappa Nagarahalli <[email protected]>Reviewed-by Jerin Jacob <[email protected]>Acked-by Yongseok Koh <[email protected]>
Series applied, thanks