Good question! I’ve been meaning to write this up for the manual.
The best way to do this is to create your own data path layout (DPL) with only the Ethernet ports you need.
The procedure is:
- Flash the ‘eth0 only’ DPL in recovery mode and reboot
- Add the ports you want with
ls-addni
(note, eth0->GE0 is already in there, but you can edit this)
- Compile and flash the new DPL
The process is roughly:
# Download "eth-dpl-eth0-only.dtb" from the firmware package (also available under "components" on our server)
wget https://archive.traverse.com.au/pub/traverse/ls1088firmware/firmware-builds/latest/components/eth-dpl-eth0-only.dtb
mtd erase dpl && mtd write eth-dpl-eth0-only.dtb dpl
reboot
(Alternatively, if your kernel supports restool, you can stop here and just add the ports you want at runtime)
On next boot, go into recovery again, and add the specific ports you want
See DPAA2 configuration in the manual for the DPMAC numbers corresponding to each Ethernet port.
The default order is 7,8,9,10,3,4,5,6,1,2.
ls-addni dpmac.8 #GE1
ls-addni dpmac.9 #GE2
ls-addni dpmac.10 #GE3
ls-addni dpmac.2 # XG0
ls-addni dpmac.1 #XG1
# Dump the new DPL
restool dprc generate-dpl > new-dpl.dts
# Edit the DPL to fix the port ordering (see below)
vi new-dpl.dts
# Compile into a blob (ignore the warnings from dtc, since this not an actual device tree)
dtc < new-dpl.dts > new-dpl.dtb
# Flash
mtd erase dpl && mtd write new-dpl.dtb dpl
# Reboot
Port ordering
Linux will enumerate ethernet ports in reverse order of the network interfaces (DPNI).
To get around this, you want to connect the last DPNI to the first MAC which will become eth0
.
You need to edit the “connection@X” nodes at the bottom of the DPL file.
e.g
connection@1{
endpoint1 = "dpni@5"; /* was dpni@0 */
endpoint2 = "dpmac@7";
};
connection@2{
endpoint1 = "dpni@4"; /* was dpni@1*/
endpoint2 = "dpmac@8";
};
See the source of eth-dpl-all.dts for how it does it.
Future updates
NXP has added features (DPNI_OPT_SHARED_FS) in recent MC firmwares that might allow a full 10 port configuration with better portal balancing. I’ve tried to use it and encountered issues getting the firmware to accept the configuration. I have a enquiry with them open on this and hopefully they will fix that issue soon.