On 6/1/2023 8:39 PM, David Marchand wrote:
On Thu, May 25, 2023 at 12:09 PM Nipun Gupta <[email protected]> wrote:
<snip>
@@ -116,6 +141,18 @@ cdx_vfio_unmap_resource_secondary(struct rte_cdx_device *dev) { struct mapped_cdx_resource *vfio_res = NULL; struct mapped_cdx_res_list *vfio_res_list; + int ret, vfio_dev_fd; + + vfio_dev_fd = rte_intr_dev_fd_get(dev->intr_handle); + if (vfio_dev_fd < 0) + return -1; + + ret = rte_vfio_release_device(rte_cdx_get_sysfs_path(), dev->device.name, + vfio_dev_fd); + if (ret < 0) { + CDX_BUS_ERR("Cannot release VFIO device"); + return ret; + } vfio_res_list = RTE_TAILQ_CAST(cdx_vfio_tailq.head, mapped_cdx_res_list); @@ -140,9 +177,80 @@ cdx_vfio_unmap_resource(struct rte_cdx_device *dev) return cdx_vfio_unmap_resource_secondary(dev); } +/* set up interrupt support (but not enable interrupts) */ static int -cdx_rte_vfio_setup_device(int vfio_dev_fd) +cdx_vfio_setup_interrupts(struct rte_cdx_device *dev, int vfio_dev_fd,Why rename this function?
This is actually not renamed. git commit is showing this, because parameters of cdx_rte_vfio_setup_device() has been updated and a new API has also been added cdx_vfio_setup_interrupts(). It shows parameter update as "+cdx_rte_vfio_setup_device()" just after this API code.
Thanks, Nipun

