AnsweredAssumed Answered

Switch port on nxp-ls1028 board ping remote port failed

Question asked by Tang zhantao on May 13, 2020
Latest reply on May 17, 2020 by Tang zhantao

Hi experts,

 

I got failure when I test switch port on ls1028 board by ping a enetc port on another ls1028 board. 

I did the test following the steps of "8.6.3 Felix Linux switch driver" of LSDK19.09,  the board configs as follows:

 

On board--1:

  

# Create switch namespace
ip netns add swns

# Create switch device in net namespace
ip netns exec swns ip link add name switch type bridge
ip netns exec swns ip link set switch up

# Configure switch ports
# * set MAC address
# * bring up interface
# * move net device into the switch net namespace
# * set switch device as master
swps=($(ls /sys/bus/pci/devices/0000:00:00.5/net/))
nr=${#swps[@]}

ip link set eth3 netns swns
ip link set eth4 netns swns
ip link set eth5 netns swns
ip link set eth6 netns swns
ip link set eth7 netns swns
ip link set eth8 netns swns

ip netns exec swns ip link set eth3 master switch
ip netns exec swns ip link set eth3 up
ip netns exec swns ip link set eth4 master switch
ip netns exec swns ip link set eth4 up
ip netns exec swns ip link set eth5 master switch
ip netns exec swns ip link set eth5 up
ip netns exec swns ip link set eth6 master switch
ip netns exec swns ip link set eth6 up
ip netns exec swns ip link set eth7 master switch
ip netns exec swns ip link set eth7 up
ip netns exec swns ip link set eth8 master switch
ip netns exec swns ip link set eth8 up

# bring up ENETC ports connected to switch ports
enetc2=$(ls /sys/bus/pci/devices/0000:00:00.2/net/)
ip link set eth1 up

# move ENETC port connected to switch CPU port in switch ns
enetc3=$(ls /sys/bus/pci/devices/0000:00:00.6/net/)
ip link set eth2 netns swns
ip netns exec swns ip link set eth2 up

# Check configuration
ip netns exec swns bridge link show

# config switch ip
ip netns exec swns ip addr add 192.168.2.1/24 dev switch
ip netns exec swns ip addr show dev switch

# config eth1 ip
ifconfig eth1 192.168.2.3/24

 

 

On board -- 2:

 

ifconfig eth0 192.168.2.2/24

 

 

The up two boards are directly connected by network cable, without any other net cables. The board -- 2 enables the enetc port eth0 which connected to the switch port eth3 on board -- 1.

 

Could you please help to check this issue?

And could you help to give a test log copy of switch verification?

 

Thanks,

Zhantao

Outcomes