hi, gaetan

On 7/9/2018 3:42 PM, Gaëtan Rivet wrote:
Hi Jeff,

On Mon, Jul 09, 2018 at 02:51:21PM +0800, Jeff Guo wrote:
This patch introduces a failure handle mechanism to handle device
hotplug removal event.

First it can register sigbus handler when enable device event monitor. Once
sigbus error be captured, it will check the failure address and accordingly
remap the invalid memory for the corresponding device. Besed on this
mechanism, it could guaranty the application not crash when the device be
hotplug out.

Signed-off-by: Jeff Guo <jia....@intel.com>
Acked-by: Shaopeng He <shaopeng...@intel.com>
---
v6->v5:
refine some doc and coding style
---
  lib/librte_eal/linuxapp/eal/eal_dev.c | 114 +++++++++++++++++++++++++++++++++-
  1 file changed, 113 insertions(+), 1 deletion(-)

diff --git a/lib/librte_eal/linuxapp/eal/eal_dev.c 
b/lib/librte_eal/linuxapp/eal/eal_dev.c
index 1cf6aeb..cb30729 100644
--- a/lib/librte_eal/linuxapp/eal/eal_dev.c
+++ b/lib/librte_eal/linuxapp/eal/eal_dev.c
@@ -4,6 +4,8 @@
#include <string.h>
  #include <unistd.h>
+#include <fcntl.h>
+#include <signal.h>
  #include <sys/socket.h>
  #include <linux/netlink.h>
@@ -14,15 +16,31 @@
  #include <rte_malloc.h>
  #include <rte_interrupts.h>
  #include <rte_alarm.h>
+#include <rte_bus.h>
+#include <rte_eal.h>
+#include <rte_spinlock.h>
+#include <rte_errno.h>
#include "eal_private.h" static struct rte_intr_handle intr_handle = {.fd = -1 };
  static bool monitor_started;
+extern struct rte_bus_list rte_bus_list;
+
Where do you use the rte_bus_list? It seems the reference is a remnant
from a previous version.

You do not seem to need a direct access on rte_bus_list,
as you call rte_bus_find instead.

Why do you need this extern? I think its absence is motivated: to keep the
bus list private and force users to access it through standard exposed ways.

Regards,

i think that is my missing here. Will delete it. Thanks for your info.


Reply via email to