Skip to content

Commit

Permalink
rename RTNH_F_EXTERNAL to RTNH_F_OFFLOAD
Browse files Browse the repository at this point in the history
RTNH_F_EXTERNAL today is printed as "offload" in iproute2 output.

This patch renames the flag to be consistent with what the user sees.

Signed-off-by: Roopa Prabhu <roopa@cumulusnetworks.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Roopa Prabhu authored and David S. Miller committed May 15, 2015
1 parent c1c52db commit eea3994
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion include/uapi/linux/rtnetlink.h
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,7 @@ struct rtnexthop {
#define RTNH_F_DEAD 1 /* Nexthop is dead (used by multipath) */
#define RTNH_F_PERVASIVE 2 /* Do recursive gateway lookup */
#define RTNH_F_ONLINK 4 /* Gateway is forced on link */
#define RTNH_F_EXTERNAL 8 /* Route installed externally */
#define RTNH_F_OFFLOAD 8 /* offloaded route */

/* Macros to handle hexthops */

Expand Down
2 changes: 1 addition & 1 deletion net/ipv4/fib_trie.c
Original file line number Diff line number Diff line change
Expand Up @@ -1764,7 +1764,7 @@ void fib_table_flush_external(struct fib_table *tb)
/* record local slen */
slen = fa->fa_slen;

if (!fi || !(fi->fib_flags & RTNH_F_EXTERNAL))
if (!fi || !(fi->fib_flags & RTNH_F_OFFLOAD))
continue;

netdev_switch_fib_ipv4_del(n->key,
Expand Down
6 changes: 3 additions & 3 deletions net/switchdev/switchdev.c
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,7 @@ int netdev_switch_fib_ipv4_add(u32 dst, int dst_len, struct fib_info *fi,
fi, tos, type, nlflags,
tb_id);
if (!err)
fi->fib_flags |= RTNH_F_EXTERNAL;
fi->fib_flags |= RTNH_F_OFFLOAD;
}

return err;
Expand All @@ -364,7 +364,7 @@ int netdev_switch_fib_ipv4_del(u32 dst, int dst_len, struct fib_info *fi,
const struct swdev_ops *ops;
int err = 0;

if (!(fi->fib_flags & RTNH_F_EXTERNAL))
if (!(fi->fib_flags & RTNH_F_OFFLOAD))
return 0;

dev = netdev_switch_get_dev_by_nhs(fi);
Expand All @@ -376,7 +376,7 @@ int netdev_switch_fib_ipv4_del(u32 dst, int dst_len, struct fib_info *fi,
err = ops->swdev_fib_ipv4_del(dev, htonl(dst), dst_len,
fi, tos, type, tb_id);
if (!err)
fi->fib_flags &= ~RTNH_F_EXTERNAL;
fi->fib_flags &= ~RTNH_F_OFFLOAD;
}

return err;
Expand Down

0 comments on commit eea3994

Please sign in to comment.