Re: [PATCH 2/3] base-files: failsafe: Start also CPU interface for DSA

2021-06-26 Thread Hauke Mehrtens

On 6/24/21 11:13 PM, Sven Roederer wrote:

Am Sonntag, 20. Juni 2021, 17:11:08 CEST schrieb Hauke Mehrtens:

On 6/20/21 4:30 PM, Sven Roederer wrote:


The Rb750 is DSA, so it seems there is still something wrong. I'll retest
with current master soon, to rule out issues based on 21.02-rc3.

Sven


Hi,

I tried it on a lantiq device with the DSA patches applied and it works
fine.



Hauke,

I found some tme to test and and confirm the this patch-series also fixes the
issue on the RB750Gr3 with DSA.
As it takes much longer till the network is up, in comparison to 19.07, it
seems that I gave up to quickly.

IÄve seen you pushed some updated patch-sets already, so my comment here might
be only for reference.


Hi Sven,

Thanks for reporting back.

These patches should fix networking in failsafe for all targets. I am 
surprised that it takes long till the networking in failsafe works on 
the RB750Gr3 (mt7621), but if it works at all this is already good.


Hauke

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [PATCH 2/3] base-files: failsafe: Start also CPU interface for DSA

2021-06-24 Thread Sven Roederer
Am Sonntag, 20. Juni 2021, 17:11:08 CEST schrieb Hauke Mehrtens:
> On 6/20/21 4:30 PM, Sven Roederer wrote:
> > 
> > The Rb750 is DSA, so it seems there is still something wrong. I'll retest
> > with current master soon, to rule out issues based on 21.02-rc3.
> > 
> > Sven
> 
> Hi,
> 
> I tried it on a lantiq device with the DSA patches applied and it works
> fine.
> 

Hauke,

I found some tme to test and and confirm the this patch-series also fixes the 
issue on the RB750Gr3 with DSA.
As it takes much longer till the network is up, in comparison to 19.07, it 
seems that I gave up to quickly.

IÄve seen you pushed some updated patch-sets already, so my comment here might 
be only for reference.

Sven



___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [PATCH 2/3] base-files: failsafe: Start also CPU interface for DSA

2021-06-21 Thread Rafał Miłecki

On 21.06.2021 16:57, Rafał Miłecki wrote:

On 19.06.2021 20:36, Hauke Mehrtens wrote:

On a DSA switch the ports have an upper device, the CPU device, e.g.
eth0. This device has to be in up state to bring up the lower devices
like lan1.

Parse the link device from "ip link show" and bring it into up stated
before bringing up the actual interface.

This is needed to make network in failsafe on systems with DSA work.

Signed-off-by: Hauke Mehrtens 


Idea behind this patch sounds OK (screen scraping of "ip" maybe a bit less).

The problem is this patch *breaks* network on normal (non-failsafe)
bcm4908 (DSA target) boot. I don't know why. In ifconfig interfaces look
OK. In "brctl show" everything seems fine too.

I've to keep debugging that problem. Meanwhile I'll also try kernel
patch.

This patch doesn't affect (break or fix) bcm53xx with swconfig.


I forgot to tell: it *does* fix failsafe on bcm4908 (DSA target). It
just breaks normal boot network.

I tested kernel commit 9d5ef190e561 ("net: dsa: automatically bring up
DSA master when opening user port") and it breaks by network on bcm4908
just the same. So maybe it's some kernel / b53 / bcm4908enet bug. I'll
keep debugging that.

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [PATCH 2/3] base-files: failsafe: Start also CPU interface for DSA

2021-06-21 Thread Rafał Miłecki

On 19.06.2021 20:36, Hauke Mehrtens wrote:

On a DSA switch the ports have an upper device, the CPU device, e.g.
eth0. This device has to be in up state to bring up the lower devices
like lan1.

Parse the link device from "ip link show" and bring it into up stated
before bringing up the actual interface.

This is needed to make network in failsafe on systems with DSA work.

Signed-off-by: Hauke Mehrtens 


Idea behind this patch sounds OK (screen scraping of "ip" maybe a bit less).

The problem is this patch *breaks* network on normal (non-failsafe)
bcm4908 (DSA target) boot. I don't know why. In ifconfig interfaces look
OK. In "brctl show" everything seems fine too.

I've to keep debugging that problem. Meanwhile I'll also try kernel
patch.

This patch doesn't affect (break or fix) bcm53xx with swconfig.

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [PATCH 2/3] base-files: failsafe: Start also CPU interface for DSA

2021-06-20 Thread Hauke Mehrtens

On 6/20/21 10:32 AM, DENG Qingfang wrote:

On Sat, Jun 19, 2021 at 08:36:10PM +0200, Hauke Mehrtens wrote:

On a DSA switch the ports have an upper device, the CPU device, e.g.
eth0. This device has to be in up state to bring up the lower devices
like lan1.

Parse the link device from "ip link show" and bring it into up stated
before bringing up the actual interface.

This is needed to make network in failsafe on systems with DSA work.



Hi Hauke,

You may instead backport the upstream commit 9d5ef190e561
("net: dsa: automatically bring up DSA master when opening user port").


Thanks for the hint, I was not aware of this patch.

I tried this kernel patch and it works good without my script patch, I 
anyway do not like the parsing of the "ip link show" output.


I would prefer to just backport this kernel patch instead, it applies 
without problems.


Hauke

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [PATCH 2/3] base-files: failsafe: Start also CPU interface for DSA

2021-06-20 Thread Hauke Mehrtens

On 6/20/21 4:30 PM, Sven Roederer wrote:

Am Samstag, 19. Juni 2021, 20:36:10 CEST schrieb Hauke Mehrtens:

On a DSA switch the ports have an upper device, the CPU device, e.g.
eth0. This device has to be in up state to bring up the lower devices
like lan1.

Parse the link device from "ip link show" and bring it into up stated
before bringing up the actual interface.

This is needed to make network in failsafe on systems with DSA work.



Hauke,

I tested you patches on the Mikrotik RB750Gr3 and WDR3600 (as I did in
FS#3866), this time with customized IP-adresses and patches applied to
OpenWrt-21.02.
For the WDR3600 the issue was fixed, but for the RB750 there is no network.
I was not able to usr IPv6 link-local, OpenWrt default 192.168.1.1 or my
custom IP-Address.

The Rb750 is DSA, so it seems there is still something wrong. I'll retest with
current master soon, to rule out issues based on 21.02-rc3.

Sven


Hi,

I tried it on a lantiq device with the DSA patches applied and it works 
fine.


Could you please share the content of this file: /tmp/board.json
and the output of "ip addr" while in failsafe on a broken device please.

You need all 3 patches and I am not aware of a difference between master 
and 21.02 in this area, but I only tried it on top of master.


Hauke

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [PATCH 2/3] base-files: failsafe: Start also CPU interface for DSA

2021-06-20 Thread Martin Blumenstingl via openwrt-devel
The sender domain has a DMARC Reject/Quarantine policy which disallows
sending mailing list messages using the original "From" header.

To mitigate this problem, the original message has been wrapped
automatically by the mailing list software.--- Begin Message ---
On Sat, Jun 19, 2021 at 8:39 PM Hauke Mehrtens  wrote:
>
> On a DSA switch the ports have an upper device, the CPU device, e.g.
> eth0. This device has to be in up state to bring up the lower devices
> like lan1.
>
> Parse the link device from "ip link show" and bring it into up stated
> before bringing up the actual interface.
>
> This is needed to make network in failsafe on systems with DSA work.
>
> Signed-off-by: Hauke Mehrtens 
if you're keeping this patch instead of going with the backport you can add my:
Tested-by: Martin Blumenstingl  #
BT Home Hub 5A with DSA patches

--- End Message ---
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [PATCH 2/3] base-files: failsafe: Start also CPU interface for DSA

2021-06-20 Thread Sven Roederer
Am Samstag, 19. Juni 2021, 20:36:10 CEST schrieb Hauke Mehrtens:
> On a DSA switch the ports have an upper device, the CPU device, e.g.
> eth0. This device has to be in up state to bring up the lower devices
> like lan1.
> 
> Parse the link device from "ip link show" and bring it into up stated
> before bringing up the actual interface.
> 
> This is needed to make network in failsafe on systems with DSA work.
> 

Hauke, 

I tested you patches on the Mikrotik RB750Gr3 and WDR3600 (as I did in 
FS#3866), this time with customized IP-adresses and patches applied to 
OpenWrt-21.02.
For the WDR3600 the issue was fixed, but for the RB750 there is no network.
I was not able to usr IPv6 link-local, OpenWrt default 192.168.1.1 or my 
custom IP-Address.

The Rb750 is DSA, so it seems there is still something wrong. I'll retest with 
current master soon, to rule out issues based on 21.02-rc3.

Sven



___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [PATCH 2/3] base-files: failsafe: Start also CPU interface for DSA

2021-06-20 Thread DENG Qingfang
On Sat, Jun 19, 2021 at 08:36:10PM +0200, Hauke Mehrtens wrote:
> On a DSA switch the ports have an upper device, the CPU device, e.g.
> eth0. This device has to be in up state to bring up the lower devices
> like lan1.
> 
> Parse the link device from "ip link show" and bring it into up stated
> before bringing up the actual interface.
> 
> This is needed to make network in failsafe on systems with DSA work.


Hi Hauke,

You may instead backport the upstream commit 9d5ef190e561
("net: dsa: automatically bring up DSA master when opening user port").

> 
> Signed-off-by: Hauke Mehrtens 
> ---
>  package/base-files/files/lib/preinit/10_indicate_preinit | 6 ++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/package/base-files/files/lib/preinit/10_indicate_preinit 
> b/package/base-files/files/lib/preinit/10_indicate_preinit
> index ae9fcfecc89e..a3bc289dd663 100644
> --- a/package/base-files/files/lib/preinit/10_indicate_preinit
> +++ b/package/base-files/files/lib/preinit/10_indicate_preinit
> @@ -12,6 +12,12 @@ preinit_ip_config() {
>   fi
>  
>   grep -q "$netdev" /proc/net/dev || return
> + 
> + # Get the link interface e.g. eth0 in lan1@eth0
> + iflink=$(ip link show dev ${netdev} |sed -nr 's/.*@([a-zA-Z0-9]*): 
> .*/\1/p')
> + if [ -n "$iflink" ]; then
> + ip link set dev $iflink up
> + fi
>  
>   if [ -n "$vid" ]; then
>   ip link add link $netdev name $1 type vlan id $vid

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel