blob: 8f9f00997641ef5d04e6fa2e3184f71678128763 [file] [log] [blame]
Greg Kroah-Hartmanb2441312017-11-01 15:07:57 +01001/* SPDX-License-Identifier: GPL-2.0 */
Ursula Braun952310c2017-01-09 16:55:24 +01002/*
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
20void smc_rx_init(struct smc_sock *smc);
21int smc_rx_recvmsg(struct smc_sock *smc, struct msghdr *msg, size_t len,
22 int flags);
Stefan Rasplb51fa1b2018-05-03 18:12:37 +020023int smc_rx_wait(struct smc_sock *smc, long *timeo,
24 int (*fcrit)(struct smc_connection *conn));
25static inline int smc_rx_data_available(struct smc_connection *conn)
26{
27 return atomic_read(&conn->bytes_to_rcv);
28}
29
Ursula Braun952310c2017-01-09 16:55:24 +010030
31#endif /* SMC_RX_H */