#undef pr_fmt
#define pr_fmt(fmt) …
#include <linux/module.h>
#include <linux/inet.h>
#include "rtrs-pri.h"
#include "rtrs-log.h"
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;
struct rtrs_iu *rtrs_iu_alloc(u32 iu_num, size_t size, gfp_t gfp_mask,
struct ib_device *dma_dev,
enum dma_data_direction dir,
void (*done)(struct ib_cq *cq, struct ib_wc *wc))
{ … }
EXPORT_SYMBOL_GPL(…);
void rtrs_iu_free(struct rtrs_iu *ius, struct ib_device *ibdev, u32 queue_num)
{ … }
EXPORT_SYMBOL_GPL(…);
int rtrs_iu_post_recv(struct rtrs_con *con, struct rtrs_iu *iu)
{ … }
EXPORT_SYMBOL_GPL(…);
int rtrs_post_recv_empty(struct rtrs_con *con, struct ib_cqe *cqe)
{ … }
EXPORT_SYMBOL_GPL(…);
static int rtrs_post_send(struct ib_qp *qp, struct ib_send_wr *head,
struct ib_send_wr *wr, struct ib_send_wr *tail)
{ … }
int rtrs_iu_post_send(struct rtrs_con *con, struct rtrs_iu *iu, size_t size,
struct ib_send_wr *head)
{ … }
EXPORT_SYMBOL_GPL(…);
int rtrs_iu_post_rdma_write_imm(struct rtrs_con *con, struct rtrs_iu *iu,
struct ib_sge *sge, unsigned int num_sge,
u32 rkey, u64 rdma_addr, u32 imm_data,
enum ib_send_flags flags,
struct ib_send_wr *head,
struct ib_send_wr *tail)
{ … }
EXPORT_SYMBOL_GPL(…);
static int rtrs_post_rdma_write_imm_empty(struct rtrs_con *con,
struct ib_cqe *cqe,
u32 imm_data,
struct ib_send_wr *head)
{ … }
static void qp_event_handler(struct ib_event *ev, void *ctx)
{ … }
static bool is_pollqueue(struct rtrs_con *con)
{ … }
static int create_cq(struct rtrs_con *con, int cq_vector, int nr_cqe,
enum ib_poll_context poll_ctx)
{ … }
static int create_qp(struct rtrs_con *con, struct ib_pd *pd,
u32 max_send_wr, u32 max_recv_wr, u32 max_sge)
{ … }
static void destroy_cq(struct rtrs_con *con)
{ … }
int rtrs_cq_qp_create(struct rtrs_path *path, struct rtrs_con *con,
u32 max_send_sge, int cq_vector, int nr_cqe,
u32 max_send_wr, u32 max_recv_wr,
enum ib_poll_context poll_ctx)
{ … }
EXPORT_SYMBOL_GPL(…);
void rtrs_cq_qp_destroy(struct rtrs_con *con)
{ … }
EXPORT_SYMBOL_GPL(…);
static void schedule_hb(struct rtrs_path *path)
{ … }
void rtrs_send_hb_ack(struct rtrs_path *path)
{ … }
EXPORT_SYMBOL_GPL(…);
static void hb_work(struct work_struct *work)
{ … }
void rtrs_init_hb(struct rtrs_path *path, struct ib_cqe *cqe,
unsigned int interval_ms, unsigned int missed_max,
void (*err_handler)(struct rtrs_con *con),
struct workqueue_struct *wq)
{ … }
EXPORT_SYMBOL_GPL(…);
void rtrs_start_hb(struct rtrs_path *path)
{ … }
EXPORT_SYMBOL_GPL(…);
void rtrs_stop_hb(struct rtrs_path *path)
{ … }
EXPORT_SYMBOL_GPL(…);
static int rtrs_str_gid_to_sockaddr(const char *addr, size_t len,
short port, struct sockaddr_storage *dst)
{ … }
static int rtrs_str_to_sockaddr(const char *addr, size_t len,
u16 port, struct sockaddr_storage *dst)
{ … }
int sockaddr_to_str(const struct sockaddr *addr, char *buf, size_t len)
{ … }
EXPORT_SYMBOL(…);
int rtrs_addr_to_str(const struct rtrs_addr *addr, char *buf, size_t len)
{ … }
EXPORT_SYMBOL(…);
int rtrs_addr_to_sockaddr(const char *str, size_t len, u16 port,
struct rtrs_addr *addr)
{ … }
EXPORT_SYMBOL(…);
void rtrs_rdma_dev_pd_init(enum ib_pd_flags pd_flags,
struct rtrs_rdma_dev_pd *pool)
{ … }
EXPORT_SYMBOL(…);
void rtrs_rdma_dev_pd_deinit(struct rtrs_rdma_dev_pd *pool)
{ … }
EXPORT_SYMBOL(…);
static void dev_free(struct kref *ref)
{ … }
int rtrs_ib_dev_put(struct rtrs_ib_dev *dev)
{ … }
EXPORT_SYMBOL(…);
static int rtrs_ib_dev_get(struct rtrs_ib_dev *dev)
{ … }
struct rtrs_ib_dev *
rtrs_ib_dev_find_or_add(struct ib_device *ib_dev,
struct rtrs_rdma_dev_pd *pool)
{ … }
EXPORT_SYMBOL(…);