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