DPDK patches and discussions
 help / color / mirror / Atom feed
From: Shahaf Shuler <shahafs@mellanox.com>
To: "Nélio Laranjeiro" <nelio.laranjeiro@6wind.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>, Yongseok Koh <yskoh@mellanox.com>,
	Adrien Mazarguil <adrien.mazarguil@6wind.com>,
	Alex Rosenbaum <alexr@mellanox.com>
Subject: Re: [dpdk-dev] [PATCH] mk: fix application compilation with lmnl and mlx5
Date: Tue, 24 Jul 2018 11:53:54 +0000	[thread overview]
Message-ID: <DB7PR05MB4426371CBB4B78EB7E409358C3550@DB7PR05MB4426.eurprd05.prod.outlook.com> (raw)
In-Reply-To: <20180724114450.5mrrdkye7elwpka5@laranjeiro-vm.dev.6wind.com>

Tuesday, July 24, 2018 2:45 PM, Nélio Laranjeiro:
> Subject: Re: [PATCH] mk: fix application compilation with lmnl and mlx5
> 
> On Tue, Jul 24, 2018 at 11:21:52AM +0000, Shahaf Shuler wrote:
> > Tuesday, July 24, 2018 12:29 PM, Nelio Laranjeiro:
> > > Subject: [PATCH] mk: fix application compilation with lmnl and mlx5
> > >
> > > When Mellanox MLX5 PMD is compiled with
> > > CONFIG_RTE_LIBRTE_MLX5_DLOPEN_DEPS=y, the external dependency
> on
> > > libmln is missing.
> > >
> > > Fixes: 4d5cce06231a ("net/mlx5: lay groundwork for switch offloads")
> > > Cc: adrien.mazarguil@6wind.com
> > >
> > > Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
> > > ---
> > >  mk/rte.app.mk | 2 +-
> > >  1 file changed, 1 insertion(+), 1 deletion(-)
> > >
> > > diff --git a/mk/rte.app.mk b/mk/rte.app.mk index
> > > f4d28c2da..ff39d37aa
> > > 100644
> > > --- a/mk/rte.app.mk
> > > +++ b/mk/rte.app.mk
> > > @@ -149,7 +149,7 @@ else
> > >  _LDLIBS-$(CONFIG_RTE_LIBRTE_MLX4_PMD)       += -lrte_pmd_mlx4 -
> > > libverbs -lmlx4
> > >  endif
> > >  ifeq ($(CONFIG_RTE_LIBRTE_MLX5_DLOPEN_DEPS),y)
> > > -_LDLIBS-$(CONFIG_RTE_LIBRTE_MLX5_PMD)       += -lrte_pmd_mlx5 -ldl
> > > +_LDLIBS-$(CONFIG_RTE_LIBRTE_MLX5_PMD)       += -lrte_pmd_mlx5 -ldl
> -
> > > lmnl
> >
> > This issue raise some more basic question.
> > The DLOPEN mode was introduced to run in systems which don't have
> > verbs/mlx5 libs installed, because those were the only dependencies
> > for the PMD back then.
> > Now we have the libmnl, which is external dependency just like
> > rdma-core, and following your fix, hard linked also in case of DLOPEN
> > option.
> > It means the whole DPDK binary/lib will be depended on libmnl and this
> > is not what we want with DLOPEN.
> >
> > Can we consider different options:
> > 1. always statically link libmnl
> 
> This will force users to re-compile their application to have the missing
> features disabled because some calls are not available, see the list of
> HAVE_RDMA_NLDEV_* elements in the MLX5 makefile due to the issues this
> Netlink stuff brings.

I don't understand. 

First the HAVE_RDMA_NLDEV_* actually re-define the needed enum in case some of the user space headers are missing.
It is not to disable to support on some features in libmnl.

In the doc patch[1] is state the minimal libmnl version:
"Minimal version for libmnl is **1.0.3**."

This one contains all the needed support for switch rules?
Do we expect that w/ more switch rules we will need more feature from this lib? (not sure, it is only to open the sockets).  

[1] https://patches.dpdk.org/patch/43266/

> 
> > 2. dlopen libmnl just like we do for verbs/mlx5
> 
> You want another glue library.  It won't be for this release in this case, I don't
> have time to write such glue.

Yes I agree the first approach is better (static linkage). 

> 
> > >  else
> > >  _LDLIBS-$(CONFIG_RTE_LIBRTE_MLX5_PMD)       += -lrte_pmd_mlx5 -
> > > libverbs -lmlx5 -lmnl
> > >  endif
> > > --
> > > 2.18.0
> >
> 
> [1]
> https://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fma
> ils.dpdk.org%2Farchives%2Fdev%2F2018-
> March%2F092876.html&amp;data=02%7C01%7Cshahafs%40mellanox.com%7
> C206bd64b84a341f50c6e08d5f15ae0d5%7Ca652971c7d2e4d9ba6a4d149256f4
> 61b%7C0%7C0%7C636680294972217071&amp;sdata=GIfPD0xe8QnHaRh%2Bv
> BTy1p3r%2FWj3j2GlmcVPFCbSLMw%3D&amp;reserved=0
> 
> --
> Nélio Laranjeiro
> 6WIND

  reply	other threads:[~2018-07-24 11:54 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-24  9:29 Nelio Laranjeiro
2018-07-24  9:32 ` Adrien Mazarguil
2018-07-26 12:05   ` Thomas Monjalon
2018-07-24 11:21 ` Shahaf Shuler
2018-07-24 11:44   ` Nélio Laranjeiro
2018-07-24 11:53     ` Shahaf Shuler [this message]
2018-07-24 12:55   ` Adrien Mazarguil
2018-07-24 13:03     ` Shahaf Shuler
2018-07-24 15:13       ` Adrien Mazarguil
2018-07-25  6:39         ` Shahaf Shuler
2018-07-25  9:07           ` Adrien Mazarguil
2018-07-25 13:23             ` Shahaf Shuler

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=DB7PR05MB4426371CBB4B78EB7E409358C3550@DB7PR05MB4426.eurprd05.prod.outlook.com \
    --to=shahafs@mellanox.com \
    --cc=adrien.mazarguil@6wind.com \
    --cc=alexr@mellanox.com \
    --cc=dev@dpdk.org \
    --cc=nelio.laranjeiro@6wind.com \
    --cc=yskoh@mellanox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).