From: Bruce Richardson <bruce.richardson@intel.com>
To: dev@dpdk.org
Cc: Bruce Richardson <bruce.richardson@intel.com>,
Stephen Hemminger <stephen@networkplumber.org>
Subject: [PATCH v2 2/3] vhost: : remove fallbacks for old Linux versions
Date: Mon, 28 Jul 2025 16:19:07 +0100 [thread overview]
Message-ID: <20250728151908.338534-3-bruce.richardson@intel.com> (raw)
In-Reply-To: <20250728151908.338534-1-bruce.richardson@intel.com>
All supported linux versions support F_ADD_SEALS (Linux 3.17+) and
MFD_HUGETLB (Linux 4.14+), so no need to have #ifdefs and fallbacks to
support systems which do not support those features.
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
---
lib/vhost/vhost_user.c | 7 -------
1 file changed, 7 deletions(-)
diff --git a/lib/vhost/vhost_user.c b/lib/vhost/vhost_user.c
index b73dec6a22..4bfb13fb98 100644
--- a/lib/vhost/vhost_user.c
+++ b/lib/vhost/vhost_user.c
@@ -36,10 +36,7 @@
#ifdef RTE_LIBRTE_VHOST_POSTCOPY
#include <linux/userfaultfd.h>
#endif
-#ifdef F_ADD_SEALS /* if file sealing is supported, so is memfd */
#include <linux/memfd.h>
-#define MEMFD_SUPPORTED
-#endif
#include <eal_export.h>
#include <rte_common.h>
@@ -1627,11 +1624,7 @@ inflight_mem_alloc(struct virtio_net *dev, const char *name, size_t size, int *f
char fname[20] = "/tmp/memfd-XXXXXX";
*fd = -1;
-#ifdef MEMFD_SUPPORTED
mfd = memfd_create(name, MFD_CLOEXEC);
-#else
- RTE_SET_USED(name);
-#endif
if (mfd == -1) {
mfd = mkstemp(fname);
if (mfd == -1) {
--
2.48.1
next prev parent reply other threads:[~2025-07-28 15:19 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-30 13:29 [PATCH 25.11 0/3] remove fallbacks for old Linux versions Bruce Richardson
2025-06-30 13:29 ` [PATCH 25.11 1/3] eal/linux: " Bruce Richardson
2025-06-30 13:29 ` [PATCH 25.11 2/3] vhost: : " Bruce Richardson
2025-06-30 13:29 ` [PATCH 25.11 3/3] memif: " Bruce Richardson
2025-06-30 15:02 ` [PATCH 25.11 0/3] " Stephen Hemminger
2025-07-28 15:19 ` [PATCH v2 " Bruce Richardson
2025-07-28 15:19 ` [PATCH v2 1/3] eal/linux: " Bruce Richardson
2025-07-28 15:19 ` Bruce Richardson [this message]
2025-07-28 15:19 ` [PATCH v2 3/3] memif: : " Bruce Richardson
2025-08-19 8:16 ` David Marchand
2025-07-30 9:21 ` [PATCH v2 0/3] " Morten Brørup
2025-08-29 13:48 ` David Marchand
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=20250728151908.338534-3-bruce.richardson@intel.com \
--to=bruce.richardson@intel.com \
--cc=dev@dpdk.org \
--cc=stephen@networkplumber.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.