DPDK patches and discussions
 help / color / mirror / Atom feed
From: Thomas Monjalon <thomas@monjalon.net>
To: shijith.thotton@caviumnetworks.com, qiming.yang@intel.com,
	jingjing.wu@intel.com
Cc: ferruh.yigit@intel.com, luca.boccassi@att.com, gregory@weka.io,
	helin.zhang@intel.com, xuekun.hu@intel.com,
	harish.patil@cavium.com, dev@dpdk.org
Subject: [dpdk-dev] [PATCH] igb_uio: revert open and release operations
Date: Fri, 13 Oct 2017 16:51:04 +0200	[thread overview]
Message-ID: <20171013145104.17596-1-thomas@monjalon.net> (raw)
In-Reply-To: <F5DF4F0E3AFEF648ADC1C3C33AD4DBF16F7E0E71@SHSMSX101.ccr.corp.intel.com>

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(-)

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;
 
-- 
2.14.1

  parent reply	other threads:[~2017-10-13 14:51 UTC|newest]

Thread overview: 45+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-13  7:51 [dpdk-dev] vf init issue with patch igb_uio: issue FLR during open and release of device file Yang, Qiming
2017-09-13 10:48 ` Shijith Thotton
2017-09-13 11:03   ` Ferruh Yigit
2017-09-13 14:25     ` Hu, Xuekun
2017-09-13 17:06       ` Ferruh Yigit
2017-09-13 19:44         ` Patil, Harish
2017-09-15  8:04           ` Yang, Qiming
2017-09-15  8:42             ` Thomas Monjalon
2017-09-15  9:18               ` Yang, Qiming
2017-09-15  9:25                 ` Ferruh Yigit
2017-09-15  9:31                 ` Shijith Thotton
2017-09-17  2:49             ` Gregory Etelson
2017-09-18  2:21               ` Yang, Qiming
2017-09-18  2:39                 ` Zhang, Helin
2017-09-18  3:50                   ` Yang, Qiming
2017-09-18  6:49                     ` Shijith Thotton
2017-09-18 19:33                       ` Ferruh Yigit
2017-09-18 22:43                       ` Patil, Harish
2017-09-14  3:16         ` Yang, Qiming
2017-09-14  7:00           ` Shijith Thotton
2017-09-14  7:15             ` Shijith Thotton
2017-09-14  1:23   ` Yang, Qiming
2017-09-19 10:24 ` [dpdk-dev] [PATCH] igb_uio: remove PCI reset during uio device open Shijith Thotton
2017-09-20 16:52   ` Ferruh Yigit
2017-09-21 10:00   ` Luca Boccassi
2017-09-22  2:47   ` Yang, Qiming
2017-09-29 12:57   ` Wu, Jingjing
2017-10-02 18:24     ` Shijith Thotton
2017-10-03 11:35       ` Gregory Etelson
2017-10-13 14:36         ` Shijith Thotton
2017-10-13 14:51 ` Thomas Monjalon [this message]
2017-10-13 21:05   ` [dpdk-dev] [PATCH] igb_uio: revert open and release operations Ferruh Yigit
2017-10-13 21:11     ` Thomas Monjalon
2017-10-13 21:17       ` Thomas Monjalon
2017-10-17 20:14 Ferruh Yigit
2017-10-17 20:33 ` Thomas Monjalon
2017-10-18  4:50   ` Patil, Harish
2017-10-19 22:43     ` Patil, Harish
2017-10-20  1:15       ` Ferruh Yigit
2017-10-20 15:26         ` Tan, Jianfeng
2017-10-20 16:32           ` Ferruh Yigit
2017-10-18  0:14 ` Wu, Jingjing
2017-10-18  6:27 ` Shijith Thotton
2017-10-18 20:47   ` Ferruh Yigit
2017-10-24 21:32 ` Ferruh Yigit

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20171013145104.17596-1-thomas@monjalon.net \
    --to=thomas@monjalon.net \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@intel.com \
    --cc=gregory@weka.io \
    --cc=harish.patil@cavium.com \
    --cc=helin.zhang@intel.com \
    --cc=jingjing.wu@intel.com \
    --cc=luca.boccassi@att.com \
    --cc=qiming.yang@intel.com \
    --cc=shijith.thotton@caviumnetworks.com \
    --cc=xuekun.hu@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).