[dpdk-dev] [PATCH v8 02/12] eal: Close file descriptor of uio configuration
David Marchand
david.marchand at 6wind.com
Tue Jul 7 10:04:17 CEST 2015
On Mon, Jul 6, 2015 at 8:24 AM, Tetsuya Mukawa <mukawa at igel.co.jp> wrote:
> From: "Tetsuya.Mukawa" <mukawa at 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 at igel.co.jp>
> Acked-by: Stephen Hemminger <stephen at networkplumber.org>
> ---
> lib/librte_eal/linuxapp/eal/eal_pci_uio.c | 6 +++++-
> 1 file changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/lib/librte_eal/linuxapp/eal/eal_pci_uio.c
> b/lib/librte_eal/linuxapp/eal/eal_pci_uio.c
> index 5915a84..37dc936 100644
> --- a/lib/librte_eal/linuxapp/eal/eal_pci_uio.c
> +++ b/lib/librte_eal/linuxapp/eal/eal_pci_uio.c
> @@ -465,8 +465,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 */
> --
> 2.1.4
>
>
Acked-by: David Marchand <david.marchand at 6wind.com>
--
David Marchand
More information about the dev
mailing list