Greg Kroah-Hartman | b244131 | 2017-11-01 15:07:57 +0100 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0 */ |
Ursula Braun | 952310c | 2017-01-09 16:55:24 +0100 | [diff] [blame] | 2 | /* |
| 3 | * Shared Memory Communications over RDMA (SMC-R) and RoCE |
| 4 | * |
| 5 | * Manage RMBE |
| 6 | * |
| 7 | * Copyright IBM Corp. 2016 |
| 8 | * |
| 9 | * Author(s): Ursula Braun <ubraun@linux.vnet.ibm.com> |
| 10 | */ |
| 11 | |
| 12 | #ifndef SMC_RX_H |
| 13 | #define SMC_RX_H |
| 14 | |
| 15 | #include <linux/socket.h> |
| 16 | #include <linux/types.h> |
| 17 | |
| 18 | #include "smc.h" |
| 19 | |
| 20 | void smc_rx_init(struct smc_sock *smc); |
Stefan Raspl | 9014db2 | 2018-05-03 18:12:39 +0200 | [diff] [blame] | 21 | |
| 22 | int smc_rx_recvmsg(struct smc_sock *smc, struct msghdr *msg, |
| 23 | struct pipe_inode_info *pipe, size_t len, int flags); |
Stefan Raspl | b51fa1b | 2018-05-03 18:12:37 +0200 | [diff] [blame] | 24 | int smc_rx_wait(struct smc_sock *smc, long *timeo, |
| 25 | int (*fcrit)(struct smc_connection *conn)); |
| 26 | static inline int smc_rx_data_available(struct smc_connection *conn) |
| 27 | { |
| 28 | return atomic_read(&conn->bytes_to_rcv); |
| 29 | } |
| 30 | |
Ursula Braun | 952310c | 2017-01-09 16:55:24 +0100 | [diff] [blame] | 31 | #endif /* SMC_RX_H */ |