Building current 1.8.1-rc1 with clang
I just pulled the current repo and stated a build with ‘make install T=x86_64-native-linuxapp-clang’ which produced the following error. I do not think I am allowed to modify this file, correct? If that is the case then someone will have to update the original source. If you want me to submit a patch I can, but I do not think I fully understand what needs to be done.
Quoted 1 line
From what I can tell the line:
dma_addr0 = _mm_xor_si128(dma_addr0, dma_addr0); needs to be: dma_addr0 = _mm_setzero_si128();
== Build lib/librte_pmd_ixgbe
CC ixgbe_common.o
CC ixgbe_82598.o
CC ixgbe_82599.o
CC ixgbe_x540.o
CC ixgbe_phy.o
CC ixgbe_api.o
CC ixgbe_vf.o
CC ixgbe_dcb.o
CC ixgbe_dcb_82599.o
CC ixgbe_dcb_82598.o
CC ixgbe_mbx.o
CC ixgbe_rxtx.o
CC ixgbe_ethdev.o
CC ixgbe_fdir.o
CC ixgbe_pf.o
CC ixgbe_rxtx_vec.o/home/keithw/projects/dpdk-code/org-dpdk/lib/librte_pmd_ixgbe/ixgbe_rxtx_vec.c:67:30: error: variable 'dma_addr0' is uninitialized
when used here [-Werror,-Wuninitialized]
dma_addr0 = _mm_xor_si128(dma_addr0, dma_addr0);
^~~~~~~~~
/home/keithw/projects/dpdk-code/org-dpdk/lib/librte_pmd_ixgbe/ixgbe_rxtx_vec.c:57:2: note: variable 'dma_addr0' is declared here
__m128i dma_addr0, dma_addr1;
^1 error generated.
make[5]: *** [ixgbe_rxtx_vec.o] Error 1
make[4]: *** [librte_pmd_ixgbe] Error 2
make[3]: *** [lib] Error 2
make[2]: *** [all] Error 2
make[1]: *** [x86_64-native-linuxapp-clang_install] Error 2
make: *** [install] Error 2
Thanks
++Keith
Keith Wiles, Principal Technologist with CTO office, Wind River mobile 972-213-5533
A message that is not in the archive (sent off-list or not yet received): A07EB24F-3F3B-4783-BE9B-5E5AA0FD08D9-CWA4WttNNZF54TAoqtyWWQ@public.gmane.org
Quoted 39 lines · Roger Keith
I just pulled the current repo and stated a build with ‘make install T=x86_64-native-linuxapp-clang’ which produced the following error. I do not think I am allowed to modify this file, correct? If that is the case then someone will have to update the original source. If you want me to submit a patch I can, but I do not think I fully understand what needs to be done.
From what I can tell the line:
dma_addr0 = _mm_xor_si128(dma_addr0, dma_addr0); needs to be: dma_addr0 = _mm_setzero_si128();== Build
lib/librte_pmd_ixgbe
CC ixgbe_common.o
CC ixgbe_82598.o
CC ixgbe_82599.o
CC ixgbe_x540.o
CC ixgbe_phy.o
CC ixgbe_api.o
CC ixgbe_vf.o
CC ixgbe_dcb.o
CC ixgbe_dcb_82599.o
CC ixgbe_dcb_82598.o
CC ixgbe_mbx.o
CC ixgbe_rxtx.o
CC ixgbe_ethdev.o
CC ixgbe_fdir.o
CC ixgbe_pf.o
CC ixgbe_rxtx_vec.o/home/keithw/projects/dpdk-code/org-dpdk/lib/librte_pmd_ixgbe/ixgbe_rxtx_vec.c:67:30: error: variable 'dma_addr0' is uninitializedwhen used here [-Werror,-Wuninitialized] dma_addr0 = _mm_xor_si128(dma_addr0, dma_addr0); ^~~~~~~~~ /home/keithw/projects/dpdk-code/org-dpdk/lib/librte_pmd_ixgbe/ixgbe_rxtx_vec.c:57:2: note: variable 'dma_addr0' is declared here __m128i dma_addr0, dma_addr1; ^1 error generated.
make[5]: *** [ixgbe_rxtx_vec.o] Error 1
make[4]: *** [librte_pmd_ixgbe] Error 2
make[3]: *** [lib] Error 2
make[2]: *** [all] Error 2
make[1]: *** [x86_64-native-linuxapp-clang_install] Error 2
make: *** [install] Error 2
Quoted 5 lines
Thanks
++KeithKeith Wiles, Principal Technologist with CTO office, Wind River mobile 972-213-5533
I think a simple one-line change like below should fix it. The xor can also be written as a setzero call.
(quoted diff) +0 -0
b/lib/librte_pmd_ixgbe/ixgbe_rxtx_vec.c
index 457f267..2236250 100644
lib/librte_pmd_ixgbe/ixgbe_rxtx_vec.c +0 -0
@@ -64,7 +64,7 @@ ixgbe_rxq_rearm(struct igb_rx_queue *rxq)
RTE_IXGBE_RXQ_REARM_THRESH) < 0) {
if (rxq->rxrearm_nb + RTE_IXGBE_RXQ_REARM_THRESH >=
rxq->nb_rx_desc) {
- dma_addr0 = _mm_xor_si128(dma_addr0, dma_addr0);
+ dma_addr0 = _mm_setzero_si128();
for (i = 0; i < RTE_IXGBE_DESCS_PER_LOOP; i++) {
rxep[i].mbuf = &rxq->fake_mbuf;
_mm_store_si128((__m128i *)&rxdp[i].read,/Bruce
PATCH 1/1 ixgbe: Fix clang compilation issue
In reply to a message not in the archiveIssue reported by Keith Wiles.
Clang fails with an error about a variable being used uninitialized:
CC ixgbe_rxtx_vec.o/home/keithw/projects/dpdk-code/org-dpdk/lib/librte_pmd_ixgbe/ixgbe_rxtx_vec.c:67:30:
error: variable 'dma_addr0' is uninitialized
when used here [-Werror,-Wuninitialized]
dma_addr0 = _mm_xor_si128(dma_addr0, dma_addr0);
^~~~~~~~~This error can be fixed by replacing the call to xor which takes two parameters, by a call to setzero, which does not take any.
--- lib/librte_pmd_ixgbe/ixgbe_rxtx_vec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
lib/librte_pmd_ixgbe/ixgbe_rxtx_vec.c +1 -1
@@ -64,7 +64,7 @@ ixgbe_rxq_rearm(struct igb_rx_queue *rxq) RTE_IXGBE_RXQ_REARM_THRESH) < 0) {if (rxq->rxrearm_nb +RTE_IXGBE_RXQ_REARM_THRESH >= rxq->nb_rx_desc) { - dma_addr0 =_mm_xor_si128 (dma_addr0, dma_addr0); + dma_addr0 =_mm_setzero_si128 ();for (i =0 ; i <RTE_IXGBE_DESCS_PER_LOOP ; i++) { rxep[i].mbuf = &rxq->fake_mbuf; _mm_store_si128((__m128i *)&rxdp[i].read,
Signature · 1 line
1.9.3
A message that is not in the archive (sent off-list or not yet received): 1412070008-4782-1-git-send-email-bruce.richardson-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org
Wiles, Roger Keith
Acked-by Keith WilesRe: [PATCH] ixgbe: Fix clang compilation issue
Quoted 34 lines · Bruce Richardson
Issue reported by Keith Wiles.
Clang fails with an error about a variable being used uninitialized:CC ixgbe_rxtx_vec.o
/home/keithw/projects/dpdk-code/org-dpdk/lib/librte_pmd_ixgbe/ixgbe_rxtx_vec.c:67:30:
error: variable 'dma_addr0' is uninitializedwhen used here [-Werror,-Wuninitialized] dma_addr0 = _mm_xor_si128(dma_addr0, dma_addr0); ^~~~~~~~~This error can be fixed by replacing the call to xor which takes two parameters, by a call to setzero, which does not take any.
Signed-off-by Bruce Richardson <[email protected]>---
lib/librte_pmd_ixgbe/ixgbe_rxtx_vec.c| 2 +-1 file changed, 1 insertion(+), 1 deletion(-)lib/librte_pmd_ixgbe/ixgbe_rxtx_vec.c +1
-1@@ -64,7 +64,7 @@ ixgbe_rxq_rearm(struct igb_rx_queue *rxq) RTE_IXGBE_RXQ_REARM_THRESH) < 0) {if (rxq->rxrearm_nb +RTE_IXGBE_RXQ_REARM_THRESH >= rxq->nb_rx_desc) { - dma_addr0 =_mm_xor_si128 (dma_addr0, dma_addr0); + dma_addr0 =_mm_setzero_si128 ();for (i =0 ; i <RTE_IXGBE_DESCS_PER_LOOP ; i++) { rxep[i].mbuf = &rxq->fake_mbuf; _mm_store_si128((__m128i *)&rxdp[i].read,Signature · 1 line
1.9.3
Keith Wiles, Principal Technologist with CTO office, Wind River mobile 972-213-5533
A message that is not in the archive (sent off-list or not yet received): 2306E3D2-B159-42B0-AA59-3B3400E9A2A6-CWA4WttNNZF54TAoqtyWWQ@public.gmane.org
Re: [PATCH] ixgbe: Fix clang compilation issue
Quoted 10 lines
Quoted 10 lines
Issue reported by Keith Wiles.
Clang fails with an error about a variable being used uninitialized:CC ixgbe_rxtx_vec.o
/home/keithw/projects/dpdk-code/org-dpdk/lib/librte_pmd_ixgbe/ixgbe_rxtx_vec.c:67:30:
error: variable 'dma_addr0' is uninitializedwhen used here [-Werror,-Wuninitialized] dma_addr0 = _mm_xor_si128(dma_addr0, dma_addr0); ^~~~~~~~~
Quoted 6 lines
Quoted 4 lines
This error can be fixed by replacing the call to xor which takes two parameters, by a call to setzero, which does not take any.
Signed-off-by Bruce Richardson <[email protected]>
Acked and applied
Thanks
Signature · 1 line
Thomas