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 0E849A09D3; Thu, 12 Nov 2020 11:28:23 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 0E4FF56A3; Thu, 12 Nov 2020 11:28:21 +0100 (CET) Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id A0DE9493D for ; Thu, 12 Nov 2020 11:28:18 +0100 (CET) IronPort-SDR: qJTyLc44/7Cxaa7VbguN8eQYEBu80wk9TInykIZJUIRJvJyXumo2lZ5vixLF+wUUu2V51Mt9d6 vB9P0FwS3Hmg== X-IronPort-AV: E=McAfee;i="6000,8403,9802"; a="170394951" X-IronPort-AV: E=Sophos;i="5.77,471,1596524400"; d="scan'208";a="170394951" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Nov 2020 02:28:16 -0800 IronPort-SDR: sja3rpCtFiOJEMXO1vJI76RmQgK+cMmRGci9r6ptSg27wd1KU6idZCui5muUJiVcVcf1/rqHFE HNQWatoSU3cQ== X-IronPort-AV: E=Sophos;i="5.77,471,1596524400"; d="scan'208";a="542208345" Received: from bricha3-mobl.ger.corp.intel.com ([10.213.208.146]) by orsmga005-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-SHA; 12 Nov 2020 02:28:13 -0800 Date: Thu, 12 Nov 2020 10:28:10 +0000 From: Bruce Richardson To: David Marchand Cc: Cheng Jiang , Maxime Coquelin , "Xia, Chenbo" , dev , "Fu, Patrick" , "Yang, YvonneX" , Jiayu Hu Message-ID: <20201112102810.GE1309@bricha3-MOBL.ger.corp.intel.com> References: <20201111111957.46090-1-Cheng1.jiang@intel.com> <20201112072147.4345-1-Cheng1.jiang@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Subject: Re: [dpdk-dev] [PATCH v3] examples/vhost: fix ioat dependency issue 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 Thu, Nov 12, 2020 at 10:36:50AM +0100, David Marchand wrote: > On Thu, Nov 12, 2020 at 8:30 AM Cheng Jiang wrote: > > > > Fix vhost-switch compiling issue when ioat dependency is missing. > > Change 'RTE_x86' check into 'RTE_RAW_IOAT' check in meson build file > > and update Makefile. Clean some codes. > > > > Fixes: abec60e7115d ("examples/vhost: support vhost async data path") > > Fixes: 3a04ecb21420 ("examples/vhost: add async vhost args parsing") > > > > Signed-off-by: Cheng Jiang > > --- > > v3: > > * Added fixes lines in commit log. > > > > v2: > > * Cleaned some codes > > * Changed RTE_RAW_IOAT check method in Makefile > > * Added ioat function definition when RTE_RAW_IOAT is missing > > > > examples/vhost/Makefile | 5 +++++ > > examples/vhost/ioat.h | 32 +++++++++++++++++++++++++------- > > examples/vhost/main.c | 22 +++++++++++----------- > > examples/vhost/meson.build | 2 +- > > 4 files changed, 42 insertions(+), 19 deletions(-) > > > > diff --git a/examples/vhost/Makefile b/examples/vhost/Makefile > > index cec59d0e0..cbe56f742 100644 > > --- a/examples/vhost/Makefile > > +++ b/examples/vhost/Makefile > > @@ -28,6 +28,11 @@ CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) > > LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) > > LDFLAGS_STATIC = $(shell $(PKGCONF) --static --libs libdpdk) > > > > +HAS_RAW_IOAT=$(shell echo RTE_RAW_IOAT | $(CPP) $(CFLAGS) -P - | tail -1) > > +ifeq ($(HAS_RAW_IOAT), 1) > > +SRCS-y += ioat.c > > +endif > > + > > CFLAGS += -DALLOW_EXPERIMENTAL_API > > > > build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build > I'll let Bruce and Maxime have the last word on this patch. > But at least it works for me, > Tested-by: David Marchand > I don't have a really strong objection to this, but I still would rather see the ioat detection done in the C code only rather than in the Makefile. I'm concerned about us adding too much complexity into our makefiles, so would like to keep them simple as much as possible. Therefore, I'd like to see ioat.c always included in SRCS-y, and ioat.c just have #ifdef RTE_RAW_IOAT to block out any ioat-dependent code. /Bruce