patches for DPDK stable branches
 help / color / mirror / Atom feed
* [dpdk-stable] [dpdk v1] net/mlx5: fix possible building error
@ 2020-02-29 10:27 xiangxia.m.yue
  2020-03-01 17:09 ` [dpdk-stable] [dpdk-dev] " Ali Alnubani
  0 siblings, 1 reply; 7+ messages in thread
From: xiangxia.m.yue @ 2020-02-29 10:27 UTC (permalink / raw)
  To: matan, dev; +Cc: Tonghao Zhang, stable

From: Tonghao Zhang <xiangxia.m.yue@gmail.com>

When setting the CONFIG_RTE_BUILD_SHARED_LIB to y,
and build the mlx5 pmd, there is a building error.
To fix it, add RTE_IBVERBS_LINK_DLOPEN to include
relative codes.

> mlx5_common.o: In function `mlx5_glue_init':
> drivers/common/mlx5/mlx5_common.c:324: undefined reference to `dlclose'

Fixes: 7b4f1e6bd367 ("common/mlx5: introduce common library")
Cc: stable@dpdk.org

Signed-off-by: Tonghao Zhang <xiangxia.m.yue@gmail.com>
---
 drivers/common/mlx5/mlx5_common.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/common/mlx5/mlx5_common.c b/drivers/common/mlx5/mlx5_common.c
index 610fb48..570a3f4 100644
--- a/drivers/common/mlx5/mlx5_common.c
+++ b/drivers/common/mlx5/mlx5_common.c
@@ -209,8 +209,6 @@ enum mlx5_class
  */
 RTE_INIT_PRIO(mlx5_glue_init, CLASS)
 {
-	void *handle = NULL;
-
 	/* Initialize common log type. */
 	mlx5_common_logtype = rte_log_register("pmd.common.mlx5");
 	if (mlx5_common_logtype >= 0)
@@ -249,6 +247,7 @@ enum mlx5_class
 		 mlx5_glue_path(glue_path, sizeof(glue_path)) : ""),
 	};
 	unsigned int i = 0;
+	void *handle = NULL;
 	void **sym;
 	const char *dlmsg;
 
@@ -320,8 +319,10 @@ enum mlx5_class
 	mlx5_glue->fork_init();
 	return;
 glue_error:
+#ifdef RTE_IBVERBS_LINK_DLOPEN
 	if (handle)
 		dlclose(handle);
+#endif
 	DRV_LOG(WARNING, "Cannot initialize MLX5 common due to missing"
 		" run-time dependency on rdma-core libraries (libibverbs,"
 		" libmlx5)");
-- 
1.8.3.1


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

* Re: [dpdk-stable] [dpdk-dev] [dpdk v1] net/mlx5: fix possible building error
  2020-02-29 10:27 [dpdk-stable] [dpdk v1] net/mlx5: fix possible building error xiangxia.m.yue
@ 2020-03-01 17:09 ` Ali Alnubani
  2020-03-02  0:22   ` Tonghao Zhang
  0 siblings, 1 reply; 7+ messages in thread
From: Ali Alnubani @ 2020-03-01 17:09 UTC (permalink / raw)
  To: xiangxia.m.yue; +Cc: stable, Matan Azrad, dev

Hi Tonghao,

> -----Original Message-----
> From: dev <dev-bounces@dpdk.org> On Behalf Of
> xiangxia.m.yue@gmail.com
> Sent: Saturday, February 29, 2020 12:27 PM
> To: Matan Azrad <matan@mellanox.com>; dev@dpdk.org
> Cc: Tonghao Zhang <xiangxia.m.yue@gmail.com>; stable@dpdk.org
> Subject: [dpdk-dev] [dpdk v1] net/mlx5: fix possible building error
> 
> From: Tonghao Zhang <xiangxia.m.yue@gmail.com>
> 
> When setting the CONFIG_RTE_BUILD_SHARED_LIB to y, and build the mlx5
> pmd, there is a building error.
> To fix it, add RTE_IBVERBS_LINK_DLOPEN to include relative codes.
> 
> > mlx5_common.o: In function `mlx5_glue_init':
> > drivers/common/mlx5/mlx5_common.c:324: undefined reference to
> `dlclose'
> 
> Fixes: 7b4f1e6bd367 ("common/mlx5: introduce common library")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Tonghao Zhang <xiangxia.m.yue@gmail.com>
> ---
>  drivers/common/mlx5/mlx5_common.c | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
> 

I test this case on multiple environments and don't see the build failure. Can you please provide more information about yours, and how to reproduce this?

Thanks,
Ali

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

* Re: [dpdk-stable] [dpdk-dev] [dpdk v1] net/mlx5: fix possible building error
  2020-03-01 17:09 ` [dpdk-stable] [dpdk-dev] " Ali Alnubani
@ 2020-03-02  0:22   ` Tonghao Zhang
  2020-03-02  7:35     ` Ali Alnubani
  0 siblings, 1 reply; 7+ messages in thread
From: Tonghao Zhang @ 2020-03-02  0:22 UTC (permalink / raw)
  To: Ali Alnubani; +Cc: stable, Matan Azrad, dev

On Mon, Mar 2, 2020 at 1:09 AM Ali Alnubani <alialnu@mellanox.com> wrote:
>
> Hi Tonghao,
>
> > -----Original Message-----
> > From: dev <dev-bounces@dpdk.org> On Behalf Of
> > xiangxia.m.yue@gmail.com
> > Sent: Saturday, February 29, 2020 12:27 PM
> > To: Matan Azrad <matan@mellanox.com>; dev@dpdk.org
> > Cc: Tonghao Zhang <xiangxia.m.yue@gmail.com>; stable@dpdk.org
> > Subject: [dpdk-dev] [dpdk v1] net/mlx5: fix possible building error
> >
> > From: Tonghao Zhang <xiangxia.m.yue@gmail.com>
> >
> > When setting the CONFIG_RTE_BUILD_SHARED_LIB to y, and build the mlx5
> > pmd, there is a building error.
> > To fix it, add RTE_IBVERBS_LINK_DLOPEN to include relative codes.
> >
> > > mlx5_common.o: In function `mlx5_glue_init':
> > > drivers/common/mlx5/mlx5_common.c:324: undefined reference to
> > `dlclose'
> >
> > Fixes: 7b4f1e6bd367 ("common/mlx5: introduce common library")
> > Cc: stable@dpdk.org
> >
> > Signed-off-by: Tonghao Zhang <xiangxia.m.yue@gmail.com>
> > ---
> >  drivers/common/mlx5/mlx5_common.c | 5 +++--
> >  1 file changed, 3 insertions(+), 2 deletions(-)
> >
>
> I test this case on multiple environments and don't see the build failure. Can you please provide more information about yours, and how to reproduce this?
Hi Ali,
I use the dpdk-next-net, and the last commit id is
d7142fbae16f185e11bfa44be061399afc40a1be.
The build config is show as below:

diff --git a/config/common_base b/config/common_base
index 7ca2f28..4bd5126 100644
--- a/config/common_base
+++ b/config/common_base
@@ -57,7 +57,7 @@ CONFIG_RTE_ENABLE_LTO=n
 #
 # Compile to share library
 #
-CONFIG_RTE_BUILD_SHARED_LIB=n
+CONFIG_RTE_BUILD_SHARED_LIB=y

 #
 # Use newest code breaking previous ABI
@@ -363,7 +363,7 @@ CONFIG_RTE_LIBRTE_MLX4_DEBUG=n
 # Compile burst-oriented Mellanox ConnectX-4, ConnectX-5,
 # ConnectX-6 & BlueField (MLX5) PMD
 #
-CONFIG_RTE_LIBRTE_MLX5_PMD=n
+CONFIG_RTE_LIBRTE_MLX5_PMD=y
 CONFIG_RTE_LIBRTE_MLX5_DEBUG=n

 #

The building failure log show:
LD librte_common_mlx5.so.20.0.1
mlx5_common.o: In function `mlx5_glue_init':
/root/zth/myshell/dpdk-next-net/drivers/common/mlx5/mlx5_common.c:324:
undefined reference to `dlclose'
collect2: error: ld returned 1 exit status

> Thanks,
> Ali

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

* Re: [dpdk-stable] [dpdk-dev] [dpdk v1] net/mlx5: fix possible building error
  2020-03-02  0:22   ` Tonghao Zhang
@ 2020-03-02  7:35     ` Ali Alnubani
  2020-03-02  8:13       ` Tonghao Zhang
  0 siblings, 1 reply; 7+ messages in thread
From: Ali Alnubani @ 2020-03-02  7:35 UTC (permalink / raw)
  To: Tonghao Zhang; +Cc: stable, Matan Azrad, dev

> -----Original Message-----
> From: Tonghao Zhang <xiangxia.m.yue@gmail.com>
> Sent: Monday, March 2, 2020 2:23 AM
> To: Ali Alnubani <alialnu@mellanox.com>
> Cc: stable@dpdk.org; Matan Azrad <matan@mellanox.com>; dev@dpdk.org
> Subject: Re: [dpdk-dev] [dpdk v1] net/mlx5: fix possible building error
> 
> On Mon, Mar 2, 2020 at 1:09 AM Ali Alnubani <alialnu@mellanox.com>
> wrote:
> >
> > Hi Tonghao,
> >
> > > -----Original Message-----
> > > From: dev <dev-bounces@dpdk.org> On Behalf Of
> > > xiangxia.m.yue@gmail.com
> > > Sent: Saturday, February 29, 2020 12:27 PM
> > > To: Matan Azrad <matan@mellanox.com>; dev@dpdk.org
> > > Cc: Tonghao Zhang <xiangxia.m.yue@gmail.com>; stable@dpdk.org
> > > Subject: [dpdk-dev] [dpdk v1] net/mlx5: fix possible building error
> > >
> > > From: Tonghao Zhang <xiangxia.m.yue@gmail.com>
> > >
> > > When setting the CONFIG_RTE_BUILD_SHARED_LIB to y, and build the
> > > mlx5 pmd, there is a building error.
> > > To fix it, add RTE_IBVERBS_LINK_DLOPEN to include relative codes.
> > >
> > > > mlx5_common.o: In function `mlx5_glue_init':
> > > > drivers/common/mlx5/mlx5_common.c:324: undefined reference to
> > > `dlclose'
> > >
> > > Fixes: 7b4f1e6bd367 ("common/mlx5: introduce common library")
> > > Cc: stable@dpdk.org
> > >
> > > Signed-off-by: Tonghao Zhang <xiangxia.m.yue@gmail.com>
> > > ---
> > >  drivers/common/mlx5/mlx5_common.c | 5 +++--
> > >  1 file changed, 3 insertions(+), 2 deletions(-)
> > >
> >
> > I test this case on multiple environments and don't see the build failure.
> Can you please provide more information about yours, and how to
> reproduce this?
> Hi Ali,
> I use the dpdk-next-net, and the last commit id is
> d7142fbae16f185e11bfa44be061399afc40a1be.
> The build config is show as below:
> 
> diff --git a/config/common_base b/config/common_base index
> 7ca2f28..4bd5126 100644
> --- a/config/common_base
> +++ b/config/common_base
> @@ -57,7 +57,7 @@ CONFIG_RTE_ENABLE_LTO=n  #  # Compile to share
> library  # -CONFIG_RTE_BUILD_SHARED_LIB=n
> +CONFIG_RTE_BUILD_SHARED_LIB=y
> 
>  #
>  # Use newest code breaking previous ABI @@ -363,7 +363,7 @@
> CONFIG_RTE_LIBRTE_MLX4_DEBUG=n  # Compile burst-oriented Mellanox
> ConnectX-4, ConnectX-5,  # ConnectX-6 & BlueField (MLX5) PMD  # -
> CONFIG_RTE_LIBRTE_MLX5_PMD=n
> +CONFIG_RTE_LIBRTE_MLX5_PMD=y
>  CONFIG_RTE_LIBRTE_MLX5_DEBUG=n
> 
>  #
> 
> The building failure log show:
> LD librte_common_mlx5.so.20.0.1
> mlx5_common.o: In function `mlx5_glue_init':
> /root/zth/myshell/dpdk-next-
> net/drivers/common/mlx5/mlx5_common.c:324:
> undefined reference to `dlclose'
> collect2: error: ld returned 1 exit status
> 

Do you mind sharing which OS are you using, which gcc/clang version, whether you have MLNX_OFED or rdma-core installed, and which version?

Thanks,
Ali

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

* Re: [dpdk-stable] [dpdk-dev] [dpdk v1] net/mlx5: fix possible building error
  2020-03-02  7:35     ` Ali Alnubani
@ 2020-03-02  8:13       ` Tonghao Zhang
  2020-03-02  9:47         ` Ali Alnubani
  0 siblings, 1 reply; 7+ messages in thread
From: Tonghao Zhang @ 2020-03-02  8:13 UTC (permalink / raw)
  To: Ali Alnubani; +Cc: stable, Matan Azrad, dev

On Mon, Mar 2, 2020 at 3:35 PM Ali Alnubani <alialnu@mellanox.com> wrote:
>
> > -----Original Message-----
> > From: Tonghao Zhang <xiangxia.m.yue@gmail.com>
> > Sent: Monday, March 2, 2020 2:23 AM
> > To: Ali Alnubani <alialnu@mellanox.com>
> > Cc: stable@dpdk.org; Matan Azrad <matan@mellanox.com>; dev@dpdk.org
> > Subject: Re: [dpdk-dev] [dpdk v1] net/mlx5: fix possible building error
> >
> > On Mon, Mar 2, 2020 at 1:09 AM Ali Alnubani <alialnu@mellanox.com>
> > wrote:
> > >
> > > Hi Tonghao,
> > >
> > > > -----Original Message-----
> > > > From: dev <dev-bounces@dpdk.org> On Behalf Of
> > > > xiangxia.m.yue@gmail.com
> > > > Sent: Saturday, February 29, 2020 12:27 PM
> > > > To: Matan Azrad <matan@mellanox.com>; dev@dpdk.org
> > > > Cc: Tonghao Zhang <xiangxia.m.yue@gmail.com>; stable@dpdk.org
> > > > Subject: [dpdk-dev] [dpdk v1] net/mlx5: fix possible building error
> > > >
> > > > From: Tonghao Zhang <xiangxia.m.yue@gmail.com>
> > > >
> > > > When setting the CONFIG_RTE_BUILD_SHARED_LIB to y, and build the
> > > > mlx5 pmd, there is a building error.
> > > > To fix it, add RTE_IBVERBS_LINK_DLOPEN to include relative codes.
> > > >
> > > > > mlx5_common.o: In function `mlx5_glue_init':
> > > > > drivers/common/mlx5/mlx5_common.c:324: undefined reference to
> > > > `dlclose'
> > > >
> > > > Fixes: 7b4f1e6bd367 ("common/mlx5: introduce common library")
> > > > Cc: stable@dpdk.org
> > > >
> > > > Signed-off-by: Tonghao Zhang <xiangxia.m.yue@gmail.com>
> > > > ---
> > > >  drivers/common/mlx5/mlx5_common.c | 5 +++--
> > > >  1 file changed, 3 insertions(+), 2 deletions(-)
> > > >
> > >
> > > I test this case on multiple environments and don't see the build failure.
> > Can you please provide more information about yours, and how to
> > reproduce this?
> > Hi Ali,
> > I use the dpdk-next-net, and the last commit id is
> > d7142fbae16f185e11bfa44be061399afc40a1be.
> > The build config is show as below:
> >
> > diff --git a/config/common_base b/config/common_base index
> > 7ca2f28..4bd5126 100644
> > --- a/config/common_base
> > +++ b/config/common_base
> > @@ -57,7 +57,7 @@ CONFIG_RTE_ENABLE_LTO=n  #  # Compile to share
> > library  # -CONFIG_RTE_BUILD_SHARED_LIB=n
> > +CONFIG_RTE_BUILD_SHARED_LIB=y
> >
> >  #
> >  # Use newest code breaking previous ABI @@ -363,7 +363,7 @@
> > CONFIG_RTE_LIBRTE_MLX4_DEBUG=n  # Compile burst-oriented Mellanox
> > ConnectX-4, ConnectX-5,  # ConnectX-6 & BlueField (MLX5) PMD  # -
> > CONFIG_RTE_LIBRTE_MLX5_PMD=n
> > +CONFIG_RTE_LIBRTE_MLX5_PMD=y
> >  CONFIG_RTE_LIBRTE_MLX5_DEBUG=n
> >
> >  #
> >
> > The building failure log show:
> > LD librte_common_mlx5.so.20.0.1
> > mlx5_common.o: In function `mlx5_glue_init':
> > /root/zth/myshell/dpdk-next-
> > net/drivers/common/mlx5/mlx5_common.c:324:
> > undefined reference to `dlclose'
> > collect2: error: ld returned 1 exit status
> >
>
> Do you mind sharing which OS are you using, which gcc/clang version, whether you have MLNX_OFED or rdma-core installed, and which version?
1. CentOS Linux release 7.6.1810 (Core)
2. kernel 3.10.0-957.1.3.el7.x86_64
3. OFED 4.7-3.2.9
4. FW 16.26.4012
5. gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-36)
6. build the dpdk with x86_64-native-linuxapp-gcc
> Thanks,
> Ali

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

* Re: [dpdk-stable] [dpdk-dev] [dpdk v1] net/mlx5: fix possible building error
  2020-03-02  8:13       ` Tonghao Zhang
@ 2020-03-02  9:47         ` Ali Alnubani
  2020-03-02 10:56           ` Tonghao Zhang
  0 siblings, 1 reply; 7+ messages in thread
From: Ali Alnubani @ 2020-03-02  9:47 UTC (permalink / raw)
  To: Tonghao Zhang; +Cc: stable, Matan Azrad, dev, Raslan Darawsheh

> > Do you mind sharing which OS are you using, which gcc/clang version,
> whether you have MLNX_OFED or rdma-core installed, and which version?
> 1. CentOS Linux release 7.6.1810 (Core)
> 2. kernel 3.10.0-957.1.3.el7.x86_64
> 3. OFED 4.7-3.2.9
> 4. FW 16.26.4012
> 5. gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-36) 6. build the dpdk with x86_64-
> native-linuxapp-gcc

Thanks for sharing this information, still can't reproduce though:

"""
[root@hostname dpdk-next-net]# cat /etc/redhat-release
CentOS Linux release 7.6.1810 (Core)

[root@hostname dpdk-next-net]# ofed_info -s
MLNX_OFED_LINUX-4.7-3.2.9.0:

[root@hostname dpdk-next-net]# gcc --version | head -1
gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-39)

[root@hostname dpdk-next-net]# git log -1 --oneline
d7142fb version: 20.02

[root@hostname dpdk-next-net]# git diff -U0
diff --git a/config/common_base b/config/common_base
index 7ca2f28..4bd5126 100644
--- a/config/common_base
+++ b/config/common_base
@@ -60 +60 @@ CONFIG_RTE_ENABLE_LTO=n
-CONFIG_RTE_BUILD_SHARED_LIB=n
+CONFIG_RTE_BUILD_SHARED_LIB=y
@@ -366 +366 @@ CONFIG_RTE_LIBRTE_MLX4_DEBUG=n
-CONFIG_RTE_LIBRTE_MLX5_PMD=n
+CONFIG_RTE_LIBRTE_MLX5_PMD=y

[root@hostname dpdk-next-net]# make install T=x86_64-native-linuxapp-gcc -j$(nproc --all) > /dev/null
[root@hostname dpdk-next-net]# echo $?
0
"""

Anyway, I ran some tests on the patch and don't see any regressions.
One small issue though, the script check-git-log.sh is failing:
"""
./devtools/check-git-log.sh -1
Wrong headline prefix:
        net/mlx5: fix possible building error
"""
You could use common/mlx5 instead of net/mlx5. 

Tested-by: Ali Alnubani <alialnu@mellanox.com>

Thanks,
Ali

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

* Re: [dpdk-stable] [dpdk-dev] [dpdk v1] net/mlx5: fix possible building error
  2020-03-02  9:47         ` Ali Alnubani
@ 2020-03-02 10:56           ` Tonghao Zhang
  0 siblings, 0 replies; 7+ messages in thread
From: Tonghao Zhang @ 2020-03-02 10:56 UTC (permalink / raw)
  To: Ali Alnubani; +Cc: stable, Matan Azrad, dev, Raslan Darawsheh

On Mon, Mar 2, 2020 at 5:47 PM Ali Alnubani <alialnu@mellanox.com> wrote:
>
> > > Do you mind sharing which OS are you using, which gcc/clang version,
> > whether you have MLNX_OFED or rdma-core installed, and which version?
> > 1. CentOS Linux release 7.6.1810 (Core)
> > 2. kernel 3.10.0-957.1.3.el7.x86_64
> > 3. OFED 4.7-3.2.9
> > 4. FW 16.26.4012
> > 5. gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-36) 6. build the dpdk with x86_64-
> > native-linuxapp-gcc
>
> Thanks for sharing this information, still can't reproduce though:
>
> """
> [root@hostname dpdk-next-net]# cat /etc/redhat-release
> CentOS Linux release 7.6.1810 (Core)
>
> [root@hostname dpdk-next-net]# ofed_info -s
> MLNX_OFED_LINUX-4.7-3.2.9.0:
>
> [root@hostname dpdk-next-net]# gcc --version | head -1
> gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-39)
>
> [root@hostname dpdk-next-net]# git log -1 --oneline
> d7142fb version: 20.02
>
> [root@hostname dpdk-next-net]# git diff -U0
> diff --git a/config/common_base b/config/common_base
> index 7ca2f28..4bd5126 100644
> --- a/config/common_base
> +++ b/config/common_base
> @@ -60 +60 @@ CONFIG_RTE_ENABLE_LTO=n
> -CONFIG_RTE_BUILD_SHARED_LIB=n
> +CONFIG_RTE_BUILD_SHARED_LIB=y
> @@ -366 +366 @@ CONFIG_RTE_LIBRTE_MLX4_DEBUG=n
> -CONFIG_RTE_LIBRTE_MLX5_PMD=n
> +CONFIG_RTE_LIBRTE_MLX5_PMD=y
>
> [root@hostname dpdk-next-net]# make install T=x86_64-native-linuxapp-gcc -j$(nproc --all) > /dev/null
> [root@hostname dpdk-next-net]# echo $?
> 0
> """
>
> Anyway, I ran some tests on the patch and don't see any regressions.
> One small issue though, the script check-git-log.sh is failing:
> """
> ./devtools/check-git-log.sh -1
> Wrong headline prefix:
>         net/mlx5: fix possible building error
> """
> You could use common/mlx5 instead of net/mlx5.
>
> Tested-by: Ali Alnubani <alialnu@mellanox.com>
Thanks for your work, v2 has been sent.

> Thanks,
> Ali



-- 
Thanks,
Tonghao

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

end of thread, other threads:[~2020-03-02 10:56 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-29 10:27 [dpdk-stable] [dpdk v1] net/mlx5: fix possible building error xiangxia.m.yue
2020-03-01 17:09 ` [dpdk-stable] [dpdk-dev] " Ali Alnubani
2020-03-02  0:22   ` Tonghao Zhang
2020-03-02  7:35     ` Ali Alnubani
2020-03-02  8:13       ` Tonghao Zhang
2020-03-02  9:47         ` Ali Alnubani
2020-03-02 10:56           ` Tonghao Zhang

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