From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by dpdk.org (Postfix) with ESMTP id F3C31292D; Mon, 25 Feb 2019 15:25:37 +0100 (CET) X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga106.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 25 Feb 2019 06:25:36 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.58,411,1544515200"; d="scan'208";a="127070780" Received: from bricha3-mobl.ger.corp.intel.com ([10.237.221.36]) by fmsmga008.fm.intel.com with SMTP; 25 Feb 2019 06:25:34 -0800 Received: by (sSMTP sendmail emulation); Mon, 25 Feb 2019 14:25:33 +0000 Date: Mon, 25 Feb 2019 14:25:33 +0000 From: Bruce Richardson To: Neil Horman Cc: dev@dpdk.org, stable@dpdk.org, David Marchand , Anatoly Burakov , Thomas Monjalon Message-ID: <20190225142533.GA34368@bricha3-MOBL.ger.corp.intel.com> References: <20190110111104.56464-1-bruce.richardson@intel.com> <20190206110130.55135-1-bruce.richardson@intel.com> <20190206122254.GA16887@hmswarspite.think-freely.org> <20190206141744.GA236864@bricha3-MOBL.ger.corp.intel.com> <20190207143426.GA23613@hmswarspite.think-freely.org> <20190207150328.GA121112@bricha3-MOBL.ger.corp.intel.com> <20190208153740.GC13299@hmswarspite.think-freely.org> <20190208161838.GB298844@bricha3-MOBL.ger.corp.intel.com> <20190208165509.GD13299@hmswarspite.think-freely.org> <20190208171321.GE298844@bricha3-MOBL.ger.corp.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190208171321.GE298844@bricha3-MOBL.ger.corp.intel.com> User-Agent: Mutt/1.11.2 (2019-01-07) Subject: Re: [dpdk-dev] [PATCH v3] compat: merge compat library into EAL 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: Mon, 25 Feb 2019 14:25:38 -0000 On Fri, Feb 08, 2019 at 05:13:21PM +0000, Bruce Richardson wrote: > On Fri, Feb 08, 2019 at 11:55:09AM -0500, Neil Horman wrote: > > On Fri, Feb 08, 2019 at 04:18:38PM +0000, Bruce Richardson wrote: > > > On Fri, Feb 08, 2019 at 10:37:40AM -0500, Neil Horman wrote: > > > > On Thu, Feb 07, 2019 at 03:03:28PM +0000, Bruce Richardson wrote: > > > > > On Thu, Feb 07, 2019 at 09:34:26AM -0500, Neil Horman wrote: > > > > > > On Wed, Feb 06, 2019 at 02:17:45PM +0000, Bruce Richardson wrote: > > > > > > > On Wed, Feb 06, 2019 at 07:22:54AM -0500, Neil Horman wrote: > > > > > > > > On Wed, Feb 06, 2019 at 11:01:30AM +0000, Bruce Richardson wrote: > > > > > > > > > Since compat library is only a single header, we can easily move it into > > > > > > > > > the EAL common headers instead of tracking it separately. The downside of > > > > > > > > > this is that it becomes a little more difficult to have any libs that are > > > > > > > > > built before EAL depend on it. Thankfully, this is not a major problem as > > > > > > > > > the only library which uses rte_compat.h and is built before EAL (kvargs) > > > > > > > > > already has the path to the compat.h header file explicitly called out as > > > > > > > > > an include path. > > > > > > > > > > > > > > > > > > However, to ensure that we don't hit problems later with this, we can add > > > > > > > > > EAL common headers folder to the global include list in the meson build > > > > > > > > > which means that all common headers can be safely used by all libraries, no > > > > > > > > > matter what their build order. > > > > > > > > > > > > > > > > > This assumes that the compat lib will always just be a header though, no? Will > > > > > > > > this work in the event that someone wants to add some compatibility code that > > > > > > > > requires its own C compilation unit? > > > > > > > > > > > > > > > > > > > > > > No, it probably won't work, you'll hit an issue with any libraries that > > > > > > > don't depend on EAL and need that functionality. The question is whether > > > > > > > this is likely to be an issue in the future for us. I'd say the possiblity > > > > > > > is fairly remote, but I'm open to input on it. > > > > > > > > > > > > > Im afraid I don't have any more visibility on that than anyone else. The fact > > > > > > that it hasn't been needed yet is likely a good sign, but I am concerned at the > > > > > > notion that this change enjoins us from having that flexibility. > > > > > > > > > > > Yes. However, in general is it not the case that compatibility code belongs > > > > > in the actual library wanting to provide the compatibility? That is what > > > > > has been done up till now. If we do need compatibility code placed more > > > > > centrally, I think EAL is as good a place for it as any - the only library > > > > > which doesn't depend on EAL now is kvargs, so our risk area is pretty low, > > > > > I think. > > > > > > > > > > Also, if we do need a compat libraries with .c files in it, there is no > > > > > reason we can't undo this change. It would be no more user visible than > > > > > adding a .c file to the existing structure, given that in both cases an > > > > > extra .so file will appear in the build output. > > > > > > > > > If the consensus is that compat code can all live in the EAL library, then I'm > > > > ok with it, even if its C code. The only thing I don't want is for our plan to > > > > be, in the event we need C code, to immediately undo this change. That just > > > > doesn't make sense to me. > > > > > > > > So, if you're ok with compat C code in eal, then > > > > Acked-by: Neil Horman > > > > > > > Can you clarify what you would see as the compat C code that would be > > > needed - perhaps an example from another project? From the little function > > > versioning I've done in DPDK, I would have thought what was in the headers > > > was enough for all cases we might encounter. > > > > > I can't, hence my ACK. I was really just concerned that we were making a change > > that enjoined us from being able to add C compilation units should we need them, > > but if we can add them directly to the EAL libraries, I'm satisfied with that. > > > > Neil > > > Ok, thanks, Neil. > > +Thomas, in case you have any concerns or thoughts here. Ping on this patch. As far as I am concerned, this is ready for merge. Currently the FreeBSD builds using meson are broken, and this patch or another fix is needed to get them working again. Regards, /Bruce