From: Ferruh Yigit <ferruh.yigit@intel.com>
To: Gaetan Rivet <grive@u256.net>, matan@mellanox.com
Cc: dev@dpdk.org, Stephen Hemminger <stephen@networkplumber.org>
Subject: Re: [dpdk-dev] [PATCH 2/2] net/failsafe: fix primary/secondary mutex
Date: Fri, 16 Apr 2021 09:19:18 +0100 [thread overview]
Message-ID: <a2d60e71-6377-c43f-5ba1-ecc9b0d0dbcb@intel.com> (raw)
In-Reply-To: <0def4a36-e5e2-1a41-df84-2b237efc7758@intel.com>
On 4/14/2021 2:10 PM, Ferruh Yigit wrote:
> On 3/15/2021 7:27 PM, Stephen Hemminger wrote:
>> Set mutex used in failsafe driver to protect when used by
>> both primary and secondary process. Without this fix, the failsafe
>> lock is not really locking when there are multiple secondary processes.
>>
>> Bugzilla ID: 662
>> Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
>> Fixes: 655fcd68c7d2 ("net/failsafe: fix hotplug races")
>> Cc: matan@mellanox.com
>> ---
>> drivers/net/failsafe/failsafe.c | 5 +++++
>> 1 file changed, 5 insertions(+)
>>
>> diff --git a/drivers/net/failsafe/failsafe.c b/drivers/net/failsafe/failsafe.c
>> index e3bda0df2bf9..5b7e560dbc08 100644
>> --- a/drivers/net/failsafe/failsafe.c
>> +++ b/drivers/net/failsafe/failsafe.c
>> @@ -140,6 +140,11 @@ fs_mutex_init(struct fs_priv *priv)
>> ERROR("Cannot initiate mutex attributes - %s", strerror(ret));
>> return ret;
>> }
>> + /* Allow mutex to protect primary/secondary */
>> + ret = pthread_mutexattr_setpshared(&attr, PTHREAD_PROCESS_SHARED);
>> + if (ret)
>> + ERROR("Cannot set mutex shared - %s", strerror(ret));
>> +
>> /* Allow mutex relocks for the thread holding the mutex. */
>> ret = pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE);
>> if (ret) {
>>
>
> Overall looks good to me.
>
> Gaetan, Matan,
>
> Can you please test the patch? To be sure it is not causing any unexpected
> functional/performance issues.
>
Ping.
next prev parent reply other threads:[~2021-04-16 8:19 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-15 19:27 [dpdk-dev] [PATCH 0/2] Mark shared pthread mutex Stephen Hemminger
2021-03-15 19:27 ` [dpdk-dev] [PATCH 1/2] ethdev: make flow API primary/secondary process safe Stephen Hemminger
2021-03-16 23:48 ` Suanming Mou
2021-03-17 0:13 ` Stephen Hemminger
2021-03-17 0:32 ` Suanming Mou
2021-04-14 13:06 ` Ferruh Yigit
2021-04-15 2:55 ` Suanming Mou
2021-04-15 3:17 ` Stephen Hemminger
2021-04-15 7:42 ` Ferruh Yigit
2021-04-15 20:04 ` Stephen Hemminger
2021-04-16 0:57 ` Suanming Mou
2021-04-16 3:19 ` Ajit Khaparde
2021-04-16 1:41 ` fengchengwen
2021-04-16 8:12 ` Ferruh Yigit
2021-04-16 8:18 ` Ferruh Yigit
2021-04-19 17:14 ` Thomas Monjalon
2021-04-19 17:45 ` Stephen Hemminger
2021-04-19 18:09 ` Thomas Monjalon
2021-06-08 8:07 ` Andrew Rybchenko
2021-03-15 19:27 ` [dpdk-dev] [PATCH 2/2] net/failsafe: fix primary/secondary mutex Stephen Hemminger
2021-04-14 13:10 ` Ferruh Yigit
2021-04-16 8:19 ` Ferruh Yigit [this message]
2021-04-19 17:08 ` Thomas Monjalon
2021-06-08 8:00 ` Andrew Rybchenko
2021-06-08 15:42 ` Stephen Hemminger
2021-06-08 15:55 ` Andrew Rybchenko
2021-06-08 20:48 ` Stephen Hemminger
2021-06-09 10:04 ` Andrew Rybchenko
2021-06-14 14:43 ` Gaëtan Rivet
2022-10-17 10:40 ` [External] : " Madhuker Mythri
2021-03-15 19:45 ` [dpdk-dev] [PATCH 0/2] Mark shared pthread mutex Stephen Hemminger
2021-03-16 16:28 ` Stephen Hemminger
2021-04-16 8:25 ` Ferruh Yigit
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=a2d60e71-6377-c43f-5ba1-ecc9b0d0dbcb@intel.com \
--to=ferruh.yigit@intel.com \
--cc=dev@dpdk.org \
--cc=grive@u256.net \
--cc=matan@mellanox.com \
--cc=stephen@networkplumber.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.