* [dpdk-dev] [PATCH v3] mlx5: use pkg-config to handle SUSE libmnl
@ 2018-10-25 20:29 Stephen Hemminger
2018-10-26 21:49 ` Yongseok Koh
0 siblings, 1 reply; 3+ messages in thread
From: Stephen Hemminger @ 2018-10-25 20:29 UTC (permalink / raw)
To: adrien.mazarguil; +Cc: dev, Stephen Hemminger
SUSE decided to install the libmnl include file in a non-standard
place: /usr/include/libmnl/libmnl/libmnl.h
This was probably a mistake by the SUSE package maintainer,
but hard to get fixed. Workaround the problem by pkg-config to find
the necessary include directive for libmnl.
Fixes: 20b71e92ef8e ("net/mlx5: lay groundwork for switch offloads")
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
v3 - Tested on SLES 15, needs $(shell pkg-config ...)
drivers/net/mlx5/Makefile | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/net/mlx5/Makefile b/drivers/net/mlx5/Makefile
index 1e9c0b42ac16..8497c98ef86e 100644
--- a/drivers/net/mlx5/Makefile
+++ b/drivers/net/mlx5/Makefile
@@ -51,6 +51,7 @@ CFLAGS += -D_DEFAULT_SOURCE
CFLAGS += -D_XOPEN_SOURCE=600
CFLAGS += $(WERROR_FLAGS)
CFLAGS += -Wno-strict-prototypes
+CFLAGS += $(shell pkg-config --cflags libmnl)
ifeq ($(CONFIG_RTE_LIBRTE_MLX5_DLOPEN_DEPS),y)
CFLAGS += -DMLX5_GLUE='"$(LIB_GLUE)"'
CFLAGS += -DMLX5_GLUE_VERSION='"$(LIB_GLUE_VERSION)"'
@@ -59,7 +60,7 @@ LDLIBS += -ldl
else
LDLIBS += -libverbs -lmlx5
endif
-LDLIBS += -lmnl
+LDLIBS += $(shell pkg-config --libs libmnl)
LDLIBS += -lrte_eal -lrte_mbuf -lrte_mempool -lrte_ring
LDLIBS += -lrte_ethdev -lrte_net -lrte_kvargs
LDLIBS += -lrte_bus_pci
--
2.19.1
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [dpdk-dev] [PATCH v3] mlx5: use pkg-config to handle SUSE libmnl
2018-10-25 20:29 [dpdk-dev] [PATCH v3] mlx5: use pkg-config to handle SUSE libmnl Stephen Hemminger
@ 2018-10-26 21:49 ` Yongseok Koh
2018-10-28 12:53 ` Shahaf Shuler
0 siblings, 1 reply; 3+ messages in thread
From: Yongseok Koh @ 2018-10-26 21:49 UTC (permalink / raw)
To: Stephen Hemminger; +Cc: Adrien Mazarguil, dev
On Thu, Oct 25, 2018 at 01:29:38PM -0700, Stephen Hemminger wrote:
> SUSE decided to install the libmnl include file in a non-standard
> place: /usr/include/libmnl/libmnl/libmnl.h
>
> This was probably a mistake by the SUSE package maintainer,
> but hard to get fixed. Workaround the problem by pkg-config to find
> the necessary include directive for libmnl.
>
> Fixes: 20b71e92ef8e ("net/mlx5: lay groundwork for switch offloads")
> Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
> ---
Acked-by: Yongseok Koh <yskoh@mellanox.com>
Thanks
> v3 - Tested on SLES 15, needs $(shell pkg-config ...)
>
> drivers/net/mlx5/Makefile | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/net/mlx5/Makefile b/drivers/net/mlx5/Makefile
> index 1e9c0b42ac16..8497c98ef86e 100644
> --- a/drivers/net/mlx5/Makefile
> +++ b/drivers/net/mlx5/Makefile
> @@ -51,6 +51,7 @@ CFLAGS += -D_DEFAULT_SOURCE
> CFLAGS += -D_XOPEN_SOURCE=600
> CFLAGS += $(WERROR_FLAGS)
> CFLAGS += -Wno-strict-prototypes
> +CFLAGS += $(shell pkg-config --cflags libmnl)
> ifeq ($(CONFIG_RTE_LIBRTE_MLX5_DLOPEN_DEPS),y)
> CFLAGS += -DMLX5_GLUE='"$(LIB_GLUE)"'
> CFLAGS += -DMLX5_GLUE_VERSION='"$(LIB_GLUE_VERSION)"'
> @@ -59,7 +60,7 @@ LDLIBS += -ldl
> else
> LDLIBS += -libverbs -lmlx5
> endif
> -LDLIBS += -lmnl
> +LDLIBS += $(shell pkg-config --libs libmnl)
> LDLIBS += -lrte_eal -lrte_mbuf -lrte_mempool -lrte_ring
> LDLIBS += -lrte_ethdev -lrte_net -lrte_kvargs
> LDLIBS += -lrte_bus_pci
> --
> 2.19.1
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [dpdk-dev] [PATCH v3] mlx5: use pkg-config to handle SUSE libmnl
2018-10-26 21:49 ` Yongseok Koh
@ 2018-10-28 12:53 ` Shahaf Shuler
0 siblings, 0 replies; 3+ messages in thread
From: Shahaf Shuler @ 2018-10-28 12:53 UTC (permalink / raw)
To: Yongseok Koh, Stephen Hemminger; +Cc: Adrien Mazarguil, dev
Saturday, October 27, 2018 12:49 AM, Yongseok Koh:
> Subject: Re: [dpdk-dev] [PATCH v3] mlx5: use pkg-config to handle SUSE
> libmnl
>
> On Thu, Oct 25, 2018 at 01:29:38PM -0700, Stephen Hemminger wrote:
> > SUSE decided to install the libmnl include file in a non-standard
> > place: /usr/include/libmnl/libmnl/libmnl.h
> >
> > This was probably a mistake by the SUSE package maintainer, but hard
> > to get fixed. Workaround the problem by pkg-config to find the
> > necessary include directive for libmnl.
> >
> > Fixes: 20b71e92ef8e ("net/mlx5: lay groundwork for switch offloads")
> > Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
> > ---
> Acked-by: Yongseok Koh <yskoh@mellanox.com>
Applied to next-net-mlx, with addition of Cc:stable@dpdk.org. thanks.
>
> Thanks
>
> > v3 - Tested on SLES 15, needs $(shell pkg-config ...)
> >
> > drivers/net/mlx5/Makefile | 3 ++-
> > 1 file changed, 2 insertions(+), 1 deletion(-)
> >
> > diff --git a/drivers/net/mlx5/Makefile b/drivers/net/mlx5/Makefile
> > index 1e9c0b42ac16..8497c98ef86e 100644
> > --- a/drivers/net/mlx5/Makefile
> > +++ b/drivers/net/mlx5/Makefile
> > @@ -51,6 +51,7 @@ CFLAGS += -D_DEFAULT_SOURCE CFLAGS +=
> > -D_XOPEN_SOURCE=600 CFLAGS += $(WERROR_FLAGS) CFLAGS +=
> > -Wno-strict-prototypes
> > +CFLAGS += $(shell pkg-config --cflags libmnl)
> > ifeq ($(CONFIG_RTE_LIBRTE_MLX5_DLOPEN_DEPS),y)
> > CFLAGS += -DMLX5_GLUE='"$(LIB_GLUE)"'
> > CFLAGS += -DMLX5_GLUE_VERSION='"$(LIB_GLUE_VERSION)"'
> > @@ -59,7 +60,7 @@ LDLIBS += -ldl
> > else
> > LDLIBS += -libverbs -lmlx5
> > endif
> > -LDLIBS += -lmnl
> > +LDLIBS += $(shell pkg-config --libs libmnl)
> > LDLIBS += -lrte_eal -lrte_mbuf -lrte_mempool -lrte_ring LDLIBS +=
> > -lrte_ethdev -lrte_net -lrte_kvargs LDLIBS += -lrte_bus_pci
> > --
> > 2.19.1
> >
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-10-28 12:53 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-25 20:29 [dpdk-dev] [PATCH v3] mlx5: use pkg-config to handle SUSE libmnl Stephen Hemminger
2018-10-26 21:49 ` Yongseok Koh
2018-10-28 12:53 ` Shahaf Shuler
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).