DPDK patches and discussions
 help / color / mirror / Atom feed
From: Vladimir Medvedkin <vladimir.medvedkin@intel.com>
To: dev@dpdk.org
Cc: david.marchand@redhat.com, stephen@networkplumber.org,
	rjarry@redhat.com, mb@smartsharesystems.com, thomas@monjalon.net
Subject: [PATCH] fib: rename configuration flag
Date: Tue, 26 Nov 2024 17:18:40 +0000	[thread overview]
Message-ID: <20241126171840.1499453-1-vladimir.medvedkin@intel.com> (raw)

Rename RTE_FIB_F_NETWORK_ORDER with RTE_FIB_F_LOOKUP_NETWORK_ORDER to
explicitly indicate that it is only used in lookup.

Fixes: e194f3cd5685 ("fib: lookup IPv4 address in network order")

Signed-off-by: Vladimir Medvedkin <vladimir.medvedkin@intel.com>
---
 lib/fib/rte_fib.c | 4 ++--
 lib/fib/rte_fib.h | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/lib/fib/rte_fib.c b/lib/fib/rte_fib.c
index db79fc428e..49211fe3fa 100644
--- a/lib/fib/rte_fib.c
+++ b/lib/fib/rte_fib.c
@@ -111,7 +111,7 @@ init_dataplane(struct rte_fib *fib, __rte_unused int socket_id,
 		if (fib->dp == NULL)
 			return -rte_errno;
 		fib->lookup = dir24_8_get_lookup_fn(fib->dp,
-			RTE_FIB_LOOKUP_DEFAULT, !!(fib->flags & RTE_FIB_F_NETWORK_ORDER));
+			RTE_FIB_LOOKUP_DEFAULT, !!(fib->flags & RTE_FIB_F_LOOKUP_NETWORK_ORDER));
 		fib->modify = dir24_8_modify;
 		return 0;
 	default:
@@ -333,7 +333,7 @@ rte_fib_select_lookup(struct rte_fib *fib,
 	switch (fib->type) {
 	case RTE_FIB_DIR24_8:
 		fn = dir24_8_get_lookup_fn(fib->dp, type,
-			!!(fib->flags & RTE_FIB_F_NETWORK_ORDER));
+			!!(fib->flags & RTE_FIB_F_LOOKUP_NETWORK_ORDER));
 		if (fn == NULL)
 			return -EINVAL;
 		fib->lookup = fn;
diff --git a/lib/fib/rte_fib.h b/lib/fib/rte_fib.h
index 362bb8f08c..1eee79c955 100644
--- a/lib/fib/rte_fib.h
+++ b/lib/fib/rte_fib.h
@@ -88,8 +88,8 @@ enum rte_fib_lookup_type {
 };
 
 /** If set, fib lookup is expecting IPv4 address in network byte order */
-#define RTE_FIB_F_NETWORK_ORDER	1
-#define RTE_FIB_ALLOWED_FLAGS	(RTE_FIB_F_NETWORK_ORDER)
+#define RTE_FIB_F_LOOKUP_NETWORK_ORDER	1
+#define RTE_FIB_ALLOWED_FLAGS	(RTE_FIB_F_LOOKUP_NETWORK_ORDER)
 
 /** FIB configuration structure */
 struct rte_fib_conf {
-- 
2.43.0


             reply	other threads:[~2024-11-26 17:18 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-26 17:18 Vladimir Medvedkin [this message]
2024-11-26 18:56 ` Thomas Monjalon

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=20241126171840.1499453-1-vladimir.medvedkin@intel.com \
    --to=vladimir.medvedkin@intel.com \
    --cc=david.marchand@redhat.com \
    --cc=dev@dpdk.org \
    --cc=mb@smartsharesystems.com \
    --cc=rjarry@redhat.com \
    --cc=stephen@networkplumber.org \
    --cc=thomas@monjalon.net \
    /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).