DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] ixgbe: Fix clang compilation issue
@ 2014-10-22 10:54 Bruce Richardson
  2014-10-22 10:55 ` Richardson, Bruce
  0 siblings, 1 reply; 5+ messages in thread
From: Bruce Richardson @ 2014-10-22 10:54 UTC (permalink / raw)
  To: dev

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 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.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
---
 lib/librte_pmd_ixgbe/ixgbe_rxtx_vec.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/librte_pmd_ixgbe/ixgbe_rxtx_vec.c b/lib/librte_pmd_ixgbe/ixgbe_rxtx_vec.c
index 457f267..2236250 100644
--- a/lib/librte_pmd_ixgbe/ixgbe_rxtx_vec.c
+++ b/lib/librte_pmd_ixgbe/ixgbe_rxtx_vec.c
@@ -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,
-- 
1.9.3

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [dpdk-dev] [PATCH] ixgbe: Fix clang compilation issue
  2014-10-22 10:54 [dpdk-dev] [PATCH] ixgbe: Fix clang compilation issue Bruce Richardson
@ 2014-10-22 10:55 ` Richardson, Bruce
  0 siblings, 0 replies; 5+ messages in thread
From: Richardson, Bruce @ 2014-10-22 10:55 UTC (permalink / raw)
  To: dev

Self-nak, resent old patch.

> -----Original Message-----
> From: Richardson, Bruce
> Sent: Wednesday, October 22, 2014 11:54 AM
> To: dev@dpdk.org
> Cc: Richardson, Bruce
> Subject: [PATCH] ixgbe: Fix clang compilation issue
> 
> 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 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.
> 
> Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
> ---
>  lib/librte_pmd_ixgbe/ixgbe_rxtx_vec.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/lib/librte_pmd_ixgbe/ixgbe_rxtx_vec.c
> b/lib/librte_pmd_ixgbe/ixgbe_rxtx_vec.c
> index 457f267..2236250 100644
> --- a/lib/librte_pmd_ixgbe/ixgbe_rxtx_vec.c
> +++ b/lib/librte_pmd_ixgbe/ixgbe_rxtx_vec.c
> @@ -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,
> --
> 1.9.3

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [dpdk-dev] [PATCH] ixgbe: Fix clang compilation issue
  2014-09-30 13:46   ` Wiles, Roger Keith
@ 2014-09-30 17:14     ` Thomas Monjalon
  0 siblings, 0 replies; 5+ messages in thread
From: Thomas Monjalon @ 2014-09-30 17:14 UTC (permalink / raw)
  To: bruce.richardson; +Cc: dev

> > 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 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.
> > 
> > Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
> 
> Acked-by: Keith Wiles <keith.wiles@windiver.com>

Acked and applied

Thanks
-- 
Thomas

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [dpdk-dev] [PATCH] ixgbe: Fix clang compilation issue
  2014-09-30  9:40 ` [dpdk-dev] [PATCH] ixgbe: Fix clang compilation issue Bruce Richardson
@ 2014-09-30 13:46   ` Wiles, Roger Keith
  2014-09-30 17:14     ` Thomas Monjalon
  0 siblings, 1 reply; 5+ messages in thread
From: Wiles, Roger Keith @ 2014-09-30 13:46 UTC (permalink / raw)
  To: RICHARDSON, BRUCE; +Cc: dev

Acked-by: Keith Wiles <keith.wiles@windiver.com>

On Sep 30, 2014, at 4:40 AM, Bruce Richardson <bruce.richardson@intel.com> wrote:

> 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 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.
> 
> Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
> ---
> lib/librte_pmd_ixgbe/ixgbe_rxtx_vec.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/lib/librte_pmd_ixgbe/ixgbe_rxtx_vec.c b/lib/librte_pmd_ixgbe/ixgbe_rxtx_vec.c
> index 457f267..2236250 100644
> --- a/lib/librte_pmd_ixgbe/ixgbe_rxtx_vec.c
> +++ b/lib/librte_pmd_ixgbe/ixgbe_rxtx_vec.c
> @@ -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,
> -- 
> 1.9.3
> 

Keith Wiles, Principal Technologist with CTO office, Wind River mobile 972-213-5533

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [dpdk-dev] [PATCH] ixgbe: Fix clang compilation issue
  2014-09-29 21:50 [dpdk-dev] Building current 1.8.1-rc1 with clang Wiles, Roger Keith
@ 2014-09-30  9:40 ` Bruce Richardson
  2014-09-30 13:46   ` Wiles, Roger Keith
  0 siblings, 1 reply; 5+ messages in thread
From: Bruce Richardson @ 2014-09-30  9:40 UTC (permalink / raw)
  To: dev

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 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.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
---
 lib/librte_pmd_ixgbe/ixgbe_rxtx_vec.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/librte_pmd_ixgbe/ixgbe_rxtx_vec.c b/lib/librte_pmd_ixgbe/ixgbe_rxtx_vec.c
index 457f267..2236250 100644
--- a/lib/librte_pmd_ixgbe/ixgbe_rxtx_vec.c
+++ b/lib/librte_pmd_ixgbe/ixgbe_rxtx_vec.c
@@ -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,
-- 
1.9.3

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2014-10-22 10:47 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-10-22 10:54 [dpdk-dev] [PATCH] ixgbe: Fix clang compilation issue Bruce Richardson
2014-10-22 10:55 ` Richardson, Bruce
  -- strict thread matches above, loose matches on Subject: below --
2014-09-29 21:50 [dpdk-dev] Building current 1.8.1-rc1 with clang Wiles, Roger Keith
2014-09-30  9:40 ` [dpdk-dev] [PATCH] ixgbe: Fix clang compilation issue Bruce Richardson
2014-09-30 13:46   ` Wiles, Roger Keith
2014-09-30 17:14     ` Thomas Monjalon

DPDK patches and discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://inbox.dpdk.org/dev/0 dev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 dev dev/ https://inbox.dpdk.org/dev \
		dev@dpdk.org
	public-inbox-index dev

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.dev


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git