linux/drivers/net/ethernet/qlogic/qed/qed_iwarp.h

/* SPDX-License-Identifier: (GPL-2.0-only OR BSD-3-Clause) */
/* QLogic qed NIC Driver
 * Copyright (c) 2015-2017  QLogic Corporation
 * Copyright (c) 2019-2020 Marvell International Ltd.
 */

#ifndef _QED_IWARP_H
#define _QED_IWARP_H

enum qed_iwarp_qp_state {};

enum qed_iwarp_qp_state qed_roce2iwarp_state(enum qed_roce_qp_state state);

#define QED_IWARP_PREALLOC_CNT

#define QED_IWARP_LL2_SYN_TX_SIZE
#define QED_IWARP_LL2_SYN_RX_SIZE

#define QED_IWARP_LL2_OOO_DEF_TX_SIZE
#define QED_IWARP_MAX_OOO
#define QED_IWARP_LL2_OOO_MAX_RX_SIZE

#define QED_IWARP_HANDLE_INVAL

struct qed_iwarp_ll2_buff {};

struct qed_iwarp_ll2_mpa_buf {};

/* In some cases a fpdu will arrive with only one byte of the header, in this
 * case the fpdu_length will be partial (contain only higher byte and
 * incomplete bytes will contain the invalid value
 */
#define QED_IWARP_INVALID_INCOMPLETE_BYTES

struct qed_iwarp_fpdu {};

struct qed_iwarp_info {};

enum qed_iwarp_ep_state {};

async_output;

#define QED_MAX_PRIV_DATA_LEN
struct qed_iwarp_ep_memory {};

/* Endpoint structure represents a TCP connection. This connection can be
 * associated with a QP or not (in which case QP==NULL)
 */
struct qed_iwarp_ep {};

struct qed_iwarp_listener {};

int qed_iwarp_alloc(struct qed_hwfn *p_hwfn);

int qed_iwarp_setup(struct qed_hwfn *p_hwfn,
		    struct qed_rdma_start_in_params *params);

void qed_iwarp_init_fw_ramrod(struct qed_hwfn *p_hwfn,
			      struct iwarp_init_func_ramrod_data *p_ramrod);

int qed_iwarp_stop(struct qed_hwfn *p_hwfn);

void qed_iwarp_resc_free(struct qed_hwfn *p_hwfn);

void qed_iwarp_init_devinfo(struct qed_hwfn *p_hwfn);

void qed_iwarp_init_hw(struct qed_hwfn *p_hwfn, struct qed_ptt *p_ptt);

int qed_iwarp_create_qp(struct qed_hwfn *p_hwfn,
			struct qed_rdma_qp *qp,
			struct qed_rdma_create_qp_out_params *out_params);

int qed_iwarp_modify_qp(struct qed_hwfn *p_hwfn, struct qed_rdma_qp *qp,
			enum qed_iwarp_qp_state new_state, bool internal);

int qed_iwarp_destroy_qp(struct qed_hwfn *p_hwfn, struct qed_rdma_qp *qp);

int qed_iwarp_fw_destroy(struct qed_hwfn *p_hwfn, struct qed_rdma_qp *qp);

void qed_iwarp_query_qp(struct qed_rdma_qp *qp,
			struct qed_rdma_query_qp_out_params *out_params);

int
qed_iwarp_connect(void *rdma_cxt,
		  struct qed_iwarp_connect_in *iparams,
		  struct qed_iwarp_connect_out *oparams);

int
qed_iwarp_create_listen(void *rdma_cxt,
			struct qed_iwarp_listen_in *iparams,
			struct qed_iwarp_listen_out *oparams);

int qed_iwarp_accept(void *rdma_cxt, struct qed_iwarp_accept_in *iparams);

int qed_iwarp_reject(void *rdma_cxt, struct qed_iwarp_reject_in *iparams);
int qed_iwarp_destroy_listen(void *rdma_cxt, void *handle);

int qed_iwarp_send_rtr(void *rdma_cxt, struct qed_iwarp_send_rtr_in *iparams);

#endif