This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TDA4VM: I want to use a VM board with switch attribute under the native driver

Part Number: TDA4VM

Hi, TI experts

The version I am using is sdk-rtos-j721e-evm-08_06_00,TDA4VM board.

I use a VM board to load the k3-j721e-quad-port-eth-exp.dts device tree file

Then run the script file muti_test.sh

ifconfig eth5 down
ifconfig eth2 down
ifconfig eth3 down
ifconfig eth4 down

ethtool --set-priv-flags eth2 p0-rx-ptype-rrobin off
ethtool --set-priv-flags eth3 p0-rx-ptype-rrobin off
ethtool --set-priv-flags eth4 p0-rx-ptype-rrobin off
ethtool --set-priv-flags eth5 p0-rx-ptype-rrobin off
devlink dev param set platform/c000000.ethernet name switch_mode value true cmode runtime

ip link set dev eth4 up
ip link set dev eth3 up
ip link set dev eth2 up
ip link set dev eth5 up

After executing the command, I found that the network port ping is not working, and I cannot see any information using tcpdump.

May I ask if the VM board supports the switch function under the native driver? If supported, how should I configure it

Regards, Albert

  • Hi Albert,

    You have to create a bridge interface with switch-port interfaces as its daughter interfaces. You would be able to use switch functionality after that.

    See this documentation for more details

    Regards,
    Tanmay

  • Hi Tanmay,

    But if implemented through a network bridge, the functions of vlan cannot be used. How to solve this problem.

    Additionally, when I execute the "devlink dev param set platform/c000000.ethernet  name switch_mode value true cmode runtime" command, the network port cannot be pinged

    Regards, Albert

  • Hi Ablert,

    You should run all these commands to create a bridge interface with 4 interfaces as daughter interfaces:

    devlink dev param set platform/c000000.ethernet \
    name switch_mode value true cmode runtime
    
    ip link add name br0 type bridge
    ip link set dev br0 type bridge ageing_time 1000
    ip link set dev eth1 up
    ip link set dev eth2 up
    ip link set dev eth3 up
    ip link set dev eth4 up
    ip link set dev eth1 master br0
    ip link set dev eth2 master br0
    ip link set dev eth3 master br0
    ip link set dev eth4 master br0
    
    ip link set dev br0 type bridge vlan_filtering 1
    
    bridge vlan add dev br0 vid 1 pvid untagged self

    After this, you should see a br0 interface in ifconfig output. Assign a static IP to this interface and using `ifconfig br0 <IP address>`. Now you will able to ping to this MAC address from any of the external interfaces.

    To add VLAN (VLAN 100 in this case) to bridge interfaces, use the following commands:

    bridge vlan add dev eth1 vid 100 master
    bridge vlan add dev eth2 vid 100 master
    bridge vlan add dev eth3 vid 100 master
    bridge vlan add dev eth4 vid 100 master
    bridge vlan add dev br0 vid 100 tagged self
    ip link add link br0 name br0.100 type vlan id 100

    The you can assign IP to br0.100 and use it as a VLAN 100 interface.

    Regards,
    Tanmay