ipc: fix locking while sending messages
authorAnatoly Burakov <anatoly.burakov@intel.com>
Wed, 27 Jun 2018 09:44:25 +0000 (10:44 +0100)
committerThomas Monjalon <thomas@monjalon.net>
Fri, 29 Jun 2018 00:01:37 +0000 (02:01 +0200)
commit53fd532e3961092b51c536fc6760ad91c6e4bb93
tree6342e44c188ac72702aef674a978a6a649eb3956
parentce5e6bf69eb32d5ea1d95e2a623f8f9d284a806d
ipc: fix locking while sending messages

Previously, we were putting an exclusive lock to prevent secondary
processes spinning up while we are sending our messages. However,
using exclusive locks had an effect of disallowing multiple
simultaenous unrelated messages/requests being sent, which was
not the intention behind locking.

Fix it to put a shared lock on the directory. That way, we still
prevent secondary process initializations while sending data over
IPC, but allow multiple unrelated transmissions to proceed.

Fixes: 89f1fe7e6d95 ("eal: lock IPC directory on init and send")
Cc: stable@dpdk.org
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Tested-by: Qi Zhang <qi.z.zhang@intel.com>
lib/librte_eal/common/eal_common_proc.c