diff mbox series

[2/2] octeon: add EdgeRouter Lite specific network config

Message ID 20210108102742.8233-3-foss@volatilesystems.org
State Changes Requested
Headers show
Series [1/2] octeon: rename erlite to ubnt,erlite | expand

Commit Message

Stijn Segers Jan. 8, 2021, 10:27 a.m. UTC
The Ubiquiti EdgeRouter Lite has three network interfaces. Add a
specific match in /etc/board.d/01_network so they all get set up.
Default to eth0 for WAN and an eth1 + eth2 bridge for LAN.

Signed-off-by: Stijn Segers <foss@volatilesystems.org>
---
 target/linux/octeon/base-files/etc/board.d/01_network | 3 +++
 1 file changed, 3 insertions(+)

Comments

Adrian Schmutzler Jan. 8, 2021, 12:30 p.m. UTC | #1
Hi,

> -----Original Message-----
> From: openwrt-devel [mailto:openwrt-devel-bounces@lists.openwrt.org]
> On Behalf Of Stijn Segers
> Sent: Freitag, 8. Januar 2021 11:28
> To: openwrt-devel@lists.openwrt.org
> Subject: [PATCH 2/2] octeon: add EdgeRouter Lite specific network config
> 
> The Ubiquiti EdgeRouter Lite has three network interfaces. Add a specific
> match in /etc/board.d/01_network so they all get set up.
> Default to eth0 for WAN and an eth1 + eth2 bridge for LAN.

Why this particular assignment?

Best

Adrian

> 
> Signed-off-by: Stijn Segers <foss@volatilesystems.org>
> ---
>  target/linux/octeon/base-files/etc/board.d/01_network | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/target/linux/octeon/base-files/etc/board.d/01_network
> b/target/linux/octeon/base-files/etc/board.d/01_network
> index 749d99be1d..4ad5f95598 100755
> --- a/target/linux/octeon/base-files/etc/board.d/01_network
> +++ b/target/linux/octeon/base-files/etc/board.d/01_network
> @@ -14,6 +14,9 @@ itus,shield-router)
>  ubnt,edgerouter-4)
>  	ucidef_set_interfaces_lan_wan "lan1 lan2 lan3" "lan0"
>  	;;
> +ubnt,erlite)
> +	ucidef_set_interfaces_lan_wan "eth1 eth2" "eth0"
> +	;;
>  *)
>  	ucidef_set_interfaces_lan_wan "eth0" "eth1"
>  	;;
> --
> 2.20.1
> 
> 
> _______________________________________________
> openwrt-devel mailing list
> openwrt-devel@lists.openwrt.org
> https://lists.openwrt.org/mailman/listinfo/openwrt-devel
Stijn Segers Jan. 8, 2021, 4:30 p.m. UTC | #2
Hi Adrian,

Op vrijdag 8 januari 2021 om 13u30 schreef Adrian Schmutzler 
<mail@adrianschmutzler.de>:
> Hi,
> 
>>  -----Original Message-----
>>  From: openwrt-devel [mailto:openwrt-devel-bounces@lists.openwrt.org]
>>  On Behalf Of Stijn Segers
>>  Sent: Freitag, 8. Januar 2021 11:28
>>  To: openwrt-devel@lists.openwrt.org
>>  Subject: [PATCH 2/2] octeon: add EdgeRouter Lite specific network 
>> config
>> 
>>  The Ubiquiti EdgeRouter Lite has three network interfaces. Add a 
>> specific
>>  match in /etc/board.d/01_network so they all get set up.
>>  Default to eth0 for WAN and an eth1 + eth2 bridge for LAN.
> 
> Why this particular assignment?


The EdgeRouter 4 (same Octeon target) uses a similar set-up; the PC 
Engines APU has a similar setup as well: 3 Ethernet ports, eth0 being 
set as WAN - see [2].

I can invert it and set eth2 as WAN port, if you'd like. The fallback 
setup for Octeon at this point is just as weird, to set eth0 as LAN 
(which is logical) and eth1 as WAN, and leave other ports unconfigured.

There's no perfect solution, but I think leaving a port unused makes 
even less sense than this.

Stijn

[1] 
https://git.openwrt.org/?p=openwrt/openwrt.git;a=blob;f=target/linux/octeon/base-files/etc/board.d/01_network;h=749d99be1d11802fbc442a11b1d3312b806ea9fb;hb=HEAD
[2] 
https://git.openwrt.org/?p=openwrt/openwrt.git;a=blob;f=target/linux/x86/base-files/etc/board.d/02_network;h=c6e381b946d03887cb941e90db2ccbb2f918fca4;hb=HEAD

> 
> Best
> 
> Adrian
> 
>> 
>>  Signed-off-by: Stijn Segers <foss@volatilesystems.org>
>>  ---
>>   target/linux/octeon/base-files/etc/board.d/01_network | 3 +++
>>   1 file changed, 3 insertions(+)
>> 
>>  diff --git a/target/linux/octeon/base-files/etc/board.d/01_network
>>  b/target/linux/octeon/base-files/etc/board.d/01_network
>>  index 749d99be1d..4ad5f95598 100755
>>  --- a/target/linux/octeon/base-files/etc/board.d/01_network
>>  +++ b/target/linux/octeon/base-files/etc/board.d/01_network
>>  @@ -14,6 +14,9 @@ itus,shield-router)
>>   ubnt,edgerouter-4)
>>   	ucidef_set_interfaces_lan_wan "lan1 lan2 lan3" "lan0"
>>   	;;
>>  +ubnt,erlite)
>>  +	ucidef_set_interfaces_lan_wan "eth1 eth2" "eth0"
>>  +	;;
>>   *)
>>   	ucidef_set_interfaces_lan_wan "eth0" "eth1"
>>   	;;
>>  --
>>  2.20.1
>> 
>> 
>>  _______________________________________________
>>  openwrt-devel mailing list
>>  openwrt-devel@lists.openwrt.org
>>  https://lists.openwrt.org/mailman/listinfo/openwrt-devel
> _______________________________________________
> openwrt-devel mailing list
> openwrt-devel@lists.openwrt.org
> https://lists.openwrt.org/mailman/listinfo/openwrt-devel
Adrian Schmutzler May 23, 2021, 10:04 a.m. UTC | #3
Hi,

> -----Original Message-----
> From: openwrt-devel [mailto:openwrt-devel-bounces@lists.openwrt.org]
> On Behalf Of Stijn Segers
> Sent: Freitag, 8. Januar 2021 17:30
> To: Adrian Schmutzler <mail@adrianschmutzler.de>
> Cc: openwrt-devel@lists.openwrt.org
> Subject: RE: [PATCH 2/2] octeon: add EdgeRouter Lite specific network config
> 
> Hi Adrian,
> 
> Op vrijdag 8 januari 2021 om 13u30 schreef Adrian Schmutzler
> <mail@adrianschmutzler.de>:
> > Hi,
> >
> >>  -----Original Message-----
> >>  From: openwrt-devel [mailto:openwrt-devel-
> bounces@lists.openwrt.org]
> >>  On Behalf Of Stijn Segers
> >>  Sent: Freitag, 8. Januar 2021 11:28
> >>  To: openwrt-devel@lists.openwrt.org
> >>  Subject: [PATCH 2/2] octeon: add EdgeRouter Lite specific network
> >> config
> >>
> >>  The Ubiquiti EdgeRouter Lite has three network interfaces. Add a
> >> specific  match in /etc/board.d/01_network so they all get set up.
> >>  Default to eth0 for WAN and an eth1 + eth2 bridge for LAN.
> >
> > Why this particular assignment?
> 
> 
> The EdgeRouter 4 (same Octeon target) uses a similar set-up; the PC Engines
> APU has a similar setup as well: 3 Ethernet ports, eth0 being set as WAN - see
> [2].
> 
> I can invert it and set eth2 as WAN port, if you'd like. The fallback setup for
> Octeon at this point is just as weird, to set eth0 as LAN (which is logical) and
> eth1 as WAN, and leave other ports unconfigured.
> 
> There's no perfect solution, but I think leaving a port unused makes even less
> sense than this.

Coming back to this old discussion as well.

From the generic config, we have eth1 as WAN port. Changing that to eth0 now could break some existing configurations (though I doubt this will affect many people). So, in order to have all three ports working, I'd prefer:

ucidef_set_interfaces_lan_wan "eth0 eth2" "eth1"

I'm aware this is not nice, but it won't break anything. If you think having eth0 or eth2 as WAN is superior, please prepare a patch where compat_version is set to 1.1 to enforce config wiping. If we decide to stick to eth1 now on the other hand, I'm not really inclined to reorder it again in half a year ...

Best

Adrian

> 
> Stijn
> 
> [1]
> https://git.openwrt.org/?p=openwrt/openwrt.git;a=blob;f=target/linux/oct
> eon/base-
> files/etc/board.d/01_network;h=749d99be1d11802fbc442a11b1d3312b806ea
> 9fb;hb=HEAD
> [2]
> https://git.openwrt.org/?p=openwrt/openwrt.git;a=blob;f=target/linux/x86
> /base-
> files/etc/board.d/02_network;h=c6e381b946d03887cb941e90db2ccbb2f918fc
> a4;hb=HEAD
> 
> >
> > Best
> >
> > Adrian
> >
> >>
> >>  Signed-off-by: Stijn Segers <foss@volatilesystems.org>
> >>  ---
> >>   target/linux/octeon/base-files/etc/board.d/01_network | 3 +++
> >>   1 file changed, 3 insertions(+)
> >>
> >>  diff --git a/target/linux/octeon/base-files/etc/board.d/01_network
> >>  b/target/linux/octeon/base-files/etc/board.d/01_network
> >>  index 749d99be1d..4ad5f95598 100755
> >>  --- a/target/linux/octeon/base-files/etc/board.d/01_network
> >>  +++ b/target/linux/octeon/base-files/etc/board.d/01_network
> >>  @@ -14,6 +14,9 @@ itus,shield-router)
> >>   ubnt,edgerouter-4)
> >>   	ucidef_set_interfaces_lan_wan "lan1 lan2 lan3" "lan0"
> >>   	;;
> >>  +ubnt,erlite)
> >>  +	ucidef_set_interfaces_lan_wan "eth1 eth2" "eth0"
> >>  +	;;
> >>   *)
> >>   	ucidef_set_interfaces_lan_wan "eth0" "eth1"
> >>   	;;
> >>  --
> >>  2.20.1
> >>
> >>
> >>  _______________________________________________
> >>  openwrt-devel mailing list
> >>  openwrt-devel@lists.openwrt.org
> >>  https://lists.openwrt.org/mailman/listinfo/openwrt-devel
> > _______________________________________________
> > openwrt-devel mailing list
> > openwrt-devel@lists.openwrt.org
> > https://lists.openwrt.org/mailman/listinfo/openwrt-devel
> 
> 
> 
> _______________________________________________
> openwrt-devel mailing list
> openwrt-devel@lists.openwrt.org
> https://lists.openwrt.org/mailman/listinfo/openwrt-devel
Adrian Schmutzler May 23, 2021, 10:48 a.m. UTC | #4
Hi again,

> -----Original Message-----
> From: openwrt-devel [mailto:openwrt-devel-bounces@lists.openwrt.org]
> On Behalf Of Adrian Schmutzler
> Sent: Sonntag, 23. Mai 2021 12:05
> To: 'Stijn Segers' <foss@volatilesystems.org>
> Cc: openwrt-devel@lists.openwrt.org
> Subject: RE: [PATCH 2/2] octeon: add EdgeRouter Lite specific network config
> 
> Hi,
> 
> > -----Original Message-----
> > From: openwrt-devel [mailto:openwrt-devel-bounces@lists.openwrt.org]
> > On Behalf Of Stijn Segers
> > Sent: Freitag, 8. Januar 2021 17:30
> > To: Adrian Schmutzler <mail@adrianschmutzler.de>
> > Cc: openwrt-devel@lists.openwrt.org
> > Subject: RE: [PATCH 2/2] octeon: add EdgeRouter Lite specific network
> > config
> >
> > Hi Adrian,
> >
> > Op vrijdag 8 januari 2021 om 13u30 schreef Adrian Schmutzler
> > <mail@adrianschmutzler.de>:
> > > Hi,
> > >
> > >>  -----Original Message-----
> > >>  From: openwrt-devel [mailto:openwrt-devel-
> > bounces@lists.openwrt.org]
> > >>  On Behalf Of Stijn Segers
> > >>  Sent: Freitag, 8. Januar 2021 11:28
> > >>  To: openwrt-devel@lists.openwrt.org
> > >>  Subject: [PATCH 2/2] octeon: add EdgeRouter Lite specific network
> > >> config
> > >>
> > >>  The Ubiquiti EdgeRouter Lite has three network interfaces. Add a
> > >> specific  match in /etc/board.d/01_network so they all get set up.
> > >>  Default to eth0 for WAN and an eth1 + eth2 bridge for LAN.
> > >
> > > Why this particular assignment?
> >
> >
> > The EdgeRouter 4 (same Octeon target) uses a similar set-up; the PC
> > Engines APU has a similar setup as well: 3 Ethernet ports, eth0 being
> > set as WAN - see [2].
> >
> > I can invert it and set eth2 as WAN port, if you'd like. The fallback
> > setup for Octeon at this point is just as weird, to set eth0 as LAN
> > (which is logical) and
> > eth1 as WAN, and leave other ports unconfigured.
> >
> > There's no perfect solution, but I think leaving a port unused makes
> > even less sense than this.
> 
> Coming back to this old discussion as well.
> 
> From the generic config, we have eth1 as WAN port. Changing that to eth0
> now could break some existing configurations (though I doubt this will affect
> many people). So, in order to have all three ports working, I'd prefer:
> 
> ucidef_set_interfaces_lan_wan "eth0 eth2" "eth1"
> 
> I'm aware this is not nice, but it won't break anything. If you think having eth0
> or eth2 as WAN is superior, please prepare a patch where compat_version is
> set to 1.1 to enforce config wiping. If we decide to stick to eth1 now on the
> other hand, I'm not really inclined to reorder it again in half a year ...

Please ignore my previous mail, it's pure nonsense.

board.d will only affect _new_ installations or those which are reset, so existing users are completely irrelevant here as nothing will change for them.

Therefore, just resend your patch (with wan as you wish) bundled with the compatible rename.

Best

Adrian

> 
> Best
> 
> Adrian
> 
> >
> > Stijn
> >
> > [1]
> > https://git.openwrt.org/?p=openwrt/openwrt.git;a=blob;f=target/linux/o
> > ct
> > eon/base-
> >
> files/etc/board.d/01_network;h=749d99be1d11802fbc442a11b1d3312b806ea
> > 9fb;hb=HEAD
> > [2]
> > https://git.openwrt.org/?p=openwrt/openwrt.git;a=blob;f=target/linux/x
> > 86
> > /base-
> >
> files/etc/board.d/02_network;h=c6e381b946d03887cb941e90db2ccbb2f918fc
> > a4;hb=HEAD
> >
> > >
> > > Best
> > >
> > > Adrian
> > >
> > >>
> > >>  Signed-off-by: Stijn Segers <foss@volatilesystems.org>
> > >>  ---
> > >>   target/linux/octeon/base-files/etc/board.d/01_network | 3 +++
> > >>   1 file changed, 3 insertions(+)
> > >>
> > >>  diff --git a/target/linux/octeon/base-files/etc/board.d/01_network
> > >>  b/target/linux/octeon/base-files/etc/board.d/01_network
> > >>  index 749d99be1d..4ad5f95598 100755
> > >>  --- a/target/linux/octeon/base-files/etc/board.d/01_network
> > >>  +++ b/target/linux/octeon/base-files/etc/board.d/01_network
> > >>  @@ -14,6 +14,9 @@ itus,shield-router)
> > >>   ubnt,edgerouter-4)
> > >>   	ucidef_set_interfaces_lan_wan "lan1 lan2 lan3" "lan0"
> > >>   	;;
> > >>  +ubnt,erlite)
> > >>  +	ucidef_set_interfaces_lan_wan "eth1 eth2" "eth0"
> > >>  +	;;
> > >>   *)
> > >>   	ucidef_set_interfaces_lan_wan "eth0" "eth1"
> > >>   	;;
> > >>  --
> > >>  2.20.1
> > >>
> > >>
> > >>  _______________________________________________
> > >>  openwrt-devel mailing list
> > >>  openwrt-devel@lists.openwrt.org
> > >>  https://lists.openwrt.org/mailman/listinfo/openwrt-devel
> > > _______________________________________________
> > > openwrt-devel mailing list
> > > openwrt-devel@lists.openwrt.org
> > > https://lists.openwrt.org/mailman/listinfo/openwrt-devel
> >
> >
> >
> > _______________________________________________
> > openwrt-devel mailing list
> > openwrt-devel@lists.openwrt.org
> > https://lists.openwrt.org/mailman/listinfo/openwrt-devel
diff mbox series

Patch

diff --git a/target/linux/octeon/base-files/etc/board.d/01_network b/target/linux/octeon/base-files/etc/board.d/01_network
index 749d99be1d..4ad5f95598 100755
--- a/target/linux/octeon/base-files/etc/board.d/01_network
+++ b/target/linux/octeon/base-files/etc/board.d/01_network
@@ -14,6 +14,9 @@  itus,shield-router)
 ubnt,edgerouter-4)
 	ucidef_set_interfaces_lan_wan "lan1 lan2 lan3" "lan0"
 	;;
+ubnt,erlite)
+	ucidef_set_interfaces_lan_wan "eth1 eth2" "eth0"
+	;;
 *)
 	ucidef_set_interfaces_lan_wan "eth0" "eth1"
 	;;