Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Create DPAA2 container with passed through Ethernet MAC
#!/bin/sh
DPMAC="dpmac.3"
DPRC=$(restool -s dprc create dprc.1 --label="child VM dprc" \
--options="DPRC_CFG_OPT_IRQ_CFG_ALLOWED,DPRC_CFG_OPT_SPAWN_ALLOWED,DPRC_CFG_OPT_ALLOC_ALLOWED,DPRC_CFG_OPT_OBJ_CREATE_ALLOWED")
DPNI=$(restool -s dpni create --container="${DPRC}")
restool dprc connect dprc.1 --endpoint1="${DPMAC}" --endpoint2="${DPNI}"
restool dprc assign "${DPRC}" --object="${DPNI}" --plugged=1
DPBP=$(restool -s dpbp create --container="${DPRC}")
restool dprc assign "${DPRC}" --object="${DPBP}" --plugged=1
DPCI=$(restool -s dpci create --container="${DPRC}")
restool dprc assign "${DPRC}" --object="${DPCI}" --plugged=1
for i in $(seq 1 2); do
THIS_DPMCP=$(restool -s dpmcp create --container="${DPRC}")
restool dprc assign "${DPRC}" --object="${THIS_DPMCP}" --plugged=1
done
for i in $(seq 1 2); do
THIS_DPCON=$(restool -s dpcon create --container="${DPRC}" --num-priorities=2)
restool dprc assign "${DPRC}" --object="${THIS_DPCON}" --plugged=1
done
DPIO=$(restool -s dpio create --container="${DPRC}" --num-priorities=2)
restool dprc assign "${DPRC}" --object="${DPIO}" --plugged=1
restool dprc show "${DPRC}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment