linux/drivers/net/ethernet/broadcom/cnic_defs.h


/* cnic.c: QLogic CNIC core network driver.
 *
 * Copyright (c) 2006-2014 Broadcom Corporation
 * Copyright (c) 2014 QLogic Corporation
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation.
 *
 */

#ifndef CNIC_DEFS_H
#define CNIC_DEFS_H

/* KWQ (kernel work queue) request op codes */
#define L2_KWQE_OPCODE_VALUE_FLUSH
#define L2_KWQE_OPCODE_VALUE_VM_FREE_RX_QUEUE

#define L4_KWQE_OPCODE_VALUE_CONNECT1
#define L4_KWQE_OPCODE_VALUE_CONNECT2
#define L4_KWQE_OPCODE_VALUE_CONNECT3
#define L4_KWQE_OPCODE_VALUE_RESET
#define L4_KWQE_OPCODE_VALUE_CLOSE
#define L4_KWQE_OPCODE_VALUE_UPDATE_SECRET
#define L4_KWQE_OPCODE_VALUE_INIT_ULP

#define L4_KWQE_OPCODE_VALUE_OFFLOAD_PG
#define L4_KWQE_OPCODE_VALUE_UPDATE_PG
#define L4_KWQE_OPCODE_VALUE_UPLOAD_PG

#define L5CM_RAMROD_CMD_ID_BASE
#define L5CM_RAMROD_CMD_ID_TCP_CONNECT
#define L5CM_RAMROD_CMD_ID_CLOSE
#define L5CM_RAMROD_CMD_ID_ABORT
#define L5CM_RAMROD_CMD_ID_SEARCHER_DELETE
#define L5CM_RAMROD_CMD_ID_TERMINATE_OFFLOAD

#define FCOE_RAMROD_CMD_ID_INIT_FUNC
#define FCOE_RAMROD_CMD_ID_DESTROY_FUNC
#define FCOE_RAMROD_CMD_ID_STAT_FUNC
#define FCOE_RAMROD_CMD_ID_OFFLOAD_CONN
#define FCOE_RAMROD_CMD_ID_ENABLE_CONN
#define FCOE_RAMROD_CMD_ID_DISABLE_CONN
#define FCOE_RAMROD_CMD_ID_DESTROY_CONN
#define FCOE_RAMROD_CMD_ID_TERMINATE_CONN

/* KCQ (kernel completion queue) response op codes */
#define L4_KCQE_OPCODE_VALUE_CLOSE_COMP
#define L4_KCQE_OPCODE_VALUE_RESET_COMP
#define L4_KCQE_OPCODE_VALUE_FW_TCP_UPDATE
#define L4_KCQE_OPCODE_VALUE_CONNECT_COMPLETE
#define L4_KCQE_OPCODE_VALUE_RESET_RECEIVED
#define L4_KCQE_OPCODE_VALUE_CLOSE_RECEIVED
#define L4_KCQE_OPCODE_VALUE_INIT_ULP

#define L4_KCQE_OPCODE_VALUE_OFFLOAD_PG
#define L4_KCQE_OPCODE_VALUE_UPDATE_PG
#define L4_KCQE_OPCODE_VALUE_UPLOAD_PG

/* KCQ (kernel completion queue) completion status */
#define L4_KCQE_COMPLETION_STATUS_SUCCESS
#define L4_KCQE_COMPLETION_STATUS_NIC_ERROR
#define L4_KCQE_COMPLETION_STATUS_PARITY_ERROR
#define L4_KCQE_COMPLETION_STATUS_TIMEOUT

#define L4_KCQE_COMPLETION_STATUS_CTX_ALLOC_FAIL
#define L4_KCQE_COMPLETION_STATUS_OFFLOADED_PG

#define L4_KCQE_OPCODE_VALUE_OOO_EVENT_NOTIFICATION
#define L4_KCQE_OPCODE_VALUE_OOO_FLUSH

#define L4_LAYER_CODE
#define L2_LAYER_CODE

/*
 * L4 KCQ CQE
 */
struct l4_kcq {};


/*
 * L4 KCQ CQE PG upload
 */
struct l4_kcq_upload_pg {};


/*
 * Gracefully close the connection request
 */
struct l4_kwq_close_req {};


/*
 * The first request to be passed in order to establish connection in option2
 */
struct l4_kwq_connect_req1 {};


/*
 * The second ( optional )request to be passed in order to establish
 * connection in option2 - for IPv6 only
 */
struct l4_kwq_connect_req2 {};


/*
 * The third ( and last )request to be passed in order to establish
 * connection in option2
 */
struct l4_kwq_connect_req3 {};


/*
 * a KWQE request to offload a PG connection
 */
struct l4_kwq_offload_pg {};


/*
 * Abortively close the connection request
 */
struct l4_kwq_reset_req {};


/*
 * a KWQE request to update a PG connection
 */
struct l4_kwq_update_pg {};


/*
 * a KWQE request to upload a PG or L4 context
 */
struct l4_kwq_upload {};

/*
 * bnx2x structures
 */

/*
 * The iscsi aggregative context of Cstorm
 */
struct cstorm_iscsi_ag_context {};

/*
 * The fcoe extra aggregative context section of Tstorm
 */
struct tstorm_fcoe_extra_ag_context_section {};

/*
 * The fcoe aggregative context of Tstorm
 */
struct tstorm_fcoe_ag_context {};



/*
 * The tcp aggregative context section of Tstorm
 */
struct tstorm_tcp_tcp_ag_context_section {};

/*
 * The iscsi aggregative context of Tstorm
 */
struct tstorm_iscsi_ag_context {};



/*
 * The fcoe aggregative context of Ustorm
 */
struct ustorm_fcoe_ag_context {};


/*
 * The iscsi aggregative context of Ustorm
 */
struct ustorm_iscsi_ag_context {};


/*
 * The fcoe aggregative context section of Xstorm
 */
struct xstorm_fcoe_extra_ag_context_section {};

/*
 * The fcoe aggregative context of Xstorm
 */
struct xstorm_fcoe_ag_context {};



/*
 * The tcp aggregative context section of Xstorm
 */
struct xstorm_tcp_tcp_ag_context_section {};

/*
 * The iscsi aggregative context of Xstorm
 */
struct xstorm_iscsi_ag_context {};


/*
 * The L5cm aggregative context of XStorm
 */
struct xstorm_l5cm_ag_context {};

/*
 * ABTS info $$KEEP_ENDIANNESS$$
 */
struct fcoe_abts_info {};


/*
 * Fixed size structure in order to plant it in Union structure
 * $$KEEP_ENDIANNESS$$
 */
struct fcoe_abts_rsp_union {};


/*
 * 4 regs size $$KEEP_ENDIANNESS$$
 */
struct fcoe_bd_ctx {};


/*
 * FCoE cached sges context $$KEEP_ENDIANNESS$$
 */
struct fcoe_cached_sge_ctx {};


/*
 * Cleanup info $$KEEP_ENDIANNESS$$
 */
struct fcoe_cleanup_info {};


/*
 * Fcp RSP flags $$KEEP_ENDIANNESS$$
 */
struct fcoe_fcp_rsp_flags {};

/*
 * Fcp RSP payload $$KEEP_ENDIANNESS$$
 */
struct fcoe_fcp_rsp_payload {};

/*
 * Fixed size structure in order to plant it in Union structure
 * $$KEEP_ENDIANNESS$$
 */
struct fcoe_fcp_rsp_union {};

/*
 * FC header $$KEEP_ENDIANNESS$$
 */
struct fcoe_fc_hdr {};

/*
 * FC header union $$KEEP_ENDIANNESS$$
 */
struct fcoe_mp_rsp_union {};

/*
 * Completion information $$KEEP_ENDIANNESS$$
 */
fcoe_comp_flow_info;


/*
 * External ABTS info $$KEEP_ENDIANNESS$$
 */
struct fcoe_ext_abts_info {};


/*
 * External cleanup info $$KEEP_ENDIANNESS$$
 */
struct fcoe_ext_cleanup_info {};


/*
 * Fcoe FW Tx sequence context $$KEEP_ENDIANNESS$$
 */
struct fcoe_fw_tx_seq_ctx {};

/*
 * Fcoe external FW Tx sequence context $$KEEP_ENDIANNESS$$
 */
struct fcoe_ext_fw_tx_seq_ctx {};


/*
 * FCoE multiple sges context $$KEEP_ENDIANNESS$$
 */
struct fcoe_mul_sges_ctx {};

/*
 * FCoE external multiple sges context $$KEEP_ENDIANNESS$$
 */
struct fcoe_ext_mul_sges_ctx {};


/*
 * FCP CMD payload $$KEEP_ENDIANNESS$$
 */
struct fcoe_fcp_cmd_payload {};





/*
 * Fcp xfr rdy payload $$KEEP_ENDIANNESS$$
 */
struct fcoe_fcp_xfr_rdy_payload {};


/*
 * FC frame $$KEEP_ENDIANNESS$$
 */
struct fcoe_fc_frame {};




/*
 * FCoE KCQ CQE parameters $$KEEP_ENDIANNESS$$
 */
fcoe_kcqe_params;

/*
 * FCoE KCQ CQE $$KEEP_ENDIANNESS$$
 */
struct fcoe_kcqe {};



/*
 * FCoE KWQE header $$KEEP_ENDIANNESS$$
 */
struct fcoe_kwqe_header {};

/*
 * FCoE firmware init request 1 $$KEEP_ENDIANNESS$$
 */
struct fcoe_kwqe_init1 {};

/*
 * FCoE firmware init request 2 $$KEEP_ENDIANNESS$$
 */
struct fcoe_kwqe_init2 {};

/*
 * FCoE firmware init request 3 $$KEEP_ENDIANNESS$$
 */
struct fcoe_kwqe_init3 {};

/*
 * FCoE connection offload request 1 $$KEEP_ENDIANNESS$$
 */
struct fcoe_kwqe_conn_offload1 {};

/*
 * FCoE connection offload request 2 $$KEEP_ENDIANNESS$$
 */
struct fcoe_kwqe_conn_offload2 {};

/*
 * FCoE connection offload request 3 $$KEEP_ENDIANNESS$$
 */
struct fcoe_kwqe_conn_offload3 {};

/*
 * FCoE connection offload request 4 $$KEEP_ENDIANNESS$$
 */
struct fcoe_kwqe_conn_offload4 {};

/*
 * FCoE connection enable request $$KEEP_ENDIANNESS$$
 */
struct fcoe_kwqe_conn_enable_disable {};

/*
 * FCoE connection destroy request $$KEEP_ENDIANNESS$$
 */
struct fcoe_kwqe_conn_destroy {};

/*
 * FCoe destroy request $$KEEP_ENDIANNESS$$
 */
struct fcoe_kwqe_destroy {};

/*
 * FCoe statistics request $$KEEP_ENDIANNESS$$
 */
struct fcoe_kwqe_stat {};

/*
 * FCoE KWQ WQE $$KEEP_ENDIANNESS$$
 */
fcoe_kwqe;
















/*
 * TX SGL context $$KEEP_ENDIANNESS$$
 */
fcoe_sgl_union_ctx;

/*
 * Data-In/ELS/BLS information $$KEEP_ENDIANNESS$$
 */
struct fcoe_read_flow_info {};


/*
 * Fcoe stat context $$KEEP_ENDIANNESS$$
 */
struct fcoe_s_stat_ctx {};

/*
 * Fcoe rx seq context $$KEEP_ENDIANNESS$$
 */
struct fcoe_rx_seq_ctx {};


/*
 * Fcoe rx_wr union context $$KEEP_ENDIANNESS$$
 */
fcoe_rx_wr_union_ctx;



/*
 * FCoE SQ element $$KEEP_ENDIANNESS$$
 */
struct fcoe_sqe {};



/*
 * 14 regs $$KEEP_ENDIANNESS$$
 */
struct fcoe_tce_tx_only {};

/*
 * 32 bytes (8 regs) used for TX only purposes $$KEEP_ENDIANNESS$$
 */
fcoe_tx_wr_rx_rd_union_ctx;

/*
 * tce_tx_wr_rx_rd_const $$KEEP_ENDIANNESS$$
 */
struct fcoe_tce_tx_wr_rx_rd_const {};

/*
 * tce_tx_wr_rx_rd $$KEEP_ENDIANNESS$$
 */
struct fcoe_tce_tx_wr_rx_rd {};

/*
 * tce_rx_wr_tx_rd_const $$KEEP_ENDIANNESS$$
 */
struct fcoe_tce_rx_wr_tx_rd_const {};

/*
 * tce_rx_wr_tx_rd_var $$KEEP_ENDIANNESS$$
 */
struct fcoe_tce_rx_wr_tx_rd_var {};

/*
 * tce_rx_wr_tx_rd $$KEEP_ENDIANNESS$$
 */
struct fcoe_tce_rx_wr_tx_rd {};

/*
 * tce_rx_only $$KEEP_ENDIANNESS$$
 */
struct fcoe_tce_rx_only {};

/*
 * task_ctx_entry $$KEEP_ENDIANNESS$$
 */
struct fcoe_task_ctx_entry {};










/*
 * FCoE XFRQ element $$KEEP_ENDIANNESS$$
 */
struct fcoe_xfrqe {};


/*
 * Cached SGEs $$KEEP_ENDIANNESS$$
 */
struct common_fcoe_sgl {};


/*
 * FCoE SQ\XFRQ element
 */
struct fcoe_cached_wqe {};


/*
 * FCoE connection enable\disable params passed by driver to FW in FCoE enable
 * ramrod $$KEEP_ENDIANNESS$$
 */
struct fcoe_conn_enable_disable_ramrod_params {};


/*
 * FCoE connection offload params passed by driver to FW in FCoE offload ramrod
 * $$KEEP_ENDIANNESS$$
 */
struct fcoe_conn_offload_ramrod_params {};


struct ustorm_fcoe_mng_ctx {};

/*
 * Parameters initialized during offloaded according to FLOGI/PLOGI/PRLI and
 * used in FCoE context section
 */
struct ustorm_fcoe_params {};

/*
 * FCoE 16-bits index structure
 */
struct fcoe_idx16_fields {};

/*
 * FCoE 16-bits index union
 */
fcoe_idx16_field_union;

/*
 * Parameters required for placement according to SGL
 */
struct ustorm_fcoe_data_place_mng {};

/*
 * Parameters required for placement according to SGL
 */
struct ustorm_fcoe_data_place {};

/*
 * TX processing shall write and RX processing shall read from this section
 */
fcoe_u_tce_tx_wr_rx_rd_union;

/*
 * TX processing shall write and RX processing shall read from this section
 */
struct fcoe_u_tce_tx_wr_rx_rd {};

struct ustorm_fcoe_tce {};

struct ustorm_fcoe_cache_ctx {};

/*
 * Ustorm FCoE Storm Context
 */
struct ustorm_fcoe_st_context {};

/*
 * The FCoE non-aggregative context of Tstorm
 */
struct tstorm_fcoe_st_context {};

/*
 * Ethernet context section
 */
struct xstorm_fcoe_eth_context_section {};

/*
 * Flags used in FCoE context section - 1 byte
 */
struct xstorm_fcoe_context_flags {};

struct xstorm_fcoe_tce {};

/*
 * FCP_DATA parameters required for transmission
 */
struct xstorm_fcoe_fcp_data {};

/*
 * vlan configuration
 */
struct xstorm_fcoe_vlan_conf {};

/*
 * FCoE 16-bits vlan structure
 */
struct fcoe_vlan_fields {};

/*
 * FCoE 16-bits vlan union
 */
fcoe_vlan_field_union;

/*
 * FCoE 16-bits vlan, vif union
 */
fcoe_vlan_vif_field_union;

/*
 * FCoE context section
 */
struct xstorm_fcoe_context_section {};

/*
 * Xstorm FCoE Storm Context
 */
struct xstorm_fcoe_st_context {};

/*
 * Fcoe connection context
 */
struct fcoe_context {};

/*
 * FCoE init params passed by driver to FW in FCoE init ramrod
 * $$KEEP_ENDIANNESS$$
 */
struct fcoe_init_ramrod_params {};

/*
 * FCoE statistics params buffer passed by driver to FW in FCoE statistics
 * ramrod $$KEEP_ENDIANNESS$$
 */
struct fcoe_stat_ramrod_params {};

/*
 * CQ DB CQ producer and pending completion counter
 */
struct iscsi_cq_db_prod_pnd_cmpltn_cnt {};

/*
 * CQ DB pending completion ITT array
 */
struct iscsi_cq_db_prod_pnd_cmpltn_cnt_arr {};

/*
 * Cstorm CQ sequence to notify array, updated by driver
 */
struct iscsi_cq_db_sqn_2_notify_arr {};

/*
 * Cstorm iSCSI Storm Context
 */
struct cstorm_iscsi_st_context {};


/*
 * SCSI read/write SQ WQE
 */
struct iscsi_cmd_pdu_hdr_little_endian {};


/*
 * Buffer per connection, used in Tstorm
 */
struct iscsi_conn_buf {};


/*
 * iSCSI context region, used only in iSCSI
 */
struct ustorm_iscsi_rq_db {};

/*
 * iSCSI context region, used only in iSCSI
 */
struct ustorm_iscsi_r2tq_db {};

/*
 * iSCSI context region, used only in iSCSI
 */
struct ustorm_iscsi_cq_db {};

/*
 * iSCSI context region, used only in iSCSI
 */
struct rings_db {};

/*
 * iSCSI context region, used only in iSCSI
 */
struct ustorm_iscsi_placement_db {};

/*
 * Ustorm iSCSI Storm Context
 */
struct ustorm_iscsi_st_context {};

/*
 * TCP context region, shared in TOE, RDMA and ISCSI
 */
struct tstorm_tcp_st_context_section {};

/*
 * Termination variables
 */
struct iscsi_term_vars {};

/*
 * iSCSI context region, used only in iSCSI
 */
struct tstorm_iscsi_st_context_section {};

/*
 * The iSCSI non-aggregative context of Tstorm
 */
struct tstorm_iscsi_st_context {};

/*
 * Ethernet context section, shared in TOE, RDMA and ISCSI
 */
struct xstorm_eth_context_section {};

/*
 * IpV4 context section, shared in TOE, RDMA and ISCSI
 */
struct xstorm_ip_v4_context_section {};

/*
 * context section, shared in TOE, RDMA and ISCSI
 */
struct xstorm_padded_ip_v4_context_section {};

/*
 * IpV6 context section, shared in TOE, RDMA and ISCSI
 */
struct xstorm_ip_v6_context_section {};

xstorm_ip_context_section_types;

/*
 * TCP context section, shared in TOE, RDMA and ISCSI
 */
struct xstorm_tcp_context_section {};

/*
 * Common context section, shared in TOE, RDMA and ISCSI
 */
struct xstorm_common_context_section {};

/*
 * Flags used in ISCSI context section
 */
struct xstorm_iscsi_context_flags {};

struct iscsi_task_context_entry_x {};

struct iscsi_task_context_entry_xuc_x_write_only {};

struct iscsi_task_context_entry_xuc_xu_write_both {};

/*
 * iSCSI context section
 */
struct xstorm_iscsi_context_section {};

/*
 * Xstorm iSCSI Storm Context
 */
struct xstorm_iscsi_st_context {};

/*
 * Iscsi connection context
 */
struct iscsi_context {};


/*
 * PDU header of an iSCSI DATA-OUT
 */
struct iscsi_data_pdu_hdr_little_endian {};


/*
 * PDU header of an iSCSI login request
 */
struct iscsi_login_req_hdr_little_endian {};

/*
 * PDU header of an iSCSI logout request
 */
struct iscsi_logout_req_hdr_little_endian {};

/*
 * PDU header of an iSCSI TMF request
 */
struct iscsi_tmf_req_hdr_little_endian {};

/*
 * PDU header of an iSCSI Text request
 */
struct iscsi_text_req_hdr_little_endian {};

/*
 * PDU header of an iSCSI Nop-Out
 */
struct iscsi_nop_out_hdr_little_endian {};

/*
 * iscsi pdu headers in little endian form.
 */
iscsi_pdu_headers_little_endian;

struct iscsi_hq_bd {};


/*
 * CQE data for L2 OOO connection $$KEEP_ENDIANNESS$$
 */
struct iscsi_l2_ooo_data {};






struct iscsi_task_context_entry_xuc_c_write_only {};

struct iscsi_task_context_r2t_table_entry {};

struct iscsi_task_context_entry_xuc_u_write_only {};

struct iscsi_task_context_entry_xuc {};

struct iscsi_task_context_entry_u {};

struct iscsi_task_context_entry {};








struct iscsi_task_context_entry_xuc_x_init_only {};

















/*
 * ipv6 structure
 */
struct ip_v6_addr {};



/*
 * l5cm- connection identification params
 */
struct l5cm_conn_addr_params {};

/*
 * l5cm-xstorm connection buffer
 */
struct l5cm_xstorm_conn_buffer {};

/*
 * l5cm-tstorm connection buffer
 */
struct l5cm_tstorm_conn_buffer {};

/*
 * l5cm connection buffer for active side
 */
struct l5cm_active_conn_buffer {};



/*
 * The l5cm opaque buffer passed in add new connection ramrod passive side
 */
struct l5cm_hash_input_string {};


/*
 * syn cookie component
 */
struct l5cm_syn_cookie_comp {};

/*
 * data related to listeners of a TCP port
 */
struct l5cm_port_listener_data {};

/*
 * Opaque structure passed from U to X when final ack arrives
 */
struct l5cm_opaque_buf {};


/*
 * l5cm slow path element
 */
struct l5cm_packet_size {};


/*
 * The final-ack union structure in PCS entry after final ack arrived
 */
struct l5cm_pcse_ack {};


/*
 * The syn union structure in PCS entry after syn arrived
 */
struct l5cm_pcse_syn {};


/*
 * pcs entry data for passive connections
 */
struct l5cm_pcs_attributes {};


l5cm_seg_params;

/*
 * pcs entry data for passive connections
 */
struct l5cm_pcs_hdr {};

/*
 * pcs entry for passive connections
 */
struct l5cm_pcs_entry {};




/*
 * l5cm connection parameters
 */
l5cm_reduce_param_union;

/*
 * l5cm connection parameters
 */
struct l5cm_reduce_conn {};

/*
 * l5cm slow path element
 */
l5cm_specific_data;

/*
 * l5 slow path element
 */
struct l5cm_spe {};




/*
 * Termination variables
 */
struct l5cm_term_vars {};




/*
 * Tstorm Tcp flags
 */
struct tstorm_l5cm_tcp_flags {};


/*
 * Xstorm Tcp flags
 */
struct xstorm_l5cm_tcp_flags {};



/*
 * Out-of-order states
 */
enum tcp_ooo_event {};


/*
 * OOO support modes
 */
enum tcp_tstorm_ooo {};









#endif /* __5710_HSI_CNIC_LE__ */