2 * Copyright (c) 2016 QLogic Corporation.
6 * See LICENSE.qede_pmd for copyright and licensing details.
9 #ifndef __ECORE_PROTO_IF_H__
10 #define __ECORE_PROTO_IF_H__
13 * PF parameters (according to personality/protocol)
16 #define ECORE_ROCE_PROTOCOL_INDEX (3)
18 struct ecore_eth_pf_params {
19 /* The following parameters are used during HW-init
20 * and these parameters need to be passed as arguments
21 * to update_pf_params routine invoked before slowpath start
25 /* To enable arfs, previous to HW-init a positive number needs to be
26 * set [as filters require allocated searcher ILT memory].
27 * This will set the maximal number of configured steering-filters.
32 /* Most of the the parameters below are described in the FW iSCSI / TCP HSI */
33 struct ecore_iscsi_pf_params {
34 u64 glbl_q_params_addr;
35 u64 bdq_pbl_base_addr[2];
40 /* The following parameters are used during HW-init
41 * and these parameters need to be passed as arguments
42 * to update_pf_params routine invoked before slowpath start
47 /* The following parameters are used during protocol-init */
48 u16 half_way_close_timeout;
49 u16 bdq_xoff_threshold[2];
50 u16 bdq_xon_threshold[2];
51 u16 cmdq_xoff_threshold;
52 u16 cmdq_xon_threshold;
55 u8 num_sq_pages_in_ring;
56 u8 num_r2tq_pages_in_ring;
57 u8 num_uhq_pages_in_ring;
69 u8 bdq_pbl_num_entries[2];
72 enum ecore_rdma_protocol {
73 ECORE_RDMA_PROTOCOL_DEFAULT,
74 ECORE_RDMA_PROTOCOL_ROCE,
75 ECORE_RDMA_PROTOCOL_IWARP,
78 struct ecore_rdma_pf_params {
79 /* Supplied to ECORE during resource allocation (may affect the ILT and
82 u32 min_dpis; /* number of requested DPIs */
83 u32 num_mrs; /* number of requested memory regions*/
84 u32 num_qps; /* number of requested Queue Pairs */
85 u32 num_srqs; /* number of requested SRQ */
86 u8 roce_edpm_mode; /* see QED_ROCE_EDPM_MODE_ENABLE */
87 u8 gl_pi; /* protocol index */
89 /* Will allocate rate limiters to be used with QPs */
92 /* TCP port number used for the iwarp traffic */
94 enum ecore_rdma_protocol rdma_protocol;
97 struct ecore_pf_params {
98 struct ecore_eth_pf_params eth_pf_params;
99 struct ecore_iscsi_pf_params iscsi_pf_params;
100 struct ecore_rdma_pf_params rdma_pf_params;