smb: client: add and use smbd_get_parameters()

In future struct smbdirect_socket_parameters will be the only
public structure for the smb layer. This prepares this...

Cc: Steve French <smfrench@gmail.com>
Cc: Tom Talpey <tom@talpey.com>
Cc: Long Li <longli@microsoft.com>
Cc: linux-cifs@vger.kernel.org
Cc: samba-technical@lists.samba.org
Acked-by: Namjae Jeon <linkinjeon@kernel.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Steve French <stfrench@microsoft.com>
This commit is contained in:
Stefan Metzmacher 2025-08-22 00:23:53 +02:00 committed by Steve French
parent 40212a27c7
commit 5f84b0819a
3 changed files with 13 additions and 4 deletions

View File

@ -504,8 +504,8 @@ smb3_negotiate_wsize(struct cifs_tcon *tcon, struct smb3_fs_context *ctx)
wsize = min_t(unsigned int, wsize, server->max_write);
#ifdef CONFIG_CIFS_SMB_DIRECT
if (server->rdma) {
struct smbdirect_socket_parameters *sp =
&server->smbd_conn->socket.parameters;
const struct smbdirect_socket_parameters *sp =
smbd_get_parameters(server->smbd_conn);
if (server->sign)
/*
@ -555,8 +555,8 @@ smb3_negotiate_rsize(struct cifs_tcon *tcon, struct smb3_fs_context *ctx)
rsize = min_t(unsigned int, rsize, server->max_read);
#ifdef CONFIG_CIFS_SMB_DIRECT
if (server->rdma) {
struct smbdirect_socket_parameters *sp =
&server->smbd_conn->socket.parameters;
const struct smbdirect_socket_parameters *sp =
smbd_get_parameters(server->smbd_conn);
if (server->sign)
/*

View File

@ -13,6 +13,13 @@
#include "cifsproto.h"
#include "smb2proto.h"
const struct smbdirect_socket_parameters *smbd_get_parameters(struct smbd_connection *conn)
{
struct smbdirect_socket *sc = &conn->socket;
return &sc->parameters;
}
static struct smbdirect_recv_io *get_receive_buffer(
struct smbd_connection *info);
static void put_receive_buffer(

View File

@ -59,6 +59,8 @@ struct smbd_connection {
struct smbd_connection *smbd_get_connection(
struct TCP_Server_Info *server, struct sockaddr *dstaddr);
const struct smbdirect_socket_parameters *smbd_get_parameters(struct smbd_connection *conn);
/* Reconnect SMBDirect session */
int smbd_reconnect(struct TCP_Server_Info *server);
/* Destroy SMBDirect session */