On 4/21/2018 12:16 AM, Ananyev, Konstantin wrote:
+
+static void sigbus_handler(int signum __rte_unused, siginfo_t *info,
+ void *ctx __rte_unused)
+{
+ int ret;
+
+ RTE_LOG(ERR, EAL, "SIGBUS error, fault address:%p\n", info->si_addr);
+ ret = dev_uev_failure_process(NULL, info->si_addr);
As now you can try to mmap/munmap same address from two or more different
threads
you probably need some synchronization here.
Something simple as spinlock seems to be enough here.
We might have one per device or might be even a global one would be ok here.
+ if (!ret)
+ RTE_LOG(DEBUG, EAL,
+ "SIGBUS error is because of hot unplug!\n");
Also if sigbus handler wasn't able to fix things - failure addr doesn't belong
to
any devices, or remaping fails - we probably should invoke previously installed
handler
or just apply default action.
Konstantin
i think just exception here by exit for apply default action, and info
that is a normal sigbus error should be ok.
+}
+