#include <net/tcp.h>
#include <rdma/ib_verbs.h>
#include "smc.h"
#include "smc_core.h"
#include "smc_clc.h"
#include "smc_llc.h"
#include "smc_pnet.h"
#define SMC_LLC_DATA_LEN …
struct smc_llc_hdr { … } __packed;
#define SMC_LLC_FLAG_NO_RMBE_EYEC …
struct smc_llc_msg_confirm_link { … };
#define SMC_LLC_FLAG_ADD_LNK_REJ …
#define SMC_LLC_REJ_RSN_NO_ALT_PATH …
struct smc_llc_msg_add_link { … };
struct smc_llc_msg_add_link_cont_rt { … };
struct smc_llc_msg_add_link_v2_ext { … } __packed;
struct smc_llc_msg_req_add_link_v2 { … };
#define SMC_LLC_RKEYS_PER_CONT_MSG …
struct smc_llc_msg_add_link_cont { … } __packed;
#define SMC_LLC_FLAG_DEL_LINK_ALL …
#define SMC_LLC_FLAG_DEL_LINK_ORDERLY …
struct smc_llc_msg_del_link { … } __packed;
struct smc_llc_msg_test_link { … };
struct smc_rmb_rtoken { … } __packed;
#define SMC_LLC_RKEYS_PER_MSG …
#define SMC_LLC_RKEYS_PER_MSG_V2 …
struct smc_llc_msg_confirm_rkey { … };
#define SMC_LLC_DEL_RKEY_MAX …
#define SMC_LLC_FLAG_RKEY_RETRY …
#define SMC_LLC_FLAG_RKEY_NEG …
struct smc_llc_msg_delete_rkey { … };
struct smc_llc_msg_delete_rkey_v2 { … };
smc_llc_msg;
#define SMC_LLC_FLAG_RESP …
struct smc_llc_qentry { … };
static void smc_llc_enqueue(struct smc_link *link, union smc_llc_msg *llc);
struct smc_llc_qentry *smc_llc_flow_qentry_clr(struct smc_llc_flow *flow)
{ … }
void smc_llc_flow_qentry_del(struct smc_llc_flow *flow)
{ … }
static inline void smc_llc_flow_qentry_set(struct smc_llc_flow *flow,
struct smc_llc_qentry *qentry)
{ … }
static void smc_llc_flow_parallel(struct smc_link_group *lgr, u8 flow_type,
struct smc_llc_qentry *qentry)
{ … }
static bool smc_llc_flow_start(struct smc_llc_flow *flow,
struct smc_llc_qentry *qentry)
{ … }
int smc_llc_flow_initiate(struct smc_link_group *lgr,
enum smc_llc_flowtype type)
{ … }
void smc_llc_flow_stop(struct smc_link_group *lgr, struct smc_llc_flow *flow)
{ … }
struct smc_llc_qentry *smc_llc_wait(struct smc_link_group *lgr,
struct smc_link *lnk,
int time_out, u8 exp_msg)
{ … }
struct smc_llc_tx_pend { … };
static void smc_llc_tx_handler(struct smc_wr_tx_pend_priv *pend,
struct smc_link *link,
enum ib_wc_status wc_status)
{ … }
static int smc_llc_add_pending_send(struct smc_link *link,
struct smc_wr_buf **wr_buf,
struct smc_wr_tx_pend_priv **pend)
{ … }
static int smc_llc_add_pending_send_v2(struct smc_link *link,
struct smc_wr_v2_buf **wr_buf,
struct smc_wr_tx_pend_priv **pend)
{ … }
static void smc_llc_init_msg_hdr(struct smc_llc_hdr *hdr,
struct smc_link_group *lgr, size_t len)
{ … }
int smc_llc_send_confirm_link(struct smc_link *link,
enum smc_llc_reqresp reqresp)
{ … }
static int smc_llc_send_confirm_rkey(struct smc_link *send_link,
struct smc_buf_desc *rmb_desc)
{ … }
static int smc_llc_send_delete_rkey(struct smc_link *link,
struct smc_buf_desc *rmb_desc)
{ … }
static struct smc_buf_desc *_smc_llc_get_next_rmb(struct smc_link_group *lgr,
int *buf_lst)
{ … }
static struct smc_buf_desc *smc_llc_get_next_rmb(struct smc_link_group *lgr,
int *buf_lst,
struct smc_buf_desc *buf_pos)
{ … }
static struct smc_buf_desc *smc_llc_get_first_rmb(struct smc_link_group *lgr,
int *buf_lst)
{ … }
static int smc_llc_fill_ext_v2(struct smc_llc_msg_add_link_v2_ext *ext,
struct smc_link *link, struct smc_link *link_new)
{ … }
int smc_llc_send_add_link(struct smc_link *link, u8 mac[], u8 gid[],
struct smc_link *link_new,
enum smc_llc_reqresp reqresp)
{ … }
int smc_llc_send_delete_link(struct smc_link *link, u8 link_del_id,
enum smc_llc_reqresp reqresp, bool orderly,
u32 reason)
{ … }
static int smc_llc_send_test_link(struct smc_link *link, u8 user_data[16])
{ … }
static int smc_llc_send_message(struct smc_link *link, void *llcbuf)
{ … }
static int smc_llc_send_message_wait(struct smc_link *link, void *llcbuf)
{ … }
static int smc_llc_alloc_alt_link(struct smc_link_group *lgr,
enum smc_lgr_type lgr_new_t)
{ … }
static int smc_llc_add_link_cont(struct smc_link *link,
struct smc_link *link_new, u8 *num_rkeys_todo,
int *buf_lst, struct smc_buf_desc **buf_pos)
{ … }
static int smc_llc_cli_rkey_exchange(struct smc_link *link,
struct smc_link *link_new)
{ … }
static int smc_llc_cli_add_link_reject(struct smc_llc_qentry *qentry)
{ … }
static int smc_llc_cli_conf_link(struct smc_link *link,
struct smc_init_info *ini,
struct smc_link *link_new,
enum smc_lgr_type lgr_new_t)
{ … }
static void smc_llc_save_add_link_rkeys(struct smc_link *link,
struct smc_link *link_new)
{ … }
static void smc_llc_save_add_link_info(struct smc_link *link,
struct smc_llc_msg_add_link *add_llc)
{ … }
int smc_llc_cli_add_link(struct smc_link *link, struct smc_llc_qentry *qentry)
{ … }
static void smc_llc_send_request_add_link(struct smc_link *link)
{ … }
static void smc_llc_cli_add_link_invite(struct smc_link *link,
struct smc_llc_qentry *qentry)
{ … }
static bool smc_llc_is_empty_llc_message(union smc_llc_msg *llc)
{ … }
static bool smc_llc_is_local_add_link(union smc_llc_msg *llc)
{ … }
static void smc_llc_process_cli_add_link(struct smc_link_group *lgr)
{ … }
static int smc_llc_active_link_count(struct smc_link_group *lgr)
{ … }
static struct smc_link *smc_llc_find_asym_link(struct smc_link_group *lgr)
{ … }
static void smc_llc_delete_asym_link(struct smc_link_group *lgr)
{ … }
static int smc_llc_srv_rkey_exchange(struct smc_link *link,
struct smc_link *link_new)
{ … }
static int smc_llc_srv_conf_link(struct smc_link *link,
struct smc_link *link_new,
enum smc_lgr_type lgr_new_t)
{ … }
static void smc_llc_send_req_add_link_response(struct smc_llc_qentry *qentry)
{ … }
int smc_llc_srv_add_link(struct smc_link *link,
struct smc_llc_qentry *req_qentry)
{ … }
static void smc_llc_process_srv_add_link(struct smc_link_group *lgr)
{ … }
void smc_llc_add_link_local(struct smc_link *link)
{ … }
static void smc_llc_add_link_work(struct work_struct *work)
{ … }
void smc_llc_srv_delete_link_local(struct smc_link *link, u8 del_link_id)
{ … }
static void smc_llc_process_cli_delete_link(struct smc_link_group *lgr)
{ … }
void smc_llc_send_link_delete_all(struct smc_link_group *lgr, bool ord, u32 rsn)
{ … }
static void smc_llc_process_srv_delete_link(struct smc_link_group *lgr)
{ … }
static void smc_llc_delete_link_work(struct work_struct *work)
{ … }
static void smc_llc_rmt_conf_rkey(struct smc_link_group *lgr)
{ … }
static void smc_llc_rmt_delete_rkey(struct smc_link_group *lgr)
{ … }
static void smc_llc_protocol_violation(struct smc_link_group *lgr, u8 type)
{ … }
static void smc_llc_event_flush(struct smc_link_group *lgr)
{ … }
static void smc_llc_event_handler(struct smc_llc_qentry *qentry)
{ … }
static void smc_llc_event_work(struct work_struct *work)
{ … }
static void smc_llc_rx_response(struct smc_link *link,
struct smc_llc_qentry *qentry)
{ … }
static void smc_llc_enqueue(struct smc_link *link, union smc_llc_msg *llc)
{ … }
static void smc_llc_rx_handler(struct ib_wc *wc, void *buf)
{ … }
static void smc_llc_testlink_work(struct work_struct *work)
{ … }
void smc_llc_lgr_init(struct smc_link_group *lgr, struct smc_sock *smc)
{ … }
void smc_llc_lgr_clear(struct smc_link_group *lgr)
{ … }
int smc_llc_link_init(struct smc_link *link)
{ … }
void smc_llc_link_active(struct smc_link *link)
{ … }
void smc_llc_link_clear(struct smc_link *link, bool log)
{ … }
int smc_llc_do_confirm_rkey(struct smc_link *send_link,
struct smc_buf_desc *rmb_desc)
{ … }
int smc_llc_do_delete_rkey(struct smc_link_group *lgr,
struct smc_buf_desc *rmb_desc)
{ … }
void smc_llc_link_set_uid(struct smc_link *link)
{ … }
void smc_llc_save_peer_uid(struct smc_llc_qentry *qentry)
{ … }
int smc_llc_eval_conf_link(struct smc_llc_qentry *qentry,
enum smc_llc_reqresp type)
{ … }
static struct smc_wr_rx_handler smc_llc_rx_handlers[] = …;
int __init smc_llc_init(void)
{ … }