Link: https://lore.kernel.org/r/20260217200002.683975158@linuxfoundation.org Tested-by: Florian Fainelli <florian.fainelli@broadcom.com> Tested-by: Takeshi Ogasawara <takeshi.ogasawara@futuring-girl.com> Tested-by: Peter Schneider <pschneider1968@googlemail.com> Tested-by: Jon Hunter <jonathanh@nvidia.com> Tested-by: Salvatore Bonaccorso <carnil@debian.org> Tested-by: Brett A C Sheffield <bacs@librecast.net> Tested-by: Mark Brown <broonie@kernel.org> Tested-by: Luna Jernberg <droidbittin@gmail.com> Tested-by: Ronald Warsow <rwarsow@gmx.de> Tested-by: Justin M. Forbes <jforbes@fedoraproject.org> Tested-by: Ron Economos <re@w6rz.net> Tested-by: Miguel Ojeda <ojeda@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
32 lines
771 B
C
32 lines
771 B
C
/* SPDX-License-Identifier: GPL-2.0 */
|
|
/*
|
|
* Shared Memory Communications over RDMA (SMC-R) and RoCE
|
|
*
|
|
* Manage RMBE
|
|
*
|
|
* Copyright IBM Corp. 2016
|
|
*
|
|
* Author(s): Ursula Braun <ubraun@linux.vnet.ibm.com>
|
|
*/
|
|
|
|
#ifndef SMC_RX_H
|
|
#define SMC_RX_H
|
|
|
|
#include <linux/socket.h>
|
|
#include <linux/types.h>
|
|
|
|
#include "smc.h"
|
|
|
|
void smc_rx_init(struct smc_sock *smc);
|
|
|
|
int smc_rx_recvmsg(struct smc_sock *smc, struct msghdr *msg,
|
|
struct pipe_inode_info *pipe, size_t len, int flags);
|
|
int smc_rx_wait(struct smc_sock *smc, long *timeo, size_t peeked,
|
|
int (*fcrit)(struct smc_connection *conn, size_t baseline));
|
|
static inline int smc_rx_data_available(struct smc_connection *conn, size_t peeked)
|
|
{
|
|
return atomic_read(&conn->bytes_to_rcv) - peeked;
|
|
}
|
|
|
|
#endif /* SMC_RX_H */
|