[dpdk-dev] [PATCH v3 4/5] eal: prevent secondary process init while sending messages
Burakov, Anatoly
anatoly.burakov at intel.com
Wed Feb 28 11:19:45 CET 2018
On 28-Feb-18 1:58 AM, Tan, Jianfeng wrote:
> Hi Anatoly,
>
>> -----Original Message-----
>> From: Burakov, Anatoly
>> Sent: Tuesday, February 27, 2018 10:36 PM
>> To: dev at dpdk.org
>> Cc: Tan, Jianfeng
>> Subject: [PATCH v3 4/5] eal: prevent secondary process init while sending
>> messages
>>
>> Currently, it is possible to spin up a secondary process while
>> either sendmsg or request is in progress. Fix this by adding
>> directory locks during init, sendmsg and requests.
>
> Could you give a more detailed example for this issue?
>
> And why locking the directory can help?
>
> Thanks,
> Jianfeng
>
Consider this. You start a request. Since sending this out takes
non-zero amount of time, and you're waiting for process to reply each
time you send a message, there's a non-zero chance where contents of
/var/run may change and another socket file may appear that wasn't there
when we started sending out those messages.
This is simply making sending requests atomic, if you will. Honestly, i
can't think of a situation where this might be a problem, but it just
doesn't feel right, so i fixed it :)
--
Thanks,
Anatoly
More information about the dev
mailing list