Re: [PATCH AUTOSEL for 4.15 058/124] ipv6: Set nexthop flags during route creation

2018-04-02 Thread Sasha Levin
On Mon, Mar 19, 2018 at 08:04:34PM +0200, Ido Schimmel wrote:
>On Mon, Mar 19, 2018 at 03:48:00PM +, Sasha Levin wrote:
>> From: Ido Schimmel 
>>
>> [ Upstream commit 5609b80a37f69f796548339e675256188b29c17d ]
>>
>> It is valid to install routes with a nexthop device that does not have a
>> carrier, so we need to make sure they're marked accordingly.
>>
>> As explained in the previous patch, host and anycast routes are never
>> marked with the 'linkdown' flag.
>>
>> Note that reject routes are unaffected, as these use the loopback device
>> which always has a carrier.
>>
>> Signed-off-by: Ido Schimmel 
>> Acked-by: David Ahern 
>> Signed-off-by: David S. Miller 
>> Signed-off-by: Sasha Levin 
>
>Hi Sasha,
>
>It doesn't really make sense to take this patch to 4.15 (and 4.14 from
>your other mail). The flag is never used there.
>
>In these kernels the flag is dumped to user space based on a carrier
>check. See commit 44c9f2f206f8 ("ipv6: Check nexthop flags in route dump
>instead of carrier").
>
>Similarly, during route lookup the carrier is checked and not the flag.
>See commit 14c5206c2d02 ("ipv6: Check nexthop flags during route lookup
>instead of carrier").
>
>Thanks

Now removed, thanks!

Re: [PATCH AUTOSEL for 4.15 058/124] ipv6: Set nexthop flags during route creation

2018-04-02 Thread Sasha Levin
On Mon, Mar 19, 2018 at 08:04:34PM +0200, Ido Schimmel wrote:
>On Mon, Mar 19, 2018 at 03:48:00PM +, Sasha Levin wrote:
>> From: Ido Schimmel 
>>
>> [ Upstream commit 5609b80a37f69f796548339e675256188b29c17d ]
>>
>> It is valid to install routes with a nexthop device that does not have a
>> carrier, so we need to make sure they're marked accordingly.
>>
>> As explained in the previous patch, host and anycast routes are never
>> marked with the 'linkdown' flag.
>>
>> Note that reject routes are unaffected, as these use the loopback device
>> which always has a carrier.
>>
>> Signed-off-by: Ido Schimmel 
>> Acked-by: David Ahern 
>> Signed-off-by: David S. Miller 
>> Signed-off-by: Sasha Levin 
>
>Hi Sasha,
>
>It doesn't really make sense to take this patch to 4.15 (and 4.14 from
>your other mail). The flag is never used there.
>
>In these kernels the flag is dumped to user space based on a carrier
>check. See commit 44c9f2f206f8 ("ipv6: Check nexthop flags in route dump
>instead of carrier").
>
>Similarly, during route lookup the carrier is checked and not the flag.
>See commit 14c5206c2d02 ("ipv6: Check nexthop flags during route lookup
>instead of carrier").
>
>Thanks

Now removed, thanks!

Re: [PATCH AUTOSEL for 4.15 058/124] ipv6: Set nexthop flags during route creation

2018-03-21 Thread Sasha Levin
On Mon, Mar 19, 2018 at 08:04:34PM +0200, Ido Schimmel wrote:
>On Mon, Mar 19, 2018 at 03:48:00PM +, Sasha Levin wrote:
>> From: Ido Schimmel 
>>
>> [ Upstream commit 5609b80a37f69f796548339e675256188b29c17d ]
>>
>> It is valid to install routes with a nexthop device that does not have a
>> carrier, so we need to make sure they're marked accordingly.
>>
>> As explained in the previous patch, host and anycast routes are never
>> marked with the 'linkdown' flag.
>>
>> Note that reject routes are unaffected, as these use the loopback device
>> which always has a carrier.
>>
>> Signed-off-by: Ido Schimmel 
>> Acked-by: David Ahern 
>> Signed-off-by: David S. Miller 
>> Signed-off-by: Sasha Levin 
>
>Hi Sasha,
>
>It doesn't really make sense to take this patch to 4.15 (and 4.14 from
>your other mail). The flag is never used there.
>
>In these kernels the flag is dumped to user space based on a carrier
>check. See commit 44c9f2f206f8 ("ipv6: Check nexthop flags in route dump
>instead of carrier").
>
>Similarly, during route lookup the carrier is checked and not the flag.
>See commit 14c5206c2d02 ("ipv6: Check nexthop flags during route lookup
>instead of carrier").

Removed from both trees, thanks!

-- 

Thanks,
Sasha

Re: [PATCH AUTOSEL for 4.15 058/124] ipv6: Set nexthop flags during route creation

2018-03-21 Thread Sasha Levin
On Mon, Mar 19, 2018 at 08:04:34PM +0200, Ido Schimmel wrote:
>On Mon, Mar 19, 2018 at 03:48:00PM +, Sasha Levin wrote:
>> From: Ido Schimmel 
>>
>> [ Upstream commit 5609b80a37f69f796548339e675256188b29c17d ]
>>
>> It is valid to install routes with a nexthop device that does not have a
>> carrier, so we need to make sure they're marked accordingly.
>>
>> As explained in the previous patch, host and anycast routes are never
>> marked with the 'linkdown' flag.
>>
>> Note that reject routes are unaffected, as these use the loopback device
>> which always has a carrier.
>>
>> Signed-off-by: Ido Schimmel 
>> Acked-by: David Ahern 
>> Signed-off-by: David S. Miller 
>> Signed-off-by: Sasha Levin 
>
>Hi Sasha,
>
>It doesn't really make sense to take this patch to 4.15 (and 4.14 from
>your other mail). The flag is never used there.
>
>In these kernels the flag is dumped to user space based on a carrier
>check. See commit 44c9f2f206f8 ("ipv6: Check nexthop flags in route dump
>instead of carrier").
>
>Similarly, during route lookup the carrier is checked and not the flag.
>See commit 14c5206c2d02 ("ipv6: Check nexthop flags during route lookup
>instead of carrier").

Removed from both trees, thanks!

-- 

Thanks,
Sasha

[PATCH AUTOSEL for 4.15 058/124] ipv6: Set nexthop flags during route creation

2018-03-19 Thread Sasha Levin
From: Ido Schimmel 

[ Upstream commit 5609b80a37f69f796548339e675256188b29c17d ]

It is valid to install routes with a nexthop device that does not have a
carrier, so we need to make sure they're marked accordingly.

As explained in the previous patch, host and anycast routes are never
marked with the 'linkdown' flag.

Note that reject routes are unaffected, as these use the loopback device
which always has a carrier.

Signed-off-by: Ido Schimmel 
Acked-by: David Ahern 
Signed-off-by: David S. Miller 
Signed-off-by: Sasha Levin 
---
 net/ipv6/route.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/net/ipv6/route.c b/net/ipv6/route.c
index a560fb1d0230..b2d6377f1ef5 100644
--- a/net/ipv6/route.c
+++ b/net/ipv6/route.c
@@ -2750,6 +2750,9 @@ static struct rt6_info *ip6_route_info_create(struct 
fib6_config *cfg,
rt->rt6i_flags = cfg->fc_flags;
 
 install_route:
+   if (!(rt->rt6i_flags & (RTF_LOCAL | RTF_ANYCAST)) &&
+   !netif_carrier_ok(dev))
+   rt->rt6i_nh_flags |= RTNH_F_LINKDOWN;
rt->dst.dev = dev;
rt->rt6i_idev = idev;
rt->rt6i_table = table;
-- 
2.14.1


[PATCH AUTOSEL for 4.15 058/124] ipv6: Set nexthop flags during route creation

2018-03-19 Thread Sasha Levin
From: Ido Schimmel 

[ Upstream commit 5609b80a37f69f796548339e675256188b29c17d ]

It is valid to install routes with a nexthop device that does not have a
carrier, so we need to make sure they're marked accordingly.

As explained in the previous patch, host and anycast routes are never
marked with the 'linkdown' flag.

Note that reject routes are unaffected, as these use the loopback device
which always has a carrier.

Signed-off-by: Ido Schimmel 
Acked-by: David Ahern 
Signed-off-by: David S. Miller 
Signed-off-by: Sasha Levin 
---
 net/ipv6/route.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/net/ipv6/route.c b/net/ipv6/route.c
index a560fb1d0230..b2d6377f1ef5 100644
--- a/net/ipv6/route.c
+++ b/net/ipv6/route.c
@@ -2750,6 +2750,9 @@ static struct rt6_info *ip6_route_info_create(struct 
fib6_config *cfg,
rt->rt6i_flags = cfg->fc_flags;
 
 install_route:
+   if (!(rt->rt6i_flags & (RTF_LOCAL | RTF_ANYCAST)) &&
+   !netif_carrier_ok(dev))
+   rt->rt6i_nh_flags |= RTNH_F_LINKDOWN;
rt->dst.dev = dev;
rt->rt6i_idev = idev;
rt->rt6i_table = table;
-- 
2.14.1


Re: [PATCH AUTOSEL for 4.15 058/124] ipv6: Set nexthop flags during route creation

2018-03-19 Thread Ido Schimmel
On Mon, Mar 19, 2018 at 03:48:00PM +, Sasha Levin wrote:
> From: Ido Schimmel 
> 
> [ Upstream commit 5609b80a37f69f796548339e675256188b29c17d ]
> 
> It is valid to install routes with a nexthop device that does not have a
> carrier, so we need to make sure they're marked accordingly.
> 
> As explained in the previous patch, host and anycast routes are never
> marked with the 'linkdown' flag.
> 
> Note that reject routes are unaffected, as these use the loopback device
> which always has a carrier.
> 
> Signed-off-by: Ido Schimmel 
> Acked-by: David Ahern 
> Signed-off-by: David S. Miller 
> Signed-off-by: Sasha Levin 

Hi Sasha,

It doesn't really make sense to take this patch to 4.15 (and 4.14 from
your other mail). The flag is never used there.

In these kernels the flag is dumped to user space based on a carrier
check. See commit 44c9f2f206f8 ("ipv6: Check nexthop flags in route dump
instead of carrier").

Similarly, during route lookup the carrier is checked and not the flag.
See commit 14c5206c2d02 ("ipv6: Check nexthop flags during route lookup
instead of carrier").

Thanks


Re: [PATCH AUTOSEL for 4.15 058/124] ipv6: Set nexthop flags during route creation

2018-03-19 Thread Ido Schimmel
On Mon, Mar 19, 2018 at 03:48:00PM +, Sasha Levin wrote:
> From: Ido Schimmel 
> 
> [ Upstream commit 5609b80a37f69f796548339e675256188b29c17d ]
> 
> It is valid to install routes with a nexthop device that does not have a
> carrier, so we need to make sure they're marked accordingly.
> 
> As explained in the previous patch, host and anycast routes are never
> marked with the 'linkdown' flag.
> 
> Note that reject routes are unaffected, as these use the loopback device
> which always has a carrier.
> 
> Signed-off-by: Ido Schimmel 
> Acked-by: David Ahern 
> Signed-off-by: David S. Miller 
> Signed-off-by: Sasha Levin 

Hi Sasha,

It doesn't really make sense to take this patch to 4.15 (and 4.14 from
your other mail). The flag is never used there.

In these kernels the flag is dumped to user space based on a carrier
check. See commit 44c9f2f206f8 ("ipv6: Check nexthop flags in route dump
instead of carrier").

Similarly, during route lookup the carrier is checked and not the flag.
See commit 14c5206c2d02 ("ipv6: Check nexthop flags during route lookup
instead of carrier").

Thanks