DPDK patches and discussions
 help / color / mirror / Atom feed
* [PATCH] lib: fix include guards
@ 2025-09-18 12:17 Thomas Monjalon
  0 siblings, 0 replies; only message in thread
From: Thomas Monjalon @ 2025-09-18 12:17 UTC (permalink / raw)
  To: dev; +Cc: Tyler Retzlaff, Maxime Coquelin, Chenbo Xia

Fix the namespace of include guards by prefixing with "RTE",
and add a missing include guard in rte_eal_paging.h.

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
---
 lib/eal/include/rte_eal_paging.h | 11 ++++++++---
 lib/eal/include/rte_keepalive.h  |  6 +++---
 lib/jobstats/rte_jobstats.h      |  6 +++---
 lib/vhost/rte_vhost_crypto.h     |  6 +++---
 4 files changed, 17 insertions(+), 12 deletions(-)

diff --git a/lib/eal/include/rte_eal_paging.h b/lib/eal/include/rte_eal_paging.h
index f4431bb349..a05cf41ac9 100644
--- a/lib/eal/include/rte_eal_paging.h
+++ b/lib/eal/include/rte_eal_paging.h
@@ -2,9 +2,8 @@
  * Copyright(c) 2020 Dmitry Kozlyuk
  */
 
-#include <stdint.h>
-
-#include <rte_compat.h>
+#ifndef RTE_EAL_PAGING_H
+#define RTE_EAL_PAGING_H
 
 /**
  * @file
@@ -13,6 +12,10 @@
  * Wrappers for OS facilities related to memory paging, used across DPDK.
  */
 
+#include <stdint.h>
+
+#include <rte_compat.h>
+
 /** Memory protection flags. */
 enum rte_mem_prot {
 	RTE_PROT_READ = 1 << 0,   /**< Read access. */
@@ -101,3 +104,5 @@ rte_mem_page_size(void);
 __rte_internal
 int
 rte_mem_lock(const void *virt, size_t size);
+
+#endif /* RTE_EAL_PAGING_H */
diff --git a/lib/eal/include/rte_keepalive.h b/lib/eal/include/rte_keepalive.h
index 9ff870f6b4..04d96947b0 100644
--- a/lib/eal/include/rte_keepalive.h
+++ b/lib/eal/include/rte_keepalive.h
@@ -7,8 +7,8 @@
  * DPDK RTE LCore Keepalive Monitor.
  */
 
-#ifndef _KEEPALIVE_H_
-#define _KEEPALIVE_H_
+#ifndef RTE_KEEPALIVE_H
+#define RTE_KEEPALIVE_H
 
 #include <rte_config.h>
 #include <rte_memory.h>
@@ -146,4 +146,4 @@ rte_keepalive_register_relay_callback(struct rte_keepalive *keepcfg,
 }
 #endif
 
-#endif /* _KEEPALIVE_H_ */
+#endif /* RTE_KEEPALIVE_H */
diff --git a/lib/jobstats/rte_jobstats.h b/lib/jobstats/rte_jobstats.h
index bdd85fe000..08549be35f 100644
--- a/lib/jobstats/rte_jobstats.h
+++ b/lib/jobstats/rte_jobstats.h
@@ -2,8 +2,8 @@
  * Copyright(c) 2015 Intel Corporation
  */
 
-#ifndef JOBSTATS_H_
-#define JOBSTATS_H_
+#ifndef RTE_JOBSTATS_H
+#define RTE_JOBSTATS_H
 
 #include <stdint.h>
 
@@ -303,4 +303,4 @@ rte_jobstats_reset(struct rte_jobstats *job);
 }
 #endif
 
-#endif /* JOBSTATS_H_ */
+#endif /* RTE_JOBSTATS_H */
diff --git a/lib/vhost/rte_vhost_crypto.h b/lib/vhost/rte_vhost_crypto.h
index af61f0907e..adfd5cfab0 100644
--- a/lib/vhost/rte_vhost_crypto.h
+++ b/lib/vhost/rte_vhost_crypto.h
@@ -2,8 +2,8 @@
  * Copyright(c) 2017-2018 Intel Corporation
  */
 
-#ifndef _VHOST_CRYPTO_H_
-#define _VHOST_CRYPTO_H_
+#ifndef _RTE_VHOST_CRYPTO_H_
+#define _RTE_VHOST_CRYPTO_H_
 
 #include <stdint.h>
 
@@ -134,4 +134,4 @@ rte_vhost_crypto_finalize_requests(struct rte_crypto_op **ops,
 }
 #endif
 
-#endif /**< _VHOST_CRYPTO_H_ */
+#endif /* _RTE_VHOST_CRYPTO_H_ */
-- 
2.51.0


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2025-09-18 12:18 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-09-18 12:17 [PATCH] lib: fix include guards Thomas Monjalon

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).