From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM01-BN3-obe.outbound.protection.outlook.com (mail-bn3nam01on0060.outbound.protection.outlook.com [104.47.33.60]) by dpdk.org (Postfix) with ESMTP id F06D47D19 for ; Thu, 11 Jan 2018 13:42:53 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=CAVIUMNETWORKS.onmicrosoft.com; s=selector1-cavium-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=lgEqEJVGvin7cPdK9e8fCSGW6KJHDdaoYDl/LV/CuJ0=; b=Q/9/ILy5vipMTKPnG0Fd+aGRoomWyqaX9pVhKMsrJ32D1tJz8ecgL+P1XOPdjd/8X+xHmvLCmiUBf9l6423KHXSUkTHf77LfoPBMc/MmlSGd4TEZJL+pLREJa7BE1wKd3/td+h9fYeO2Q6Nkoq6Q9cSi6aZxCV3XENL9V/9i8t0= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Pavan.Bhagavatula@cavium.com; Received: from Pavan-LT (111.93.218.67) by BN6PR07MB3457.namprd07.prod.outlook.com (10.161.153.20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.386.5; Thu, 11 Jan 2018 12:42:50 +0000 Date: Thu, 11 Jan 2018 18:12:29 +0530 From: Pavan Nikhilesh To: Bruce Richardson , harry.van.haaren@intel.com, jerin.jacob@caviumnetworks.com Cc: dev@dpdk.org Message-ID: <20180111124227.tlffhzgqe4kgr6n6@Pavan-LT> References: <20171231000203.4510-1-pbhagavatula@caviumnetworks.com> <20171231000203.4510-2-pbhagavatula@caviumnetworks.com> <20180109172936.GA6508@bricha3-MOBL3.ger.corp.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180109172936.GA6508@bricha3-MOBL3.ger.corp.intel.com> User-Agent: NeoMutt/20170609 (1.8.3) X-Originating-IP: [111.93.218.67] X-ClientProxiedBy: PN1PR01CA0087.INDPRD01.PROD.OUTLOOK.COM (10.174.144.155) To BN6PR07MB3457.namprd07.prod.outlook.com (10.161.153.20) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: f3fefe00-a7cd-4ae7-0af0-08d558f0d45f X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(5600026)(4604075)(4534020)(4602075)(4627115)(201703031133081)(201702281549075)(2017052603307)(7153060)(7193020); SRVR:BN6PR07MB3457; X-Microsoft-Exchange-Diagnostics: 1; BN6PR07MB3457; 3:GTljxWxr1Ib7qm2LoruZ9T3oZfJ25Rkso3zoEiSzHQolpU+rum08eGVfkfpgCObiuk4zVkO2LWEkaGiXrpqzlmUQo8dO4p/NJ/SjrvuiGii/XUVUZ4kRnFLzCs5zqBgLUZjiwzsMy9TgmemBL0N6V7Kn7TO+0oVDwH7r5QslZb6My8fWYHAwOeP8WnufAccOHWWF1Jv3PQik8KpLRc2fXIOQqAZMFKbk9B585L7lfC4VYm/znQ71WtIVVm7QNt++; 25:r8m9BBK/HrE4AB3WGKtGuT4QsQSYdTbLWy6Fgj29vO2SIvhgwd9OBLPBnIiQWSRtfv3J5+QHXToa0C+AYfO3OlqhTg4tkxVRTtSxYLPTnD3wHVivRrqvy9CMTSAzD4r3OhahBOllIiSk/+GPBIgeNWXSx4zNM/+EommQjKkCcfu+kVuYkuD5lpfylwcEB3iU5rpreILG6Q1qozgaRmHGgZVsQ33TRl8JM+Dv6QsyNLgrbTkoNwo9asimsLa1/QfE8cGFndGQfKeM3UA13yh+2NjWGd1dAcZMtv91Ujgy19kSGId3wJbHlkn2hiDR8TLJmQw2OoUehjtWGiJvaEDdXA==; 31:28GCONBBsqWTofTxKEpLJOQT+Y9fZHES7gD8bGQTCzfSUKsoQpOUnVdt1g+A+Mh5aSgsXTidyU4ltLXxuJXrQSNGZfNlAXQddIC+jBjzawIDtdHQ/QvAHEZteXAWreMXVybM8wkbmpuBQvDPur++xNkn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oft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040470)(2401047)(5005006)(8121501046)(10201501046)(3231023)(944501075)(93006095)(3002001)(6041268)(20161123558120)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123564045)(20161123560045)(20161123562045)(6072148)(201708071742011); SRVR:BN6PR07MB3457; BCL:0; PCL:0; RULEID:(100000803101)(100110400095); SRVR:BN6PR07MB3457; X-Forefront-PRVS: 0549E6FD50 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(39860400002)(376002)(366004)(39380400002)(396003)(346002)(189003)(199004)(24454002)(229853002)(58126008)(66066001)(6496006)(81156014)(2906002)(305945005)(8676002)(8936002)(7736002)(6636002)(52116002)(6666003)(6246003)(50466002)(81166006)(33716001)(2950100002)(5009440100003)(5660300001)(42882006)(316002)(47776003)(23726003)(4326008)(68736007)(478600001)(16526018)(6116002)(83506002)(72206003)(386003)(16586007)(33896004)(25786009)(3846002)(9686003)(106356001)(105586002)(76176011)(55016002)(53936002)(1076002)(97736004)(107986001)(42262002); DIR:OUT; SFP:1101; SCL:1; SRVR:BN6PR07MB3457; H:Pavan-LT; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A:1; LANG:en; Received-SPF: None (protection.outlook.com: cavium.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BN6PR07MB3457; 23:HrNjyzAJe0AZx3ziy9CQkOEl2NbiAg+Ex6cdVDP0M?= =?us-ascii?Q?FEL72EC3pqmtzY0Ndu9FcHGVFQOOco/Zxbk/awzomT+iOiUnFhbvEGJnBn/a?= =?us-ascii?Q?Pc3Tnvt3rTqGX4h/KI2VUQwhmmjrAnfGbDe95TMl0t0n6IcSbQ3it5DOlQ2z?= =?us-ascii?Q?ZY7O3/A7jVs56mpLA7dUNJfmrqG9voURgj9bUtK6FW/1P6YgxXErNcvQuW95?= =?us-ascii?Q?spsakokftymALh7esdKNKo48eogUSmjF2AZvRHaGe1L3YoaiL4sokkgY++iw?= =?us-ascii?Q?ncTZbrxkTYaNqNZmbChMjEssSB7loENzJ9R+rYxdsUea4eK6udn/g24PmVld?= =?us-ascii?Q?xqy4aTsbHSDfMlxzIt+lEmYPuFfNvisFv7lEaEusXi+FktKOF2q0ZoQcGkvI?= =?us-ascii?Q?0xkXtIjKpzl1EqgxAJIqGtESAKgWnr41p9YmO93N9JjiOfrZ2KKvh3daaX1K?= =?us-ascii?Q?5FZtQQxniVuknU35SJnHzqglZftYLQ7D/glRW2u5JCLwvJARegm5Msxi28pl?= =?us-ascii?Q?TIw2U8jGuUdNrqbL95WJpi9Pu4QpMUTSziMsE+tJRTAlVx2BdAIS3zK0Cpjo?= =?us-ascii?Q?dDQwljnhywk40dWY8tZNahoYQDOltKggh1LITZqLQCdRUDUFvD6nTsxPl0xu?= =?us-ascii?Q?sUYUTQkco2B9IERgLTHVz2W0of4XBSEemF2MFCE3YQ0WCNng4/o2w0p/XdgR?= =?us-ascii?Q?s3XTEaEkTDPRCtY9AWHtUBefbYK2+yYm20GJcbX4XCNN/oLK3Jcbe3eWPOcm?= =?us-ascii?Q?zEVgAAUVrWBQLAhK+rd0ADP9aqgSBxjd6wNC1V01686Qempe3gytsrxwSEmN?= =?us-ascii?Q?m9xt2KnislBkC1+WuBmp1Q+7NGKDvLiT+Yp6RLIhtC0UTvECn2951pzpkr9K?= =?us-ascii?Q?j+etJNIVyzIqihA7h+GERBKJApbAw0N7p2WtGSd6uEynoRaF2dH6X3tp2Tqy?= =?us-ascii?Q?4aQFgX6fpNgATExr/pae7CaJgNbKEbTuZEZK9biW4WiOEBmybpBQZ57lVdOe?= =?us-ascii?Q?CPsp24aBR3MDmrziVHFm7Gn2m15hAqtkkI0I3JpoPekqQfoUTU7YX8jt3obE?= =?us-ascii?Q?CVBCvfnKfTnEpOaOZI4KDSiF4FLGcKgD+tgTMPugZqxKWZ6eykJTpSE1hALZ?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DlPwQtno2S2loWR33mur+N/ZZ3txNk3OpcXKy5xirAgVdIrCdP1RYA1dJQqRYJopEXKvlAaDkai SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Jan 2018 12:42:50.6186 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: f3fefe00-a7cd-4ae7-0af0-08d558f0d45f X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN6PR07MB3457 Subject: Re: [dpdk-dev] [PATCH 2/4] drivers/net: add drivers for Cavium NICs to meson build 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: Thu, 11 Jan 2018 12:42:54 -0000 On Tue, Jan 09, 2018 at 05:29:36PM +0000, Bruce Richardson wrote: > On Sun, Dec 31, 2017 at 05:32:01AM +0530, Pavan Nikhilesh wrote: > > Add Cavium octeontx and thunder nicvf to meson build infrastructure. > > > > Signed-off-by: Pavan Nikhilesh > > --- > > drivers/net/meson.build | 3 ++- > > drivers/net/octeontx/base/meson.build | 12 ++++++++++++ > > drivers/net/octeontx/meson.build | 10 ++++++++++ > > drivers/net/thunderx/Makefile | 2 +- > > drivers/net/thunderx/base/meson.build | 17 +++++++++++++++++ > > drivers/net/thunderx/meson.build | 9 +++++++++ > > ...x_nicvf_version.map => rte_pmd_thunderx_version.map} | 0 > > 7 files changed, 51 insertions(+), 2 deletions(-) > > create mode 100644 drivers/net/octeontx/base/meson.build > > create mode 100644 drivers/net/octeontx/meson.build > > create mode 100644 drivers/net/thunderx/base/meson.build > > create mode 100644 drivers/net/thunderx/meson.build > > rename drivers/net/thunderx/{rte_pmd_thunderx_nicvf_version.map => rte_pmd_thunderx_version.map} (100%) > > > > Some minor comments below. > > > diff --git a/drivers/net/meson.build b/drivers/net/meson.build > > index 72e1d3578..b132d3558 100644 > > --- a/drivers/net/meson.build > > +++ b/drivers/net/meson.build > > @@ -3,7 +3,8 @@ > > > > drivers = ['af_packet', 'bonding', > > 'e1000', 'fm10k', 'i40e', 'ixgbe', > > - 'null', 'pcap', 'ring'] > > + 'null', 'pcap', 'ring', > > + 'octeontx', 'thunderx'] > > std_deps = ['ethdev', 'kvargs'] # 'ethdev' also pulls in mbuf, net, eal etc > > std_deps += ['bus_pci'] # very many PMDs depend on PCI, so make std > > std_deps += ['bus_vdev'] # same with vdev bus > > diff --git a/drivers/net/octeontx/base/meson.build b/drivers/net/octeontx/base/meson.build > > new file mode 100644 > > index 000000000..637483d68 > > --- /dev/null > > +++ b/drivers/net/octeontx/base/meson.build > > @@ -0,0 +1,12 @@ > > +sources = [ > > + 'octeontx_bgx.c', > > + 'octeontx_pkivf.c', > > + 'octeontx_pkovf.c' > > +] > > + > > +base_lib = static_library('octeontx_base', sources, > > + c_args: cflags, > > + dependencies: static_rte_bus_pci, > > + include_directories: mempool_octeontx_dir) > > + > > +base_objs = base_lib.extract_all_objects() > > diff --git a/drivers/net/octeontx/meson.build b/drivers/net/octeontx/meson.build > > new file mode 100644 > > index 000000000..f263a4b51 > > --- /dev/null > > +++ b/drivers/net/octeontx/meson.build > > @@ -0,0 +1,10 @@ > > +subdir('base') > > +objs = [base_objs] > > + > > +sources = files('octeontx_rxtx.c', > > + 'octeontx_ethdev.c' > > + ) > > + > > +deps += ['mempool_octeontx', 'eventdev'] > > + > > +includes += include_directories('base') > > diff --git a/drivers/net/thunderx/Makefile b/drivers/net/thunderx/Makefile > > index e50e1ad8c..3e4501d34 100644 > > --- a/drivers/net/thunderx/Makefile > > +++ b/drivers/net/thunderx/Makefile > > @@ -44,7 +44,7 @@ LDLIBS += -lrte_eal -lrte_mbuf -lrte_mempool -lrte_ring > > LDLIBS += -lrte_ethdev -lrte_net -lrte_kvargs > > LDLIBS += -lrte_bus_pci > > > > -EXPORT_MAP := rte_pmd_thunderx_nicvf_version.map > > +EXPORT_MAP := rte_pmd_thunderx_version.map > > > > LIBABIVER := 1 > > > > diff --git a/drivers/net/thunderx/base/meson.build b/drivers/net/thunderx/base/meson.build > > new file mode 100644 > > index 000000000..867a6d661 > > --- /dev/null > > +++ b/drivers/net/thunderx/base/meson.build > > @@ -0,0 +1,17 @@ > > +sources = [ > > + 'nicvf_bsvf.c', > > + 'nicvf_hw.c', > > + 'nicvf_mbox.c' > > +] > > + > > +depends = ['ethdev'] > > +static_obj = [] > > +foreach d: depends > > + static_obj += [get_variable('static_rte_' + d)] > > +endforeach > > + > > +base_lib = static_library('nicvf_base', sources, > > + c_args: cflags, > > + dependencies: static_obj) > > + > > Given there is only one dependency here, I think it's probably best just > to do like you did with the octeontx base code, and put it explicitly in > the dependencies line, rather than bothering with a loop. Agreed, will remove the loop and include directly. > > > +base_objs = base_lib.extract_all_objects() > > diff --git a/drivers/net/thunderx/meson.build b/drivers/net/thunderx/meson.build > > new file mode 100644 > > index 000000000..17852f732 > > --- /dev/null > > +++ b/drivers/net/thunderx/meson.build > > @@ -0,0 +1,9 @@ > > +subdir('base') > > +objs = [base_objs] > > + > > +sources = files('nicvf_ethdev.c', > > + 'nicvf_svf.c', > > + 'nicvf_rxtx.c') > > +cflags += '-Ofast' > > Is there a reason this is explicitly needed? The optimization flags for > the DPDK build as a whole should be covered by the meson top-level > flags, based on the build type. With this given here, changing the build > type to "debug" or "debugoptimized" may not work as expected for the > driver. I do agree that this would mess up meson debug build. In traditional make environment we could control file specific cflags but as far as I see I couldnt find the support for it in meson. AFAIK meson's default cflags include '-O3' and not '-Ofast'. I will do a quick benchmark before v2 based on that include the cflag. Also, in case if -Ofast is necessary I will add a condition to enable it only in case of a normal build. > > > + > > +includes += include_directories('base') > > diff --git a/drivers/net/thunderx/rte_pmd_thunderx_nicvf_version.map b/drivers/net/thunderx/rte_pmd_thunderx_version.map > > similarity index 100% > > rename from drivers/net/thunderx/rte_pmd_thunderx_nicvf_version.map > > rename to drivers/net/thunderx/rte_pmd_thunderx_version.map > > -- > > 2.15.1 > >