mirror of
https://github.com/torvalds/linux.git
synced 2026-05-28 17:13:52 +02:00
smb: smbdirect: add smbdirect_socket.h
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>
This commit is contained in:
parent
21604ed608
commit
22234e37d7
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__ */
|
||||
Loading…
Reference in New Issue
Block a user