From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bruce Richardson Subject: Re: [PATCH 1/2] lib: move Netlink code into a common library Date: Tue, 13 Mar 2018 13:58:28 +0000 Message-ID: <20180313135828.GA4612@bricha3-MOBL3.ger.corp.intel.com> References: <881cd2e5dd39987f50789bde2de291740debbab2.1520943890.git.nelio.laranjeiro@6wind.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Pascal Mazon , dev@dpdk.org To: Nelio Laranjeiro Return-path: Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by dpdk.org (Postfix) with ESMTP id 395EBAA90 for ; Tue, 13 Mar 2018 14:58:35 +0100 (CET) Content-Disposition: inline In-Reply-To: <881cd2e5dd39987f50789bde2de291740debbab2.1520943890.git.nelio.laranjeiro@6wind.com> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Tue, Mar 13, 2018 at 01:28:26PM +0100, Nelio Laranjeiro wrote: > Moves TAP PMD generic Netlink library into lib directory to let other PMD > use Netlink to communicate with kernel. > > As this library uses a socket to communicate with Netlink it does not bring > any dependency on the libnl. > > Cc: Pascal Mazon > > Signed-off-by: Nelio Laranjeiro > --- > MAINTAINERS | 3 + > config/common_base | 6 ++ > config/common_linuxapp | 1 + > drivers/net/tap/Makefile | 3 +- > drivers/net/tap/rte_eth_tap.c | 16 +-- > drivers/net/tap/tap_flow.c | 118 ++++++++++----------- > drivers/net/tap/tap_netlink.h | 42 -------- > drivers/net/tap/tap_tcmsgs.c | 28 ++--- > drivers/net/tap/tap_tcmsgs.h | 2 +- > lib/Makefile | 2 + > lib/librte_netlink/Makefile | 26 +++++ > lib/librte_netlink/meson.build | 13 +++ > .../librte_netlink/rte_netlink.c | 42 ++++---- > lib/librte_netlink/rte_netlink.h | 42 ++++++++ > lib/librte_netlink/rte_netlink_version.map | 17 +++ > lib/meson.build | 2 +- > mk/rte.app.mk | 1 + > 17 files changed, 216 insertions(+), 148 deletions(-) > delete mode 100644 drivers/net/tap/tap_netlink.h > create mode 100644 lib/librte_netlink/Makefile > create mode 100644 lib/librte_netlink/meson.build > rename drivers/net/tap/tap_netlink.c => lib/librte_netlink/rte_netlink.c (88%) > create mode 100644 lib/librte_netlink/rte_netlink.h > create mode 100644 lib/librte_netlink/rte_netlink_version.map > > diff --git a/lib/librte_netlink/meson.build b/lib/librte_netlink/meson.build > new file mode 100644 > index 000000000..77592c7d4 > --- /dev/null > +++ b/lib/librte_netlink/meson.build > @@ -0,0 +1,13 @@ > +# SPDX-License-Identifier: BSD-3-Clause > +# Copyright 2018 6WIND S.A. > +# Copyright 2018 Mellanox Technologies, Ltd. > + > + > +name = 'netlink' > +version = 1 Not a big issue, but the above two lines are unnecessary, and can be omitted. I'd rather than the name of the lib *not* be explicitly called out, to prevent the temptation of giving the library a different name to the name of the directory it is in. > +allow_experimental_apis = true > +sources = files('rte_netlink.c',) > + > +headers = files('rte_netlink.h') > + > +deps += ['net'] > diff --git a/lib/meson.build b/lib/meson.build > index ef6159170..873a39785 100644 > --- a/lib/meson.build > +++ b/lib/meson.build > @@ -23,7 +23,7 @@ libraries = [ 'compat', # just a header, used for versioning > # add pkt framework libs which use other libs from above > 'port', 'table', 'pipeline', > # flow_classify lib depends on pkt framework table lib > - 'flow_classify'] > + 'flow_classify', 'netlink'] Given that this doesn't depend on anything apart from the core libs, I think it should be placed earlier in the list, where the majority of the libs are in alphabetical order. [Yes, I should have put a comment just before the "acl" lib entry calling out the fact that it was meant to be an alphabetical list - I forgot, sorry! :-)] /Bruce