ipc: handle unsupported IPC in sendmsg
Currently, IPC API will silently ignore unsupported IPC. Fix the API call and its callers to explicitly handle unsupported IPC cases. Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
This commit is contained in:
parent
9a4274be9e
commit
144767514e
@ -807,6 +807,12 @@ rte_mp_sendmsg(struct rte_mp_msg *msg)
|
||||
if (check_input(msg) != 0)
|
||||
return -1;
|
||||
|
||||
if (internal_config.no_shconf) {
|
||||
RTE_LOG(DEBUG, EAL, "No shared files mode enabled, IPC is disabled\n");
|
||||
rte_errno = ENOTSUP;
|
||||
return -1;
|
||||
}
|
||||
|
||||
RTE_LOG(DEBUG, EAL, "sendmsg: %s\n", msg->name);
|
||||
return mp_send(msg, NULL, MP_MSG);
|
||||
}
|
||||
|
@ -288,6 +288,9 @@ rte_mp_action_register(const char *name, rte_mp_t action);
|
||||
* not want to response the messages from the corresponding component in its
|
||||
* primary process or secondary processes.
|
||||
*
|
||||
* @note IPC may be unsupported in certain circumstances, so caller should check
|
||||
* for ENOTSUP error.
|
||||
*
|
||||
* @param name
|
||||
* The name argument plays as the nonredundant key to find the action.
|
||||
*
|
||||
|
Loading…
x
Reference in New Issue
Block a user