linux/drivers/infiniband/hw/erdma/erdma_cm.h

/* SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause */

/* Authors: Cheng Xu <[email protected]> */
/*          Kai Shen <[email protected]> */
/* Copyright (c) 2020-2022, Alibaba Group. */

/* Authors: Bernard Metzler <[email protected]> */
/*          Greg Joyce <[email protected]> */
/* Copyright (c) 2008-2019, IBM Corporation */
/* Copyright (c) 2017, Open Grid Computing, Inc. */

#ifndef __ERDMA_CM_H__
#define __ERDMA_CM_H__

#include <linux/tcp.h>
#include <net/sock.h>
#include <rdma/iw_cm.h>

/* iWarp MPA protocol defs */
#define MPA_REVISION_EXT_1
#define MPA_MAX_PRIVDATA
#define MPA_KEY_REQ
#define MPA_KEY_REP
#define MPA_KEY_SIZE
#define MPA_DEFAULT_HDR_LEN

struct mpa_rr_params {};

/*
 * MPA request/response Hdr bits & fields
 */
enum {};

/*
 * MPA request/reply header
 */
struct mpa_rr {};

struct erdma_mpa_ext {};

enum {};

struct erdma_mpa_info {};

struct erdma_sk_upcalls {};

struct erdma_dev;

enum erdma_cep_state {};

struct erdma_cep {};

#define MPAREQ_TIMEOUT
#define MPAREP_TIMEOUT
#define CONNECT_TIMEOUT

enum erdma_work_type {};

struct erdma_cm_work {};

#define to_sockaddr_in(a)

static inline int getname_peer(struct socket *s, struct sockaddr_storage *a)
{}

static inline int getname_local(struct socket *s, struct sockaddr_storage *a)
{}

int erdma_connect(struct iw_cm_id *id, struct iw_cm_conn_param *param);
int erdma_accept(struct iw_cm_id *id, struct iw_cm_conn_param *param);
int erdma_reject(struct iw_cm_id *id, const void *pdata, u8 plen);
int erdma_create_listen(struct iw_cm_id *id, int backlog);
int erdma_destroy_listen(struct iw_cm_id *id);

void erdma_cep_get(struct erdma_cep *ceq);
void erdma_cep_put(struct erdma_cep *ceq);
int erdma_cm_queue_work(struct erdma_cep *ceq, enum erdma_work_type type);

int erdma_cm_init(void);
void erdma_cm_exit(void);

#define sk_to_cep(sk)

#endif