From: Tom Talpey <tom@talpey.com>
To: He Wang <xw897002528@gmail.com>
Cc: Namjae Jeon <linkinjeon@kernel.org>,
Steve French <sfrench@samba.org>,
Sergey Senozhatsky <senozhatsky@chromium.org>,
linux-cifs@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/2] ksmbd: fix possibly wrong init value for RDMA buffer size
Date: Tue, 7 Jan 2025 16:04:26 -0500 [thread overview]
Message-ID: <d013fffa-8ed3-4c96-90a1-df2e7f45380b@talpey.com> (raw)
In-Reply-To: <20250106033956.27445-1-xw897002528@gmail.com>
On 1/5/2025 10:39 PM, He Wang wrote:
> Field `initiator_depth` is for incoming request.
>
> According to the man page, `max_qp_rd_atom` is the maximum number of
> outstanding packaets, and `max_qp_init_rd_atom` is the maximum depth of
> incoming requests.
I do not believe this is correct, what "man page" are you referring to?
The commit message is definitely wrong. Neither value is referring to
generic "maximum packets" nor "incoming requests".
The max_qp_rd_atom is the "ORD" or outgoing read/atomic request depth.
The ksmbd server uses this to control RDMA Read requests to fetch data
from the client for certain SMB3_WRITE operations. (SMB Direct does not
use atomics)
The max_qp_init_rd_atom is the "IRD" or incoming read/atomic request
depth. The SMB3 protocol does not allow clients to request data from
servers via RDMA Read. This is absolutely by design, and the server
therefore does not use this value.
In practice, many RDMA providers set the rd_atom and rd_init_atom to
the same value, but this change would appear to break SMB Direct write
functionality when operating over providers that do not.
So, NAK.
Namjae, you should revert your upstream commit.
Tom.
>
> Signed-off-by: He Wang <xw897002528@gmail.com>
> ---
> fs/smb/server/transport_rdma.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/fs/smb/server/transport_rdma.c b/fs/smb/server/transport_rdma.c
> index 0ef3c9f0b..c6dbbbb32 100644
> --- a/fs/smb/server/transport_rdma.c
> +++ b/fs/smb/server/transport_rdma.c
> @@ -1640,7 +1640,7 @@ static int smb_direct_accept_client(struct smb_direct_transport *t)
> int ret;
>
> memset(&conn_param, 0, sizeof(conn_param));
> - conn_param.initiator_depth = min_t(u8, t->cm_id->device->attrs.max_qp_rd_atom,
> + conn_param.initiator_depth = min_t(u8, t->cm_id->device->attrs.max_qp_init_rd_atom,
> SMB_DIRECT_CM_INITIATOR_DEPTH);
> conn_param.responder_resources = 0;
>
next prev parent reply other threads:[~2025-01-07 21:04 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-06 3:39 [PATCH 1/2] ksmbd: fix possibly wrong init value for RDMA buffer size He Wang
2025-01-06 3:39 ` [PATCH 2/2] ksmbd: fix unexpectedly changed path in ksmbd_vfs_kern_path_locked He Wang
2025-01-06 8:30 ` [PATCH 1/2] ksmbd: fix possibly wrong init value for RDMA buffer size Namjae Jeon
2025-01-07 21:04 ` Tom Talpey [this message]
2025-01-07 23:14 ` Namjae Jeon
2025-01-07 23:32 ` Steve French
[not found] ` <CAPG2z08PyX3VZ4mxzEr_FtmiafGi=cNGpOzG7rjWxihjxeyTjQ@mail.gmail.com>
2025-01-08 13:58 ` Tom Talpey
[not found] ` <CAPG2z08fdWGMLovAo663nTant4S8oyPoWL5Vo7Rdc8JzaTRsMw@mail.gmail.com>
2025-01-08 16:38 ` Tom Talpey
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=d013fffa-8ed3-4c96-90a1-df2e7f45380b@talpey.com \
--to=tom@talpey.com \
--cc=linkinjeon@kernel.org \
--cc=linux-cifs@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=senozhatsky@chromium.org \
--cc=sfrench@samba.org \
--cc=xw897002528@gmail.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