diff mbox

[dpdk-dev] net/mlx5: fix ICC compiler warning

Message ID 20171017024643.1011-1-xuemingl@mellanox.com (mailing list archive)
State Accepted, archived
Delegated to: Ferruh Yigit
Headers show

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation success Compilation OK

Commit Message

Xueming Li Oct. 17, 2017, 2:46 a.m. UTC
Initialize variable to avoid ICC compiler warning:
http://www.dpdk.org/ml/archives/dev/2017-October/077971.html

Fixes: f8b9a3bad467 ("net/mlx5: install a socket to exchange a file...")

Signed-off-by: Xueming Li <xuemingl@mellanox.com>
---
 drivers/net/mlx5/mlx5_txq.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Nélio Laranjeiro Oct. 17, 2017, 7:56 a.m. UTC | #1
On Tue, Oct 17, 2017 at 10:46:43AM +0800, Xueming Li wrote:
> Initialize variable to avoid ICC compiler warning:
> http://www.dpdk.org/ml/archives/dev/2017-October/077971.html
> 
> Fixes: f8b9a3bad467 ("net/mlx5: install a socket to exchange a file...")
> 
> Signed-off-by: Xueming Li <xuemingl@mellanox.com>
> ---
>  drivers/net/mlx5/mlx5_txq.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/net/mlx5/mlx5_txq.c b/drivers/net/mlx5/mlx5_txq.c
> index 9deaa7e..93f1388 100644
> --- a/drivers/net/mlx5/mlx5_txq.c
> +++ b/drivers/net/mlx5/mlx5_txq.c
> @@ -246,6 +246,7 @@
>  	int already_mapped;
>  	size_t page_size = sysconf(_SC_PAGESIZE);
>  
> +	memset(pages, 0, priv->txqs_n * sizeof(uintptr_t));
>  	/*
>  	 * As rdma-core, UARs are mapped in size of OS page size.
>  	 * Use aligned address to avoid duplicate mmap.
> -- 
> 1.8.3.1
 

Acked-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Ferruh Yigit Oct. 21, 2017, 1:05 a.m. UTC | #2
On 10/16/2017 7:46 PM, Xueming Li wrote:
> Initialize variable to avoid ICC compiler warning:
> http://www.dpdk.org/ml/archives/dev/2017-October/077971.html

Hi Xueming, Nelio,

I disabled that warning for ICC in Makefile [1], as mentioned in above mail.

If you prefer to fix it instead of disable, can you please update the patch,
and remove that workaround in this patch?

Thanks,
ferruh


[1]
http://dpdk.org/browse/dpdk/tree/drivers/net/mlx5/Makefile#n93
 # Disable false positive warning
 ifeq ($(CONFIG_RTE_TOOLCHAIN_ICC),y)
 CFLAGS_mlx5_txq.o += -wd3656
 endif



> 
> Fixes: f8b9a3bad467 ("net/mlx5: install a socket to exchange a file...")
> 
> Signed-off-by: Xueming Li <xuemingl@mellanox.com>
> ---
>  drivers/net/mlx5/mlx5_txq.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/net/mlx5/mlx5_txq.c b/drivers/net/mlx5/mlx5_txq.c
> index 9deaa7e..93f1388 100644
> --- a/drivers/net/mlx5/mlx5_txq.c
> +++ b/drivers/net/mlx5/mlx5_txq.c
> @@ -246,6 +246,7 @@
>  	int already_mapped;
>  	size_t page_size = sysconf(_SC_PAGESIZE);
>  
> +	memset(pages, 0, priv->txqs_n * sizeof(uintptr_t));
>  	/*
>  	 * As rdma-core, UARs are mapped in size of OS page size.
>  	 * Use aligned address to avoid duplicate mmap.
>
Ferruh Yigit Oct. 23, 2017, 9:54 p.m. UTC | #3
On 10/17/2017 12:56 AM, Nélio Laranjeiro wrote:
> On Tue, Oct 17, 2017 at 10:46:43AM +0800, Xueming Li wrote:
>> Initialize variable to avoid ICC compiler warning:
>> http://www.dpdk.org/ml/archives/dev/2017-October/077971.html
>>
>> Fixes: f8b9a3bad467 ("net/mlx5: install a socket to exchange a file...")
>>
>> Signed-off-by: Xueming Li <xuemingl@mellanox.com>

> Acked-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>

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


(icc workaround to disable warning [1] removed as well with patch, please check)

[1]
http://dpdk.org/ml/archives/dev/2017-October/079836.html
Xueming Li Oct. 24, 2017, 12:28 p.m. UTC | #4
Thanks very much, sorry that I forgot to reply...

> -----Original Message-----

> From: Ferruh Yigit [mailto:ferruh.yigit@intel.com]

> Sent: Tuesday, October 24, 2017 5:54 AM

> To: Nélio Laranjeiro <nelio.laranjeiro@6wind.com>; Xueming(Steven) Li

> <xuemingl@mellanox.com>

> Cc: Ferruh Yigit <ferruh.yigit@intel.com>; dev@dpdk.org

> Subject: Re: [dpdk-dev] [PATCH] net/mlx5: fix ICC compiler warning

> 

> On 10/17/2017 12:56 AM, Nélio Laranjeiro wrote:

> > On Tue, Oct 17, 2017 at 10:46:43AM +0800, Xueming Li wrote:

> >> Initialize variable to avoid ICC compiler warning:

> >>

> https://emea01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.dpd

> k.org%2Fml%2Farchives%2Fdev%2F2017-

> October%2F077971.html&data=02%7C01%7Cxuemingl%40mellanox.com%7Cf2aa5d8fb9

> be404fc57b08d51a60a28b%7Ca652971c7d2e4d9ba6a4d149256f461b%7C0%7C0%7C63644

> 3924711609271&sdata=z%2Fiv8vs4MAbdnHr%2Bmq7ZMcGUfNa%2F1ItUhCq95sI11iU%3D&

> reserved=0

> >>

> >> Fixes: f8b9a3bad467 ("net/mlx5: install a socket to exchange a

> file...")

> >>

> >> Signed-off-by: Xueming Li <xuemingl@mellanox.com>

> 

> > Acked-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>

> 

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

> 

> 

> (icc workaround to disable warning [1] removed as well with patch, please

> check)

> 

> [1]

> https://emea01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fdpdk.or

> g%2Fml%2Farchives%2Fdev%2F2017-

> October%2F079836.html&data=02%7C01%7Cxuemingl%40mellanox.com%7Cf2aa5d8fb9

> be404fc57b08d51a60a28b%7Ca652971c7d2e4d9ba6a4d149256f461b%7C0%7C0%7C63644

> 3924711609271&sdata=RaHRnvt0Xaiu8qb34MfY4sGXOt1auJQhyXgtU7AWgrw%3D&reserv

> ed=0
diff mbox

Patch

diff --git a/drivers/net/mlx5/mlx5_txq.c b/drivers/net/mlx5/mlx5_txq.c
index 9deaa7e..93f1388 100644
--- a/drivers/net/mlx5/mlx5_txq.c
+++ b/drivers/net/mlx5/mlx5_txq.c
@@ -246,6 +246,7 @@ 
 	int already_mapped;
 	size_t page_size = sysconf(_SC_PAGESIZE);
 
+	memset(pages, 0, priv->txqs_n * sizeof(uintptr_t));
 	/*
 	 * As rdma-core, UARs are mapped in size of OS page size.
 	 * Use aligned address to avoid duplicate mmap.