/* SPDX-License-Identifier: (GPL-2.0-only OR BSD-3-Clause) */ /* Copyright 2021 Marvell. All rights reserved. */ #ifndef _QED_NVMETCP_IF_H #define _QED_NVMETCP_IF_H #include <linux/types.h> #include <linux/qed/qed_if.h> #include <linux/qed/storage_common.h> #include <linux/qed/nvmetcp_common.h> #define QED_NVMETCP_MAX_IO_SIZE … #define QED_NVMETCP_CMN_HDR_SIZE … #define QED_NVMETCP_CMD_HDR_SIZE … #define QED_NVMETCP_NON_IO_HDR_SIZE … nvmetcp_event_cb_t; struct qed_dev_nvmetcp_info { … }; #define MAX_TID_BLOCKS_NVMETCP … struct qed_nvmetcp_tid { … }; struct qed_nvmetcp_id_params { … }; struct qed_nvmetcp_params_offload { … }; struct qed_nvmetcp_params_update { … }; struct qed_nvmetcp_cb_ops { … }; struct nvmetcp_sge { … }; /* IO path HSI function SGL params */ struct storage_sgl_task_params { … }; /* IO path HSI function FW task context params */ struct nvmetcp_task_params { … }; /** * struct qed_nvmetcp_ops - qed NVMeTCP operations. * @common: common operations pointer * @ll2: light L2 operations pointer * @fill_dev_info: fills NVMeTCP specific information * @param cdev * @param info * @return 0 on success, otherwise error value. * @register_ops: register nvmetcp operations * @param cdev * @param ops - specified using qed_nvmetcp_cb_ops * @param cookie - driver private * @start: nvmetcp in FW * @param cdev * @param tasks - qed will fill information about tasks * return 0 on success, otherwise error value. * @stop: nvmetcp in FW * @param cdev * return 0 on success, otherwise error value. * @acquire_conn: acquire a new nvmetcp connection * @param cdev * @param handle - qed will fill handle that should be * used henceforth as identifier of the * connection. * @param p_doorbell - qed will fill the address of the * doorbell. * @return 0 on success, otherwise error value. * @release_conn: release a previously acquired nvmetcp connection * @param cdev * @param handle - the connection handle. * @return 0 on success, otherwise error value. * @offload_conn: configures an offloaded connection * @param cdev * @param handle - the connection handle. * @param conn_info - the configuration to use for the * offload. * @return 0 on success, otherwise error value. * @update_conn: updates an offloaded connection * @param cdev * @param handle - the connection handle. * @param conn_info - the configuration to use for the * offload. * @return 0 on success, otherwise error value. * @destroy_conn: stops an offloaded connection * @param cdev * @param handle - the connection handle. * @return 0 on success, otherwise error value. * @clear_sq: clear all task in sq * @param cdev * @param handle - the connection handle. * @return 0 on success, otherwise error value. * @add_src_tcp_port_filter: Add source tcp port filter * @param cdev * @param src_port * @remove_src_tcp_port_filter: Remove source tcp port filter * @param cdev * @param src_port * @add_dst_tcp_port_filter: Add destination tcp port filter * @param cdev * @param dest_port * @remove_dst_tcp_port_filter: Remove destination tcp port filter * @param cdev * @param dest_port * @clear_all_filters: Clear all filters. * @param cdev * @init_read_io: Init read IO. * @task_params * @cmd_pdu_header * @nvme_cmd * @sgl_task_params * @init_write_io: Init write IO. * @task_params * @cmd_pdu_header * @nvme_cmd * @sgl_task_params * @init_icreq_exchange: Exchange ICReq. * @task_params * @init_conn_req_pdu_hdr * @tx_sgl_task_params * @rx_sgl_task_params * @init_task_cleanup: Init task cleanup. * @task_params */ struct qed_nvmetcp_ops { … }; const struct qed_nvmetcp_ops *qed_get_nvmetcp_ops(void); void qed_put_nvmetcp_ops(void); #endif