[RFC 6/6] qoriq: m300 switchport mac assignment order
Rosen Penev
rosenp at gmail.com
Wed Oct 9 15:18:03 PDT 2024
On Wed, Oct 9, 2024 at 1:20 AM Evan Jobling via openwrt-devel
<openwrt-devel at lists.openwrt.org> wrote:
>
> 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.
>
>
> ---------- Forwarded message ----------
> From: Evan Jobling <evan.jobling at mslsc.com.au>
> To: openwrt-devel <openwrt-devel at lists.openwrt.org>
> Cc:
> Bcc:
> Date: Wed, 9 Oct 2024 19:08:23 +1100
> Subject: [RFC 6/6] qoriq: m300 switchport mac assignment order
> before mac addresses were out of order.
> Now order is correct.
>
> Known issues:
> conduit 0 and conduit 1 have the same MAC as some of the
> switchports.
My opinion is that NVMEM should be used for these assignments.
Only issue is that I have no device to test.
If it doesn't work, either the ethernet driver does not support NVMEM
properly or enet2 and enet3 aliases need removal.
>
> Signed-off-by: Evan Jobling <evan.jobling at mslsc.com.au>
> ---
> target/linux/qoriq/base-files/etc/board.d/02_network | 9 ++++-----
> 1 file changed, 4 insertions(+), 5 deletions(-)
>
> diff --git a/target/linux/qoriq/base-files/etc/board.d/02_network b/target/linux/qoriq/base-files/etc/board.d/02_network
> index 5e2780ea53..d4e534ecbb 100644
> --- a/target/linux/qoriq/base-files/etc/board.d/02_network
> +++ b/target/linux/qoriq/base-files/etc/board.d/02_network
> @@ -43,12 +43,11 @@ watchguard,firebox-m300)
>
> eth_mac_offset=0x186d
>
> - for eth in $(find /sys/class/net/ -name 'eth[3-7]' -print); do
> - device="$(basename "$eth")"
> + for eth in "eth3" "eth4" "eth5" "eth6" "eth7"; do
> mac="$(mtd_get_mac_text wg_cfg0 "$eth_mac_offset")"
> - switchports="$switchports $device"
> - ucidef_set_network_device_mac "$device" "$mac"
> - wg_set_opt_interface "$device" "${device#eth}"
> + switchports="$switchports $eth"
> + ucidef_set_network_device_mac "$eth" "$mac"
> + wg_set_opt_interface "$eth" "${eth#eth}"
> eth_mac_offset=$(printf "0x%X\n" $(( $eth_mac_offset + 0x14)))
> done
>
> --
> 2.39.5
>
>
> _______________________________________________
> openwrt-devel mailing list
> openwrt-devel at lists.openwrt.org
> https://lists.openwrt.org/mailman/listinfo/openwrt-devel
More information about the openwrt-devel
mailing list