From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from out5-smtp.messagingengine.com (out5-smtp.messagingengine.com [66.111.4.29]) by dpdk.org (Postfix) with ESMTP id 8B0804F9A for ; Fri, 30 Mar 2018 13:03:08 +0200 (CEST) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id D39EF21751; Fri, 30 Mar 2018 07:03:07 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Fri, 30 Mar 2018 07:03:07 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-sender :x-me-sender:x-sasl-enc; s=mesmtp; bh=jbiGDYxJ7vQ70zFMJvdyeEE9ja OXAesIKFNk6FkqUew=; b=KKyNg3Dg8m+hzn23Zs3qaqUpKupVYrImw8lsQlsUjF u+MDejQUbmUkiXwxcX8yvNEdaJ3JWQOvH0DcVVZbLEeiiloLZmSbu5CWNweyB3dG q8QpHTk9gHXVInYfVE/QMIl3LrY2QLC98vf+14RuQlj4fu6ZvcDUrqRXx2C+9ord s= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=jbiGDY xJ7vQ70zFMJvdyeEE9jaOXAesIKFNk6FkqUew=; b=B91kTYcVwj0v69jgj+qRhV BaDiyLae2uhNiLRXRRV4Jucxd0be2wE2UF80cDYb8nyzTE+d/yLt8ASJ754XTbDY GxiCAyZh6ntbDdnGUGREFTfXCJnXE5JNo1OTom2Gr2p/Y66f7LB1xl+hOaa63+aP iJ350PVX2wIMr2b0ZOyCm3Ud5a/gUM+tuCle3QYguqD6NCo8FPkzoBaNz23zXaos Zfh5f6WreZF1CTSoEWk4u3M0sg7llWFXpV6Cjt2x4lYG1nvV+or2oD3sCfj9+ike QOOzjWAraUE48KwtLbV8A7385krjkxZn9zttx92ubIFBL5AseqxYA+QTJkKxEuWQ == X-ME-Sender: Received: from xps.localnet (184.203.134.77.rev.sfr.net [77.134.203.184]) by mail.messagingengine.com (Postfix) with ESMTPA id 586F7E43C8; Fri, 30 Mar 2018 07:03:07 -0400 (EDT) From: Thomas Monjalon To: Ferruh Yigit Cc: dev@dpdk.org, hemant.agrawal@nxp.com Date: Fri, 30 Mar 2018 13:03:06 +0200 Message-ID: <11134257.RPB9PVzrFs@xps> In-Reply-To: <31b00186-5f46-457a-73a7-6c68fab8b73b@intel.com> References: <20180329153931.26351-1-thomas@monjalon.net> <13988753.3FnxEl37g3@xps> <31b00186-5f46-457a-73a7-6c68fab8b73b@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [dpdk-dev] [PATCH] mk: fix kernel modules build dependency 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, 30 Mar 2018 11:03:08 -0000 30/03/2018 12:15, Ferruh Yigit: > On 3/30/2018 9:32 AM, Thomas Monjalon wrote: > > 29/03/2018 20:43, Ferruh Yigit: > >> On 3/29/2018 7:21 PM, Ferruh Yigit wrote: > >>> On 3/29/2018 6:01 PM, Thomas Monjalon wrote: > >>>> 29/03/2018 18:50, Ferruh Yigit: > >>>>> On 3/29/2018 5:43 PM, Thomas Monjalon wrote: > >>>>>> 29/03/2018 18:38, Ferruh Yigit: > >>>>>>> On 3/29/2018 5:32 PM, Thomas Monjalon wrote: > >>>>>>>> 29/03/2018 17:48, Ferruh Yigit: > >>>>>>>>> On 3/29/2018 4:39 PM, Thomas Monjalon wrote: > >>>>>>>>>> Some kernel modules may need some header files to be "installed" > >>>>>>>>>> in the build directory. > >>>>>>>>>> > >>>>>>>>>> When running multiple threads of make, kernel modules can try to > >>>>>>>>>> be compiled before the lib headers are ready: > >>>>>>>>>> make -j3 > >>>>>>>>>> kernel/linux/kni/kni_misc.c:19:37: fatal error: > >>>>>>>>>> exec-env/rte_kni_common.h: No such file or directory > >>>>>>>>> > >>>>>>>>> Is there a reason to keep header in eal when module itself moved into kernel? > >>>>>>>> > >>>>>>>> It seems you missed my comment below: > >>>>>>>> > >>>>>>>> On a related note, this header file > >>>>>>>> lib/librte_eal/linuxapp/eal/include/exec-env/rte_kni_common.h > >>>>>>>> could be moved to lib/librte_kni/ > >>>>>>>> Opinion? > >>>>>>> > >>>>>>> Ahh, yes we are saying same thing. > >>>>>>> But not sure if it should go under lib/librte_kni/ or kernel/linux/kni/? > >>>>>>> I lean to kernel/linux/kni/. > >>>>>> > >>>>>> Why in kernel/? > >>>>>> > >>>>>> Logically, kernel/ depends on lib/ but not the reverse. > >>>>>> > >>>>>> And regarding the licensing, we avoid BSD files in Linux modules. > >>>>> > >>>>> From functionality point of view, module provides the functionality and it > >>>>> should provide the header, this can be all subjective tough :) > >>>>> > >>>>> Or in other words, if you have the kernel module, you can write another piece of > >>>>> userspace application (without using librte_kni) and it will be functional. > >>>>> But if you have the librte_kni only, it won't be functional on its own. > >>>>> > >>>>> Providing header with kernel enables other userspace app to user KNI. > >>>> > >>>> So you are saying we should reverse the dependency? > >>>> It would mean moving all headers used by kernel modules in kernel/ directory: > >>> > >>> No, not talking about moving headers to kernel/ folder. But we can "liberate" J > >>> the kernel modules. > >>> > >>> For KNI, rte_kni_common.h is shared between kernel and userspace, can't escape > >>> from it. But why this common header needs to depend other dpdk headers at all? > >>> Indeed commenting out rte_common and rte_config worked fine, it seem there is > >>> already no dependency. > >> > >> Hemant is right, putting rte_kni_common makes build dependent to module build, > >> and module is more fragile. > >> > >> I agree to move header to userspace library. > > > > Does it mean you ack this patch? > > yep, > Acked-by: Ferruh Yigit Applied, thanks