Hi,
we want to use netifd.service to config our bridge and ip address, the devlink command seems doesn't work after run netifd service.
Can you point me to what specific devlink command is not working and what the log is showing when this devlink command is used?
What SDK version is the customer using?
Is this on a custom designed board or a TI AM64x EVM?
Is there a way just change DTS file to achieve switch mode?
Is configuring switch mode for PRU_ICSSG Ethernet interfaces or CPSW Ethernet interfaces?
Please note with the latest SDK, a DTS configuration is not necessary to configure switch mode, see below
PRU_ICSSG Ethernet: https://software-dl.ti.com/processor-sdk-linux/esd/AM64X/latest/exports/docs/linux/Foundational_Components/PRU-ICSS/Linux_Drivers/PRU_ICSSG_Ethernet_Switch.html
I am using TI AM64x EVM, I want to cofigure switch mode on CPSW ethernet interfaces.
In emac-only mode, we config ethernet by using /etc/config/network:
config interface 'lan' option type 'bridge' option ifname 'eth0 eth1' option proto 'static' option ipaddr '192.168.1.101' #option gateway '172.16.88.1' option netmask '255.255.255.0' option ip6assign '60' option stp '1' option rstp '1'
but when I convert it to switch mode by run command:
devlink dev param set platform/8000000.ethernet name switch_mode value true cmode runtime
the log shows:
but the ethernet doesn't work.
I would be really appreciate if you have any suggestions, thank you.
By the way, I try to cancel the uci network config, reboot the machine, and run the script below, it works.
#!/bin/bash ip link set dev eth0 down ip link set dev eth1 down sleep 1 ip link set dev eth0 up ip link set dev eth1 up sleep 2 devlink dev param set platform/8000000.ethernet name switch_mode value true cmode runtime sleep 1 ip link add name br0 type bridge ip link set dev br0 type bridge ageing_time 1000 sleep 1 ip link set dev eth0 master br0 ip link set dev eth1 master br0 ip link set dev br0 type bridge stp_state 1 ip link set dev br0 up bridge vlan add dev br0 vid 1 self bridge vlan add dev br0 vid 1 pvid untagged self #udhcpc -i br0 ip addr add 192.168.1.101/24 dev br0
But I can't run this script every time, I still want to use uci to config my network,
Maybe it has some thing to do in the order of running devlink and netifd.service, maybe the uci config should add something, I don't know.
Hi,
Thanks for sharing the response,
I have post your question to English forum, the engineer would like to communicate with you directly, please communicate directly with the engineer through the link below,
e2e.ti.com/.../am6422-change-ethernet-to-switch-mode
I will close this thread.