#ifndef SMC_CDC_H
#define SMC_CDC_H
#include <linux/kernel.h>
#include <linux/atomic.h>
#include <linux/in.h>
#include <linux/compiler.h>
#include "smc.h"
#include "smc_core.h"
#include "smc_wr.h"
#define SMC_CDC_MSG_TYPE …
smc_cdc_cursor __aligned(…);
struct smc_cdc_msg { … };
smcd_cdc_cursor __aligned(…);
struct smcd_cdc_msg { … } __aligned(…);
static inline bool smc_cdc_rxed_any_close(struct smc_connection *conn)
{ … }
static inline bool smc_cdc_rxed_any_close_or_senddone(
struct smc_connection *conn)
{ … }
static inline void smc_curs_add(int size, union smc_host_cursor *curs,
int value)
{ … }
static inline void smc_curs_copy(union smc_host_cursor *tgt,
union smc_host_cursor *src,
struct smc_connection *conn)
{ … }
static inline void smc_curs_copy_net(union smc_cdc_cursor *tgt,
union smc_cdc_cursor *src,
struct smc_connection *conn)
{ … }
static inline void smcd_curs_copy(union smcd_cdc_cursor *tgt,
union smcd_cdc_cursor *src,
struct smc_connection *conn)
{ … }
static inline int smc_curs_diff(unsigned int size,
union smc_host_cursor *old,
union smc_host_cursor *new)
{ … }
static inline int smc_curs_comp(unsigned int size,
union smc_host_cursor *old,
union smc_host_cursor *new)
{ … }
static inline int smc_curs_diff_large(unsigned int size,
union smc_host_cursor *old,
union smc_host_cursor *new)
{ … }
static inline void smc_host_cursor_to_cdc(union smc_cdc_cursor *peer,
union smc_host_cursor *local,
union smc_host_cursor *save,
struct smc_connection *conn)
{ … }
static inline void smc_host_msg_to_cdc(struct smc_cdc_msg *peer,
struct smc_connection *conn,
union smc_host_cursor *save)
{ … }
static inline void smc_cdc_cursor_to_host(union smc_host_cursor *local,
union smc_cdc_cursor *peer,
struct smc_connection *conn)
{ … }
static inline void smcr_cdc_msg_to_host(struct smc_host_cdc_msg *local,
struct smc_cdc_msg *peer,
struct smc_connection *conn)
{ … }
static inline void smcd_cdc_msg_to_host(struct smc_host_cdc_msg *local,
struct smcd_cdc_msg *peer,
struct smc_connection *conn)
{ … }
static inline void smc_cdc_msg_to_host(struct smc_host_cdc_msg *local,
struct smc_cdc_msg *peer,
struct smc_connection *conn)
{ … }
struct smc_cdc_tx_pend { … };
int smc_cdc_get_free_slot(struct smc_connection *conn,
struct smc_link *link,
struct smc_wr_buf **wr_buf,
struct smc_rdma_wr **wr_rdma_buf,
struct smc_cdc_tx_pend **pend);
void smc_cdc_wait_pend_tx_wr(struct smc_connection *conn);
int smc_cdc_msg_send(struct smc_connection *conn, struct smc_wr_buf *wr_buf,
struct smc_cdc_tx_pend *pend);
int smc_cdc_get_slot_and_msg_send(struct smc_connection *conn);
int smcd_cdc_msg_send(struct smc_connection *conn);
int smcr_cdc_msg_send_validation(struct smc_connection *conn,
struct smc_cdc_tx_pend *pend,
struct smc_wr_buf *wr_buf);
int smc_cdc_init(void) __init;
void smcd_cdc_rx_init(struct smc_connection *conn);
#endif