From: Stephen Hemminger <stephen@networkplumber.org>
To: Wei Huang <wei.huang@intel.com>
Cc: dev@dpdk.org, thomas@monjalon.net, nipun.gupta@nxp.com,
hemant.agrawal@nxp.com, stable@dpdk.org, rosen.xu@intel.com,
tianfei.zhang@intel.com, qi.z.zhang@intel.com
Subject: Re: [PATCH v5 1/5] drivers/raw: introduce AFU raw device driver
Date: Mon, 6 Jun 2022 08:38:21 -0700 [thread overview]
Message-ID: <20220606083821.5c8903b3@hermes.local> (raw)
In-Reply-To: <1653629824-4535-2-git-send-email-wei.huang@intel.com>
On Fri, 27 May 2022 01:37:00 -0400
Wei Huang <wei.huang@intel.com> wrote:
> +static inline int afu_mf_trylock(struct afu_mf_rawdev *dev)
> +{
> + int32_t x = 0;
> +
> + if (!dev || !dev->shared)
> + return -ENODEV;
> +
> + x = __atomic_load_n(&dev->shared->lock, __ATOMIC_RELAXED);
> +
> + if ((x != 0) || (__atomic_compare_exchange_n(&dev->shared->lock, &x, 1,
> + 1, __ATOMIC_ACQUIRE, __ATOMIC_RELAXED) == 0))
> + return -EBUSY;
> +
> + return 0;
> +}
> +
> +static inline void afu_mf_unlock(struct afu_mf_rawdev *dev)
> +{
> + if (!dev || !dev->shared)
> + return;
> +
> + __atomic_store_n(&dev->shared->lock, 0, __ATOMIC_RELEASE);
> +}
What other subsystem is this shared with?
Is there a good reason it can't just use existing spinlock?
next prev parent reply other threads:[~2022-06-06 15:38 UTC|newest]
Thread overview: 57+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-17 6:29 [PATCH v1] raw/afu_mf: introduce AFU MF " Wei Huang
2022-05-17 7:34 ` [PATCH v2] " Wei Huang
2022-05-19 2:43 ` [PATCH v3] " Wei Huang
2022-05-19 5:52 ` [PATCH v4] " Wei Huang
2022-05-26 6:51 ` Xu, Rosen
2022-05-27 5:36 ` [PATCH v5 0/5] introduce afu_mf raw " Wei Huang
2022-05-27 5:37 ` [PATCH v5 1/5] drivers/raw: introduce AFU " Wei Huang
2022-06-06 1:52 ` Zhang, Tianfei
2022-06-06 2:00 ` Zhang, Tianfei
2022-06-07 2:36 ` Huang, Wei
2022-06-07 2:35 ` Huang, Wei
2022-06-06 15:38 ` Stephen Hemminger [this message]
2022-06-07 1:36 ` Huang, Wei
2022-05-27 5:37 ` [PATCH v5 2/5] raw/afu_mf: add N3000 AFU driver Wei Huang
2022-06-06 1:38 ` Zhang, Tianfei
2022-06-07 2:40 ` Huang, Wei
2022-05-27 5:37 ` [PATCH v5 3/5] raw/afu_mf: add HE-LBK " Wei Huang
2022-06-06 1:41 ` Zhang, Tianfei
2022-06-07 2:42 ` Huang, Wei
2022-05-27 5:37 ` [PATCH v5 4/5] raw/afu_mf: add HE-MEM " Wei Huang
2022-06-06 6:36 ` Zhang, Tianfei
2022-06-07 2:43 ` Huang, Wei
2022-05-27 5:37 ` [PATCH v5 5/5] raw/afu_mf: add HE-HSSI " Wei Huang
2022-06-06 6:39 ` Zhang, Tianfei
2022-06-07 2:44 ` Huang, Wei
2022-06-06 1:47 ` [PATCH v5 0/5] introduce afu_mf raw device driver Zhang, Tianfei
2022-06-07 2:34 ` Huang, Wei
2022-06-09 2:44 ` [PATCH v6 0/5] introduce AFU PMD driver of FPGA Wei Huang
2022-06-09 2:44 ` [PATCH v6 1/5] raw/ifpga: introduce AFU driver framework Wei Huang
2022-06-09 2:44 ` [PATCH v6 2/5] raw/ifpga: add N3000 AFU driver Wei Huang
2022-06-09 2:44 ` [PATCH v6 3/5] raw/ifpga: add HE-LPBK " Wei Huang
2022-06-09 2:44 ` [PATCH v6 4/5] raw/ifpga: add HE-MEM " Wei Huang
2022-06-09 2:44 ` [PATCH v6 5/5] raw/ifpga: add HE-HSSI " Wei Huang
2022-06-09 7:37 ` [PATCH v7 0/5] introduce AFU PMD driver of FPGA Wei Huang
2022-06-09 7:37 ` [PATCH v7 1/5] raw/ifpga: introduce AFU driver framework Wei Huang
2022-06-10 6:09 ` Zhang, Tianfei
2022-06-15 6:55 ` Xu, Rosen
2022-06-15 9:03 ` Huang, Wei
2022-06-09 7:37 ` [PATCH v7 2/5] raw/ifpga: add N3000 AFU driver Wei Huang
2022-06-10 6:11 ` Zhang, Tianfei
2022-06-15 7:07 ` Xu, Rosen
2022-06-16 1:10 ` Huang, Wei
2022-06-09 7:37 ` [PATCH v7 3/5] raw/ifpga: add HE-LPBK " Wei Huang
2022-06-10 6:11 ` Zhang, Tianfei
2022-06-15 7:12 ` Xu, Rosen
2022-06-09 7:37 ` [PATCH v7 4/5] raw/ifpga: add HE-MEM " Wei Huang
2022-06-15 7:13 ` Xu, Rosen
2022-06-09 7:37 ` [PATCH v7 5/5] raw/ifpga: add HE-HSSI " Wei Huang
2022-06-10 6:12 ` Zhang, Tianfei
2022-06-15 7:14 ` Xu, Rosen
2022-06-16 3:00 ` [PATCH v8 0/5] introduce AFU PMD driver of FPGA Wei Huang
2022-06-16 3:00 ` [PATCH v8 1/5] raw/ifpga: introduce AFU driver framework Wei Huang
2022-06-16 3:00 ` [PATCH v8 2/5] raw/ifpga: add N3000 AFU driver Wei Huang
2022-06-16 3:00 ` [PATCH v8 3/5] raw/ifpga: add HE-LPBK " Wei Huang
2022-06-16 3:00 ` [PATCH v8 4/5] raw/ifpga: add HE-MEM " Wei Huang
2022-06-16 3:00 ` [PATCH v8 5/5] raw/ifpga: add HE-HSSI " Wei Huang
2022-06-21 8:49 ` [PATCH v8 0/5] introduce AFU PMD driver of FPGA 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=20220606083821.5c8903b3@hermes.local \
--to=stephen@networkplumber.org \
--cc=dev@dpdk.org \
--cc=hemant.agrawal@nxp.com \
--cc=nipun.gupta@nxp.com \
--cc=qi.z.zhang@intel.com \
--cc=rosen.xu@intel.com \
--cc=stable@dpdk.org \
--cc=thomas@monjalon.net \
--cc=tianfei.zhang@intel.com \
--cc=wei.huang@intel.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).