#include <net/addrconf.h>
#include <linux/etherdevice.h>
#include <linux/mlx5/vport.h>
#include "mlx5_core.h"
#include "lib/mlx5.h"
#include "fpga/conn.h"
#define MLX5_FPGA_PKEY …
#define MLX5_FPGA_PKEY_INDEX …
#define MLX5_FPGA_RECV_SIZE …
#define MLX5_FPGA_PORT_NUM …
#define MLX5_FPGA_CQ_BUDGET …
static int mlx5_fpga_conn_map_buf(struct mlx5_fpga_conn *conn,
struct mlx5_fpga_dma_buf *buf)
{ … }
static void mlx5_fpga_conn_unmap_buf(struct mlx5_fpga_conn *conn,
struct mlx5_fpga_dma_buf *buf)
{ … }
static int mlx5_fpga_conn_post_recv(struct mlx5_fpga_conn *conn,
struct mlx5_fpga_dma_buf *buf)
{ … }
static void mlx5_fpga_conn_notify_hw(struct mlx5_fpga_conn *conn, void *wqe)
{ … }
static void mlx5_fpga_conn_post_send(struct mlx5_fpga_conn *conn,
struct mlx5_fpga_dma_buf *buf)
{ … }
int mlx5_fpga_conn_send(struct mlx5_fpga_conn *conn,
struct mlx5_fpga_dma_buf *buf)
{ … }
static int mlx5_fpga_conn_post_recv_buf(struct mlx5_fpga_conn *conn)
{ … }
static int mlx5_fpga_conn_create_mkey(struct mlx5_core_dev *mdev, u32 pdn,
u32 *mkey)
{ … }
static void mlx5_fpga_conn_rq_cqe(struct mlx5_fpga_conn *conn,
struct mlx5_cqe64 *cqe, u8 status)
{ … }
static void mlx5_fpga_conn_sq_cqe(struct mlx5_fpga_conn *conn,
struct mlx5_cqe64 *cqe, u8 status)
{ … }
static void mlx5_fpga_conn_handle_cqe(struct mlx5_fpga_conn *conn,
struct mlx5_cqe64 *cqe)
{ … }
static void mlx5_fpga_conn_arm_cq(struct mlx5_fpga_conn *conn)
{ … }
static inline void mlx5_fpga_conn_cqes(struct mlx5_fpga_conn *conn,
unsigned int budget)
{ … }
static void mlx5_fpga_conn_cq_tasklet(struct tasklet_struct *t)
{ … }
static void mlx5_fpga_conn_cq_complete(struct mlx5_core_cq *mcq,
struct mlx5_eqe *eqe)
{ … }
static int mlx5_fpga_conn_create_cq(struct mlx5_fpga_conn *conn, int cq_size)
{ … }
static void mlx5_fpga_conn_destroy_cq(struct mlx5_fpga_conn *conn)
{ … }
static int mlx5_fpga_conn_create_wq(struct mlx5_fpga_conn *conn, void *qpc)
{ … }
static int mlx5_fpga_conn_create_qp(struct mlx5_fpga_conn *conn,
unsigned int tx_size, unsigned int rx_size)
{ … }
static void mlx5_fpga_conn_free_recv_bufs(struct mlx5_fpga_conn *conn)
{ … }
static void mlx5_fpga_conn_flush_send_bufs(struct mlx5_fpga_conn *conn)
{ … }
static void mlx5_fpga_conn_destroy_qp(struct mlx5_fpga_conn *conn)
{ … }
static int mlx5_fpga_conn_reset_qp(struct mlx5_fpga_conn *conn)
{ … }
static int mlx5_fpga_conn_init_qp(struct mlx5_fpga_conn *conn)
{ … }
static int mlx5_fpga_conn_rtr_qp(struct mlx5_fpga_conn *conn)
{ … }
static int mlx5_fpga_conn_rts_qp(struct mlx5_fpga_conn *conn)
{ … }
static int mlx5_fpga_conn_connect(struct mlx5_fpga_conn *conn)
{ … }
struct mlx5_fpga_conn *mlx5_fpga_conn_create(struct mlx5_fpga_device *fdev,
struct mlx5_fpga_conn_attr *attr,
enum mlx5_ifc_fpga_qp_type qp_type)
{ … }
void mlx5_fpga_conn_destroy(struct mlx5_fpga_conn *conn)
{ … }
int mlx5_fpga_conn_device_init(struct mlx5_fpga_device *fdev)
{ … }
void mlx5_fpga_conn_device_cleanup(struct mlx5_fpga_device *fdev)
{ … }