rename RTNH_F_EXTERNAL to RTNH_F_OFFLOAD
Subsystems (4)
PATCH 1/1 rename RTNH_F_EXTERNAL to RTNH_F_OFFLOAD
From: Roopa Prabhu <[email protected]>
RTNH_F_EXTERNAL today is printed as "offload" in iproute2 output.
This patch renames the flag to be consistent with what the user sees.
(I will post iproute2 patch if this gets accepted)
--- include/uapi/linux/rtnetlink.h | 2 +- net/ipv4/fib_trie.c | 2 +- net/switchdev/switchdev.c | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-)
include/uapi/linux/rtnetlink.h +1 -1
@@ -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 */
net/ipv4/fib_trie.c +1 -1
@@ -1762,7 +1762,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 ; switchdev_fib_ipv4_del(n->key, KEYLENGTH - fa->fa_slen,
net/switchdev/switchdev.c +3 -3
@@ -674,7 +674,7 @@ int switchdev_fib_ipv4_add(u32 dst, int dst_len, struct fib_info *fi, err =switchdev_port_obj_add (dev, &fib_obj);if (!err) - fi->fib_flags |=RTNH_F_EXTERNAL ; + fi->fib_flags |=RTNH_F_OFFLOAD ;return err; }
@@ -710,7 +710,7 @@ int switchdev_fib_ipv4_del(u32 dst, int dst_len, struct fib_info *fi,struct net_device *dev;int err =0 ; -if (!(fi->fib_flags &RTNH_F_EXTERNAL )) +if (!(fi->fib_flags &RTNH_F_OFFLOAD ))return 0 ; dev =switchdev_get_dev_by_nhs (fi);
@@ -719,7 +719,7 @@ int switchdev_fib_ipv4_del(u32 dst, int dst_len, struct fib_info *fi, err =switchdev_port_obj_del (dev, &fib_obj);if (!err) - fi->fib_flags &= ~RTNH_F_EXTERNAL ; + fi->fib_flags &= ~RTNH_F_OFFLOAD ;return err; }
Signature · 1 line
1.7.10.4
Jiri Pirko
maintainerQuoted 20 lines · Wed, May 13, 2015 at 07:27:10AM CEST, [email protected] wrote:
From: Roopa Prabhu <[email protected]>
RTNH_F_EXTERNALtoday is printed as "offload" in iproute2 output.This patch renames the flag to be consistent with what the user sees.
(I will post iproute2 patch if this gets accepted)
Signed-off-by Roopa Prabhu <[email protected]>---
include/uapi/linux/rtnetlink.h | 2 +- net/ipv4/fib_trie.c | 2 +- net/switchdev/switchdev.c | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-)include/uapi/linux/rtnetlink.h +0
-0
include/uapi/linux/rtnetlink.h struct rtnexthop { · line 340
Quoted 5 lines
include/uapi/linux/rtnetlink.h +1
-1@@ -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 */
Since this is part of uapi, I believe this is not doable :/
Quoted 16 lines · Jiri Pirko
Quoted 15 lines · Wed, May 13, 2015 at 07:27:10AM CEST, [email protected] wrote:
From: Roopa Prabhu <[email protected]>
RTNH_F_EXTERNALtoday is printed as "offload" in iproute2 output.This patch renames the flag to be consistent with what the user sees.
(I will post iproute2 patch if this gets accepted)
Signed-off-by Roopa Prabhu <[email protected]>---
include/uapi/linux/rtnetlink.h | 2 +- net/ipv4/fib_trie.c | 2 +- net/switchdev/switchdev.c | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-)
Quoted 12 lines
include/uapi/linux/rtnetlink.h struct rtnexthop { · line 340
Quoted 10 lines
include/uapi/linux/rtnetlink.h +1
-1@@ -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 */ Since this is part of uapi, I believe this is not doable :/
You could still alias it if necessary:
#define RTNH_F_OFFLOAD RTNH_F_EXTERNAL
Quoted 17 lines · Daniel Borkmann
Quoted 16 lines · Jiri Pirko
Quoted 15 lines · Wed, May 13, 2015 at 07:27:10AM CEST, [email protected] wrote:
From: Roopa Prabhu <[email protected]>
RTNH_F_EXTERNALtoday is printed as "offload" in iproute2 output.This patch renames the flag to be consistent with what the user sees.
(I will post iproute2 patch if this gets accepted)
Signed-off-by Roopa Prabhu <[email protected]>---
include/uapi/linux/rtnetlink.h | 2 +- net/ipv4/fib_trie.c | 2 +- net/switchdev/switchdev.c | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-)
Quoted 13 lines
Quoted 5 lines
Quoted 5 lines
include/uapi/linux/rtnetlink.h +0
-0@@ -337,7 +337,7 @@ struct rtnexthop {Quoted 8 lines
Quoted 6 lines
include/uapi/linux/rtnetlink.h +0
-1#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 */
+#defineRTNH_F_OFFLOAD8 /* offloaded route */Since this is part of uapi, I believe this is not doable :/
i thought it was not too late :) and besides i wasn't changing the value and just the name. current iproute2 would still build for example.
Quoted 4 lines
You could still alias it if necessary:
#define RTNH_F_OFFLOAD RTNH_F_EXTERNAL
that is an option. hmm...wondering if it is worth creating an alias or we should live with it. If i get more votes, i will resubmit.
thanks!.
David Miller
maintainerFrom: roopa <[email protected]>
Date: Wed, 13 May 2015 06:38:02 -0700
Quoted 31 lines · Daniel Borkmann
Quoted 17 lines · Jiri Pirko
Quoted 16 lines
Quoted 15 lines · Wed, May 13, 2015 at 07:27:10AM CEST, [email protected] wrote:
From: Roopa Prabhu <[email protected]>
RTNH_F_EXTERNALtoday is printed as "offload" in iproute2 output.This patch renames the flag to be consistent with what the user sees.
(I will post iproute2 patch if this gets accepted)
Signed-off-by Roopa Prabhu <[email protected]>---
include/uapi/linux/rtnetlink.h | 2 +- net/ipv4/fib_trie.c | 2 +- net/switchdev/switchdev.c | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-)Quoted 13 lines
Quoted 5 lines
Quoted 5 lines
include/uapi/linux/rtnetlink.h +0
-0Quoted 8 lines
include/uapi/linux/rtnetlink.h struct rtnexthop { · line 340
Quoted 6 lines
include/uapi/linux/rtnetlink.h +1
-1@@ -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 */ Since this is part of uapi, I believe this is not doable :/
Quoted 3 lines
i thought it was not too late :) and besides i wasn't changing the value and just the name.
current iproute2 would still build for example.
If it made it into a release kernel, you cannot change it.
Period.
Quoted 33 lines · David Miller
From: roopa <[email protected]>
Date: Wed, 13 May 2015 06:38:02 -0700Quoted 30 lines · Daniel Borkmann
Quoted 29 lines · Jiri Pirko
Quoted 28 lines
Quoted 21 lines · Wed, May 13, 2015 at 07:27:10AM CEST, [email protected] wrote:
From: Roopa Prabhu <[email protected]>
RTNH_F_EXTERNALtoday is printed as "offload" in iproute2 output.This patch renames the flag to be consistent with what the user sees.
(I will post iproute2 patch if this gets accepted)
Signed-off-by Roopa Prabhu <[email protected]>---
include/uapi/linux/rtnetlink.h | 2 +- net/ipv4/fib_trie.c | 2 +- net/switchdev/switchdev.c | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-)include/uapi/linux/rtnetlink.h +0
-0include/uapi/linux/rtnetlink.h struct rtnexthop { · line 340
Quoted 5 lines
include/uapi/linux/rtnetlink.h +1
-1@@ -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 */ Since this is part of uapi, I believe this is not doable :/
Quoted 6 lines
Quoted 3 lines
i thought it was not too late :) and besides i wasn't changing the value and just the name.
current iproute2 would still build for example.If it made it into a release kernel, you cannot change it.
Period.
Got it. But, I don't see the RTNH_F_EXTERNAL flag in 4.0. I will respin the patch against net.
thanks.