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

// 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]> */
/*          Fredy Neeser */
/*          Greg Joyce <[email protected]> */
/* Copyright (c) 2008-2019, IBM Corporation */
/* Copyright (c) 2017, Open Grid Computing, Inc. */

#include <linux/workqueue.h>
#include <trace/events/sock.h>

#include "erdma.h"
#include "erdma_cm.h"
#include "erdma_verbs.h"

static struct workqueue_struct *erdma_cm_wq;

static void erdma_cm_llp_state_change(struct sock *sk);
static void erdma_cm_llp_data_ready(struct sock *sk);
static void erdma_cm_llp_error_report(struct sock *sk);

static void erdma_sk_assign_cm_upcalls(struct sock *sk)
{}

static void erdma_sk_save_upcalls(struct sock *sk)
{}

static void erdma_sk_restore_upcalls(struct sock *sk, struct erdma_cep *cep)
{}

static void erdma_socket_disassoc(struct socket *s)
{}

static void erdma_cep_socket_assoc(struct erdma_cep *cep, struct socket *s)
{}

static void erdma_disassoc_listen_cep(struct erdma_cep *cep)
{}

static struct erdma_cep *erdma_cep_alloc(struct erdma_dev *dev)
{}

static void erdma_cm_free_work(struct erdma_cep *cep)
{}

static void erdma_cancel_mpatimer(struct erdma_cep *cep)
{}

static void erdma_put_work(struct erdma_cm_work *work)
{}

static void erdma_cep_set_inuse(struct erdma_cep *cep)
{}

static void erdma_cep_set_free(struct erdma_cep *cep)
{}

static void __erdma_cep_dealloc(struct kref *ref)
{}

static struct erdma_cm_work *erdma_get_work(struct erdma_cep *cep)
{}

static int erdma_cm_alloc_work(struct erdma_cep *cep, int num)
{}

static int erdma_cm_upcall(struct erdma_cep *cep, enum iw_cm_event_type reason,
			   int status)
{}

void erdma_qp_cm_drop(struct erdma_qp *qp)
{}

void erdma_cep_put(struct erdma_cep *cep)
{}

void erdma_cep_get(struct erdma_cep *cep)
{}

static int erdma_send_mpareqrep(struct erdma_cep *cep, const void *pdata,
				u8 pd_len)
{}

static inline int ksock_recv(struct socket *sock, char *buf, size_t size,
			     int flags)
{}

static int __recv_mpa_hdr(struct erdma_cep *cep, int hdr_rcvd, char *hdr,
			  int hdr_size, int *rcvd_out)
{}

static void __mpa_rr_set_revision(__be16 *bits, u8 rev)
{}

static u8 __mpa_rr_revision(__be16 mpa_rr_bits)
{}

static void __mpa_ext_set_cc(__be32 *bits, u32 cc)
{}

static u8 __mpa_ext_cc(__be32 mpa_ext_bits)
{}

/*
 * Receive MPA Request/Reply header.
 *
 * Returns 0 if complete MPA Request/Reply haeder including
 * eventual private data was received. Returns -EAGAIN if
 * header was partially received or negative error code otherwise.
 *
 * Context: May be called in process context only
 */
static int erdma_recv_mpa_rr(struct erdma_cep *cep)
{}

/*
 * erdma_proc_mpareq()
 *
 * Read MPA Request from socket and signal new connection to IWCM
 * if success. Caller must hold lock on corresponding listening CEP.
 */
static int erdma_proc_mpareq(struct erdma_cep *cep)
{}

static int erdma_proc_mpareply(struct erdma_cep *cep)
{}

static void erdma_accept_newconn(struct erdma_cep *cep)
{}

static int erdma_newconn_connected(struct erdma_cep *cep)
{}

static void erdma_cm_work_handler(struct work_struct *w)
{}

int erdma_cm_queue_work(struct erdma_cep *cep, enum erdma_work_type type)
{}

static void erdma_cm_llp_data_ready(struct sock *sk)
{}

static void erdma_cm_llp_error_report(struct sock *sk)
{}

static void erdma_cm_llp_state_change(struct sock *sk)
{}

static int kernel_bindconnect(struct socket *s, struct sockaddr *laddr,
			      int laddrlen, struct sockaddr *raddr,
			      int raddrlen, int flags)
{}

int erdma_connect(struct iw_cm_id *id, struct iw_cm_conn_param *params)
{}

int erdma_accept(struct iw_cm_id *id, struct iw_cm_conn_param *params)
{}

int erdma_reject(struct iw_cm_id *id, const void *pdata, u8 plen)
{}

int erdma_create_listen(struct iw_cm_id *id, int backlog)
{}

static void erdma_drop_listeners(struct iw_cm_id *id)
{}

int erdma_destroy_listen(struct iw_cm_id *id)
{}

int erdma_cm_init(void)
{}

void erdma_cm_exit(void)
{}