Linux CIFS filesystem development
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: stable@vger.kernel.org
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	patches@lists.linux.dev, Steve French <smfrench@gmail.com>,
	Tom Talpey <tom@talpey.com>, Long Li <longli@microsoft.com>,
	Namjae Jeon <linkinjeon@kernel.org>,
	Hyunchul Lee <hyc.lee@gmail.com>,
	Meetakshi Setiya <meetakshisetiyaoss@gmail.com>,
	linux-cifs@vger.kernel.org, samba-technical@lists.samba.org,
	Stefan Metzmacher <metze@samba.org>,
	Steve French <stfrench@microsoft.com>
Subject: [PATCH 6.15 179/187] smb: smbdirect: introduce smbdirect_socket_parameters
Date: Tue, 22 Jul 2025 15:45:49 +0200	[thread overview]
Message-ID: <20250722134352.437429400@linuxfoundation.org> (raw)
In-Reply-To: <20250722134345.761035548@linuxfoundation.org>

6.15-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Stefan Metzmacher <metze@samba.org>

commit dce8047f4725d4469c0813ff50c4115fc2d0b628 upstream.

This is the next step in the direction of a common smbdirect layer.

Cc: Steve French <smfrench@gmail.com>
Cc: Tom Talpey <tom@talpey.com>
Cc: Long Li <longli@microsoft.com>
Cc: Namjae Jeon <linkinjeon@kernel.org>
Cc: Hyunchul Lee <hyc.lee@gmail.com>
Cc: Meetakshi Setiya <meetakshisetiyaoss@gmail.com>
Cc: linux-cifs@vger.kernel.org
Cc: samba-technical@lists.samba.org
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Steve French <stfrench@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 fs/smb/client/smbdirect.h                  |    1 +
 fs/smb/common/smbdirect/smbdirect.h        |   20 ++++++++++++++++++++
 fs/smb/common/smbdirect/smbdirect_socket.h |    2 ++
 3 files changed, 23 insertions(+)

--- a/fs/smb/client/smbdirect.h
+++ b/fs/smb/client/smbdirect.h
@@ -15,6 +15,7 @@
 #include <rdma/rdma_cm.h>
 #include <linux/mempool.h>
 
+#include "../common/smbdirect/smbdirect.h"
 #include "../common/smbdirect/smbdirect_socket.h"
 
 extern int rdma_readwrite_threshold;
--- a/fs/smb/common/smbdirect/smbdirect.h
+++ b/fs/smb/common/smbdirect/smbdirect.h
@@ -14,4 +14,24 @@ struct smbdirect_buffer_descriptor_v1 {
 	__le32 length;
 } __packed;
 
+/*
+ * Connection parameters mostly from [MS-SMBD] 3.1.1.1
+ *
+ * These are setup and negotiated at the beginning of a
+ * connection and remain constant unless explicitly changed.
+ *
+ * Some values are important for the upper layer.
+ */
+struct smbdirect_socket_parameters {
+	__u16 recv_credit_max;
+	__u16 send_credit_target;
+	__u32 max_send_size;
+	__u32 max_fragmented_send_size;
+	__u32 max_recv_size;
+	__u32 max_fragmented_recv_size;
+	__u32 max_read_write_size;
+	__u32 keepalive_interval_msec;
+	__u32 keepalive_timeout_msec;
+} __packed;
+
 #endif /* __FS_SMB_COMMON_SMBDIRECT_SMBDIRECT_H__ */
--- a/fs/smb/common/smbdirect/smbdirect_socket.h
+++ b/fs/smb/common/smbdirect/smbdirect_socket.h
@@ -36,6 +36,8 @@ struct smbdirect_socket {
 		struct ib_qp *qp;
 		struct ib_device *dev;
 	} ib;
+
+	struct smbdirect_socket_parameters parameters;
 };
 
 #endif /* __FS_SMB_COMMON_SMBDIRECT_SMBDIRECT_SOCKET_H__ */



  parent reply	other threads:[~2025-07-22 14:16 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20250722134345.761035548@linuxfoundation.org>
2025-07-22 13:45 ` [PATCH 6.15 174/187] smb: smbdirect: add smbdirect_pdu.h with protocol definitions Greg Kroah-Hartman
2025-07-22 13:45 ` [PATCH 6.15 175/187] smb: client: make use of common smbdirect_pdu.h Greg Kroah-Hartman
2025-07-22 13:45 ` [PATCH 6.15 176/187] smb: smbdirect: add smbdirect.h with public structures Greg Kroah-Hartman
2025-07-22 13:45 ` [PATCH 6.15 177/187] smb: smbdirect: add smbdirect_socket.h Greg Kroah-Hartman
2025-07-22 13:45 ` [PATCH 6.15 178/187] smb: client: make use of common smbdirect_socket Greg Kroah-Hartman
2025-07-22 13:45 ` Greg Kroah-Hartman [this message]
2025-07-22 13:45 ` [PATCH 6.15 180/187] smb: client: make use of common smbdirect_socket_parameters Greg Kroah-Hartman
2025-07-22 13:45 ` [PATCH 6.15 181/187] cifs: Fix the smbd_response slab to allow usercopy Greg Kroah-Hartman
2025-07-22 13:45 ` [PATCH 6.15 182/187] cifs: Fix reading into an ITER_FOLIOQ from the smbdirect code Greg Kroah-Hartman
2025-07-22 13:45 ` [PATCH 6.15 187/187] smb: client: let smbd_post_send_iter() respect the peers max_send_size and transmit all data Greg Kroah-Hartman
2025-07-22 16:25   ` [PATCH 6.15 000/187] 6.15.8-rc1 review Brett A C Sheffield

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=20250722134352.437429400@linuxfoundation.org \
    --to=gregkh@linuxfoundation.org \
    --cc=hyc.lee@gmail.com \
    --cc=linkinjeon@kernel.org \
    --cc=linux-cifs@vger.kernel.org \
    --cc=longli@microsoft.com \
    --cc=meetakshisetiyaoss@gmail.com \
    --cc=metze@samba.org \
    --cc=patches@lists.linux.dev \
    --cc=samba-technical@lists.samba.org \
    --cc=smfrench@gmail.com \
    --cc=stable@vger.kernel.org \
    --cc=stfrench@microsoft.com \
    --cc=tom@talpey.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