18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 */ 28c2ecf20Sopenharmony_ci/* 38c2ecf20Sopenharmony_ci * Shared Memory Communications over RDMA (SMC-R) and RoCE 48c2ecf20Sopenharmony_ci * 58c2ecf20Sopenharmony_ci * Manage RMBE 68c2ecf20Sopenharmony_ci * 78c2ecf20Sopenharmony_ci * Copyright IBM Corp. 2016 88c2ecf20Sopenharmony_ci * 98c2ecf20Sopenharmony_ci * Author(s): Ursula Braun <ubraun@linux.vnet.ibm.com> 108c2ecf20Sopenharmony_ci */ 118c2ecf20Sopenharmony_ci 128c2ecf20Sopenharmony_ci#ifndef SMC_RX_H 138c2ecf20Sopenharmony_ci#define SMC_RX_H 148c2ecf20Sopenharmony_ci 158c2ecf20Sopenharmony_ci#include <linux/socket.h> 168c2ecf20Sopenharmony_ci#include <linux/types.h> 178c2ecf20Sopenharmony_ci 188c2ecf20Sopenharmony_ci#include "smc.h" 198c2ecf20Sopenharmony_ci 208c2ecf20Sopenharmony_civoid smc_rx_init(struct smc_sock *smc); 218c2ecf20Sopenharmony_ci 228c2ecf20Sopenharmony_ciint smc_rx_recvmsg(struct smc_sock *smc, struct msghdr *msg, 238c2ecf20Sopenharmony_ci struct pipe_inode_info *pipe, size_t len, int flags); 248c2ecf20Sopenharmony_ciint smc_rx_wait(struct smc_sock *smc, long *timeo, 258c2ecf20Sopenharmony_ci int (*fcrit)(struct smc_connection *conn)); 268c2ecf20Sopenharmony_cistatic inline int smc_rx_data_available(struct smc_connection *conn) 278c2ecf20Sopenharmony_ci{ 288c2ecf20Sopenharmony_ci return atomic_read(&conn->bytes_to_rcv); 298c2ecf20Sopenharmony_ci} 308c2ecf20Sopenharmony_ci 318c2ecf20Sopenharmony_ci#endif /* SMC_RX_H */ 32