[dpdk-dev,v6,2/5] eal: Close file descriptor of uio configuration
Commit Message
From: "Tetsuya.Mukawa" <mukawa@igel.co.jp>
When pci_uio_unmap_resource() is called, a file descriptor that is used
for uio configuration should be closed.
Signed-off-by: Tetsuya Mukawa <mukawa@igel.co.jp>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
---
lib/librte_eal/linuxapp/eal/eal_pci_uio.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
Comments
> -----Original Message-----
> From: Tetsuya Mukawa [mailto:mukawa@igel.co.jp]
> Sent: Friday, June 26, 2015 9:18 AM
> To: dev@dpdk.org
> Cc: Iremonger, Bernard; david.marchand@6wind.com; Tetsuya.Mukawa
> Subject: [PATCH v6 2/5] eal: Close file descriptor of uio configuration
>
> From: "Tetsuya.Mukawa" <mukawa@igel.co.jp>
>
> When pci_uio_unmap_resource() is called, a file descriptor that is used for
> uio configuration should be closed.
>
> Signed-off-by: Tetsuya Mukawa <mukawa@igel.co.jp>
> Acked-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Bernard Iremonger <bernard.iremonger@intel.com>
@@ -464,8 +464,12 @@ pci_uio_unmap_resource(struct rte_pci_device *dev)
/* close fd if in primary process */
close(dev->intr_handle.fd);
-
dev->intr_handle.fd = -1;
+
+ /* close cfg_fd if in primary process */
+ close(dev->intr_handle.uio_cfg_fd);
+ dev->intr_handle.uio_cfg_fd = -1;
+
dev->intr_handle.type = RTE_INTR_HANDLE_UNKNOWN;
}
#endif /* RTE_LIBRTE_EAL_HOTPLUG */