mirror of
https://github.com/torvalds/linux.git
synced 2026-05-25 15:41:52 +02:00
smb: smbdirect: introduce smbdirect_socket_bind()
This will be used by the server in the next steps. 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: linux-cifs@vger.kernel.org Cc: samba-technical@lists.samba.org Signed-off-by: Stefan Metzmacher <metze@samba.org> Acked-by: Namjae Jeon <linkinjeon@kernel.org> Signed-off-by: Steve French <stfrench@microsoft.com>
This commit is contained in:
parent
84df3cde16
commit
03f9e2c15f
|
|
@ -85,6 +85,9 @@ bool smbdirect_connection_is_connected(struct smbdirect_socket *sc);
|
|||
__SMBDIRECT_PUBLIC__
|
||||
int smbdirect_connection_wait_for_connected(struct smbdirect_socket *sc);
|
||||
|
||||
__SMBDIRECT_PUBLIC__
|
||||
int smbdirect_socket_bind(struct smbdirect_socket *sc, struct sockaddr *addr);
|
||||
|
||||
__SMBDIRECT_PUBLIC__
|
||||
void smbdirect_socket_shutdown(struct smbdirect_socket *sc);
|
||||
|
||||
|
|
|
|||
|
|
@ -611,6 +611,22 @@ void smbdirect_socket_destroy_sync(struct smbdirect_socket *sc)
|
|||
SMBDIRECT_DEBUG_ERR_PTR(sc->first_error));
|
||||
}
|
||||
|
||||
__SMBDIRECT_PUBLIC__
|
||||
int smbdirect_socket_bind(struct smbdirect_socket *sc, struct sockaddr *addr)
|
||||
{
|
||||
int ret;
|
||||
|
||||
if (sc->status != SMBDIRECT_SOCKET_CREATED)
|
||||
return -EINVAL;
|
||||
|
||||
ret = rdma_bind_addr(sc->rdma.cm_id, addr);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
return 0;
|
||||
}
|
||||
__SMBDIRECT_EXPORT_SYMBOL__(smbdirect_socket_bind);
|
||||
|
||||
__SMBDIRECT_PUBLIC__
|
||||
void smbdirect_socket_shutdown(struct smbdirect_socket *sc)
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user