Hi, yiping
Thanks for your answers about restool, I have a few questions want to check with you.
For example create/destroy dpbp object.
[root@TinyLSDK ~]$ restool dpbp create
dpbp.3 is created under dprc.1
[root@TinyLSDK ~]$ restool dprc assign dprc.1 --object=dpbp.3 --plugged=1
[ 943.367016] iommu: Adding device dpbp.3 to group 0
[root@TinyLSDK ~]$ echo dpbp.3 > /sys/bus/fsl-mc/drivers/fsl_mc_allocator/unbind
[root@TinyLSDK ~]$ restool dpbp destroy dpbp.3
dpbp.3 is destroyed
[ 1084.731149] iommu: Removing device dpbp.3 from group 0
[root@TinyLSDK ~]$
I know dprc-driver.c file set interrupt (dprc_setup_irq), when create a dpbp object, dprc trigger interrupt, load fsl-mc-allocator driver.
So when destroy a dpbp object, need to unload driver first, the echo dpbp.3 > /sys/bus/fsl-mc/drivers/fsl_mc_allocator/unbind is used to unload dpbp driver, right?
Create dpbp object, need execute two commands :restool dpbp create and restool dprc assign dprc.1 --object=dpbp.3 --plugged=1
Does the restool dprc assign dprc.1 --object=dpbp.3 --plugged=1 use to trigger interrupt and load driver?
I test on vxworks that only execute restool dpbp create , also can trigger dprc interrupt and load driver, so what does the command(restool dprc assign dprc.1 --object=dpbp.3 --plugged=1) really do?
I see function fsl_mc_allocator_remove()used to remove mc device from the resource pool, that is unload the dpbp driver, remove dpbp device from system.
Why not use restool dprc unassign dprc.1 –object=dpbp.3, remove dpbp object from dprc.1?
Can you explain the command about cmd_dprc_assign and cmd_dprc_unassign?
I see script provide ls-addni dpmac.3 to enable a MAC interface, this command call restool to create dpbp, dpcon, dpmcp, dpni etc objects, and connect dpmac to dpni.
Do you have commnd to disable the MAC interface which will destroy the objects which are created in ls-addni, disconnect dpmac and dpni? So we don’t need to destroy every object respectively?