[dpdk-dev] [PATCH v2] app/testpmd: fix pmd_test_exit function for vdevs

Matan Azrad matan at mellanox.com
Fri May 18 17:55:36 CEST 2018


Hi all

While this patch also applied I don't understand it.
Is it mandatory for each PMD to free all its resources in dev_close()?
Or it should be done by the rte_device remove function?

If the resource cleanup should be done by the remove function I think it
should be called for all the devices (pci, vdev, etc).

Is there an exit function for EAL to clean rte_eal_init()? If no, looks like we need it...
 
From:  Ferruh Yigit
> 
> On 5/18/2018 11:18 AM, Iremonger, Bernard wrote:
> > Hi Ferruh, Zhiyong,
> >
> > <snip>
> >
> >>> Subject: [PATCH v2] app/testpmd: fix pmd_test_exit function for
> >>> vdevs
> >>>
> >>> For vdev, just calling rte_eth_dev_close() isn't enough to free all
> >>> the resources allocated during device probe, e.g. for virtio-user,
> >>> virtio_user_pmd_remove(), i.e. the remove() method of a vdev driver,
> >>> needs to be called to unlink the socket file created during device
> >>> probe. So this patch calls the rte_eth_dev_detach() for vdev when
> >>> quitting testpmd.
> >>>
> >>> Cc: maxime.coquelin at redhat.com
> >>> Cc: ferruh.yigit at intel.com
> >>> Cc: tiwei.bie at intel.com
> >>> Cc: lei.a.yao at intel.com
> >>> Cc: bernard.iremonger at intel.com
> >>> Cc: stable at dpdk.org
> >>>
> >>> Fixes: af75078fece3 ("first public release")
> >>> Fixes: bd8f50a45d0f ("net/virtio-user: support server mode")
> >>>
> >>> Signed-off-by: Zhiyong Yang <zhiyong.yang at intel.com>
> >> Tested-by: Lei Yao<lei.a.yao at intel.com> This patch pass the test for
> >> virtio-user server mode. The socket file can be deleted after quit
> >> testpmd.
> >
> > Acked-by: Bernard Iremonger <bernard.iremonger at intel.com>
> 
> Applied to dpdk-next-net/master, thanks.
> 
> 
> > Check-git-log is showing some errors:
> >
> > ./devtools/check-git-log.sh -1
> > Wrong headline format:
> >         app/testpmd: fix pmd_test_exit function for vdevs Wrong tag:
> >         Tested-by: Lei Yao<lei.a.yao at intel.com>
> 
> fixed while applying.


More information about the dev mailing list