[dpdk-dev] net/mlx5: fix ICC compilation

Message ID cab8a88d75b5efd89c03862e6287eeb7011b3a7e.1521456027.git.nelio.laranjeiro@6wind.com (mailing list archive)
State Accepted, archived
Delegated to: Shahaf Shuler
Headers

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation fail apply issues

Commit Message

Nélio Laranjeiro March 19, 2018, 10:42 a.m. UTC
  Remove the second declaration of device_attr [1] inside the loop as well as
the query_device_ex() which has already been done outside of the loop.

Fixes: 9a761de8ea14 ("net/mlx5: flow counter support")
Cc: orika@mellanox.com

Reported-by: Ferruh Yigit <ferruh.yigit@intel.com>
Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>

[1] https://dpdk.org/ml/archives/dev/2018-March/091744.html
---
 drivers/net/mlx5/mlx5.c | 2 --
 1 file changed, 2 deletions(-)
  

Comments

Yongseok Koh March 20, 2018, 11:16 p.m. UTC | #1
> On Mar 19, 2018, at 3:42 AM, Nelio Laranjeiro <nelio.laranjeiro@6wind.com> wrote:
> 
> Remove the second declaration of device_attr [1] inside the loop as well as
> the query_device_ex() which has already been done outside of the loop.
> 
> Fixes: 9a761de8ea14 ("net/mlx5: flow counter support")
> Cc: orika@mellanox.com
> 
> Reported-by: Ferruh Yigit <ferruh.yigit@intel.com>
> Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
> 
> [1] https://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fdpdk.org%2Fml%2Farchives%2Fdev%2F2018-March%2F091744.html&data=02%7C01%7Cyskoh%40mellanox.com%7C3b1029de8c1049ea04a608d58d8640e4%7Ca652971c7d2e4d9ba6a4d149256f461b%7C0%7C0%7C636570530118173451&sdata=8olD%2BtcSHsXU8FNC82LlOdxkStJ8HFklyQWwVgewda4%3D&reserved=0
> ---
Acked-by: Yongseok Koh <yskoh@mellanox.com>
 
Thanks
  
Shahaf Shuler March 21, 2018, 6:16 a.m. UTC | #2
Wednesday, March 21, 2018 1:16 AM, Yongseok Koh:
> > On Mar 19, 2018, at 3:42 AM, Nelio Laranjeiro
> <nelio.laranjeiro@6wind.com> wrote:
> >
> > Remove the second declaration of device_attr [1] inside the loop as
> > well as the query_device_ex() which has already been done outside of the
> loop.
> >
> > Fixes: 9a761de8ea14 ("net/mlx5: flow counter support")
> > Cc: orika@mellanox.com
> >
> > Reported-by: Ferruh Yigit <ferruh.yigit@intel.com>
> > Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>

Ferruh, can you confirm the compilation issue solved? 

> >
> > [1]
> >
> https://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fdp
> d
> > k.org%2Fml%2Farchives%2Fdev%2F2018-
> March%2F091744.html&data=02%7C01%7C
> >
> yskoh%40mellanox.com%7C3b1029de8c1049ea04a608d58d8640e4%7Ca6529
> 71c7d2e
> >
> 4d9ba6a4d149256f461b%7C0%7C0%7C636570530118173451&sdata=8olD%2Bt
> cSHsXU
> > 8FNC82LlOdxkStJ8HFklyQWwVgewda4%3D&reserved=0
> > ---
> Acked-by: Yongseok Koh <yskoh@mellanox.com>
> 
> Thanks
  
Ferruh Yigit March 21, 2018, 9:53 a.m. UTC | #3
On 3/19/2018 10:42 AM, Nelio Laranjeiro wrote:
> Remove the second declaration of device_attr [1] inside the loop as well as
> the query_device_ex() which has already been done outside of the loop.
> 
> Fixes: 9a761de8ea14 ("net/mlx5: flow counter support")
> Cc: orika@mellanox.com
> 
> Reported-by: Ferruh Yigit <ferruh.yigit@intel.com>
> Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>

Tested-by: Ferruh Yigit <ferruh.yigit@intel.com>
  
Shahaf Shuler March 27, 2018, 1:07 p.m. UTC | #4
Wednesday, March 21, 2018 11:53 AM, Ferruh Yigit:
> On 3/19/2018 10:42 AM, Nelio Laranjeiro wrote:

> > Remove the second declaration of device_attr [1] inside the loop as

> > well as the query_device_ex() which has already been done outside of the

> loop.

> >

> > Fixes: 9a761de8ea14 ("net/mlx5: flow counter support")

> > Cc: orika@mellanox.com

> >

> > Reported-by: Ferruh Yigit <ferruh.yigit@intel.com>

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

> 

> Tested-by: Ferruh Yigit <ferruh.yigit@intel.com>


Applied to next-net-mlx, thanks.
  

Patch

diff --git a/drivers/net/mlx5/mlx5.c b/drivers/net/mlx5/mlx5.c
index a2acac703..b8b362a20 100644
--- a/drivers/net/mlx5/mlx5.c
+++ b/drivers/net/mlx5/mlx5.c
@@ -723,7 +723,6 @@  mlx5_pci_probe(struct rte_pci_driver *pci_drv __rte_unused,
 		struct rte_eth_dev *eth_dev = NULL;
 		struct ibv_device_attr_ex device_attr_ex;
 		struct ether_addr mac;
-		struct ibv_device_attr_ex device_attr;
 		struct mlx5_dev_config config = {
 			.cqe_comp = cqe_comp,
 			.mps = mps,
@@ -780,7 +779,6 @@  mlx5_pci_probe(struct rte_pci_driver *pci_drv __rte_unused,
 			err = ENODEV;
 			goto port_error;
 		}
-		mlx5_glue->query_device_ex(ctx, NULL, &device_attr);
 		/* Check port status. */
 		err = mlx5_glue->query_port(ctx, port, &port_attr);
 		if (err) {