ls12028ardb l2switch issue

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

ls12028ardb l2switch issue

730 Views
pjw
Contributor II

Hi, I'm testing custom boards with ls1028ardb.

What is currently being tested is the l2switch part.
Part 4.1.12.3.2 of LS1028A_BSPv02_Rev0.
Now, on the custom board,
eno0 / eno2 / switch / swp0 / swp1 / swp2 is available.

The test method is as follows.

1. Complete the ENETC interface sh file as manual and execute the file.
2. ip addr add 192.168.2.1/24 dev switch
3. Connect swp0 and laptop by wlan (Note that laptop ip is designated as 192.168.2.2)

The ---> problem is this part.
Ping 192.168.2.1 on the laptop to activate.
However, ping 192.168.2.2.2 on the board does not work.

Then, after designating the ip of swp0 as 192.168.2.3, ping 192.168.2.3 on the laptop gives the signal.
However, ping 192.168.2.2.2 shall not be tested on the board.


Is this how it works?
As far as I understand, in L2Switch mode, the board acts as a hub, so I understood that the hosts are connected.
Therefore, I understood that communication should be possible if each host pc is connected to swp0/swp1/swp2 and the ip is set to 192.168.2.xxx.

If not, is another way necessary?

0 Kudos
1 Reply

704 Views
yipingwang
NXP TechSupport
NXP TechSupport

Please refer to the following log captured on LS1028ARDB.

# cat enetc_switch_cpu_port_without_bridge_switchdev.sh

#!/bin/bash
#
# Simple switch configuration without bridge
# Assume both ENETC and Felix drivers are already loaded

MAC_ROOT=bc:8d:bf:7c:5b
#swpip=192.168

# Configure switch ports
swps=($(ls /sys/bus/pci/devices/0000:00:00.5/net/))
let nr=${#swps[@]}
for (( i=0; i<$nr; i++ ))
do
#ip link set ${swps[$i]} address $MAC_ROOT:$(echo "${swps[$i]}" | tr -dc '0-9')
#ip addr add ${swpip}.${i}.1/24 dev ${swps[$i]}
ip link set ${swps[$i]} up
done
# bring up ENETC switch port
seth=$(ls /sys/bus/pci/devices/0000:00:00.6/net/)
ip link set $seth up

 

root@ls1028ardb:~# bash +x enetc_switch_cpu_port_without_bridge_switchdev.sh
root@ls1028ardb:~# ifconfig swp0 down
root@ls1028ardb:~# ifconfig swp0 100.1.1.29 netmask 255.255.255.0
root@ls1028ardb:~# ifconfig swp0 up
root@ls1028ardb:~# ping -c 5 -s 1 100.1.1.1
PING 100.1.1.1 (100.1.1.1) 1(29) bytes of data.
9 bytes from 100.1.1.1: icmp_seq=1 ttl=64
9 bytes from 100.1.1.1: icmp_seq=2 ttl=64
9 bytes from 100.1.1.1: icmp_seq=3 ttl=64
9 bytes from 100.1.1.1: icmp_seq=4 ttl=64
9 bytes from 100.1.1.1: icmp_seq=5 ttl=64

0 Kudos