From mboxrd@z Thu Jan 1 00:00:00 1970 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) X-Amp-Result: UNSCANNABLE X-Amp-File-Uploaded: False Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga104.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 13 Mar 2018 06:58:32 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.47,465,1515484800"; d="scan'208";a="211113794" Received: from bricha3-mobl3.ger.corp.intel.com ([10.237.221.36]) by fmsmga005.fm.intel.com with SMTP; 13 Mar 2018 06:58:30 -0700 Received: by (sSMTP sendmail emulation); Tue, 13 Mar 2018 13:58:29 +0000 Date: Tue, 13 Mar 2018 13:58:28 +0000 From: Bruce Richardson To: Nelio Laranjeiro Cc: Pascal Mazon , dev@dpdk.org 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 Content-Disposition: inline In-Reply-To: <881cd2e5dd39987f50789bde2de291740debbab2.1520943890.git.nelio.laranjeiro@6wind.com> Organization: Intel Research and Development Ireland Ltd. User-Agent: Mutt/1.9.3 (2018-01-21) Subject: Re: [dpdk-dev] [PATCH 1/2] lib: move Netlink code into a common library X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Mar 2018 13:58:36 -0000 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