History

rename RTNH_F_EXTERNAL to RTNH_F_OFFLOAD

RTNH_F_EXTERNAL today is printed as "offload" in iproute2 output. This patch renames the flag to be consistent with what the user sees.

Roopa Prabhu committed 11 years ago

Commit eea39941 parent c1c52db3 files · +5 −5Browse files

Unified · Split

3 files
  1. include/uapi/linux/rtnetlink.h +1 −1
  2. net/ipv4/fib_trie.c +1 −1
  3. net/switchdev/switchdev.c +3 −3
include/uapi/linux/rtnetlink.h+1−1
@@ -337,7 +337,7 @@ struct rtnexthop { · 336 unmodified lines
337337 #define RTNH_F_DEAD 1 /* Nexthop is dead (used by multipath) */
338338 #define RTNH_F_PERVASIVE 2 /* Do recursive gateway lookup */
339339 #define RTNH_F_ONLINK 4 /* Gateway is forced on link */
340−#define RTNH_F_EXTERNAL 8 /* Route installed externally */
340+#define RTNH_F_OFFLOAD 8 /* offloaded route */
341341
342342 /* Macros to handle hexthops */
343343
net/ipv4/fib_trie.c+1−1
@@ -1764,7 +1764,7 @@ void fib_table_flush_external(struct fib_table *tb) · 1763 unmodified lines
17641764 /* record local slen */
17651765 slen = fa->fa_slen;
17661766
1767− if (!fi || !(fi->fib_flags & RTNH_F_EXTERNAL))
1767+ if (!fi || !(fi->fib_flags & RTNH_F_OFFLOAD))
17681768 continue;
17691769
17701770 netdev_switch_fib_ipv4_del(n->key,
net/switchdev/switchdev.c+3−3
@@ -338,7 +338,7 @@ int netdev_switch_fib_ipv4_add(u32 dst, int dst_len, struct fib_info *fi, · 337 unmodified lines
338338 fi, tos, type, nlflags,
339339 tb_id);
340340 if (!err)
341− fi->fib_flags |= RTNH_F_EXTERNAL;
341+ fi->fib_flags |= RTNH_F_OFFLOAD;
342342 }
343343
344344 return err;
@@ -364,7 +364,7 @@ int netdev_switch_fib_ipv4_del(u32 dst, int dst_len, struct fib_info *fi, · 19 unmodified lines
364364 const struct swdev_ops *ops;
365365 int err = 0;
366366
367− if (!(fi->fib_flags & RTNH_F_EXTERNAL))
367+ if (!(fi->fib_flags & RTNH_F_OFFLOAD))
368368 return 0;
369369
370370 dev = netdev_switch_get_dev_by_nhs(fi);
@@ -376,7 +376,7 @@ int netdev_switch_fib_ipv4_del(u32 dst, int dst_len, struct fib_info *fi, · 5 unmodified lines
376376 err = ops->swdev_fib_ipv4_del(dev, htonl(dst), dst_len,
377377 fi, tos, type, tb_id);
378378 if (!err)
379− fi->fib_flags &= ~RTNH_F_EXTERNAL;
379+ fi->fib_flags &= ~RTNH_F_OFFLOAD;
380380 }
381381
382382 return err;