From: Thomas Monjalon <thomas@monjalon.net>
To: dev@dpdk.org
Cc: Tyler Retzlaff <roretzla@linux.microsoft.com>,
Maxime Coquelin <maxime.coquelin@redhat.com>,
Chenbo Xia <chenbox@nvidia.com>
Subject: [PATCH] lib: fix include guards
Date: Thu, 18 Sep 2025 14:17:51 +0200 [thread overview]
Message-ID: <20250918121751.1552714-1-thomas@monjalon.net> (raw)
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
reply other threads:[~2025-09-18 12:18 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20250918121751.1552714-1-thomas@monjalon.net \
--to=thomas@monjalon.net \
--cc=chenbox@nvidia.com \
--cc=dev@dpdk.org \
--cc=maxime.coquelin@redhat.com \
--cc=roretzla@linux.microsoft.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).