From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 7C351A04B5; Tue, 3 Dec 2019 11:10:48 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 3191D4C99; Tue, 3 Dec 2019 11:10:47 +0100 (CET) Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id 84BD791; Tue, 3 Dec 2019 11:10:45 +0100 (CET) X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 03 Dec 2019 02:10:44 -0800 X-IronPort-AV: E=Sophos;i="5.69,272,1571727600"; d="scan'208";a="204921963" Received: from bricha3-mobl.ger.corp.intel.com ([10.237.221.46]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 03 Dec 2019 02:10:42 -0800 Date: Tue, 3 Dec 2019 10:10:39 +0000 From: Bruce Richardson To: Ye Xiaolong Cc: Igor Ryzhov , Ferruh Yigit , dev , dpdk stable Message-ID: <20191203101039.GA38@bricha3-MOBL.ger.corp.intel.com> References: <20191202061442.56964-1-xiaolong.ye@intel.com> <20191202083903.GA78157@intel.com> <20191202113454.GB78157@intel.com> <20191202120819.GA25@bricha3-MOBL.ger.corp.intel.com> <20191203053319.GA3210@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20191203053319.GA3210@intel.com> User-Agent: Mutt/1.12.1 (2019-06-15) Subject: Re: [dpdk-dev] [PATCH] kernel/linux: fix kernel dir for meson 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Tue, Dec 03, 2019 at 01:33:19PM +0800, Ye Xiaolong wrote: > On 12/02, Bruce Richardson wrote: > >On Mon, Dec 02, 2019 at 07:34:54PM +0800, Ye Xiaolong wrote: > >> On 12/02, Igor Ryzhov wrote: > >> >We should at least install it into /lib/modules/kernel-version. For > >> >convenience, dpdk modules are installed into > >> >/lib/modules/kernel-version/extra/dpdk. > >> >In the cross-compilation case, you can use DEST_DIR to set some prefix. > >> > > >> >I don't really see the issue here. The description clearly says that > >> >headers must be in $kernel_dir/build which is usually a symlink > >> >to /usr/src/linux-headers-kernel-version. > >> >Just set kernel_dir correctly and there won't be compilation failure. > >> > >> I think for cross-compilation case, user should be allowed to specify any kernel > >> src dir (it doesn't have to be /lib/modules/kernel-version) in his local system > >> as kernel_dir that doesn't contain the build dir, in this case, current meson > >> build will skip kernel module compilation. > >> > > > >I don't think we can take this change as the default, since the previous > >fix was put in for good reason. > > > >However, perhaps we can attempt to support both, using the checks below for > >"make kernelversion" in kernel/linux/meson.build. We can attempt using the > >directory with /build (as now) and then if that fails attempt without it (or > >vice versa). > > After a second thought, I think it'd be better that we unify the meaning of > kernel_dir for both cases, it should be aligned with make's RTE_KERNELDIR > variable that specify the directory contains kernel src code (or header), then > we don't need to distinguish these 2 cases in check (make kernelversion) phase, > we just need to assign different install dirs, > > For normal case: > > kernel_dir=/lib/modules//build > install_dir=/lib/modules//extra/dpdk > > For cross compilation case: > > kernel_dir= > install_dir=/extra/dpdk > > What do you think (I've sent v2 according to above description)? > The downside of what you propose is that it will break any builds which are already working by passing in the base kerneldir folder as parameter. That case needs to be kept working, so you cannot force the user to pass in the path with /build on the end. /Bruce