[dpdk-stable] patch 'igb_uio: issue FLR during open and release of device file' has been queued to LTS release 16.11.9

Luca Boccassi bluca at debian.org
Thu Nov 8 19:16:25 CET 2018


On Thu, 2018-11-08 at 18:01 +0000, Luca Boccassi wrote:
> Hi,
> 
> FYI, your patch has been queued to LTS release 16.11.9
> 
> Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
> It will be pushed if I get no objections before 11/10/18. So please
> shout if anyone has objections.
> 
> Also note that after the patch there's a diff of the upstream commit
> vs the patch applied
> to the branch. If the code is different (ie: not only metadata
> diffs), due for example to
> a change in context or macro names, please double check it.
> 
> Thanks.
> 
> Luca Boccassi
> 
> ---
> From 11bb826270d6feb3e810aec77a9252cf65b559a9 Mon Sep 17 00:00:00
> 2001
> From: Shijith Thotton <shijith.thotton at caviumnetworks.com>
> Date: Fri, 7 Jul 2017 16:43:51 +0530
> Subject: [PATCH] igb_uio: issue FLR during open and release of device
> file
> 
> [ upstream commit b58eedfc7dd57eef6d12e2c654a52c834f36084a ]
> 
> Set UIO info device file operations open and release. Call pci reset
> function inside open and release to clear device state at start and
> end.
> Copied this behaviour from vfio_pci kernel module code. With this
> patch,
> it is not mandatory to issue FLR by PMD's during init and close.
> 
> Bus master enable and disable are added in open and release
> respectively
> to take care of device DMA.
> 
> Signed-off-by: Shijith Thotton <shijith.thotton at caviumnetworks.com>
> Reviewed-by: Jianfeng Tan <jianfeng.tan at intel.com>
> Acked-by: Ferruh Yigit <ferruh.yigit at intel.com>
> Acked-by: Gregory Etelson <gregory at weka.io>
> ---
>  lib/librte_eal/linuxapp/igb_uio/igb_uio.c | 33
> +++++++++++++++++++++++
>  1 file changed, 33 insertions(+)
> 
> diff --git a/lib/librte_eal/linuxapp/igb_uio/igb_uio.c
> b/lib/librte_eal/linuxapp/igb_uio/igb_uio.c
> index 9f00f07ab..4be89ef86 100644
> --- a/lib/librte_eal/linuxapp/igb_uio/igb_uio.c
> +++ b/lib/librte_eal/linuxapp/igb_uio/igb_uio.c
> @@ -170,6 +170,37 @@ igbuio_pci_irqhandler(int irq, struct uio_info
> *info)
>  	return IRQ_HANDLED;
>  }
>  
> +/**
> + * This gets called while opening uio device file.
> + */
> +static int
> +igbuio_pci_open(struct uio_info *info, struct inode *inode)
> +{
> +	struct rte_uio_pci_dev *udev = info->priv;
> +	struct pci_dev *dev = udev->pdev;
> +
> +	pci_reset_function(dev);
> +
> +	/* set bus master, which was cleared by the reset function
> */
> +	pci_set_master(dev);
> +
> +	return 0;
> +}
> +
> +static int
> +igbuio_pci_release(struct uio_info *info, struct inode *inode)
> +{
> +	struct rte_uio_pci_dev *udev = info->priv;
> +	struct pci_dev *dev = udev->pdev;
> +
> +	/* stop the device from further DMA */
> +	pci_clear_master(dev);
> +
> +	pci_reset_function(dev);
> +
> +	return 0;
> +}
> +
>  #ifdef CONFIG_XEN_DOM0
>  static int
>  igbuio_dom0_mmap_phys(struct uio_info *info, struct vm_area_struct
> *vma)
> @@ -370,6 +401,8 @@ igbuio_pci_probe(struct pci_dev *dev, const
> struct pci_device_id *id)
>  	udev->info.version = "0.1";
>  	udev->info.handler = igbuio_pci_irqhandler;
>  	udev->info.irqcontrol = igbuio_pci_irqcontrol;
> +	udev->info.open = igbuio_pci_open;
> +	udev->info.release = igbuio_pci_release;
>  #ifdef CONFIG_XEN_DOM0
>  	/* check if the driver run on Xen Dom0 */
>  	if (xen_initial_domain())

Hi,

I've picked up b58eedfc7dd57eef6d12e2c654a52c834f36084a as it is a
prerequisite for 70efa4116420b6f7a0734711dd603d3024366c79 as far as I
can see, let me know if I should not or do it differently please.

Thanks!

-- 
Kind regards,
Luca Boccassi


More information about the stable mailing list