[PATCH devicetree] arm64: dts: ls1028a-rdb: add more ethernet aliases
Vladimir Oltean
vladimir.oltean at nxp.com
Wed Sep 7 06:07:30 PDT 2022
On Wed, Sep 07, 2022 at 10:56:37AM +0200, Michael Walle wrote:
> > > I think we are on the same track here. I was ignoring any VFs for now.
> > > So I guess, what I'm still missing here is why enet#2 and enet#3 (or
> > > even swp4 and swp5) would need a non-random MAC address. Except from
> > > your example above. Considering the usecase where swp0..3 is one bridge
> > > with eno2 and eno3 being the CPU ports. Then I'd only need a unique
> > > MAC address for eno0, eno1 and swp0, correct?
> >
> > Don't say "unique MAC address for swp0", since swp0's MAC address is not
> > unique, you probably mean to say "a MAC address which will be shared by
> > swp0-swp3".
>
> That I actually don't understand. I have the following addresses after
> booting:
>
> # ip link
> ..
> 4: gbe0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group
> default qlen 1000
> link/ether 00:a0:a5:5c:6b:62 brd ff:ff:ff:ff:ff:ff
> inet 172.16.1.2/24 scope global gbe0
> valid_lft forever preferred_lft forever
> inet6 fe80::2a0:a5ff:fe5c:6b62/64 scope link
> valid_lft forever preferred_lft forever
> 5: gbe1: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default
> qlen 1000
> link/ether 00:a0:a5:5c:6b:63 brd ff:ff:ff:ff:ff:ff
> 6: eno2: <BROADCAST,MULTICAST> mtu 1504 qdisc noop state DOWN group default
> qlen 1000
> link/ether 8e:6c:20:8a:ab:52 brd ff:ff:ff:ff:ff:ff
> 7: eno3: <BROADCAST,MULTICAST> mtu 1504 qdisc noop state DOWN group default
> qlen 1000
> link/ether c6:fd:b1:88:3c:36 brd ff:ff:ff:ff:ff:ff
> 8: swp0 at eno2: <BROADCAST,MULTICAST,M-DOWN> mtu 1500 qdisc noop state DOWN
> group default qlen 1000
> link/ether 00:a0:a5:5c:6b:66 brd ff:ff:ff:ff:ff:ff
> 9: swp1 at eno2: <BROADCAST,MULTICAST,M-DOWN> mtu 1500 qdisc noop state DOWN
> group default qlen 1000
> link/ether 00:a0:a5:5c:6b:67 brd ff:ff:ff:ff:ff:ff
> 10: swp2 at eno2: <BROADCAST,MULTICAST,M-DOWN> mtu 1500 qdisc noop state DOWN
> group default qlen 1000
> link/ether 00:a0:a5:5c:6b:68 brd ff:ff:ff:ff:ff:ff
> 11: swp3 at eno2: <BROADCAST,MULTICAST,M-DOWN> mtu 1500 qdisc noop state DOWN
> group default qlen 1000
> link/ether 00:a0:a5:5c:6b:69 brd ff:ff:ff:ff:ff:ff
>
> gbe0 is eno0 and gbe1 is eno1. So in my case they are unique.
>
> When adding all the ports to a bridge, the bridge gets the lowest MAC.
>
> # ip link add name br0 type bridge
> # ip link set swp0 master br0
> # ip link set swp1 master br0
> # ip link set swp2 master br0
> # ip link set swp3 master br0
>
> 12: br0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT
> group default qlen 1000
> link/ether 00:a0:a5:5c:6b:66 brd ff:ff:ff:ff:ff:ff
>
> Is that what you mean with "a MAC address which will be shared by
> swp0-swp3"?
No, what I'm trying is only to reformulate what you've said, "Then I'd
only need a unique MAC address for eno0, eno1 and swp0". My understanding
of what you mean by "unique address for swp0" is that the addresses for
swp1-swp3 don't matter (hence they can be set to the same address as swp0)
since there will be a bridge that serves as the IP termination point,
with its own MAC address, inherited from the first bridge port, swp0.
But this makes it improper to call it a "unique address for swp0".
More information about the linux-arm-kernel
mailing list