git.droids-corp.org
/
dpdk.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
net/mlx5: fix crash on GRE flow rule parsing
[dpdk.git]
/
lib
/
librte_eal
/
common
/
hotplug_mp.c
diff --git
a/lib/librte_eal/common/hotplug_mp.c
b/lib/librte_eal/common/hotplug_mp.c
index
4052a5c
..
ee79190
100644
(file)
--- a/
lib/librte_eal/common/hotplug_mp.c
+++ b/
lib/librte_eal/common/hotplug_mp.c
@@
-4,6
+4,7
@@
#include <string.h>
#include <rte_eal.h>
#include <string.h>
#include <rte_eal.h>
+#include <rte_errno.h>
#include <rte_alarm.h>
#include <rte_string_fns.h>
#include <rte_devargs.h>
#include <rte_alarm.h>
#include <rte_string_fns.h>
#include <rte_devargs.h>
@@
-376,7
+377,7
@@
int eal_dev_hotplug_request_to_primary(struct eal_dev_mp_req *req)
ret = rte_mp_request_sync(&mp_req, &mp_reply, &ts);
if (ret || mp_reply.nb_received != 1) {
ret = rte_mp_request_sync(&mp_req, &mp_reply, &ts);
if (ret || mp_reply.nb_received != 1) {
- RTE_LOG(ERR, EAL, "
cannot send request to primary
");
+ RTE_LOG(ERR, EAL, "
Cannot send request to primary\n
");
if (!ret)
return -1;
return ret;
if (!ret)
return -1;
return ret;
@@
-404,7
+405,11
@@
int eal_dev_hotplug_request_to_secondary(struct eal_dev_mp_req *req)
ret = rte_mp_request_sync(&mp_req, &mp_reply, &ts);
if (ret != 0) {
ret = rte_mp_request_sync(&mp_req, &mp_reply, &ts);
if (ret != 0) {
- RTE_LOG(ERR, EAL, "rte_mp_request_sync failed\n");
+ /* if IPC is not supported, behave as if the call succeeded */
+ if (rte_errno != ENOTSUP)
+ RTE_LOG(ERR, EAL, "rte_mp_request_sync failed\n");
+ else
+ ret = 0;
return ret;
}
return ret;
}
@@
-433,14
+438,15
@@
int eal_dev_hotplug_request_to_secondary(struct eal_dev_mp_req *req)
return 0;
}
return 0;
}
-int
rte
_mp_dev_hotplug_init(void)
+int
eal
_mp_dev_hotplug_init(void)
{
int ret;
if (rte_eal_process_type() == RTE_PROC_PRIMARY) {
ret = rte_mp_action_register(EAL_DEV_MP_ACTION_REQUEST,
handle_secondary_request);
{
int ret;
if (rte_eal_process_type() == RTE_PROC_PRIMARY) {
ret = rte_mp_action_register(EAL_DEV_MP_ACTION_REQUEST,
handle_secondary_request);
- if (ret != 0) {
+ /* primary is allowed to not support IPC */
+ if (ret != 0 && rte_errno != ENOTSUP) {
RTE_LOG(ERR, EAL, "Couldn't register '%s' action\n",
EAL_DEV_MP_ACTION_REQUEST);
return ret;
RTE_LOG(ERR, EAL, "Couldn't register '%s' action\n",
EAL_DEV_MP_ACTION_REQUEST);
return ret;