DPDK patches and discussions
 help / color / mirror / Atom feed
From: Cheng Jiang <Cheng1.jiang@intel.com>
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 <Cheng1.jiang@intel.com>
Subject: [dpdk-dev] [PATCH v1] examples/vhost: fix ioat dependency issue
Date: Wed, 11 Nov 2020 11:19:57 +0000	[thread overview]
Message-ID: <20201111111957.46090-1-Cheng1.jiang@intel.com> (raw)

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 <Cheng1.jiang@intel.com>
---
 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
-- 
2.29.2


             reply	other threads:[~2020-11-11 11:29 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-11 11:19 Cheng Jiang [this message]
2020-11-11 14:36 ` David Marchand
2020-11-11 15:03   ` Bruce Richardson
2020-11-12  7:14   ` Jiang, Cheng1
2020-11-12  9:31     ` Bruce Richardson
2020-11-12  9:39       ` David Marchand
2020-11-12 10:22         ` Bruce Richardson
2020-11-12  5:16 ` [dpdk-dev] [PATCH v2] " Cheng Jiang
2020-11-12  7:21 ` [dpdk-dev] [PATCH v3] " Cheng Jiang
2020-11-12  9:36   ` David Marchand
2020-11-12 10:28     ` Bruce Richardson
2020-11-12 11:29       ` Jiang, Cheng1
2020-11-12 12:02         ` Bruce Richardson
2020-11-12 14:06           ` Jiang, Cheng1
2020-11-12 13:47 ` [dpdk-dev] [PATCH v4] " Cheng Jiang
2020-11-12 15:01   ` Bruce Richardson
2020-11-12 15:55     ` Jiang, Cheng1
2020-11-12 15:49 ` [dpdk-dev] [PATCH v5] " Cheng Jiang
2020-11-12 16:01   ` Bruce Richardson
2020-11-12 16:51   ` Maxime Coquelin
2020-11-12 18:18   ` David Marchand
2020-11-13  8:40   ` Maxime Coquelin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20201111111957.46090-1-Cheng1.jiang@intel.com \
    --to=cheng1.jiang@intel.com \
    --cc=Jiayu.Hu@intel.com \
    --cc=YvonneX.Yang@intel.com \
    --cc=chenbo.xia@intel.com \
    --cc=david.marchand@redhat.com \
    --cc=dev@dpdk.org \
    --cc=maxime.coquelin@redhat.com \
    --cc=patrick.fu@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).