DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] net/ixgbe: fix build for gcc 4.8.5
@ 2020-01-14 17:52 Ferruh Yigit
  2020-01-14 18:01 ` Maxime Coquelin
  2020-01-15 10:17 ` Ye Xiaolong
  0 siblings, 2 replies; 4+ messages in thread
From: Ferruh Yigit @ 2020-01-14 17:52 UTC (permalink / raw)
  To: Wenzhuo Lu, Konstantin Ananyev, Phil Yang, Gavin Hu, Dharmik Thakkar
  Cc: dev, Maxime Coquelin

Build error:
  In function ‘ixgbe_recv_pkts_lro_bulk_alloc’:
../drivers/net/ixgbe/ixgbe_rxtx.c:2209:24:
  error: ‘next_sc_entry’ may be used uninitialized in this function
  [-Werror=maybe-uninitialized]
    next_sc_entry->fbuf = first_seg;
                        ^
http://mails.dpdk.org/archives/test-report/2020-January/113891.html

This is a compiler false positive and error not seen by newer compilers,
or clang but to fix the warning initializing the complained variable.

According git bisect, no idea how:
Fixes: 8a2e7ce976fd ("net/ixgbe: avoid multiple definitions of bool")

Reported-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
Cc: dharmik.thakkar@arm.com
---
 drivers/net/ixgbe/ixgbe_rxtx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ixgbe/ixgbe_rxtx.c b/drivers/net/ixgbe/ixgbe_rxtx.c
index 13b06eb9c..30f890572 100644
--- a/drivers/net/ixgbe/ixgbe_rxtx.c
+++ b/drivers/net/ixgbe/ixgbe_rxtx.c
@@ -2028,7 +2028,7 @@ ixgbe_recv_pkts_lro(void *rx_queue, struct rte_mbuf **rx_pkts, uint16_t nb_pkts,
 		bool eop;
 		struct ixgbe_rx_entry *rxe;
 		struct ixgbe_scattered_rx_entry *sc_entry;
-		struct ixgbe_scattered_rx_entry *next_sc_entry;
+		struct ixgbe_scattered_rx_entry *next_sc_entry = NULL;
 		struct ixgbe_rx_entry *next_rxe = NULL;
 		struct rte_mbuf *first_seg;
 		struct rte_mbuf *rxm;
-- 
2.24.1


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

* Re: [dpdk-dev] [PATCH] net/ixgbe: fix build for gcc 4.8.5
  2020-01-14 17:52 [dpdk-dev] [PATCH] net/ixgbe: fix build for gcc 4.8.5 Ferruh Yigit
@ 2020-01-14 18:01 ` Maxime Coquelin
  2020-01-15 10:17 ` Ye Xiaolong
  1 sibling, 0 replies; 4+ messages in thread
From: Maxime Coquelin @ 2020-01-14 18:01 UTC (permalink / raw)
  To: Ferruh Yigit, Wenzhuo Lu, Konstantin Ananyev, Phil Yang,
	Gavin Hu, Dharmik Thakkar
  Cc: dev



On 1/14/20 6:52 PM, Ferruh Yigit wrote:
> Build error:
>   In function ‘ixgbe_recv_pkts_lro_bulk_alloc’:
> ../drivers/net/ixgbe/ixgbe_rxtx.c:2209:24:
>   error: ‘next_sc_entry’ may be used uninitialized in this function
>   [-Werror=maybe-uninitialized]
>     next_sc_entry->fbuf = first_seg;
>                         ^
> http://mails.dpdk.org/archives/test-report/2020-January/113891.html
> 
> This is a compiler false positive and error not seen by newer compilers,
> or clang but to fix the warning initializing the complained variable.

You might want to add the RHEL7 GCC version I reproduced it on:
$ gcc --version
gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-39)

> According git bisect, no idea how:
> Fixes: 8a2e7ce976fd ("net/ixgbe: avoid multiple definitions of bool")
> 
> Reported-by: Maxime Coquelin <maxime.coquelin@redhat.com>
> Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>

Tested-by: Maxime Coquelin <maxime.coquelin@redhat.com>

> ---
> Cc: dharmik.thakkar@arm.com
> ---
>  drivers/net/ixgbe/ixgbe_rxtx.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/net/ixgbe/ixgbe_rxtx.c b/drivers/net/ixgbe/ixgbe_rxtx.c
> index 13b06eb9c..30f890572 100644
> --- a/drivers/net/ixgbe/ixgbe_rxtx.c
> +++ b/drivers/net/ixgbe/ixgbe_rxtx.c
> @@ -2028,7 +2028,7 @@ ixgbe_recv_pkts_lro(void *rx_queue, struct rte_mbuf **rx_pkts, uint16_t nb_pkts,
>  		bool eop;
>  		struct ixgbe_rx_entry *rxe;
>  		struct ixgbe_scattered_rx_entry *sc_entry;
> -		struct ixgbe_scattered_rx_entry *next_sc_entry;
> +		struct ixgbe_scattered_rx_entry *next_sc_entry = NULL;
>  		struct ixgbe_rx_entry *next_rxe = NULL;
>  		struct rte_mbuf *first_seg;
>  		struct rte_mbuf *rxm;
> 


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

* Re: [dpdk-dev] [PATCH] net/ixgbe: fix build for gcc 4.8.5
  2020-01-14 17:52 [dpdk-dev] [PATCH] net/ixgbe: fix build for gcc 4.8.5 Ferruh Yigit
  2020-01-14 18:01 ` Maxime Coquelin
@ 2020-01-15 10:17 ` Ye Xiaolong
  2020-01-15 16:50   ` Ferruh Yigit
  1 sibling, 1 reply; 4+ messages in thread
From: Ye Xiaolong @ 2020-01-15 10:17 UTC (permalink / raw)
  To: Ferruh Yigit
  Cc: Wenzhuo Lu, Konstantin Ananyev, Phil Yang, Gavin Hu,
	Dharmik Thakkar, dev, Maxime Coquelin

On 01/14, Ferruh Yigit wrote:
>Build error:
>  In function ‘ixgbe_recv_pkts_lro_bulk_alloc’:
>../drivers/net/ixgbe/ixgbe_rxtx.c:2209:24:
>  error: ‘next_sc_entry’ may be used uninitialized in this function
>  [-Werror=maybe-uninitialized]
>    next_sc_entry->fbuf = first_seg;
>                        ^
>http://mails.dpdk.org/archives/test-report/2020-January/113891.html
>
>This is a compiler false positive and error not seen by newer compilers,
>or clang but to fix the warning initializing the complained variable.
>
>According git bisect, no idea how:
>Fixes: 8a2e7ce976fd ("net/ixgbe: avoid multiple definitions of bool")
>
>Reported-by: Maxime Coquelin <maxime.coquelin@redhat.com>
>Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
>---
>Cc: dharmik.thakkar@arm.com
>---
> drivers/net/ixgbe/ixgbe_rxtx.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
>diff --git a/drivers/net/ixgbe/ixgbe_rxtx.c b/drivers/net/ixgbe/ixgbe_rxtx.c
>index 13b06eb9c..30f890572 100644
>--- a/drivers/net/ixgbe/ixgbe_rxtx.c
>+++ b/drivers/net/ixgbe/ixgbe_rxtx.c
>@@ -2028,7 +2028,7 @@ ixgbe_recv_pkts_lro(void *rx_queue, struct rte_mbuf **rx_pkts, uint16_t nb_pkts,
> 		bool eop;
> 		struct ixgbe_rx_entry *rxe;
> 		struct ixgbe_scattered_rx_entry *sc_entry;
>-		struct ixgbe_scattered_rx_entry *next_sc_entry;
>+		struct ixgbe_scattered_rx_entry *next_sc_entry = NULL;
> 		struct ixgbe_rx_entry *next_rxe = NULL;
> 		struct rte_mbuf *first_seg;
> 		struct rte_mbuf *rxm;
>-- 
>2.24.1
>

Acked-by: Xiaolong Ye <xiaolong.ye@intel.com>

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

* Re: [dpdk-dev] [PATCH] net/ixgbe: fix build for gcc 4.8.5
  2020-01-15 10:17 ` Ye Xiaolong
@ 2020-01-15 16:50   ` Ferruh Yigit
  0 siblings, 0 replies; 4+ messages in thread
From: Ferruh Yigit @ 2020-01-15 16:50 UTC (permalink / raw)
  To: Ye Xiaolong
  Cc: Wenzhuo Lu, Konstantin Ananyev, Phil Yang, Gavin Hu,
	Dharmik Thakkar, dev, Maxime Coquelin

On 1/15/2020 10:17 AM, Ye Xiaolong wrote:
> On 01/14, Ferruh Yigit wrote:
>> Build error:
>>  In function ‘ixgbe_recv_pkts_lro_bulk_alloc’:
>> ../drivers/net/ixgbe/ixgbe_rxtx.c:2209:24:
>>  error: ‘next_sc_entry’ may be used uninitialized in this function
>>  [-Werror=maybe-uninitialized]
>>    next_sc_entry->fbuf = first_seg;
>>                        ^
>> http://mails.dpdk.org/archives/test-report/2020-January/113891.html
>>
>> This is a compiler false positive and error not seen by newer compilers,
>> or clang but to fix the warning initializing the complained variable.
>>
>> According git bisect, no idea how:
>> Fixes: 8a2e7ce976fd ("net/ixgbe: avoid multiple definitions of bool")
>>
>> Reported-by: Maxime Coquelin <maxime.coquelin@redhat.com>
>> Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
>> ---
>> Cc: dharmik.thakkar@arm.com
>> ---
>> drivers/net/ixgbe/ixgbe_rxtx.c | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/net/ixgbe/ixgbe_rxtx.c b/drivers/net/ixgbe/ixgbe_rxtx.c
>> index 13b06eb9c..30f890572 100644
>> --- a/drivers/net/ixgbe/ixgbe_rxtx.c
>> +++ b/drivers/net/ixgbe/ixgbe_rxtx.c
>> @@ -2028,7 +2028,7 @@ ixgbe_recv_pkts_lro(void *rx_queue, struct rte_mbuf **rx_pkts, uint16_t nb_pkts,
>> 		bool eop;
>> 		struct ixgbe_rx_entry *rxe;
>> 		struct ixgbe_scattered_rx_entry *sc_entry;
>> -		struct ixgbe_scattered_rx_entry *next_sc_entry;
>> +		struct ixgbe_scattered_rx_entry *next_sc_entry = NULL;
>> 		struct ixgbe_rx_entry *next_rxe = NULL;
>> 		struct rte_mbuf *first_seg;
>> 		struct rte_mbuf *rxm;
>> -- 
>> 2.24.1
>>
> 
> Acked-by: Xiaolong Ye <xiaolong.ye@intel.com>
> 

Applied to dpdk-next-net/master, thanks.

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

end of thread, other threads:[~2020-01-15 16:50 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-14 17:52 [dpdk-dev] [PATCH] net/ixgbe: fix build for gcc 4.8.5 Ferruh Yigit
2020-01-14 18:01 ` Maxime Coquelin
2020-01-15 10:17 ` Ye Xiaolong
2020-01-15 16:50   ` Ferruh Yigit

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).