smb: smbdirect: add smbdirect_socket.h
[ Upstream commit 22234e37d7e97652cb53133009da5e14793d3c10 ] This abstracts the common smbdirect layer. Currently with just a few things in it, but that will change over time until everything is in common. Will be used in client and server in the next commits 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> Stable-dep-of: 43e7e284fc77 ("cifs: Fix the smbd_response slab to allow usercopy") Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
a6ec1fcafd
commit
f4b05342c2
41
fs/smb/common/smbdirect/smbdirect_socket.h
Normal file
41
fs/smb/common/smbdirect/smbdirect_socket.h
Normal file
@@ -0,0 +1,41 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0-or-later */
|
||||
/*
|
||||
* Copyright (c) 2025 Stefan Metzmacher
|
||||
*/
|
||||
|
||||
#ifndef __FS_SMB_COMMON_SMBDIRECT_SMBDIRECT_SOCKET_H__
|
||||
#define __FS_SMB_COMMON_SMBDIRECT_SMBDIRECT_SOCKET_H__
|
||||
|
||||
enum smbdirect_socket_status {
|
||||
SMBDIRECT_SOCKET_CREATED,
|
||||
SMBDIRECT_SOCKET_CONNECTING,
|
||||
SMBDIRECT_SOCKET_CONNECTED,
|
||||
SMBDIRECT_SOCKET_NEGOTIATE_FAILED,
|
||||
SMBDIRECT_SOCKET_DISCONNECTING,
|
||||
SMBDIRECT_SOCKET_DISCONNECTED,
|
||||
SMBDIRECT_SOCKET_DESTROYED
|
||||
};
|
||||
|
||||
struct smbdirect_socket {
|
||||
enum smbdirect_socket_status status;
|
||||
|
||||
/* RDMA related */
|
||||
struct {
|
||||
struct rdma_cm_id *cm_id;
|
||||
} rdma;
|
||||
|
||||
/* IB verbs related */
|
||||
struct {
|
||||
struct ib_pd *pd;
|
||||
struct ib_cq *send_cq;
|
||||
struct ib_cq *recv_cq;
|
||||
|
||||
/*
|
||||
* shortcuts for rdma.cm_id->{qp,device};
|
||||
*/
|
||||
struct ib_qp *qp;
|
||||
struct ib_device *dev;
|
||||
} ib;
|
||||
};
|
||||
|
||||
#endif /* __FS_SMB_COMMON_SMBDIRECT_SMBDIRECT_SOCKET_H__ */
|
||||
Reference in New Issue
Block a user