From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr0-f194.google.com (mail-wr0-f194.google.com [209.85.128.194]) by dpdk.org (Postfix) with ESMTP id 5EC027CAF for ; Fri, 1 Sep 2017 16:27:59 +0200 (CEST) Received: by mail-wr0-f194.google.com with SMTP id a47so188861wra.2 for ; Fri, 01 Sep 2017 07:27:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=message-id:subject:from:to:cc:date:in-reply-to:references :content-transfer-encoding:mime-version; bh=VjwFRVXIhPA6HZvjstauEZRnWuzoYIEgVGF4j8H1vrI=; b=c+Wq/qmr1hhPVJjiyoa+XU2hLdmedS0LbAWVkxVvUOMtt98zjIZELFrqu/Ix1bax4J tJY6jnSiMlxZgNBOyTNKKKt9cJl6hCcp9ojGoXWJ9J6mX5hfriFVlKNm8yWcKg8KUA46 KzYZY1KKpxmYoUI2qJlDfHpgiyFAsHW1+YDEOtR96zv50ziX0cYlwUOWn3EO1lUjsrej tABWGmqdJL8RXJh1T9ARitRhWzhN++PvzQfSjZE6i0EELBHeE81woFRTwCqz53QOeDiS El9GbWTVXlD0rvF8f4OacJrstRLrRBt5UG3cjLu4rb9Hy2FmgceoWvVdvtzV/zu6wzIL O6+g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:subject:from:to:cc:date:in-reply-to :references:content-transfer-encoding:mime-version; bh=VjwFRVXIhPA6HZvjstauEZRnWuzoYIEgVGF4j8H1vrI=; b=uL2I8xHDjMZCW6VNEp2GJCnf3TpKOVUTWYPO/NPLe2UHg9h/uGt8RmmNqn2beeZbf2 Ofmzg0LS4AQ8NJsCgsRv85w3Pkqy00zjPIadmYknRvITBvopuz2RDzCnJcu24j/u8cmv yzLXxaMZOzYvxQmvh50Fc5dCSLIrbM2jR1aamLJozhDtaw4TgbLX7MmytQvU5czrD/fr tET8m0S3ci7xok6rYyZuqtkoT8P6pqzwPiksY/im/bIJJmYxDwhyx6qdzoHL5QVIRRMw IMxsBygM91wWIFsBQpX9J/2sBIEWr4FjRgnfog4JnxBR2vIxFWbU/C2uqpLjtKC1hetq 2QnA== X-Gm-Message-State: AHPjjUiQhdp5n1Da9SbVBfWzjCRGChmA7y1Wglm4Q/+BTqGf9pTjH4rZ PiaaaPutKn6VfgjepD/fDA== X-Google-Smtp-Source: ADKCNb6RS8LOf+vb7P/p2cBRU6Nx2n5oV/bRrl3lWXfuxKtpYa4de1qoVkcvg4zmaIztM/wktTSPyQ== X-Received: by 10.223.135.114 with SMTP id 47mr1258335wrz.112.1504276078935; Fri, 01 Sep 2017 07:27:58 -0700 (PDT) Received: from localhost ([2a00:23c5:bef3:400:4a51:b7ff:fe0b:4749]) by smtp.gmail.com with ESMTPSA id b6sm217447wme.41.2017.09.01.07.27.58 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 01 Sep 2017 07:27:58 -0700 (PDT) Message-ID: <1504276077.31011.4.camel@gmail.com> From: Luca Boccassi To: Bruce Richardson Cc: dev@dpdk.org Date: Fri, 01 Sep 2017 15:27:57 +0100 In-Reply-To: <20170901135515.GA10224@bricha3-MOBL3.ger.corp.intel.com> References: <20170901100416.80264-1-bruce.richardson@intel.com> <20170901100416.80264-4-bruce.richardson@intel.com> <1504272772.31011.2.camel@gmail.com> <20170901135515.GA10224@bricha3-MOBL3.ger.corp.intel.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Mailer: Evolution 3.22.6-1 Mime-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH 03/17] igb_uio: add igb_uio kmod 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: Fri, 01 Sep 2017 14:27:59 -0000 On Fri, 2017-09-01 at 14:55 +0100, Bruce Richardson wrote: > On Fri, Sep 01, 2017 at 02:32:52PM +0100, Luca Boccassi wrote: > > On Fri, 2017-09-01 at 11:04 +0100, Bruce Richardson wrote: > > > Support building igb_uio using meson and ninja. For this, we > > > still > > > use the > > > kernel's kbuild system, by calling out to make, since it's safer > > > and > > > easier > > > than trying to reproduce that in meson. A list of suitable file > > > dependencies is given so that we have a reasonable chance of a > > > rebuild when > > > necessary. > > >=20 > > > Signed-off-by: Bruce Richardson > > > --- > > > =C2=A0lib/librte_eal/linuxapp/igb_uio/Kbuild=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0|=C2=A0=C2=A01 + > > > =C2=A0lib/librte_eal/linuxapp/igb_uio/meson.build | 47 > > > +++++++++++++++++++++++++++++ > > > =C2=A0lib/librte_eal/linuxapp/meson.build=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0| 10 ++++++ > > > =C2=A0meson_options.txt=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0|=C2=A0=C2=A02 ++ > > > =C2=A04 files changed, 60 insertions(+) > > > =C2=A0create mode 100644 lib/librte_eal/linuxapp/igb_uio/Kbuild > > > =C2=A0create mode 100644 lib/librte_eal/linuxapp/igb_uio/meson.build > > >=20 > > > diff --git a/lib/librte_eal/linuxapp/igb_uio/Kbuild > > > b/lib/librte_eal/linuxapp/igb_uio/Kbuild > > > new file mode 100644 > > > index 000000000..98c98fe52 > > > --- /dev/null > > > +++ b/lib/librte_eal/linuxapp/igb_uio/Kbuild > > > @@ -0,0 +1 @@ > > > +obj-m :=3D igb_uio.o > > > diff --git a/lib/librte_eal/linuxapp/igb_uio/meson.build > > > b/lib/librte_eal/linuxapp/igb_uio/meson.build > > > new file mode 100644 > > > index 000000000..c046e1d66 > > > --- /dev/null > > > +++ b/lib/librte_eal/linuxapp/igb_uio/meson.build > > > @@ -0,0 +1,47 @@ > > > +#=C2=A0=C2=A0=C2=A0BSD LICENSE > > > +# > > > +#=C2=A0=C2=A0=C2=A0Copyright(c) 2017 Intel Corporation. All rights r= eserved. > > > +#=C2=A0=C2=A0=C2=A0All rights reserved. > > > +# > > > +#=C2=A0=C2=A0=C2=A0Redistribution and use in source and binary forms= , with or > > > without > > > +#=C2=A0=C2=A0=C2=A0modification, are permitted provided that the fol= lowing > > > conditions > > > +#=C2=A0=C2=A0=C2=A0are met: > > > +# > > > +#=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0* Redistributions of source code must= retain the above > > > copyright > > > +#=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0notice, this list of cond= itions and the following > > > disclaimer. > > > +#=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0* Redistributions in binary form must= reproduce the above > > > copyright > > > +#=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0notice, this list of cond= itions and the following > > > disclaimer > > > in > > > +#=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0the documentation and/or = other materials provided with > > > the > > > +#=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0distribution. > > > +#=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0* Neither the name of Intel Corporati= on nor the names of > > > its > > > +#=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0contributors may be used = to endorse or promote products > > > derived > > > +#=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0from this software withou= t specific prior written > > > permission. > > > +# > > > +#=C2=A0=C2=A0=C2=A0THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER= S AND > > > CONTRIBUTORS > > > +#=C2=A0=C2=A0=C2=A0"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, IN= CLUDING, > > > BUT > > > NOT > > > +#=C2=A0=C2=A0=C2=A0LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABI= LITY AND > > > FITNESS FOR > > > +#=C2=A0=C2=A0=C2=A0A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT = SHALL THE > > > COPYRIGHT > > > +#=C2=A0=C2=A0=C2=A0OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, I= NDIRECT, > > > INCIDENTAL, > > > +#=C2=A0=C2=A0=C2=A0SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INC= LUDING, BUT > > > NOT > > > +#=C2=A0=C2=A0=C2=A0LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SE= RVICES; > > > LOSS OF > > > USE, > > > +#=C2=A0=C2=A0=C2=A0DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEV= ER CAUSED > > > AND > > > ON ANY > > > +#=C2=A0=C2=A0=C2=A0THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT = LIABILITY, > > > OR > > > TORT > > > +#=C2=A0=C2=A0=C2=A0(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN AN= Y WAY OUT > > > OF > > > THE USE > > > +#=C2=A0=C2=A0=C2=A0OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBIL= ITY OF SUCH > > > DAMAGE. > > > + > > > +mkfile =3D custom_target('igb_uio_makefile', > > > + output: 'Makefile', > > > + command: ['touch', '@OUTPUT@']) > > > + > > > +custom_target('igb_uio', > > > + input: ['igb_uio.c', 'Kbuild'], > > > + output: 'igb_uio.ko', > > > + command: ['make', '-C', kernel_dir, > > > + 'M=3D' + meson.current_build_dir(), > > > + 'src=3D' + meson.current_source_dir(), > > > + 'EXTRA_CFLAGS=3D-I' + meson.current_source_dir() + > > > + '/../../common/include', > > > + 'modules'], > > > + depends: mkfile, > > > + depend_files: [join_paths(kernel_dir, 'Kconfig')], > >=20 > > Can this be made optional somehow? > >=20 > > There's no build/Kconfig on Debian: > >=20 > > $ ls /lib/modules/4.9.0-3-amd64/build > > arch=C2=A0=C2=A0include=C2=A0=C2=A0Makefile=C2=A0=C2=A0Module.symvers= =C2=A0=C2=A0scripts > >=20 > > But the build works fine without that depend_files line. > >=20 >=20 > Yep, definitely can be removed. I was just looking for some way to > give > meson the smarts to know when the kmod needed to be recompiled, and > it > seemed a likely candidate to watch for changes. >=20 > /Bruce Thanks. This is the content of build/ and the parent directory in Debian, in case you want to try and find some common ground: $ ls -la /lib/modules/4.9.0-3-amd64/ total 4120 drwxr-xr-x=C2=A0=C2=A04 root root=C2=A0=C2=A0=C2=A0=C2=A04096 Aug 15 11:13 = . drwxr-xr-x=C2=A0=C2=A04 root root=C2=A0=C2=A0=C2=A0=C2=A04096 Aug 25 17:55 = .. lrwxrwxrwx=C2=A0=C2=A01 root root=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A036 May= =C2=A0=C2=A02 16:21 build -> /usr/src/linux- headers-4.9.0-3-amd64 drwxr-xr-x 12 root root=C2=A0=C2=A0=C2=A0=C2=A04096 May 17 18:58 kernel -rw-r--r--=C2=A0=C2=A01 root root 1009588 Aug 15 11:13 modules.alias -rw-r--r--=C2=A0=C2=A01 root root=C2=A0=C2=A0968576 Aug 15 11:13 modules.al= ias.bin -rw-r--r--=C2=A0=C2=A01 root root=C2=A0=C2=A0=C2=A0=C2=A04018 Aug=C2=A0=C2= =A06 05:24 modules.builtin -rw-r--r--=C2=A0=C2=A01 root root=C2=A0=C2=A0=C2=A0=C2=A05327 Aug 15 11:13 = modules.builtin.bin -rw-r--r--=C2=A0=C2=A01 root root=C2=A0=C2=A0400037 Aug 15 11:13 modules.de= p -rw-r--r--=C2=A0=C2=A01 root root=C2=A0=C2=A0551081 Aug 15 11:13 modules.de= p.bin -rw-r--r--=C2=A0=C2=A01 root root=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0402 Aug 15 1= 1:13 modules.devname -rw-r--r--=C2=A0=C2=A01 root root=C2=A0=C2=A0133512 Aug=C2=A0=C2=A06 05:24 = modules.order -rw-r--r--=C2=A0=C2=A01 root root=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0523 Aug 15 1= 1:13 modules.softdep -rw-r--r--=C2=A0=C2=A01 root root=C2=A0=C2=A0495231 Aug 15 11:13 modules.sy= mbols -rw-r--r--=C2=A0=C2=A01 root root=C2=A0=C2=A0610575 Aug 15 11:13 modules.sy= mbols.bin lrwxrwxrwx=C2=A0=C2=A01 root root=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A037 May= =C2=A0=C2=A02 16:21 source -> /usr/src/linux- headers-4.9.0-3-common drwxr-xr-x=C2=A0=C2=A03 root root=C2=A0=C2=A0=C2=A0=C2=A04096 May 17 18:58 = updates $ ls -la /lib/modules/4.9.0-3-amd64/build/ total 1460 drwxr-xr-x 4 root root=C2=A0=C2=A0=C2=A0=C2=A04096 Aug=C2=A0=C2=A07 10:27 . drwxr-xr-x 9 root root=C2=A0=C2=A0=C2=A0=C2=A04096 Aug 25 17:55 .. drwxr-xr-x 3 root root=C2=A0=C2=A0=C2=A0=C2=A04096 May 17 18:58 arch -rw-r--r-- 1 root root=C2=A0=C2=A0186386 Aug=C2=A0=C2=A06 05:24 .config drwxr-xr-x 4 root root=C2=A0=C2=A0=C2=A0=C2=A04096 May 17 18:58 include -rw-r--r-- 1 root root=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0242 Aug=C2=A0=C2=A06 05= :24 .kernelvariables -rw-r--r-- 1 root root=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0304 Aug=C2=A0=C2=A06 05= :24 Makefile -rw-r--r-- 1 root root 1278637 Aug=C2=A0=C2=A06 05:24 Module.symvers lrwxrwxrwx 1 root root=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A034 May=C2=A0=C2= =A02 16:21 scripts -> ../../lib/linux- kbuild-4.9/scripts --=20 Kind regards, Luca Boccassi