All of lore.kernel.org
 help / color / mirror / Atom feed
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 3/3] memif: : remove fallbacks for old Linux versions
Date: Mon, 28 Jul 2025 16:19:08 +0100	[thread overview]
Message-ID: <20250728151908.338534-4-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>
---
 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-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   ` [PATCH v2 2/3] vhost: : " Bruce Richardson
2025-07-28 15:19   ` Bruce Richardson [this message]
2025-08-19  8:16     ` [PATCH v2 3/3] memif: " 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-4-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.