DPDK patches and discussions
 help / color / mirror / Atom feed
From: Maxime Coquelin <maxime.coquelin@redhat.com>
To: dev@dpdk.org, techboard@dpdk.org, david.marchand@redhat.com,
	thomas@monjalon.net, mb@smartsharesystems.com,
	stephen@networkplumber.org
Cc: Maxime Coquelin <maxime.coquelin@redhat.com>
Subject: [RFC v3 3/3] vduse: use imported VDUSE uAPI header
Date: Wed, 11 Sep 2024 21:32:24 +0200	[thread overview]
Message-ID: <20240911193224.1966122-4-maxime.coquelin@redhat.com> (raw)
In-Reply-To: <20240911193224.1966122-1-maxime.coquelin@redhat.com>

This patch makes use of the imported VDUSE headers.
The VDUSE support is now systematically built on Linux
systems, even if the build system does not support its
ioctl().

Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
---
 lib/vhost/meson.build |  5 +----
 lib/vhost/vduse.c     |  2 +-
 lib/vhost/vduse.h     | 22 ----------------------
 3 files changed, 2 insertions(+), 27 deletions(-)

diff --git a/lib/vhost/meson.build b/lib/vhost/meson.build
index 41b622a9be..5c2528ff8c 100644
--- a/lib/vhost/meson.build
+++ b/lib/vhost/meson.build
@@ -23,16 +23,13 @@ sources = files(
         'iotlb.c',
         'socket.c',
         'vdpa.c',
+        'vduse.c',
         'vhost.c',
         'vhost_crypto.c',
         'vhost_user.c',
         'virtio_net.c',
         'virtio_net_ctrl.c',
 )
-if cc.has_header('linux/vduse.h')
-    sources += files('vduse.c')
-    cflags += '-DVHOST_HAS_VDUSE'
-endif
 headers = files(
         'rte_vdpa.h',
         'rte_vhost.h',
diff --git a/lib/vhost/vduse.c b/lib/vhost/vduse.c
index c66602905c..a41ff2024c 100644
--- a/lib/vhost/vduse.c
+++ b/lib/vhost/vduse.c
@@ -8,7 +8,7 @@
 #include <fcntl.h>
 
 
-#include <linux/vduse.h>
+#include <uapi/linux/vduse.h>
 #include <linux/virtio_net.h>
 
 #include <sys/ioctl.h>
diff --git a/lib/vhost/vduse.h b/lib/vhost/vduse.h
index 0d8f3f1205..47ca97a064 100644
--- a/lib/vhost/vduse.h
+++ b/lib/vhost/vduse.h
@@ -9,29 +9,7 @@
 
 #define VDUSE_NET_SUPPORTED_FEATURES VIRTIO_NET_SUPPORTED_FEATURES
 
-#ifdef VHOST_HAS_VDUSE
-
 int vduse_device_create(const char *path, bool compliant_ol_flags);
 int vduse_device_destroy(const char *path);
 
-#else
-
-static inline int
-vduse_device_create(const char *path, bool compliant_ol_flags)
-{
-	RTE_SET_USED(compliant_ol_flags);
-
-	VHOST_CONFIG_LOG(path, ERR, "VDUSE support disabled at build time");
-	return -1;
-}
-
-static inline int
-vduse_device_destroy(const char *path)
-{
-	VHOST_CONFIG_LOG(path, ERR, "VDUSE support disabled at build time");
-	return -1;
-}
-
-#endif /* VHOST_HAS_VDUSE */
-
 #endif /* _VDUSE_H */
-- 
2.46.0


  parent reply	other threads:[~2024-09-11 19:32 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-11 19:32 [RFC v3 0/3] Import Kernel uAPI header files Maxime Coquelin
2024-09-11 19:32 ` [RFC v3 1/3] uapi: introduce kernel uAPI headers import Maxime Coquelin
2024-09-17 11:36   ` David Marchand
2024-09-17 14:32     ` Maxime Coquelin
2024-09-19  8:39   ` Thomas Monjalon
2024-09-11 19:32 ` [RFC v3 2/3] uapi: import VDUSE header Maxime Coquelin
2024-09-11 19:32 ` Maxime Coquelin [this message]
2024-09-12  8:30 ` [RFC v3 0/3] Import Kernel uAPI header files Ferruh Yigit
2024-09-12 12:08   ` Maxime Coquelin
2024-09-12 13:16     ` Ferruh Yigit
2024-09-12 13:47       ` 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=20240911193224.1966122-4-maxime.coquelin@redhat.com \
    --to=maxime.coquelin@redhat.com \
    --cc=david.marchand@redhat.com \
    --cc=dev@dpdk.org \
    --cc=mb@smartsharesystems.com \
    --cc=stephen@networkplumber.org \
    --cc=techboard@dpdk.org \
    --cc=thomas@monjalon.net \
    /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).