aboutsummaryrefslogtreecommitdiffstats
path: root/net/smc/smc_rx.h
diff options
context:
space:
mode:
authorWe-unite <3205135446@qq.com>2025-03-08 22:04:20 +0800
committerWe-unite <3205135446@qq.com>2025-03-08 22:04:20 +0800
commita07bb8fd1299070229f0e8f3dcb57ffd5ef9870a (patch)
tree84f21bd0bf7071bc5fc7dd989e77d7ceb5476682 /net/smc/smc_rx.h
downloadohosKernel-a07bb8fd1299070229f0e8f3dcb57ffd5ef9870a.tar.gz
ohosKernel-a07bb8fd1299070229f0e8f3dcb57ffd5ef9870a.zip
Initial commit: OpenHarmony-v4.0-ReleaseOpenHarmony-v4.0-Release
Diffstat (limited to 'net/smc/smc_rx.h')
-rw-r--r--net/smc/smc_rx.h31
1 files changed, 31 insertions, 0 deletions
diff --git a/net/smc/smc_rx.h b/net/smc/smc_rx.h
new file mode 100644
index 000000000..db823c97d
--- /dev/null
+++ b/net/smc/smc_rx.h
@@ -0,0 +1,31 @@
1/* SPDX-License-Identifier: GPL-2.0 */
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
20void smc_rx_init(struct smc_sock *smc);
21
22int smc_rx_recvmsg(struct smc_sock *smc, struct msghdr *msg,
23 struct pipe_inode_info *pipe, size_t len, int flags);
24int smc_rx_wait(struct smc_sock *smc, long *timeo,
25 int (*fcrit)(struct smc_connection *conn));
26static inline int smc_rx_data_available(struct smc_connection *conn)
27{
28 return atomic_read(&conn->bytes_to_rcv);
29}
30
31#endif /* SMC_RX_H */