[dpdk-dev] igb_uio: revert open and release operations

Message ID 20171013145104.17596-1-thomas@monjalon.net (mailing list archive)
State Rejected, archived
Delegated to: Ferruh Yigit
Headers

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation success Compilation OK

Commit Message

Thomas Monjalon Oct. 13, 2017, 2:51 p.m. UTC
  Some VF drivers cannot work with igb_uio because of the
reset done in these functions.

First bug report:
	http://dpdk.org/ml/archives/dev/2017-September/075236.html

A partial reset was tried:
	http://dpdk.org/patch/28940

Second bug report after a partial revert trial:
	http://dpdk.org/ml/archives/dev/2017-September/076998.html

The patch author agreed to revert his patch:
	http://dpdk.org/ml/archives/dev/2017-October/077158.html

There are also some patches available to fix issues with i40e:
	http://dpdk.org/patch/30021
	http://dpdk.org/patch/30022

This patch takes the simple option of reverting the initial patch
and gives more time to properly improve igb_uio and PMDs.

Fixes: b58eedfc7dd5 ("igb_uio: issue FLR during open and release of device file")

Reported-by: Qiming Yang <qiming.yang@intel.com>
Reported-by: Jingjing Wu <jingjing.wu@intel.com>
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
---
 lib/librte_eal/linuxapp/igb_uio/igb_uio.c | 33 -------------------------------
 1 file changed, 33 deletions(-)
  

Comments

Ferruh Yigit Oct. 13, 2017, 9:05 p.m. UTC | #1
On 10/13/2017 3:51 PM, Thomas Monjalon wrote:
> Some VF drivers cannot work with igb_uio because of the
> reset done in these functions.
> 
> First bug report:
> 	http://dpdk.org/ml/archives/dev/2017-September/075236.html
> 
> A partial reset was tried:
> 	http://dpdk.org/patch/28940
> 
> Second bug report after a partial revert trial:
> 	http://dpdk.org/ml/archives/dev/2017-September/076998.html
> 
> The patch author agreed to revert his patch:
> 	http://dpdk.org/ml/archives/dev/2017-October/077158.html
> 
> There are also some patches available to fix issues with i40e:
> 	http://dpdk.org/patch/30021
> 	http://dpdk.org/patch/30022
> 
> This patch takes the simple option of reverting the initial patch
> and gives more time to properly improve igb_uio and PMDs.
> 
> Fixes: b58eedfc7dd5 ("igb_uio: issue FLR during open and release of device file")
> 
> Reported-by: Qiming Yang <qiming.yang@intel.com>
> Reported-by: Jingjing Wu <jingjing.wu@intel.com>
> Signed-off-by: Thomas Monjalon <thomas@monjalon.net>

Hi Thomas,

I put already some comment into other fix patch [1].

Mainly taking into account of current time for release, this patch make
sense, but I suggest giving a chance to the fix mentioned above.

Because the original patch is for safer igb_uio, and fixing a few times
reported issue.

Since this is rc1, we have time for testing, and many parties will be
doing tests. Lets get the fix for rc1, and if we find any issue revert
the patch?

Thanks,
ferruh

[1]
http://dpdk.org/ml/archives/dev/2017-October/079159.html
  
Thomas Monjalon Oct. 13, 2017, 9:11 p.m. UTC | #2
13/10/2017 23:05, Ferruh Yigit:
> On 10/13/2017 3:51 PM, Thomas Monjalon wrote:
> > Some VF drivers cannot work with igb_uio because of the
> > reset done in these functions.
> > 
> > First bug report:
> > 	http://dpdk.org/ml/archives/dev/2017-September/075236.html
> > 
> > A partial reset was tried:
> > 	http://dpdk.org/patch/28940
> > 
> > Second bug report after a partial revert trial:
> > 	http://dpdk.org/ml/archives/dev/2017-September/076998.html
> > 
> > The patch author agreed to revert his patch:
> > 	http://dpdk.org/ml/archives/dev/2017-October/077158.html
> > 
> > There are also some patches available to fix issues with i40e:
> > 	http://dpdk.org/patch/30021
> > 	http://dpdk.org/patch/30022
> > 
> > This patch takes the simple option of reverting the initial patch
> > and gives more time to properly improve igb_uio and PMDs.
> > 
> > Fixes: b58eedfc7dd5 ("igb_uio: issue FLR during open and release of device file")
> > 
> > Reported-by: Qiming Yang <qiming.yang@intel.com>
> > Reported-by: Jingjing Wu <jingjing.wu@intel.com>
> > Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
> 
> Hi Thomas,
> 
> I put already some comment into other fix patch [1].
> 
> Mainly taking into account of current time for release, this patch make
> sense, but I suggest giving a chance to the fix mentioned above.
> 
> Because the original patch is for safer igb_uio, and fixing a few times
> reported issue.
> 
> Since this is rc1, we have time for testing, and many parties will be
> doing tests. Lets get the fix for rc1, and if we find any issue revert
> the patch?

OK, please check it works for every VF drivers.
There was an issue reported with bnxt.
  
Thomas Monjalon Oct. 13, 2017, 9:17 p.m. UTC | #3
13/10/2017 23:11, Thomas Monjalon:
> 13/10/2017 23:05, Ferruh Yigit:
> > On 10/13/2017 3:51 PM, Thomas Monjalon wrote:
> > > Some VF drivers cannot work with igb_uio because of the
> > > reset done in these functions.
> > > 
> > > First bug report:
> > > 	http://dpdk.org/ml/archives/dev/2017-September/075236.html
> > > 
> > > A partial reset was tried:
> > > 	http://dpdk.org/patch/28940
> > > 
> > > Second bug report after a partial revert trial:
> > > 	http://dpdk.org/ml/archives/dev/2017-September/076998.html
> > > 
> > > The patch author agreed to revert his patch:
> > > 	http://dpdk.org/ml/archives/dev/2017-October/077158.html
> > > 
> > > There are also some patches available to fix issues with i40e:
> > > 	http://dpdk.org/patch/30021
> > > 	http://dpdk.org/patch/30022
> > > 
> > > This patch takes the simple option of reverting the initial patch
> > > and gives more time to properly improve igb_uio and PMDs.
> > > 
> > > Fixes: b58eedfc7dd5 ("igb_uio: issue FLR during open and release of device file")
> > > 
> > > Reported-by: Qiming Yang <qiming.yang@intel.com>
> > > Reported-by: Jingjing Wu <jingjing.wu@intel.com>
> > > Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
> > 
> > Hi Thomas,
> > 
> > I put already some comment into other fix patch [1].
> > 
> > Mainly taking into account of current time for release, this patch make
> > sense, but I suggest giving a chance to the fix mentioned above.
> > 
> > Because the original patch is for safer igb_uio, and fixing a few times
> > reported issue.
> > 
> > Since this is rc1, we have time for testing, and many parties will be
> > doing tests. Lets get the fix for rc1, and if we find any issue revert
> > the patch?
> 
> OK, please check it works for every VF drivers.
> There was an issue reported with bnxt.
Sorry, it was qede.
  

Patch

diff --git a/lib/librte_eal/linuxapp/igb_uio/igb_uio.c b/lib/librte_eal/linuxapp/igb_uio/igb_uio.c
index 0dda26c7a..e47afb98b 100644
--- a/lib/librte_eal/linuxapp/igb_uio/igb_uio.c
+++ b/lib/librte_eal/linuxapp/igb_uio/igb_uio.c
@@ -220,37 +220,6 @@  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;
-}
-
 /* Remap pci resources described by bar #pci_bar in uio resource n. */
 static int
 igbuio_pci_setup_iomem(struct pci_dev *dev, struct uio_info *info,
@@ -492,8 +461,6 @@  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;
 	udev->info.priv = udev;
 	udev->pdev = dev;