ipc: remove thread for async requests
authorAnatoly Burakov <anatoly.burakov@intel.com>
Tue, 26 Jun 2018 10:53:17 +0000 (11:53 +0100)
committerThomas Monjalon <thomas@monjalon.net>
Fri, 13 Jul 2018 10:41:34 +0000 (12:41 +0200)
commitdaf9bfca717e6ccfe99c690cc2124bcf606bab85
tree52e31e481e1751315c07be187cb284c2ac7d6e26
parentd74b7748d64b4c74b1be1199c73f07da262a0f9e
ipc: remove thread for async requests

Previously, we were using two IPC threads - one to handle messages
and synchronous requests, and another to handle asynchronous requests.
To handle replies for an async request, rte_mp_handle woke up the
rte_mp_handle_async thread to process through pthread_cond variable.

Change it to handle asynchronous messages within the main IPC thread.
To handle timeout events, for each async request which is sent,
we set an alarm for it. If its reply is received before timeout,
we will cancel the alarm when we handle the reply; otherwise,
alarm will invoke the async_reply_handle() as the alarm callback.

Signed-off-by: Jianfeng Tan <jianfeng.tan@intel.com>
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Suggested-by: Thomas Monjalon <thomas@monjalon.net>
lib/librte_eal/common/eal_common_proc.c