From: Bruce Richardson <bruce.richardson@intel.com>
To: dev@dpdk.org
Cc: Bruce Richardson <bruce.richardson@intel.com>,
Maxime Coquelin <maxime.coquelin@redhat.com>,
Chenbo Xia <chenbox@nvidia.com>
Subject: [PATCH 25.11 2/3] vhost: : remove fallbacks for old Linux versions
Date: Mon, 30 Jun 2025 13:29:03 +0000 [thread overview]
Message-ID: <20250630132904.1704901-3-bruce.richardson@intel.com> (raw)
In-Reply-To: <20250630132904.1704901-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>
---
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-06-30 13:29 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-30 13:29 [PATCH 25.11 0/3] " Bruce Richardson
2025-06-30 13:29 ` [PATCH 25.11 1/3] eal/linux: " Bruce Richardson
2025-06-30 13:29 ` Bruce Richardson [this message]
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
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=20250630132904.1704901-3-bruce.richardson@intel.com \
--to=bruce.richardson@intel.com \
--cc=chenbox@nvidia.com \
--cc=dev@dpdk.org \
--cc=maxime.coquelin@redhat.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).