1*14b24e2bSVaishali Kulkarni /*
2*14b24e2bSVaishali Kulkarni * CDDL HEADER START
3*14b24e2bSVaishali Kulkarni *
4*14b24e2bSVaishali Kulkarni * The contents of this file are subject to the terms of the
5*14b24e2bSVaishali Kulkarni * Common Development and Distribution License, v.1,  (the "License").
6*14b24e2bSVaishali Kulkarni * You may not use this file except in compliance with the License.
7*14b24e2bSVaishali Kulkarni *
8*14b24e2bSVaishali Kulkarni * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9*14b24e2bSVaishali Kulkarni * or http://opensource.org/licenses/CDDL-1.0.
10*14b24e2bSVaishali Kulkarni * See the License for the specific language governing permissions
11*14b24e2bSVaishali Kulkarni * and limitations under the License.
12*14b24e2bSVaishali Kulkarni *
13*14b24e2bSVaishali Kulkarni * When distributing Covered Code, include this CDDL HEADER in each
14*14b24e2bSVaishali Kulkarni * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15*14b24e2bSVaishali Kulkarni * If applicable, add the following below this CDDL HEADER, with the
16*14b24e2bSVaishali Kulkarni * fields enclosed by brackets "[]" replaced with your own identifying
17*14b24e2bSVaishali Kulkarni * information: Portions Copyright [yyyy] [name of copyright owner]
18*14b24e2bSVaishali Kulkarni *
19*14b24e2bSVaishali Kulkarni * CDDL HEADER END
20*14b24e2bSVaishali Kulkarni */
21*14b24e2bSVaishali Kulkarni 
22*14b24e2bSVaishali Kulkarni /*
23*14b24e2bSVaishali Kulkarni * Copyright 2014-2017 Cavium, Inc.
24*14b24e2bSVaishali Kulkarni * The contents of this file are subject to the terms of the Common Development
25*14b24e2bSVaishali Kulkarni * and Distribution License, v.1,  (the "License").
26*14b24e2bSVaishali Kulkarni 
27*14b24e2bSVaishali Kulkarni * You may not use this file except in compliance with the License.
28*14b24e2bSVaishali Kulkarni 
29*14b24e2bSVaishali Kulkarni * You can obtain a copy of the License at available
30*14b24e2bSVaishali Kulkarni * at http://opensource.org/licenses/CDDL-1.0
31*14b24e2bSVaishali Kulkarni 
32*14b24e2bSVaishali Kulkarni * See the License for the specific language governing permissions and
33*14b24e2bSVaishali Kulkarni * limitations under the License.
34*14b24e2bSVaishali Kulkarni */
35*14b24e2bSVaishali Kulkarni 
36*14b24e2bSVaishali Kulkarni #ifndef __ECORE_LL2_API_H__
37*14b24e2bSVaishali Kulkarni #define __ECORE_LL2_API_H__
38*14b24e2bSVaishali Kulkarni 
39*14b24e2bSVaishali Kulkarni /* ECORE LL2 API: called by ECORE's upper level client  */
40*14b24e2bSVaishali Kulkarni /* must be the asme as core_rx_conn_type */
41*14b24e2bSVaishali Kulkarni #ifndef __EXTRACT__LINUX__
42*14b24e2bSVaishali Kulkarni 
43*14b24e2bSVaishali Kulkarni enum ecore_ll2_conn_type {
44*14b24e2bSVaishali Kulkarni 	ECORE_LL2_TYPE_FCOE /* FCoE L2 connection */,
45*14b24e2bSVaishali Kulkarni 	ECORE_LL2_TYPE_ISCSI /* Iscsi L2 connection */,
46*14b24e2bSVaishali Kulkarni 	ECORE_LL2_TYPE_TEST /* Eth TB test connection */,
47*14b24e2bSVaishali Kulkarni 	ECORE_LL2_TYPE_OOO /* Iscsi OOO L2 connection */,
48*14b24e2bSVaishali Kulkarni 	ECORE_LL2_TYPE_TOE /* toe L2 connection */,
49*14b24e2bSVaishali Kulkarni 	ECORE_LL2_TYPE_ROCE /* RoCE L2 connection */,
50*14b24e2bSVaishali Kulkarni 	ECORE_LL2_TYPE_IWARP,
51*14b24e2bSVaishali Kulkarni 	MAX_ECORE_LL2_RX_CONN_TYPE
52*14b24e2bSVaishali Kulkarni };
53*14b24e2bSVaishali Kulkarni 
54*14b24e2bSVaishali Kulkarni enum ecore_ll2_roce_flavor_type {
55*14b24e2bSVaishali Kulkarni 	ECORE_LL2_ROCE,		/* use this as default or d/c */
56*14b24e2bSVaishali Kulkarni 	ECORE_LL2_RROCE,
57*14b24e2bSVaishali Kulkarni 	MAX_ECORE_LL2_ROCE_FLAVOR_TYPE
58*14b24e2bSVaishali Kulkarni };
59*14b24e2bSVaishali Kulkarni 
60*14b24e2bSVaishali Kulkarni enum ecore_ll2_tx_dest
61*14b24e2bSVaishali Kulkarni {
62*14b24e2bSVaishali Kulkarni 	ECORE_LL2_TX_DEST_NW /* Light L2 TX Destination to the Network */,
63*14b24e2bSVaishali Kulkarni 	ECORE_LL2_TX_DEST_LB /* Light L2 TX Destination to the Loopback */,
64*14b24e2bSVaishali Kulkarni 	ECORE_LL2_TX_DEST_DROP /* Light L2 Drop the TX packet */,
65*14b24e2bSVaishali Kulkarni 	ECORE_LL2_TX_DEST_MAX
66*14b24e2bSVaishali Kulkarni };
67*14b24e2bSVaishali Kulkarni 
68*14b24e2bSVaishali Kulkarni enum ecore_ll2_error_handle
69*14b24e2bSVaishali Kulkarni {
70*14b24e2bSVaishali Kulkarni 	ECORE_LL2_DROP_PACKET /* If error occurs drop packet */,
71*14b24e2bSVaishali Kulkarni 	ECORE_LL2_DO_NOTHING /* If error occurs do nothing */,
72*14b24e2bSVaishali Kulkarni 	ECORE_LL2_ASSERT /* If error occurs assert */,
73*14b24e2bSVaishali Kulkarni };
74*14b24e2bSVaishali Kulkarni 
75*14b24e2bSVaishali Kulkarni struct ecore_ll2_stats {
76*14b24e2bSVaishali Kulkarni 	u64 gsi_invalid_hdr;
77*14b24e2bSVaishali Kulkarni 	u64 gsi_invalid_pkt_length;
78*14b24e2bSVaishali Kulkarni 	u64 gsi_unsupported_pkt_typ;
79*14b24e2bSVaishali Kulkarni 	u64 gsi_crcchksm_error;
80*14b24e2bSVaishali Kulkarni 
81*14b24e2bSVaishali Kulkarni 	u64 packet_too_big_discard;
82*14b24e2bSVaishali Kulkarni 	u64 no_buff_discard;
83*14b24e2bSVaishali Kulkarni 
84*14b24e2bSVaishali Kulkarni 	u64 rcv_ucast_bytes;
85*14b24e2bSVaishali Kulkarni 	u64 rcv_mcast_bytes;
86*14b24e2bSVaishali Kulkarni 	u64 rcv_bcast_bytes;
87*14b24e2bSVaishali Kulkarni 	u64 rcv_ucast_pkts;
88*14b24e2bSVaishali Kulkarni 	u64 rcv_mcast_pkts;
89*14b24e2bSVaishali Kulkarni 	u64 rcv_bcast_pkts;
90*14b24e2bSVaishali Kulkarni 
91*14b24e2bSVaishali Kulkarni 	u64 sent_ucast_bytes;
92*14b24e2bSVaishali Kulkarni 	u64 sent_mcast_bytes;
93*14b24e2bSVaishali Kulkarni 	u64 sent_bcast_bytes;
94*14b24e2bSVaishali Kulkarni 	u64 sent_ucast_pkts;
95*14b24e2bSVaishali Kulkarni 	u64 sent_mcast_pkts;
96*14b24e2bSVaishali Kulkarni 	u64 sent_bcast_pkts;
97*14b24e2bSVaishali Kulkarni };
98*14b24e2bSVaishali Kulkarni 
99*14b24e2bSVaishali Kulkarni struct ecore_ll2_comp_rx_data {
100*14b24e2bSVaishali Kulkarni 	u8 connection_handle;
101*14b24e2bSVaishali Kulkarni 	void *cookie;
102*14b24e2bSVaishali Kulkarni 	dma_addr_t rx_buf_addr;
103*14b24e2bSVaishali Kulkarni 	u16 parse_flags;
104*14b24e2bSVaishali Kulkarni 	u16 err_flags;
105*14b24e2bSVaishali Kulkarni 	u16 vlan;
106*14b24e2bSVaishali Kulkarni 	bool b_last_packet;
107*14b24e2bSVaishali Kulkarni 
108*14b24e2bSVaishali Kulkarni 	union {
109*14b24e2bSVaishali Kulkarni 		u8 placement_offset;
110*14b24e2bSVaishali Kulkarni 		u8 data_length_error;
111*14b24e2bSVaishali Kulkarni 	} u;
112*14b24e2bSVaishali Kulkarni 	union {
113*14b24e2bSVaishali Kulkarni 		u16 packet_length;
114*14b24e2bSVaishali Kulkarni 		u16 data_length;
115*14b24e2bSVaishali Kulkarni 	} length;
116*14b24e2bSVaishali Kulkarni 
117*14b24e2bSVaishali Kulkarni 	u32 opaque_data_0; /* src_mac_addr_hi */
118*14b24e2bSVaishali Kulkarni 	u32 opaque_data_1; /* src_mac_addr_lo */
119*14b24e2bSVaishali Kulkarni 
120*14b24e2bSVaishali Kulkarni 	/* GSI only */
121*14b24e2bSVaishali Kulkarni 	u32 gid_dst[4];
122*14b24e2bSVaishali Kulkarni 	u16 qp_id;
123*14b24e2bSVaishali Kulkarni };
124*14b24e2bSVaishali Kulkarni 
125*14b24e2bSVaishali Kulkarni typedef
126*14b24e2bSVaishali Kulkarni void (*ecore_ll2_complete_rx_packet_cb)(void *cxt,
127*14b24e2bSVaishali Kulkarni 					struct ecore_ll2_comp_rx_data *data);
128*14b24e2bSVaishali Kulkarni 
129*14b24e2bSVaishali Kulkarni typedef
130*14b24e2bSVaishali Kulkarni void (*ecore_ll2_release_rx_packet_cb)(void *cxt,
131*14b24e2bSVaishali Kulkarni 				       u8 connection_handle,
132*14b24e2bSVaishali Kulkarni 				       void *cookie,
133*14b24e2bSVaishali Kulkarni 				       dma_addr_t rx_buf_addr,
134*14b24e2bSVaishali Kulkarni 				       bool b_last_packet);
135*14b24e2bSVaishali Kulkarni 
136*14b24e2bSVaishali Kulkarni typedef
137*14b24e2bSVaishali Kulkarni void (*ecore_ll2_complete_tx_packet_cb)(void *cxt,
138*14b24e2bSVaishali Kulkarni 					u8 connection_handle,
139*14b24e2bSVaishali Kulkarni 					void *cookie,
140*14b24e2bSVaishali Kulkarni 					dma_addr_t first_frag_addr,
141*14b24e2bSVaishali Kulkarni 					bool b_last_fragment,
142*14b24e2bSVaishali Kulkarni 					bool b_last_packet);
143*14b24e2bSVaishali Kulkarni 
144*14b24e2bSVaishali Kulkarni typedef
145*14b24e2bSVaishali Kulkarni void (*ecore_ll2_release_tx_packet_cb)(void *cxt,
146*14b24e2bSVaishali Kulkarni 				       u8 connection_handle,
147*14b24e2bSVaishali Kulkarni 				       void *cookie,
148*14b24e2bSVaishali Kulkarni 				       dma_addr_t first_frag_addr,
149*14b24e2bSVaishali Kulkarni 				       bool b_last_fragment,
150*14b24e2bSVaishali Kulkarni 				       bool b_last_packet);
151*14b24e2bSVaishali Kulkarni 
152*14b24e2bSVaishali Kulkarni typedef
153*14b24e2bSVaishali Kulkarni void (*ecore_ll2_slowpath_cb)(void *cxt,
154*14b24e2bSVaishali Kulkarni 			      u8 connection_handle,
155*14b24e2bSVaishali Kulkarni 			      u32 opaque_data_0,
156*14b24e2bSVaishali Kulkarni 			      u32 opaque_data_1);
157*14b24e2bSVaishali Kulkarni 
158*14b24e2bSVaishali Kulkarni struct ecore_ll2_cbs {
159*14b24e2bSVaishali Kulkarni 	ecore_ll2_complete_rx_packet_cb rx_comp_cb;
160*14b24e2bSVaishali Kulkarni 	ecore_ll2_release_rx_packet_cb rx_release_cb;
161*14b24e2bSVaishali Kulkarni 	ecore_ll2_complete_tx_packet_cb tx_comp_cb;
162*14b24e2bSVaishali Kulkarni 	ecore_ll2_release_tx_packet_cb tx_release_cb;
163*14b24e2bSVaishali Kulkarni 	ecore_ll2_slowpath_cb slowpath_cb;
164*14b24e2bSVaishali Kulkarni 	void *cookie;
165*14b24e2bSVaishali Kulkarni };
166*14b24e2bSVaishali Kulkarni 
167*14b24e2bSVaishali Kulkarni struct ecore_ll2_acquire_data {
168*14b24e2bSVaishali Kulkarni 	enum ecore_ll2_conn_type conn_type;
169*14b24e2bSVaishali Kulkarni 	u16 mtu; /* Maximum bytes that can be placed on a BD*/
170*14b24e2bSVaishali Kulkarni 	u16 rx_num_desc;
171*14b24e2bSVaishali Kulkarni 
172*14b24e2bSVaishali Kulkarni 	/* Relevant only for OOO connection if 0 OOO rx buffers=2*rx_num_desc */
173*14b24e2bSVaishali Kulkarni 	u16 rx_num_ooo_buffers;
174*14b24e2bSVaishali Kulkarni 	u8 rx_drop_ttl0_flg;
175*14b24e2bSVaishali Kulkarni 
176*14b24e2bSVaishali Kulkarni 	/* if set, 802.1q tags will be removed and copied to CQE */
177*14b24e2bSVaishali Kulkarni 	u8 rx_vlan_removal_en;
178*14b24e2bSVaishali Kulkarni 	u16 tx_num_desc;
179*14b24e2bSVaishali Kulkarni 	u8 tx_max_bds_per_packet;
180*14b24e2bSVaishali Kulkarni 	u8 tx_tc;
181*14b24e2bSVaishali Kulkarni 	enum ecore_ll2_tx_dest tx_dest;
182*14b24e2bSVaishali Kulkarni 	enum ecore_ll2_error_handle ai_err_packet_too_big;
183*14b24e2bSVaishali Kulkarni 	enum ecore_ll2_error_handle ai_err_no_buf;
184*14b24e2bSVaishali Kulkarni 	u8 secondary_queue;
185*14b24e2bSVaishali Kulkarni 	u8 gsi_enable;
186*14b24e2bSVaishali Kulkarni 
187*14b24e2bSVaishali Kulkarni 	/* Output container for LL2 connection's handle */
188*14b24e2bSVaishali Kulkarni 	u8 *p_connection_handle;
189*14b24e2bSVaishali Kulkarni 	const struct ecore_ll2_cbs *cbs;
190*14b24e2bSVaishali Kulkarni };
191*14b24e2bSVaishali Kulkarni #endif
192*14b24e2bSVaishali Kulkarni 
193*14b24e2bSVaishali Kulkarni /**
194*14b24e2bSVaishali Kulkarni  * @brief ecore_ll2_acquire_connection - allocate resources,
195*14b24e2bSVaishali Kulkarni  *        starts rx & tx (if relevant) queues pair. Provides
196*14b24e2bSVaishali Kulkarni  *        connecion handler as output parameter.
197*14b24e2bSVaishali Kulkarni  *
198*14b24e2bSVaishali Kulkarni  *
199*14b24e2bSVaishali Kulkarni  * @param p_hwfn
200*14b24e2bSVaishali Kulkarni  * @param data - describes connection parameters
201*14b24e2bSVaishali Kulkarni  * @return enum _ecore_status_t
202*14b24e2bSVaishali Kulkarni  */
203*14b24e2bSVaishali Kulkarni enum _ecore_status_t
204*14b24e2bSVaishali Kulkarni ecore_ll2_acquire_connection(void *cxt,
205*14b24e2bSVaishali Kulkarni 			     struct ecore_ll2_acquire_data *data);
206*14b24e2bSVaishali Kulkarni 
207*14b24e2bSVaishali Kulkarni /**
208*14b24e2bSVaishali Kulkarni  * @brief ecore_ll2_establish_connection - start previously
209*14b24e2bSVaishali Kulkarni  *        allocated LL2 queues pair
210*14b24e2bSVaishali Kulkarni  *
211*14b24e2bSVaishali Kulkarni  * @param p_hwfn
212*14b24e2bSVaishali Kulkarni  * @param p_ptt
213*14b24e2bSVaishali Kulkarni  * @param connection_handle    LL2 connection's handle
214*14b24e2bSVaishali Kulkarni  *                              obtained from
215*14b24e2bSVaishali Kulkarni  *                              ecore_ll2_require_connection
216*14b24e2bSVaishali Kulkarni  *
217*14b24e2bSVaishali Kulkarni  * @return enum _ecore_status_t
218*14b24e2bSVaishali Kulkarni  */
219*14b24e2bSVaishali Kulkarni enum _ecore_status_t ecore_ll2_establish_connection(void *cxt,
220*14b24e2bSVaishali Kulkarni 						    u8 connection_handle);
221*14b24e2bSVaishali Kulkarni 
222*14b24e2bSVaishali Kulkarni /**
223*14b24e2bSVaishali Kulkarni  * @brief ecore_ll2_post_rx_buffers - submit buffers to LL2 RxQ.
224*14b24e2bSVaishali Kulkarni  *
225*14b24e2bSVaishali Kulkarni  * @param p_hwfn
226*14b24e2bSVaishali Kulkarni  * @param connection_handle    LL2 connection's handle
227*14b24e2bSVaishali Kulkarni  *                              obtained from
228*14b24e2bSVaishali Kulkarni  *                              ecore_ll2_require_connection
229*14b24e2bSVaishali Kulkarni  * @param addr                  rx (physical address) buffers to
230*14b24e2bSVaishali Kulkarni  *                              submit
231*14b24e2bSVaishali Kulkarni  * @param cookie
232*14b24e2bSVaishali Kulkarni  * @param notify_fw             produce corresponding Rx BD
233*14b24e2bSVaishali Kulkarni  *                              immediately
234*14b24e2bSVaishali Kulkarni  *
235*14b24e2bSVaishali Kulkarni  * @return enum _ecore_status_t
236*14b24e2bSVaishali Kulkarni  */
237*14b24e2bSVaishali Kulkarni enum _ecore_status_t ecore_ll2_post_rx_buffer(void *cxt,
238*14b24e2bSVaishali Kulkarni 					      u8 connection_handle,
239*14b24e2bSVaishali Kulkarni 					      dma_addr_t addr,
240*14b24e2bSVaishali Kulkarni 					      u16 buf_len,
241*14b24e2bSVaishali Kulkarni 					      void *cookie,
242*14b24e2bSVaishali Kulkarni 					      u8 notify_fw);
243*14b24e2bSVaishali Kulkarni 
244*14b24e2bSVaishali Kulkarni #ifndef __EXTRACT__LINUX__
245*14b24e2bSVaishali Kulkarni struct ecore_ll2_tx_pkt_info {
246*14b24e2bSVaishali Kulkarni 	u8 num_of_bds;
247*14b24e2bSVaishali Kulkarni 	u16 vlan;
248*14b24e2bSVaishali Kulkarni 	u8 bd_flags;
249*14b24e2bSVaishali Kulkarni 	u16 l4_hdr_offset_w; /* from start of packet */
250*14b24e2bSVaishali Kulkarni 	enum ecore_ll2_tx_dest tx_dest;
251*14b24e2bSVaishali Kulkarni 	enum ecore_ll2_roce_flavor_type ecore_roce_flavor;
252*14b24e2bSVaishali Kulkarni 	dma_addr_t first_frag;
253*14b24e2bSVaishali Kulkarni 	u16 first_frag_len;
254*14b24e2bSVaishali Kulkarni 	bool enable_ip_cksum;
255*14b24e2bSVaishali Kulkarni 	bool enable_l4_cksum;
256*14b24e2bSVaishali Kulkarni 	bool calc_ip_len;
257*14b24e2bSVaishali Kulkarni 	void *cookie;
258*14b24e2bSVaishali Kulkarni };
259*14b24e2bSVaishali Kulkarni #endif
260*14b24e2bSVaishali Kulkarni 
261*14b24e2bSVaishali Kulkarni /**
262*14b24e2bSVaishali Kulkarni  * @brief ecore_ll2_prepare_tx_packet - request for start Tx BD
263*14b24e2bSVaishali Kulkarni  *        to prepare Tx packet submission to FW.
264*14b24e2bSVaishali Kulkarni  *
265*14b24e2bSVaishali Kulkarni  *
266*14b24e2bSVaishali Kulkarni  * @param p_hwfn
267*14b24e2bSVaishali Kulkarni  * @param pkt - info regarding the tx packet
268*14b24e2bSVaishali Kulkarni  * @param notify_fw - issue doorbell to fw for this packet
269*14b24e2bSVaishali Kulkarni  *
270*14b24e2bSVaishali Kulkarni  * @return enum _ecore_status_t
271*14b24e2bSVaishali Kulkarni  */
272*14b24e2bSVaishali Kulkarni enum _ecore_status_t ecore_ll2_prepare_tx_packet(
273*14b24e2bSVaishali Kulkarni 		void *cxt,
274*14b24e2bSVaishali Kulkarni 		u8 connection_handle,
275*14b24e2bSVaishali Kulkarni 		struct ecore_ll2_tx_pkt_info *pkt,
276*14b24e2bSVaishali Kulkarni 		bool notify_fw);
277*14b24e2bSVaishali Kulkarni 
278*14b24e2bSVaishali Kulkarni /**
279*14b24e2bSVaishali Kulkarni  * @brief ecore_ll2_release_connection - releases resources
280*14b24e2bSVaishali Kulkarni  *        allocated for LL2 connection
281*14b24e2bSVaishali Kulkarni  *
282*14b24e2bSVaishali Kulkarni  * @param p_hwfn
283*14b24e2bSVaishali Kulkarni  * @param connection_handle    LL2 connection's handle
284*14b24e2bSVaishali Kulkarni  *                              obtained from
285*14b24e2bSVaishali Kulkarni  *                              ecore_ll2_require_connection
286*14b24e2bSVaishali Kulkarni  */
287*14b24e2bSVaishali Kulkarni void ecore_ll2_release_connection(void *cxt,
288*14b24e2bSVaishali Kulkarni 				  u8 connection_handle);
289*14b24e2bSVaishali Kulkarni 
290*14b24e2bSVaishali Kulkarni /**
291*14b24e2bSVaishali Kulkarni  * @brief ecore_ll2_set_fragment_of_tx_packet - provides
292*14b24e2bSVaishali Kulkarni  *        fragments to fill Tx BD of BDs requested by
293*14b24e2bSVaishali Kulkarni  *        ecore_ll2_prepare_tx_packet..
294*14b24e2bSVaishali Kulkarni  *
295*14b24e2bSVaishali Kulkarni  *
296*14b24e2bSVaishali Kulkarni  * @param p_hwfn
297*14b24e2bSVaishali Kulkarni  * @param connection_handle    LL2 connection's handle
298*14b24e2bSVaishali Kulkarni  *                              obtained from
299*14b24e2bSVaishali Kulkarni  *                              ecore_ll2_require_connection
300*14b24e2bSVaishali Kulkarni  * @param addr
301*14b24e2bSVaishali Kulkarni  * @param nbytes
302*14b24e2bSVaishali Kulkarni  *
303*14b24e2bSVaishali Kulkarni  * @return enum _ecore_status_t
304*14b24e2bSVaishali Kulkarni  */
305*14b24e2bSVaishali Kulkarni enum _ecore_status_t
306*14b24e2bSVaishali Kulkarni ecore_ll2_set_fragment_of_tx_packet(void *cxt,
307*14b24e2bSVaishali Kulkarni 				    u8 connection_handle,
308*14b24e2bSVaishali Kulkarni 				    dma_addr_t addr,
309*14b24e2bSVaishali Kulkarni 				    u16 nbytes);
310*14b24e2bSVaishali Kulkarni 
311*14b24e2bSVaishali Kulkarni /**
312*14b24e2bSVaishali Kulkarni  * @brief ecore_ll2_terminate_connection - stops Tx/Rx queues
313*14b24e2bSVaishali Kulkarni  *
314*14b24e2bSVaishali Kulkarni  *
315*14b24e2bSVaishali Kulkarni  * @param p_hwfn
316*14b24e2bSVaishali Kulkarni  * @param connection_handle    LL2 connection's handle
317*14b24e2bSVaishali Kulkarni  *                              obtained from
318*14b24e2bSVaishali Kulkarni  *                              ecore_ll2_require_connection
319*14b24e2bSVaishali Kulkarni  *
320*14b24e2bSVaishali Kulkarni  * @return enum _ecore_status_t
321*14b24e2bSVaishali Kulkarni  */
322*14b24e2bSVaishali Kulkarni enum _ecore_status_t ecore_ll2_terminate_connection(void *cxt,
323*14b24e2bSVaishali Kulkarni 						    u8 connection_handle);
324*14b24e2bSVaishali Kulkarni 
325*14b24e2bSVaishali Kulkarni /**
326*14b24e2bSVaishali Kulkarni  * @brief ecore_ll2_get_stats - get LL2 queue's statistics
327*14b24e2bSVaishali Kulkarni  *
328*14b24e2bSVaishali Kulkarni  *
329*14b24e2bSVaishali Kulkarni  * @param p_hwfn
330*14b24e2bSVaishali Kulkarni  * @param connection_handle    LL2 connection's handle
331*14b24e2bSVaishali Kulkarni  *                              obtained from
332*14b24e2bSVaishali Kulkarni  *                              ecore_ll2_require_connection
333*14b24e2bSVaishali Kulkarni  * @param p_stats
334*14b24e2bSVaishali Kulkarni  *
335*14b24e2bSVaishali Kulkarni  * @return enum _ecore_status_t
336*14b24e2bSVaishali Kulkarni  */
337*14b24e2bSVaishali Kulkarni enum _ecore_status_t ecore_ll2_get_stats(void *cxt,
338*14b24e2bSVaishali Kulkarni 					 u8 connection_handle,
339*14b24e2bSVaishali Kulkarni 					 struct ecore_ll2_stats	*p_stats);
340*14b24e2bSVaishali Kulkarni 
341*14b24e2bSVaishali Kulkarni #endif