In Linux, only one MAC is created by default as a standard kernel Ethernet interface. This interface is named eth0 by default (or eth1 if PCI Express network interface card is discovered first). The following figure shows the Ethernet port (ETH8) that eth0 (or eth1) corresponds to, on LS1088ARDB.
The following figure shows the Ethernet port (DPMAC5) that eth0 (or eth1) corresponds to, on LS1088ARDB-PB.
Only one interface is created by default because in DPAA2, Ethernet ports need not be associated with Linux kernel Ethernet driver instances. For example, Ethernet ports can be assigned as ports on switches or can be allocated to user space. Furthermore, these associations can be made dynamically.
From Linux, you can list the available interfaces using the ifconfig -a command or the ip link command.
$ ip link
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: eth0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop qlen 1000
link/ether 68:05:ca:36:96:6a brd ff:ff:ff:ff:ff:ff
3: sit0@NONE: <NOARP> mtu 1480 qdisc noop qlen 1000
link/sit 0.0.0.0 brd 0.0.0.0
4: eth1: <BROADCAST,MULTICAST> mtu 1500 qdisc noop qlen 1000
link/ether 6e:01:3f:a2:04:b6 brd ff:ff:ff:ff:ff:ff
In this example, Linux eth1 corresponds to Ethernet port DPMAC5 (ETH8) on LS1088ARDB.
dprc.1/dpni.0 (interface: eth1, end point: dpmac.5)
The default interface DPNI.0 is configured with a minimal set of resources.
For example, it can only receive traffic on GPP0 and its intended uses are network boot and low-bandwidth traffic.
For fully-featured DPNI objects, dynamic configuration (explained in upcoming steps) is recommended.
$ echo dpni.0 > /sys/bus/fsl-mc/drivers/fsl_dpaa2_eth/unbind
$ restool dpni destroy dpni.0
dpni.0 is destroyedThe restool utility is a Linux user space command that allows DPAA2 objects to be managed (created, destroyed, and queried for status).
Add new network interfaces using Layerscape script ls-addni.
$ ls-addni dpmac.3
Created interface: eth1 (object:dpni.0, endpoint: dpmac.3)
$ ls-addni dpmac.4
Created interface: eth2 (object:dpni.1, endpoint: dpmac.4)
Check that new interfaces are created using the ifconfig -a or ip link command.
ifconfig eth1 192.168.1.23 up
ifconfig eth2 192.168.1.24 up
DPL file is used to create DPAA2 entities prior to Linux boot.
To save the current configuration to a DPL file, follow the steps below. After creating the custom DPL, you can program it to the boot source (for example, QSPI NOR flash or SD card) so that the configuration is present automatically next time Linux boots. In this case, the existing DPL is replaced with the updated DPL file.
Save this custom configuration to a DPL file (.dts format) on the board.$ restool dprc generate-dpl dprc.1 > <my_dpl>.dts
Copy the DPL file to the Linux host machine. You can SCP the file from the board to the Linux host machine.
Run following command to convert it to the .dtb format.
$ dtc -I dts -O dtb <my_dpl>.dts -o <my_dpl>.dtb
For steps to program the new DPL file in the QSPI NOR flash or on the SD card, see LS1088ARDB - How to update MC firmware, DPC, and DPL images in QSPI NOR flash or LS1088ARDB/LS1088ARDB-PB - How to update MC firmware, DPC, and DPL images on SD card.