From: Suanming Mou <suanmingm@nvidia.com> To: Narcisa Ana Maria Vasile <navasile@linux.microsoft.com> Cc: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>, Dmitry Malloy <dmitrym@microsoft.com>, Pallavi Kadam <pallavi.kadam@intel.com>, "dev@dpdk.org" <dev@dpdk.org>, NBU-Contact-Thomas Monjalon <thomas@monjalon.net>, Tal Shnaiderman <talshn@nvidia.com>, Ophir Munk <ophirmu@nvidia.com> Subject: Re: [dpdk-dev] [PATCH v4 1/2] eal/windows: add pthread mutex lock Date: Thu, 15 Oct 2020 02:18:46 +0000 Message-ID: <MWHPR12MB174303A9EDD50264DBCC6F0BC1020@MWHPR12MB1743.namprd12.prod.outlook.com> (raw) In-Reply-To: <20201015021545.GA26401@linuxonhyperv3.guj3yctzbm1etfxqx2vob5hsef.xx.internal.cloudapp.net> > -----Original Message----- > From: Narcisa Ana Maria Vasile <navasile@linux.microsoft.com> > Sent: Thursday, October 15, 2020 10:16 AM > To: Suanming Mou <suanmingm@nvidia.com> > Cc: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>; Dmitry Malloy > <dmitrym@microsoft.com>; Pallavi Kadam <pallavi.kadam@intel.com>; > dev@dpdk.org > Subject: Re: [PATCH v4 1/2] eal/windows: add pthread mutex lock > > On Fri, Oct 09, 2020 at 09:17:22AM +0800, Suanming Mou wrote: > > Add pthread mutex lock as it is needed for the thread safe rte_flow > > functions. > > > > Signed-off-by: Suanming Mou <suanmingm@nvidia.com> > > Acked-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com> > > --- > > > > v4: > > - Add PTHREAD_MUTEX_INITIALIZER macro. > > > > v3: > > - No updates. > > > > v2: > > - Using critical section for windows pthread mutex. > > > > --- > > > > lib/librte_eal/windows/include/pthread.h | 35 > > ++++++++++++++++++++++++++++++++ > > 1 file changed, 35 insertions(+) > > > > diff --git a/lib/librte_eal/windows/include/pthread.h > > b/lib/librte_eal/windows/include/pthread.h > > index 99013dc..c62251f 100644 > > --- a/lib/librte_eal/windows/include/pthread.h > > +++ b/lib/librte_eal/windows/include/pthread.h > > @@ -28,6 +28,12 @@ > > /* defining pthread_attr_t type on Windows since there is no in > > Microsoft libc*/ typedef void *pthread_attr_t; > > > > +typedef void *pthread_mutexattr_t; > > + > > +typedef CRITICAL_SECTION pthread_mutex_t; > > + > > +#define PTHREAD_MUTEX_INITIALIZER {(void *)-1, -1, 0, 0, 0, 0} > > + > > Regarding the question on the static initializer, adding the guidance from > DmitryM: > "If you choose to do the static initializer, you will be relying on implementation > specifics, (which may have not changed ever, or may not ever change, or may > change in the next release). > This would be a hack (although potentially long term)." Yes, thanks. So we have removed that hack in the latest v5. https://patches.dpdk.org/patch/80814/ > > Otherwise, > Acked-by: Narcisa Vasile <navasile@linux.microsoft.com>
next prev parent reply other threads:[~2020-10-15 2:19 UTC|newest] Thread overview: 40+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-09-27 8:20 [dpdk-dev] [PATCH 0/2] ethdev: make rte flow API thread safe Suanming Mou 2020-09-27 8:20 ` [dpdk-dev] [PATCH 1/2] eal/windows: add pthread mutex lock Suanming Mou 2020-09-27 15:56 ` Dmitry Kozlyuk 2020-09-28 2:30 ` Suanming Mou 2020-09-27 8:20 ` [dpdk-dev] [PATCH 2/2] ethdev: make rte flow API thread safe Suanming Mou 2020-09-30 10:56 ` Ori Kam 2020-10-04 23:44 ` Suanming Mou 2020-10-04 23:48 ` [dpdk-dev] [PATCH v2 0/2] ethdev: make rte_flow " Suanming Mou 2020-10-04 23:48 ` [dpdk-dev] [PATCH v2 1/2] eal/windows: add pthread mutex lock Suanming Mou 2020-10-04 23:48 ` [dpdk-dev] [PATCH v2 2/2] ethdev: make rte_flow API thread safe Suanming Mou 2020-10-05 11:28 ` Ori Kam 2020-10-06 23:18 ` Ajit Khaparde 2020-10-07 0:50 ` Suanming Mou 2020-10-07 6:33 ` Ori Kam 2020-10-07 14:17 ` [dpdk-dev] [PATCH v3 0/2] " Suanming Mou 2020-10-07 14:17 ` [dpdk-dev] [PATCH v3 1/2] eal/windows: add pthread mutex lock Suanming Mou 2020-10-07 16:53 ` Dmitry Kozlyuk 2020-10-08 2:46 ` Suanming Mou 2020-10-14 10:02 ` Tal Shnaiderman 2020-10-07 14:17 ` [dpdk-dev] [PATCH v3 2/2] ethdev: make rte_flow API thread safe Suanming Mou 2020-10-07 14:42 ` Ajit Khaparde 2020-10-07 16:37 ` Ori Kam 2020-10-07 20:10 ` Matan Azrad 2020-10-08 2:56 ` Suanming Mou 2020-10-09 1:17 ` [dpdk-dev] [PATCH v4 0/2] " Suanming Mou 2020-10-09 1:17 ` [dpdk-dev] [PATCH v4 1/2] eal/windows: add pthread mutex lock Suanming Mou 2020-10-09 9:19 ` Tal Shnaiderman 2020-10-14 16:45 ` Ranjit Menon 2020-10-15 2:15 ` Narcisa Ana Maria Vasile 2020-10-15 2:18 ` Suanming Mou [this message] 2020-10-09 1:17 ` [dpdk-dev] [PATCH v4 2/2] ethdev: make rte_flow API thread safe Suanming Mou 2020-10-14 10:19 ` Thomas Monjalon 2020-10-14 10:41 ` Suanming Mou 2020-10-15 1:07 ` [dpdk-dev] [PATCH v5 0/2] " Suanming Mou 2020-10-15 1:07 ` [dpdk-dev] [PATCH v5 1/2] eal/windows: add pthread mutex lock Suanming Mou 2020-10-15 2:22 ` Narcisa Ana Maria Vasile 2020-10-15 1:07 ` [dpdk-dev] [PATCH v5 2/2] ethdev: make rte_flow API thread safe Suanming Mou 2020-10-15 8:28 ` Thomas Monjalon 2020-10-15 8:52 ` Andrew Rybchenko 2020-10-15 22:43 ` [dpdk-dev] [PATCH v5 0/2] " Thomas Monjalon
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=MWHPR12MB174303A9EDD50264DBCC6F0BC1020@MWHPR12MB1743.namprd12.prod.outlook.com \ --to=suanmingm@nvidia.com \ --cc=dev@dpdk.org \ --cc=dmitry.kozliuk@gmail.com \ --cc=dmitrym@microsoft.com \ --cc=navasile@linux.microsoft.com \ --cc=ophirmu@nvidia.com \ --cc=pallavi.kadam@intel.com \ --cc=talshn@nvidia.com \ --cc=thomas@monjalon.net \ /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
DPDK patches and discussions This inbox may be cloned and mirrored by anyone: git clone --mirror https://inbox.dpdk.org/dev/0 dev/git/0.git # If you have public-inbox 1.1+ installed, you may # initialize and index your mirror using the following commands: public-inbox-init -V2 dev dev/ https://inbox.dpdk.org/dev \ dev@dpdk.org public-inbox-index dev Example config snippet for mirrors. Newsgroup available over NNTP: nntp://inbox.dpdk.org/inbox.dpdk.dev AGPL code for this site: git clone https://public-inbox.org/public-inbox.git