public inbox for linux-s390@vger.kernel.org
 help / color / mirror / Atom feed
From: Wenjia Zhang <wenjia@linux.ibm.com>
To: Wen Gu <guwen@linux.alibaba.com>,
	kgraul@linux.ibm.com, jaka@linux.ibm.com, davem@davemloft.net,
	edumazet@google.com, kuba@kernel.org, pabeni@redhat.com
Cc: alibuda@linux.alibaba.com, tonylu@linux.alibaba.com,
	linux-s390@vger.kernel.org, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH net-next v3 05/18] net/smc: reserve CHID range for SMC-D virtual device
Date: Fri, 22 Sep 2023 01:32:33 +0200	[thread overview]
Message-ID: <0a150c58-5fdc-5e8d-1ea6-861406f2c70a@linux.ibm.com> (raw)
In-Reply-To: <1695302360-46691-6-git-send-email-guwen@linux.alibaba.com>



On 21.09.23 15:19, Wen Gu wrote:
> This patch reserve CHID range from 0xFF00 to 0xFFFF for SMC-D virtual
> device and introduces helpers to identify them.
> 
> Signed-off-by: Wen Gu <guwen@linux.alibaba.com>
> ---
>   net/smc/smc_ism.h | 15 +++++++++++++++
>   1 file changed, 15 insertions(+)
> 
> diff --git a/net/smc/smc_ism.h b/net/smc/smc_ism.h
> index 14d2e77..2ecc8de 100644
> --- a/net/smc/smc_ism.h
> +++ b/net/smc/smc_ism.h
> @@ -15,6 +15,9 @@
>   
>   #include "smc.h"
>   
> +#define SMC_VIRT_ISM_CHID_MAX		0xFFFF
> +#define SMC_VIRT_ISM_CHID_MIN		0xFF00
> +
>   struct smcd_dev_list {	/* List of SMCD devices */
>   	struct list_head list;
>   	struct mutex mutex;	/* Protects list of devices */
> @@ -57,4 +60,16 @@ static inline int smc_ism_write(struct smcd_dev *smcd, u64 dmb_tok,
>   	return rc < 0 ? rc : 0;
>   }
>   
> +static inline bool __smc_ism_is_virtdev(u16 chid)
> +{
> +	return (chid >= SMC_VIRT_ISM_CHID_MIN && chid <= SMC_VIRT_ISM_CHID_MAX);
> +}
> +
> +static inline bool smc_ism_is_virtdev(struct smcd_dev *smcd)
> +{
> +	u16 chid = smcd->ops->get_chid(smcd);
> +
> +	return __smc_ism_is_virtdev(chid);
> +}
> +
I'm wondering if barrier is needed here.
>   #endif

  parent reply	other threads:[~2023-09-21 23:37 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1695302360-46691-1-git-send-email-guwen@linux.alibaba.com>
2023-09-21 23:31 ` [PATCH net-next v3 00/18] net/smc: implement virtual ISM extension and loopback-ism Wenjia Zhang
2023-09-22 12:18   ` Wen Gu
     [not found] ` <1695302360-46691-13-git-send-email-guwen@linux.alibaba.com>
2023-09-21 23:31   ` [PATCH net-next v3 12/18] net/smc: implement DMB-related operations of loopback Wenjia Zhang
2023-09-22  7:42     ` Wen Gu
     [not found] ` <1695302360-46691-10-git-send-email-guwen@linux.alibaba.com>
2023-09-21 23:32   ` [PATCH net-next v3 09/18] net/smc: introduce SMC-D loopback device Wenjia Zhang
2023-09-22  7:55     ` Wen Gu
     [not found] ` <1695302360-46691-7-git-send-email-guwen@linux.alibaba.com>
2023-09-21 23:32   ` [PATCH net-next v3 06/18] net/smc: extend GID to 128bits for virtual ISM device Wenjia Zhang
2023-09-22 12:12     ` Wen Gu
     [not found] ` <1695302360-46691-6-git-send-email-guwen@linux.alibaba.com>
2023-09-21 23:32   ` Wenjia Zhang [this message]
2023-09-22  8:42     ` [PATCH net-next v3 05/18] net/smc: reserve CHID range for SMC-D virtual device Wen Gu

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=0a150c58-5fdc-5e8d-1ea6-861406f2c70a@linux.ibm.com \
    --to=wenjia@linux.ibm.com \
    --cc=alibuda@linux.alibaba.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=guwen@linux.alibaba.com \
    --cc=jaka@linux.ibm.com \
    --cc=kgraul@linux.ibm.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-s390@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=tonylu@linux.alibaba.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