This looks like you are using the default dpl layout (eth-dpl-all.dts
) that allocates resources in the container dprc.1 to use all dpmacs and individually connects them to one dpni each. From this starting point, you won’t have any resources left to define an additional dprc that can be passed into your VM. Thus, you have two options:
- Use restool to dynamically free some of the resources and insert them into a new dprc.
- create your own dpl that creates custom dprcs at boot time. This involves writing your own dts file, compiling it and writing it to the nand. The config for my use case (
eth-dpl-vm-router-app.dts
) and some notes (Readme) can be found here.
Once you have your additional dprc with the needed resources for the guest defined, you can pass them to the VM by adding list dpaa2container 'dprc.X'
to your VM definition in /etc/config/virt
. For reference, I post the definition of my testing VM below. Note how dprc.4 is passed to it (along with a pci and a usb device)
config vm 'testing'
option type 'aarch64'
option cpu 'host'
option memory '1024'
option numprocs '4'
option mac '52:XX:XX:XX:XX:XX'
option kernel '/dev/guests/router-kernel-test'
option append 'earlycon root=/dev/vda console=ttyAMA0,115200 rootwait' ls1088-ext4-img'
list disks '/dev/guests/router-test'
option enable '1'
option provisioned '1'
option ballooning '1'
list pcidevice '0002:01:00.0'
list usbdevice 'vendor=3277,product=178'
list dpaa2container 'dprc.4'