From: Ferruh Yigit <ferruh.yigit@intel.com>
To: Thomas Monjalon <thomas@monjalon.net>
Cc: dev@dpdk.org, Ferruh Yigit <ferruh.yigit@intel.com>,
stable@dpdk.org, Jianfeng Tan <jianfeng.tan@intel.com>,
Jingjing Wu <jingjing.wu@intel.com>,
Shijith Thotton <shijith.thotton@caviumnetworks.com>,
Gregory Etelson <gregory@weka.io>,
Harish Patil <harish.patil@cavium.com>,
George Prekas <george.prekas@epfl.ch>,
Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>,
Rasesh Mody <rasesh.mody@cavium.com>
Subject: [dpdk-dev] [PATCH] igb_uio: add config option to control reset
Date: Fri, 3 Nov 2017 00:30:05 +0000 [thread overview]
Message-ID: <20171103003005.44339-1-ferruh.yigit@intel.com> (raw)
Adding a compile time configuration option to control device reset done
during DPDK application exit.
Config option is CONFIG_RTE_EAL_IGB_UIO_RESET and enabled by default,
so by defualt reset will happen. Having this reset is safer to be sure
device left in a proper case.
But for special cases [1] it is possible to disable the config option
to prevent the device reset.
[1]
http://dpdk.org/ml/archives/dev/2017-November/080927.html
Fixes: b58eedfc7dd5 ("igb_uio: issue FLR during open and release of device file")
Cc: stable@dpdk.org
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
Cc: Jianfeng Tan <jianfeng.tan@intel.com>
Cc: Jingjing Wu <jingjing.wu@intel.com>
Cc: Shijith Thotton <shijith.thotton@caviumnetworks.com>
Cc: Gregory Etelson <gregory@weka.io>
Cc: Harish Patil <harish.patil@cavium.com>
Cc: George Prekas <george.prekas@epfl.ch>
Cc: Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>
Cc: Rasesh Mody <rasesh.mody@cavium.com>
---
config/common_base | 1 +
config/common_linuxapp | 1 +
lib/librte_eal/linuxapp/igb_uio/igb_uio.c | 2 ++
3 files changed, 4 insertions(+)
diff --git a/config/common_base b/config/common_base
index 82ee75456..2a9947420 100644
--- a/config/common_base
+++ b/config/common_base
@@ -102,6 +102,7 @@ CONFIG_RTE_LIBEAL_USE_HPET=n
CONFIG_RTE_EAL_ALLOW_INV_SOCKET_ID=n
CONFIG_RTE_EAL_ALWAYS_PANIC_ON_ERROR=n
CONFIG_RTE_EAL_IGB_UIO=n
+CONFIG_RTE_EAL_IGB_UIO_RESET=n
CONFIG_RTE_EAL_VFIO=n
CONFIG_RTE_MALLOC_DEBUG=n
CONFIG_RTE_EAL_NUMA_AWARE_HUGEPAGES=n
diff --git a/config/common_linuxapp b/config/common_linuxapp
index 74c7d64ec..b3a602909 100644
--- a/config/common_linuxapp
+++ b/config/common_linuxapp
@@ -37,6 +37,7 @@ CONFIG_RTE_EXEC_ENV_LINUXAPP=y
CONFIG_RTE_EAL_NUMA_AWARE_HUGEPAGES=y
CONFIG_RTE_EAL_IGB_UIO=y
+CONFIG_RTE_EAL_IGB_UIO_RESET=y
CONFIG_RTE_EAL_VFIO=y
CONFIG_RTE_KNI_KMOD=y
CONFIG_RTE_LIBRTE_KNI=y
diff --git a/lib/librte_eal/linuxapp/igb_uio/igb_uio.c b/lib/librte_eal/linuxapp/igb_uio/igb_uio.c
index fd320d87d..0325722c0 100644
--- a/lib/librte_eal/linuxapp/igb_uio/igb_uio.c
+++ b/lib/librte_eal/linuxapp/igb_uio/igb_uio.c
@@ -360,7 +360,9 @@ igbuio_pci_release(struct uio_info *info, struct inode *inode)
/* stop the device from further DMA */
pci_clear_master(dev);
+#ifdef RTE_EAL_IGB_UIO_RESET
pci_reset_function(dev);
+#endif
return 0;
}
--
2.13.6
next reply other threads:[~2017-11-03 0:30 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-03 0:30 Ferruh Yigit [this message]
2017-11-03 0:51 ` [dpdk-dev] [PATCH v2] " Ferruh Yigit
2017-11-03 2:57 ` Tan, Jianfeng
2017-11-03 19:42 ` Roberts, Lee A.
2017-11-03 22:03 ` Ferruh Yigit
2017-11-04 10:08 ` Stephen Hemminger
2017-11-06 18:41 ` 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=20171103003005.44339-1-ferruh.yigit@intel.com \
--to=ferruh.yigit@intel.com \
--cc=dev@dpdk.org \
--cc=george.prekas@epfl.ch \
--cc=gregory@weka.io \
--cc=harish.patil@cavium.com \
--cc=jianfeng.tan@intel.com \
--cc=jingjing.wu@intel.com \
--cc=rasesh.mody@cavium.com \
--cc=sergio.gonzalez.monroy@intel.com \
--cc=shijith.thotton@caviumnetworks.com \
--cc=stable@dpdk.org \
--cc=thomas@monjalon.net \
/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).