DPDK patches and discussions
 help / color / mirror / Atom feed
From: Bruce Richardson <bruce.richardson@intel.com>
To: dev@dpdk.org
Cc: Bruce Richardson <bruce.richardson@intel.com>,
	Jakub Grajciar <jgrajcia@cisco.com>
Subject: [PATCH 25.11 3/3] memif: : remove fallbacks for old Linux versions
Date: Mon, 30 Jun 2025 13:29:04 +0000	[thread overview]
Message-ID: <20250630132904.1704901-4-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>
---
 drivers/net/memif/rte_eth_memif.h | 41 -------------------------------
 1 file changed, 41 deletions(-)

diff --git a/drivers/net/memif/rte_eth_memif.h b/drivers/net/memif/rte_eth_memif.h
index 8e45a3ab78..d4e625ab51 100644
--- a/drivers/net/memif/rte_eth_memif.h
+++ b/drivers/net/memif/rte_eth_memif.h
@@ -169,37 +169,6 @@ int memif_init_regions_and_queues(struct rte_eth_dev *dev);
  */
 const char *memif_version(void);
 
-#ifndef MFD_HUGETLB
-#ifndef __NR_memfd_create
-
-#if defined __x86_64__
-#define __NR_memfd_create 319
-#elif defined __x86_32__
-#define __NR_memfd_create 1073742143
-#elif defined __arm__
-#define __NR_memfd_create 385
-#elif defined __aarch64__
-#define __NR_memfd_create 279
-#elif defined __powerpc__
-#define __NR_memfd_create 360
-#elif defined __i386__
-#define __NR_memfd_create 356
-#elif defined __riscv
-#define __NR_memfd_create 279
-#elif defined __loongarch__
-#define __NR_memfd_create 279
-#else
-#error "__NR_memfd_create unknown for this architecture"
-#endif
-
-#endif				/* __NR_memfd_create */
-
-static inline int memfd_create(const char *name, unsigned int flags)
-{
-	return syscall(__NR_memfd_create, name, flags);
-}
-#endif				/* MFD_HUGETLB */
-
 #ifndef F_LINUX_SPECIFIC_BASE
 #define F_LINUX_SPECIFIC_BASE 1024
 #endif
@@ -208,14 +177,4 @@ static inline int memfd_create(const char *name, unsigned int flags)
 #define MFD_ALLOW_SEALING       0x0002U
 #endif
 
-#ifndef F_ADD_SEALS
-#define F_ADD_SEALS (F_LINUX_SPECIFIC_BASE + 9)
-#define F_GET_SEALS (F_LINUX_SPECIFIC_BASE + 10)
-
-#define F_SEAL_SEAL     0x0001	/* prevent further seals from being set */
-#define F_SEAL_SHRINK   0x0002	/* prevent file from shrinking */
-#define F_SEAL_GROW     0x0004	/* prevent file from growing */
-#define F_SEAL_WRITE    0x0008	/* prevent writes */
-#endif
-
 #endif				/* RTE_ETH_MEMIF_H */
-- 
2.48.1


  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 ` [PATCH 25.11 2/3] vhost: : " Bruce Richardson
2025-06-30 13:29 ` Bruce Richardson [this message]
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-4-bruce.richardson@intel.com \
    --to=bruce.richardson@intel.com \
    --cc=dev@dpdk.org \
    --cc=jgrajcia@cisco.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).