Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0 */
0002 /*
0003  * Shared Memory Communications over RDMA (SMC-R) and RoCE
0004  *
0005  * Manage RMBE
0006  *
0007  * Copyright IBM Corp. 2016
0008  *
0009  * Author(s):  Ursula Braun <ubraun@linux.vnet.ibm.com>
0010  */
0011 
0012 #ifndef SMC_RX_H
0013 #define SMC_RX_H
0014 
0015 #include <linux/socket.h>
0016 #include <linux/types.h>
0017 
0018 #include "smc.h"
0019 
0020 void smc_rx_init(struct smc_sock *smc);
0021 
0022 int smc_rx_recvmsg(struct smc_sock *smc, struct msghdr *msg,
0023            struct pipe_inode_info *pipe, size_t len, int flags);
0024 int smc_rx_wait(struct smc_sock *smc, long *timeo,
0025         int (*fcrit)(struct smc_connection *conn));
0026 static inline int smc_rx_data_available(struct smc_connection *conn)
0027 {
0028     return atomic_read(&conn->bytes_to_rcv);
0029 }
0030 
0031 #endif /* SMC_RX_H */