Skip to content

Commit

Permalink
fib: rename configuration flag for IPv4 lookup
Browse files Browse the repository at this point in the history
Rename RTE_FIB_F_NETWORK_ORDER with RTE_FIB_F_LOOKUP_NETWORK_ORDER to
explicitly indicate that it is only used in lookup.

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

Signed-off-by: Vladimir Medvedkin <[email protected]>
  • Loading branch information
vmedvedk authored and tmonjalo committed Nov 26, 2024
1 parent 41927fd commit df8b5bf
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions lib/fib/rte_fib.c
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions lib/fib/rte_fib.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit df8b5bf

Please sign in to comment.