* [PATCH net-next] rename RTNH_F_EXTERNAL to RTNH_F_OFFLOAD
@ 2015-05-13 5:27 roopa
2015-05-13 5:42 ` Jiri Pirko
0 siblings, 1 reply; 6+ messages in thread
From: roopa @ 2015-05-13 5:27 UTC (permalink / raw)
To: davem, sfeldma, jiri, gospo; +Cc: netdev
From: Roopa Prabhu <roopa@cumulusnetworks.com>
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)
Signed-off-by: Roopa Prabhu <roopa@cumulusnetworks.com>
---
include/uapi/linux/rtnetlink.h | 2 +-
net/ipv4/fib_trie.c | 2 +-
net/switchdev/switchdev.c | 6 +++---
3 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/include/uapi/linux/rtnetlink.h b/include/uapi/linux/rtnetlink.h
index 974db03..17fb02f 100644
--- a/include/uapi/linux/rtnetlink.h
+++ b/include/uapi/linux/rtnetlink.h
@@ -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 */
diff --git a/net/ipv4/fib_trie.c b/net/ipv4/fib_trie.c
index 03444c6..d38aa7a 100644
--- a/net/ipv4/fib_trie.c
+++ b/net/ipv4/fib_trie.c
@@ -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,
diff --git a/net/switchdev/switchdev.c b/net/switchdev/switchdev.c
index 65d49d4..0457af7 100644
--- a/net/switchdev/switchdev.c
+++ b/net/switchdev/switchdev.c
@@ -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;
}
--
1.7.10.4
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH net-next] rename RTNH_F_EXTERNAL to RTNH_F_OFFLOAD
2015-05-13 5:27 [PATCH net-next] rename RTNH_F_EXTERNAL to RTNH_F_OFFLOAD roopa
@ 2015-05-13 5:42 ` Jiri Pirko
2015-05-13 8:26 ` Daniel Borkmann
0 siblings, 1 reply; 6+ messages in thread
From: Jiri Pirko @ 2015-05-13 5:42 UTC (permalink / raw)
To: roopa; +Cc: davem, sfeldma, gospo, netdev
Wed, May 13, 2015 at 07:27:10AM CEST, roopa@cumulusnetworks.com wrote:
>From: Roopa Prabhu <roopa@cumulusnetworks.com>
>
>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)
>
>Signed-off-by: Roopa Prabhu <roopa@cumulusnetworks.com>
>---
> include/uapi/linux/rtnetlink.h | 2 +-
> net/ipv4/fib_trie.c | 2 +-
> net/switchdev/switchdev.c | 6 +++---
> 3 files changed, 5 insertions(+), 5 deletions(-)
>
>diff --git a/include/uapi/linux/rtnetlink.h b/include/uapi/linux/rtnetlink.h
>index 974db03..17fb02f 100644
>--- a/include/uapi/linux/rtnetlink.h
>+++ b/include/uapi/linux/rtnetlink.h
>@@ -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 :/
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH net-next] rename RTNH_F_EXTERNAL to RTNH_F_OFFLOAD
2015-05-13 5:42 ` Jiri Pirko
@ 2015-05-13 8:26 ` Daniel Borkmann
2015-05-13 13:38 ` roopa
0 siblings, 1 reply; 6+ messages in thread
From: Daniel Borkmann @ 2015-05-13 8:26 UTC (permalink / raw)
To: Jiri Pirko, roopa; +Cc: davem, sfeldma, gospo, netdev
On 05/13/2015 07:42 AM, Jiri Pirko wrote:
> Wed, May 13, 2015 at 07:27:10AM CEST, roopa@cumulusnetworks.com wrote:
>> From: Roopa Prabhu <roopa@cumulusnetworks.com>
>>
>> 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)
>>
>> Signed-off-by: Roopa Prabhu <roopa@cumulusnetworks.com>
>> ---
>> include/uapi/linux/rtnetlink.h | 2 +-
>> net/ipv4/fib_trie.c | 2 +-
>> net/switchdev/switchdev.c | 6 +++---
>> 3 files changed, 5 insertions(+), 5 deletions(-)
>>
>> diff --git a/include/uapi/linux/rtnetlink.h b/include/uapi/linux/rtnetlink.h
>> index 974db03..17fb02f 100644
>> --- a/include/uapi/linux/rtnetlink.h
>> +++ b/include/uapi/linux/rtnetlink.h
>> @@ -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
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH net-next] rename RTNH_F_EXTERNAL to RTNH_F_OFFLOAD
2015-05-13 8:26 ` Daniel Borkmann
@ 2015-05-13 13:38 ` roopa
2015-05-13 16:13 ` David Miller
0 siblings, 1 reply; 6+ messages in thread
From: roopa @ 2015-05-13 13:38 UTC (permalink / raw)
To: Daniel Borkmann; +Cc: Jiri Pirko, davem, sfeldma, gospo, netdev
On 5/13/15, 1:26 AM, Daniel Borkmann wrote:
> On 05/13/2015 07:42 AM, Jiri Pirko wrote:
>> Wed, May 13, 2015 at 07:27:10AM CEST, roopa@cumulusnetworks.com wrote:
>>> From: Roopa Prabhu <roopa@cumulusnetworks.com>
>>>
>>> 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)
>>>
>>> Signed-off-by: Roopa Prabhu <roopa@cumulusnetworks.com>
>>> ---
>>> include/uapi/linux/rtnetlink.h | 2 +-
>>> net/ipv4/fib_trie.c | 2 +-
>>> net/switchdev/switchdev.c | 6 +++---
>>> 3 files changed, 5 insertions(+), 5 deletions(-)
>>>
>>> diff --git a/include/uapi/linux/rtnetlink.h
>>> b/include/uapi/linux/rtnetlink.h
>>> index 974db03..17fb02f 100644
>>> --- a/include/uapi/linux/rtnetlink.h
>>> +++ b/include/uapi/linux/rtnetlink.h
>>> @@ -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 :/
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.
>
> 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!.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH net-next] rename RTNH_F_EXTERNAL to RTNH_F_OFFLOAD
2015-05-13 13:38 ` roopa
@ 2015-05-13 16:13 ` David Miller
2015-05-13 19:03 ` roopa
0 siblings, 1 reply; 6+ messages in thread
From: David Miller @ 2015-05-13 16:13 UTC (permalink / raw)
To: roopa; +Cc: daniel, jiri, sfeldma, gospo, netdev
From: roopa <roopa@cumulusnetworks.com>
Date: Wed, 13 May 2015 06:38:02 -0700
> On 5/13/15, 1:26 AM, Daniel Borkmann wrote:
>> On 05/13/2015 07:42 AM, Jiri Pirko wrote:
>>> Wed, May 13, 2015 at 07:27:10AM CEST, roopa@cumulusnetworks.com wrote:
>>>> From: Roopa Prabhu <roopa@cumulusnetworks.com>
>>>>
>>>> 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)
>>>>
>>>> Signed-off-by: Roopa Prabhu <roopa@cumulusnetworks.com>
>>>> ---
>>>> include/uapi/linux/rtnetlink.h | 2 +-
>>>> net/ipv4/fib_trie.c | 2 +-
>>>> net/switchdev/switchdev.c | 6 +++---
>>>> 3 files changed, 5 insertions(+), 5 deletions(-)
>>>>
>>>> diff --git a/include/uapi/linux/rtnetlink.h
>>>> b/include/uapi/linux/rtnetlink.h
>>>> index 974db03..17fb02f 100644
>>>> --- a/include/uapi/linux/rtnetlink.h
>>>> +++ b/include/uapi/linux/rtnetlink.h
>>>> @@ -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 :/
> 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.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH net-next] rename RTNH_F_EXTERNAL to RTNH_F_OFFLOAD
2015-05-13 16:13 ` David Miller
@ 2015-05-13 19:03 ` roopa
0 siblings, 0 replies; 6+ messages in thread
From: roopa @ 2015-05-13 19:03 UTC (permalink / raw)
To: David Miller; +Cc: daniel, jiri, sfeldma, gospo, netdev
On 5/13/15, 9:13 AM, David Miller wrote:
> From: roopa <roopa@cumulusnetworks.com>
> Date: Wed, 13 May 2015 06:38:02 -0700
>
>> On 5/13/15, 1:26 AM, Daniel Borkmann wrote:
>>> On 05/13/2015 07:42 AM, Jiri Pirko wrote:
>>>> Wed, May 13, 2015 at 07:27:10AM CEST, roopa@cumulusnetworks.com wrote:
>>>>> From: Roopa Prabhu <roopa@cumulusnetworks.com>
>>>>>
>>>>> 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)
>>>>>
>>>>> Signed-off-by: Roopa Prabhu <roopa@cumulusnetworks.com>
>>>>> ---
>>>>> include/uapi/linux/rtnetlink.h | 2 +-
>>>>> net/ipv4/fib_trie.c | 2 +-
>>>>> net/switchdev/switchdev.c | 6 +++---
>>>>> 3 files changed, 5 insertions(+), 5 deletions(-)
>>>>>
>>>>> diff --git a/include/uapi/linux/rtnetlink.h
>>>>> b/include/uapi/linux/rtnetlink.h
>>>>> index 974db03..17fb02f 100644
>>>>> --- a/include/uapi/linux/rtnetlink.h
>>>>> +++ b/include/uapi/linux/rtnetlink.h
>>>>> @@ -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 :/
>> 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.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2015-05-13 19:03 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-05-13 5:27 [PATCH net-next] rename RTNH_F_EXTERNAL to RTNH_F_OFFLOAD roopa
2015-05-13 5:42 ` Jiri Pirko
2015-05-13 8:26 ` Daniel Borkmann
2015-05-13 13:38 ` roopa
2015-05-13 16:13 ` David Miller
2015-05-13 19:03 ` roopa
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.