From patchwork Wed Nov 11 11:19:57 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Jiang, Cheng1" X-Patchwork-Id: 84004 X-Patchwork-Delegate: maxime.coquelin@redhat.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 4D723A09D9; Wed, 11 Nov 2020 12:29:08 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 0B7BC137D; Wed, 11 Nov 2020 12:29:06 +0100 (CET) Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by dpdk.org (Postfix) with ESMTP id 2CC462AB for ; Wed, 11 Nov 2020 12:29:03 +0100 (CET) IronPort-SDR: HI1KhPxjd5D79N7qaZW4tkpqidK1rjANhuqUqScVJKDyb4yL26UHOttgmAOPUf/CVJcwGNlJ5J TnRTqbFOYgEQ== X-IronPort-AV: E=McAfee;i="6000,8403,9801"; a="157911307" X-IronPort-AV: E=Sophos;i="5.77,469,1596524400"; d="scan'208";a="157911307" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Nov 2020 03:28:57 -0800 IronPort-SDR: yrzIVmu9di0TXeZf7xaMB2eNVEyEwok/o7SmVgDgDlIYWNunBzUXXQqkrOBuDOmh1Ssfswut54 mSCSzR2Kv5Yg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.77,469,1596524400"; d="scan'208";a="531666270" Received: from dpdk_jiangcheng.sh.intel.com ([10.67.119.112]) by fmsmga005.fm.intel.com with ESMTP; 11 Nov 2020 03:28:54 -0800 From: Cheng Jiang To: maxime.coquelin@redhat.com, chenbo.xia@intel.com Cc: dev@dpdk.org, patrick.fu@intel.com, YvonneX.Yang@intel.com, david.marchand@redhat.com, Jiayu.Hu@intel.com, Cheng Jiang Date: Wed, 11 Nov 2020 11:19:57 +0000 Message-Id: <20201111111957.46090-1-Cheng1.jiang@intel.com> X-Mailer: git-send-email 2.29.2 MIME-Version: 1.0 Subject: [dpdk-dev] [PATCH v1] 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" 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. Signed-off-by: Cheng Jiang --- examples/vhost/Makefile | 5 +++++ examples/vhost/ioat.h | 2 +- examples/vhost/meson.build | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/examples/vhost/Makefile b/examples/vhost/Makefile index cec59d0e0f..505e443217 100644 --- a/examples/vhost/Makefile +++ b/examples/vhost/Makefile @@ -5,7 +5,12 @@ APP = vhost-switch # all source are stored in SRCS-y +IOAT_PATH = $(shell pkg-config --cflags-only-I libdpdk | sed -e "s/^..//")/rte_ioat_rawdev.h +ifeq ($(IOAT_PATH), $(wildcard $(IOAT_PATH))) +SRCS-y := main.c virtio_net.c ioat.c +else SRCS-y := main.c virtio_net.c +endif # Build using pkg-config variables if possible ifneq ($(shell pkg-config --exists libdpdk && echo 0),0) diff --git a/examples/vhost/ioat.h b/examples/vhost/ioat.h index 9664fcc3ac..d6d0f7c18a 100644 --- a/examples/vhost/ioat.h +++ b/examples/vhost/ioat.h @@ -24,7 +24,7 @@ struct dma_for_vhost { uint16_t nr; }; -#ifdef RTE_ARCH_X86 +#ifdef RTE_RAW_IOAT int open_ioat(const char *value); #else static int open_ioat(const char *value __rte_unused) diff --git a/examples/vhost/meson.build b/examples/vhost/meson.build index 24f1f71313..d5388a795a 100644 --- a/examples/vhost/meson.build +++ b/examples/vhost/meson.build @@ -15,7 +15,7 @@ sources = files( 'main.c', 'virtio_net.c' ) -if dpdk_conf.has('RTE_ARCH_X86') +if dpdk_conf.has('RTE_RAW_IOAT') deps += 'raw_ioat' sources += files('ioat.c') endif