From: Ankur Dwivedi <adwivedi@marvell.com>
To: <dev@dpdk.org>
Cc: <jerinj@marvell.com>, <vladimir.medvedkin@intel.com>,
<ndabilpuram@marvell.com>, <pbhagavatula@marvell.com>,
<skori@marvell.com>, <rkudurumalla@marvell.com>,
Ankur Dwivedi <adwivedi@marvell.com>
Subject: [PATCH v1 07/12] fib: move macro to header file
Date: Tue, 15 Apr 2025 17:40:47 +0530 [thread overview]
Message-ID: <20250415121052.1497155-8-adwivedi@marvell.com> (raw)
In-Reply-To: <20250415121052.1497155-1-adwivedi@marvell.com>
Moves the macro FIB6_NAMESIZE to header file and rename it to
RTE_FIB6_NAMESIZE.
Signed-off-by: Ankur Dwivedi <adwivedi@marvell.com>
---
lib/fib/rte_fib6.c | 11 ++++-------
lib/fib/rte_fib6.h | 3 +++
2 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/lib/fib/rte_fib6.c b/lib/fib/rte_fib6.c
index 00647bdfa4..93a1c7197b 100644
--- a/lib/fib/rte_fib6.c
+++ b/lib/fib/rte_fib6.c
@@ -28,9 +28,6 @@ static struct rte_tailq_elem rte_fib6_tailq = {
};
EAL_REGISTER_TAILQ(rte_fib6_tailq)
-/* Maximum length of a FIB name. */
-#define FIB6_NAMESIZE 64
-
#if defined(RTE_LIBRTE_FIB_DEBUG)
#define FIB6_RETURN_IF_TRUE(cond, retval) do { \
if (cond) \
@@ -41,7 +38,7 @@ EAL_REGISTER_TAILQ(rte_fib6_tailq)
#endif
struct rte_fib6 {
- char name[FIB6_NAMESIZE];
+ char name[RTE_FIB6_NAMESIZE];
enum rte_fib6_type type; /**< Type of FIB struct */
struct rte_rib6 *rib; /**< RIB helper datastructure */
void *dp; /**< pointer to the dataplane struct*/
@@ -157,7 +154,7 @@ RTE_EXPORT_SYMBOL(rte_fib6_create)
struct rte_fib6 *
rte_fib6_create(const char *name, int socket_id, struct rte_fib6_conf *conf)
{
- char mem_name[FIB6_NAMESIZE];
+ char mem_name[RTE_FIB6_NAMESIZE];
int ret;
struct rte_fib6 *fib = NULL;
struct rte_rib6 *rib = NULL;
@@ -190,7 +187,7 @@ rte_fib6_create(const char *name, int socket_id, struct rte_fib6_conf *conf)
/* guarantee there's no existing */
TAILQ_FOREACH(te, fib_list, next) {
fib = (struct rte_fib6 *)te->data;
- if (strncmp(name, fib->name, FIB6_NAMESIZE) == 0)
+ if (strncmp(name, fib->name, RTE_FIB6_NAMESIZE) == 0)
break;
}
fib = NULL;
@@ -261,7 +258,7 @@ rte_fib6_find_existing(const char *name)
rte_mcfg_tailq_read_lock();
TAILQ_FOREACH(te, fib_list, next) {
fib = (struct rte_fib6 *) te->data;
- if (strncmp(name, fib->name, FIB6_NAMESIZE) == 0)
+ if (strncmp(name, fib->name, RTE_FIB6_NAMESIZE) == 0)
break;
}
rte_mcfg_tailq_read_unlock();
diff --git a/lib/fib/rte_fib6.h b/lib/fib/rte_fib6.h
index 42e6138708..625df1fa6b 100644
--- a/lib/fib/rte_fib6.h
+++ b/lib/fib/rte_fib6.h
@@ -28,6 +28,9 @@ extern "C" {
/** Maximum depth value possible for IPv6 FIB. */
#define RTE_FIB6_MAXDEPTH (RTE_DEPRECATED(RTE_FIB6_MAXDEPTH) RTE_IPV6_MAX_DEPTH)
+/* Maximum length of a FIB name. */
+#define RTE_FIB6_NAMESIZE 64
+
struct rte_fib6;
struct rte_rib6;
--
2.25.1
next prev parent reply other threads:[~2025-04-15 12:12 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-15 12:10 [PATCH v1 00/12] add lookup fib nodes in graph library Ankur Dwivedi
2025-04-15 12:10 ` [PATCH v1 01/12] fib: move macro to header file Ankur Dwivedi
2025-04-15 12:10 ` [PATCH v1 02/12] node: add IP4 lookup FIB node Ankur Dwivedi
2025-04-16 7:32 ` Nitin Saxena
2025-04-16 10:26 ` [EXTERNAL] " Ankur Dwivedi
2025-04-16 9:34 ` Medvedkin, Vladimir
2025-04-16 10:07 ` [EXTERNAL] " Ankur Dwivedi
2025-04-15 12:10 ` [PATCH v1 03/12] node: add IP4 FIB route add Ankur Dwivedi
2025-04-15 12:10 ` [PATCH v1 04/12] node: add process callback for IP4 FIB Ankur Dwivedi
2025-04-16 7:54 ` Nitin Saxena
2025-04-16 12:54 ` Medvedkin, Vladimir
2025-04-18 7:38 ` [EXTERNAL] " Ankur Dwivedi
2025-04-15 12:10 ` [PATCH v1 05/12] node: add next node in packet classification Ankur Dwivedi
2025-04-15 12:10 ` [PATCH v1 06/12] app/graph: add IP4 lookup mode command Ankur Dwivedi
2025-04-15 12:10 ` Ankur Dwivedi [this message]
2025-04-15 12:10 ` [PATCH v1 08/12] node: add IP6 lookup FIB node Ankur Dwivedi
2025-04-15 12:10 ` [PATCH v1 09/12] node: add IP6 FIB route add Ankur Dwivedi
2025-04-15 12:10 ` [PATCH v1 10/12] node: add process callback for IP6 FIB Ankur Dwivedi
2025-04-15 12:10 ` [PATCH v1 11/12] node: add next node in packet classification Ankur Dwivedi
2025-04-15 12:10 ` [PATCH v1 12/12] app/graph: add IP6 lookup mode command Ankur Dwivedi
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=20250415121052.1497155-8-adwivedi@marvell.com \
--to=adwivedi@marvell.com \
--cc=dev@dpdk.org \
--cc=jerinj@marvell.com \
--cc=ndabilpuram@marvell.com \
--cc=pbhagavatula@marvell.com \
--cc=rkudurumalla@marvell.com \
--cc=skori@marvell.com \
--cc=vladimir.medvedkin@intel.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).