public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Alexandra Winter <wintera@linux.ibm.com>
To: Wen Gu <guwen@linux.alibaba.com>,
	kgraul@linux.ibm.com, wenjia@linux.ibm.com, jaka@linux.ibm.com,
	davem@davemloft.net, edumazet@google.com, kuba@kernel.org,
	pabeni@redhat.com
Cc: linux-s390@vger.kernel.org, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [RFC PATCH net-next v2 1/5] net/smc: introduce SMC-D loopback device
Date: Thu, 19 Jan 2023 17:25:01 +0100	[thread overview]
Message-ID: <2ff23fc7-c393-46b8-e358-31a39ed2c56b@linux.ibm.com> (raw)
In-Reply-To: <1671506505-104676-2-git-send-email-guwen@linux.alibaba.com>



On 20.12.22 04:21, Wen Gu wrote:
> This patch introduces a kind of loopback device for SMC-D, thus
> enabling the SMC communication between two local sockets in one
> kernel.
> 
> The loopback device supports basic capabilities defined by SMC-D,
> including registering DMB, unregistering DMB and moving data.
> 
> Considering that there is no ism device on other servers expect
> IBM z13, 

Please use the wording 'on other architectures except s390'.
That is how IBM Z is referred to in the Linux kernel.


> the loopback device can be used as a dummy device to
> test SMC-D logic for the broad community.
> 
> Signed-off-by: Wen Gu <guwen@linux.alibaba.com>
> ---

Hello Wen Gu,

as the general design discussions are ongoing, I didn't
do a thorough review. But here are some general remarks
that you may want to consider for future versions.

I would propose to add a module parameter (default off) to enable
SMC-D loopback.

>  include/net/smc.h      |   1 +
>  net/smc/Makefile       |   2 +-
>  net/smc/af_smc.c       |  12 ++-
>  net/smc/smc_cdc.c      |   6 ++
>  net/smc/smc_cdc.h      |   1 +
>  net/smc/smc_loopback.c | 282 +++++++++++++++++++++++++++++++++++++++++++++++++
>  net/smc/smc_loopback.h |  59 +++++++++++
>  7 files changed, 361 insertions(+), 2 deletions(-)
>  create mode 100644 net/smc/smc_loopback.c
>  create mode 100644 net/smc/smc_loopback.h
> 

I am not convinced that this warrants a separate file.

[...]
>
> +}
> +
> +static int lo_add_vlan_id(struct smcd_dev *smcd, u64 vlan_id)
> +{
> +	return 0;
> +}
> +
> +static int lo_del_vlan_id(struct smcd_dev *smcd, u64 vlan_id)
> +{
> +	return 0;
> +}
> +
> +static int lo_set_vlan_required(struct smcd_dev *smcd)
> +{
> +	return 0;
> +}
> +
> +static int lo_reset_vlan_required(struct smcd_dev *smcd)
> +{
> +	return 0;
> +}

The VLAN functions are only required for SMC-Dv1
Seems you want to provide v1 support for loopback?
May be nice for testing v1 VLAN support.
But then you need proper VLAN support.

[...]
> +
> +static u8 *lo_get_system_eid(void)
> +{
> +	return &LO_SYSTEM_EID.seid_string[0];
> +}
SEID is for the whole system not per device.
We probably need to register a different function
for each architecture.

> +
> +static u16 lo_get_chid(struct smcd_dev *smcd)
> +{
> +	return 0;
> +}
> +

Shouldn't this return 0xFFFF in your current concept?




  reply	other threads:[~2023-01-19 16:25 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-20  3:21 [RFC PATCH net-next v2 0/5] net/smc:Introduce SMC-D based loopback acceleration Wen Gu
2022-12-20  3:21 ` [RFC PATCH net-next v2 1/5] net/smc: introduce SMC-D loopback device Wen Gu
2023-01-19 16:25   ` Alexandra Winter [this message]
2023-01-30 16:30     ` Wen Gu
2022-12-20  3:21 ` [RFC PATCH net-next v2 2/5] net/smc: choose loopback device in SMC-D communication Wen Gu
2022-12-20  3:21 ` [RFC PATCH net-next v2 3/5] net/smc: add dmb attach and detach interface Wen Gu
2022-12-20  3:21 ` [RFC PATCH net-next v2 4/5] net/smc: avoid data copy from sndbuf to peer RMB in SMC-D loopback Wen Gu
2022-12-20  3:21 ` [RFC PATCH net-next v2 5/5] net/smc: logic of cursors update in SMC-D loopback connections Wen Gu
2022-12-20 14:02 ` [RFC PATCH net-next v2 0/5] net/smc:Introduce SMC-D based loopback acceleration Niklas Schnelle
2022-12-21 13:14   ` Wen Gu
2023-01-04 16:09     ` Alexandra Winter
2023-01-12 12:12       ` Wen Gu
2023-01-16 11:01         ` Wenjia Zhang
2023-01-18 12:15           ` Wen Gu
2023-01-19 12:30             ` Alexandra Winter
2023-01-30 16:27               ` Wen Gu
2022-12-26 10:46   ` Dust Li
2022-12-28 10:26 ` 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=2ff23fc7-c393-46b8-e358-31a39ed2c56b@linux.ibm.com \
    --to=wintera@linux.ibm.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=wenjia@linux.ibm.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