TI中文支持网
TI专业的中文技术问题搜集分享网站

AM6422: change ethernet to switch mode

Part Number:AM6422

Is there a way just change DTS file to  achieve switch mode?

we want to use netifd.service to config our bridge and ip address, the devlink command seems doesn't work after run netifd service.

Lydia:

Hi ,

We'll get back to you later after the investigation.

,

Lydia:

Hi,

Cathy Liu 说: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?

Cathy Liu 说: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

CPSW Ethernet: https://software-dl.ti.com/processor-sdk-linux/esd/AM64X/latest/exports/docs/linux/Foundational_Components/Kernel/Kernel_Drivers/Network/CPSW3g.html#multi-port-switch-mode

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

,

Cathy Liu:

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.

,

Cathy Liu:

By the way, I try to cancel the uci network config, reboot the machine, and run the script below, it works.

#!/bin/baship 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.

,

Lydia:

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.

赞(0)
未经允许不得转载:TI中文支持网 » AM6422: change ethernet to switch mode
分享到: 更多 (0)