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_VF_H__
37*14b24e2bSVaishali Kulkarni #define __ECORE_VF_H__
38*14b24e2bSVaishali Kulkarni 
39*14b24e2bSVaishali Kulkarni #include "ecore_status.h"
40*14b24e2bSVaishali Kulkarni #include "ecore_vf_api.h"
41*14b24e2bSVaishali Kulkarni #include "ecore_l2_api.h"
42*14b24e2bSVaishali Kulkarni #include "ecore_vfpf_if.h"
43*14b24e2bSVaishali Kulkarni 
44*14b24e2bSVaishali Kulkarni /* Default number of CIDs [total of both Rx and Tx] to be requested
45*14b24e2bSVaishali Kulkarni  * by default.
46*14b24e2bSVaishali Kulkarni  */
47*14b24e2bSVaishali Kulkarni #define ECORE_ETH_VF_DEFAULT_NUM_CIDS	(32)
48*14b24e2bSVaishali Kulkarni 
49*14b24e2bSVaishali Kulkarni /* This data is held in the ecore_hwfn structure for VFs only. */
50*14b24e2bSVaishali Kulkarni struct ecore_vf_iov {
51*14b24e2bSVaishali Kulkarni 	union vfpf_tlvs			*vf2pf_request;
52*14b24e2bSVaishali Kulkarni 	dma_addr_t			vf2pf_request_phys;
53*14b24e2bSVaishali Kulkarni 	union pfvf_tlvs			*pf2vf_reply;
54*14b24e2bSVaishali Kulkarni 	dma_addr_t			pf2vf_reply_phys;
55*14b24e2bSVaishali Kulkarni 
56*14b24e2bSVaishali Kulkarni 	/* Should be taken whenever the mailbox buffers are accessed */
57*14b24e2bSVaishali Kulkarni 	osal_mutex_t			mutex;
58*14b24e2bSVaishali Kulkarni 	u8				*offset;
59*14b24e2bSVaishali Kulkarni 
60*14b24e2bSVaishali Kulkarni 	/* Bulletin Board */
61*14b24e2bSVaishali Kulkarni 	struct ecore_bulletin		bulletin;
62*14b24e2bSVaishali Kulkarni 	struct ecore_bulletin_content	bulletin_shadow;
63*14b24e2bSVaishali Kulkarni 
64*14b24e2bSVaishali Kulkarni 	/* we set aside a copy of the acquire response */
65*14b24e2bSVaishali Kulkarni 	struct pfvf_acquire_resp_tlv	acquire_resp;
66*14b24e2bSVaishali Kulkarni 
67*14b24e2bSVaishali Kulkarni 	/* In case PF originates prior to the fp-hsi version comparison,
68*14b24e2bSVaishali Kulkarni 	 * this has to be propagated as it affects the fastpath.
69*14b24e2bSVaishali Kulkarni 	 */
70*14b24e2bSVaishali Kulkarni 	bool b_pre_fp_hsi;
71*14b24e2bSVaishali Kulkarni 
72*14b24e2bSVaishali Kulkarni 	/* Current day VFs are passing the SBs physical address on vport
73*14b24e2bSVaishali Kulkarni 	 * start, and as they lack an IGU mapping they need to store the
74*14b24e2bSVaishali Kulkarni 	 * addresses of previously registered SBs.
75*14b24e2bSVaishali Kulkarni 	 * Even if we were to change configuration flow, due to backward
76*14b24e2bSVaishali Kulkarni 	 * compatability [with older PFs] we'd still need to store these.
77*14b24e2bSVaishali Kulkarni 	 */
78*14b24e2bSVaishali Kulkarni 	struct ecore_sb_info *sbs_info[PFVF_MAX_SBS_PER_VF];
79*14b24e2bSVaishali Kulkarni };
80*14b24e2bSVaishali Kulkarni 
81*14b24e2bSVaishali Kulkarni 
82*14b24e2bSVaishali Kulkarni enum _ecore_status_t ecore_set_rxq_coalesce(struct ecore_hwfn *p_hwfn,
83*14b24e2bSVaishali Kulkarni 					    struct ecore_ptt *p_ptt,
84*14b24e2bSVaishali Kulkarni 					    u16 coalesce,
85*14b24e2bSVaishali Kulkarni 					    struct ecore_queue_cid *p_cid);
86*14b24e2bSVaishali Kulkarni enum _ecore_status_t ecore_set_txq_coalesce(struct ecore_hwfn *p_hwfn,
87*14b24e2bSVaishali Kulkarni 					    struct ecore_ptt *p_ptt,
88*14b24e2bSVaishali Kulkarni 					    u16 coalesce,
89*14b24e2bSVaishali Kulkarni 					    struct ecore_queue_cid *p_cid);
90*14b24e2bSVaishali Kulkarni 
91*14b24e2bSVaishali Kulkarni #ifdef CONFIG_ECORE_SRIOV
92*14b24e2bSVaishali Kulkarni /**
93*14b24e2bSVaishali Kulkarni  * @brief VF - Set Rx/Tx coalesce per VF's relative queue.
94*14b24e2bSVaishali Kulkarni  *	Coalesce value '0' will omit the configuration.
95*14b24e2bSVaishali Kulkarni  *
96*14b24e2bSVaishali Kulkarni  *	@param p_hwfn
97*14b24e2bSVaishali Kulkarni  *	@param rx_coal - coalesce value in micro second for rx queue
98*14b24e2bSVaishali Kulkarni  *	@param tx_coal - coalesce value in micro second for tx queue
99*14b24e2bSVaishali Kulkarni  *	@param queue_cid
100*14b24e2bSVaishali Kulkarni  *
101*14b24e2bSVaishali Kulkarni  **/
102*14b24e2bSVaishali Kulkarni enum _ecore_status_t ecore_vf_pf_set_coalesce(struct ecore_hwfn *p_hwfn,
103*14b24e2bSVaishali Kulkarni 					      u16 rx_coal, u16 tx_coal,
104*14b24e2bSVaishali Kulkarni 					      struct ecore_queue_cid *p_cid);
105*14b24e2bSVaishali Kulkarni 
106*14b24e2bSVaishali Kulkarni /**
107*14b24e2bSVaishali Kulkarni  * @brief hw preparation for VF
108*14b24e2bSVaishali Kulkarni  *	sends ACQUIRE message
109*14b24e2bSVaishali Kulkarni  *
110*14b24e2bSVaishali Kulkarni  * @param p_hwfn
111*14b24e2bSVaishali Kulkarni  *
112*14b24e2bSVaishali Kulkarni  * @return enum _ecore_status_t
113*14b24e2bSVaishali Kulkarni  */
114*14b24e2bSVaishali Kulkarni enum _ecore_status_t ecore_vf_hw_prepare(struct ecore_hwfn *p_hwfn);
115*14b24e2bSVaishali Kulkarni 
116*14b24e2bSVaishali Kulkarni /**
117*14b24e2bSVaishali Kulkarni  * @brief VF - start the RX Queue by sending a message to the PF
118*14b24e2bSVaishali Kulkarni  *
119*14b24e2bSVaishali Kulkarni  * @param p_hwfn
120*14b24e2bSVaishali Kulkarni  * @param p_cid			- Only relative fields are relevant
121*14b24e2bSVaishali Kulkarni  * @param bd_max_bytes 		- maximum number of bytes per bd
122*14b24e2bSVaishali Kulkarni  * @param bd_chain_phys_addr 	- physical address of bd chain
123*14b24e2bSVaishali Kulkarni  * @param cqe_pbl_addr 		- physical address of pbl
124*14b24e2bSVaishali Kulkarni  * @param cqe_pbl_size 		- pbl size
125*14b24e2bSVaishali Kulkarni  * @param pp_prod 		- pointer to the producer to be
126*14b24e2bSVaishali Kulkarni  *				  used in fasthpath
127*14b24e2bSVaishali Kulkarni  *
128*14b24e2bSVaishali Kulkarni  * @return enum _ecore_status_t
129*14b24e2bSVaishali Kulkarni  */
130*14b24e2bSVaishali Kulkarni enum _ecore_status_t ecore_vf_pf_rxq_start(struct ecore_hwfn *p_hwfn,
131*14b24e2bSVaishali Kulkarni 					   struct ecore_queue_cid *p_cid,
132*14b24e2bSVaishali Kulkarni 					   u16 bd_max_bytes,
133*14b24e2bSVaishali Kulkarni 					   dma_addr_t bd_chain_phys_addr,
134*14b24e2bSVaishali Kulkarni 					   dma_addr_t cqe_pbl_addr,
135*14b24e2bSVaishali Kulkarni 					   u16 cqe_pbl_size,
136*14b24e2bSVaishali Kulkarni 					   void OSAL_IOMEM **pp_prod);
137*14b24e2bSVaishali Kulkarni 
138*14b24e2bSVaishali Kulkarni /**
139*14b24e2bSVaishali Kulkarni  * @brief VF - start the TX queue by sending a message to the
140*14b24e2bSVaishali Kulkarni  *        PF.
141*14b24e2bSVaishali Kulkarni  *
142*14b24e2bSVaishali Kulkarni  * @param p_hwfn
143*14b24e2bSVaishali Kulkarni  * @param p_cid
144*14b24e2bSVaishali Kulkarni  * @param bd_chain_phys_addr 	- physical address of tx chain
145*14b24e2bSVaishali Kulkarni  * @param pp_doorbell 		- pointer to address to which to
146*14b24e2bSVaishali Kulkarni  *      		write the doorbell too..
147*14b24e2bSVaishali Kulkarni  *
148*14b24e2bSVaishali Kulkarni  * @return enum _ecore_status_t
149*14b24e2bSVaishali Kulkarni  */
150*14b24e2bSVaishali Kulkarni enum _ecore_status_t
151*14b24e2bSVaishali Kulkarni ecore_vf_pf_txq_start(struct ecore_hwfn *p_hwfn,
152*14b24e2bSVaishali Kulkarni 		      struct ecore_queue_cid *p_cid,
153*14b24e2bSVaishali Kulkarni 		      dma_addr_t pbl_addr, u16 pbl_size,
154*14b24e2bSVaishali Kulkarni 		      void OSAL_IOMEM **pp_doorbell);
155*14b24e2bSVaishali Kulkarni 
156*14b24e2bSVaishali Kulkarni /**
157*14b24e2bSVaishali Kulkarni  * @brief VF - stop the RX queue by sending a message to the PF
158*14b24e2bSVaishali Kulkarni  *
159*14b24e2bSVaishali Kulkarni  * @param p_hwfn
160*14b24e2bSVaishali Kulkarni  * @param p_cid
161*14b24e2bSVaishali Kulkarni  * @param cqe_completion
162*14b24e2bSVaishali Kulkarni  *
163*14b24e2bSVaishali Kulkarni  * @return enum _ecore_status_t
164*14b24e2bSVaishali Kulkarni  */
165*14b24e2bSVaishali Kulkarni enum _ecore_status_t ecore_vf_pf_rxq_stop(struct ecore_hwfn *p_hwfn,
166*14b24e2bSVaishali Kulkarni 					  struct ecore_queue_cid *p_cid,
167*14b24e2bSVaishali Kulkarni 					  bool cqe_completion);
168*14b24e2bSVaishali Kulkarni 
169*14b24e2bSVaishali Kulkarni /**
170*14b24e2bSVaishali Kulkarni  * @brief VF - stop the TX queue by sending a message to the PF
171*14b24e2bSVaishali Kulkarni  *
172*14b24e2bSVaishali Kulkarni  * @param p_hwfn
173*14b24e2bSVaishali Kulkarni  * @param p_cid
174*14b24e2bSVaishali Kulkarni  *
175*14b24e2bSVaishali Kulkarni  * @return enum _ecore_status_t
176*14b24e2bSVaishali Kulkarni  */
177*14b24e2bSVaishali Kulkarni enum _ecore_status_t ecore_vf_pf_txq_stop(struct ecore_hwfn *p_hwfn,
178*14b24e2bSVaishali Kulkarni 					  struct ecore_queue_cid *p_cid);
179*14b24e2bSVaishali Kulkarni 
180*14b24e2bSVaishali Kulkarni /* TODO - fix all the !SRIOV prototypes */
181*14b24e2bSVaishali Kulkarni 
182*14b24e2bSVaishali Kulkarni #ifndef LINUX_REMOVE
183*14b24e2bSVaishali Kulkarni /**
184*14b24e2bSVaishali Kulkarni  * @brief VF - update the RX queue by sending a message to the
185*14b24e2bSVaishali Kulkarni  *        PF
186*14b24e2bSVaishali Kulkarni  *
187*14b24e2bSVaishali Kulkarni  * @param p_hwfn
188*14b24e2bSVaishali Kulkarni  * @param pp_cid - list of queue-cids which we want to update
189*14b24e2bSVaishali Kulkarni  * @param num_rxqs
190*14b24e2bSVaishali Kulkarni  * @param comp_cqe_flg
191*14b24e2bSVaishali Kulkarni  * @param comp_event_flg
192*14b24e2bSVaishali Kulkarni  *
193*14b24e2bSVaishali Kulkarni  * @return enum _ecore_status_t
194*14b24e2bSVaishali Kulkarni  */
195*14b24e2bSVaishali Kulkarni enum _ecore_status_t ecore_vf_pf_rxqs_update(struct ecore_hwfn *p_hwfn,
196*14b24e2bSVaishali Kulkarni 					     struct ecore_queue_cid **pp_cid,
197*14b24e2bSVaishali Kulkarni 					     u8 num_rxqs,
198*14b24e2bSVaishali Kulkarni 					     u8 comp_cqe_flg,
199*14b24e2bSVaishali Kulkarni 					     u8 comp_event_flg);
200*14b24e2bSVaishali Kulkarni #endif
201*14b24e2bSVaishali Kulkarni 
202*14b24e2bSVaishali Kulkarni /**
203*14b24e2bSVaishali Kulkarni  * @brief VF - send a vport update command
204*14b24e2bSVaishali Kulkarni  *
205*14b24e2bSVaishali Kulkarni  * @param p_hwfn
206*14b24e2bSVaishali Kulkarni  * @param params
207*14b24e2bSVaishali Kulkarni  *
208*14b24e2bSVaishali Kulkarni  * @return enum _ecore_status_t
209*14b24e2bSVaishali Kulkarni  */
210*14b24e2bSVaishali Kulkarni enum _ecore_status_t ecore_vf_pf_vport_update(struct ecore_hwfn *p_hwfn,
211*14b24e2bSVaishali Kulkarni 					      struct ecore_sp_vport_update_params *p_params);
212*14b24e2bSVaishali Kulkarni 
213*14b24e2bSVaishali Kulkarni /**
214*14b24e2bSVaishali Kulkarni  * @brief VF - send a close message to PF
215*14b24e2bSVaishali Kulkarni  *
216*14b24e2bSVaishali Kulkarni  * @param p_hwfn
217*14b24e2bSVaishali Kulkarni  *
218*14b24e2bSVaishali Kulkarni  * @return enum _ecore_status
219*14b24e2bSVaishali Kulkarni  */
220*14b24e2bSVaishali Kulkarni enum _ecore_status_t ecore_vf_pf_reset(struct ecore_hwfn *p_hwfn);
221*14b24e2bSVaishali Kulkarni 
222*14b24e2bSVaishali Kulkarni /**
223*14b24e2bSVaishali Kulkarni  * @brief VF - free vf`s memories
224*14b24e2bSVaishali Kulkarni  *
225*14b24e2bSVaishali Kulkarni  * @param p_hwfn
226*14b24e2bSVaishali Kulkarni  *
227*14b24e2bSVaishali Kulkarni  * @return enum _ecore_status
228*14b24e2bSVaishali Kulkarni  */
229*14b24e2bSVaishali Kulkarni enum _ecore_status_t ecore_vf_pf_release(struct ecore_hwfn *p_hwfn);
230*14b24e2bSVaishali Kulkarni 
231*14b24e2bSVaishali Kulkarni /**
232*14b24e2bSVaishali Kulkarni  * @brief ecore_vf_get_igu_sb_id - Get the IGU SB ID for a given
233*14b24e2bSVaishali Kulkarni  *        sb_id. For VFs igu sbs don't have to be contiguous
234*14b24e2bSVaishali Kulkarni  *
235*14b24e2bSVaishali Kulkarni  * @param p_hwfn
236*14b24e2bSVaishali Kulkarni  * @param sb_id
237*14b24e2bSVaishali Kulkarni  *
238*14b24e2bSVaishali Kulkarni  * @return INLINE u16
239*14b24e2bSVaishali Kulkarni  */
240*14b24e2bSVaishali Kulkarni u16 ecore_vf_get_igu_sb_id(struct ecore_hwfn *p_hwfn,
241*14b24e2bSVaishali Kulkarni 			   u16               sb_id);
242*14b24e2bSVaishali Kulkarni 
243*14b24e2bSVaishali Kulkarni /**
244*14b24e2bSVaishali Kulkarni  * @brief Stores [or removes] a configured sb_info.
245*14b24e2bSVaishali Kulkarni  *
246*14b24e2bSVaishali Kulkarni  * @param p_hwfn
247*14b24e2bSVaishali Kulkarni  * @param sb_id - zero-based SB index [for fastpath]
248*14b24e2bSVaishali Kulkarni  * @param sb_info - may be OSAL_NULL [during removal].
249*14b24e2bSVaishali Kulkarni  */
250*14b24e2bSVaishali Kulkarni void ecore_vf_set_sb_info(struct ecore_hwfn *p_hwfn,
251*14b24e2bSVaishali Kulkarni 			  u16 sb_id, struct ecore_sb_info *p_sb);
252*14b24e2bSVaishali Kulkarni 
253*14b24e2bSVaishali Kulkarni /**
254*14b24e2bSVaishali Kulkarni  * @brief ecore_vf_pf_vport_start - perform vport start for VF.
255*14b24e2bSVaishali Kulkarni  *
256*14b24e2bSVaishali Kulkarni  * @param p_hwfn
257*14b24e2bSVaishali Kulkarni  * @param vport_id
258*14b24e2bSVaishali Kulkarni  * @param mtu
259*14b24e2bSVaishali Kulkarni  * @param inner_vlan_removal
260*14b24e2bSVaishali Kulkarni  * @param tpa_mode
261*14b24e2bSVaishali Kulkarni  * @param max_buffers_per_cqe,
262*14b24e2bSVaishali Kulkarni  * @param only_untagged - default behavior regarding vlan acceptance
263*14b24e2bSVaishali Kulkarni  *
264*14b24e2bSVaishali Kulkarni  * @return enum _ecore_status
265*14b24e2bSVaishali Kulkarni  */
266*14b24e2bSVaishali Kulkarni enum _ecore_status_t ecore_vf_pf_vport_start(
267*14b24e2bSVaishali Kulkarni 			struct ecore_hwfn *p_hwfn,
268*14b24e2bSVaishali Kulkarni 			u8 vport_id,
269*14b24e2bSVaishali Kulkarni 			u16 mtu,
270*14b24e2bSVaishali Kulkarni 			u8 inner_vlan_removal,
271*14b24e2bSVaishali Kulkarni 			enum ecore_tpa_mode tpa_mode,
272*14b24e2bSVaishali Kulkarni 			u8 max_buffers_per_cqe,
273*14b24e2bSVaishali Kulkarni 			u8 only_untagged);
274*14b24e2bSVaishali Kulkarni 
275*14b24e2bSVaishali Kulkarni /**
276*14b24e2bSVaishali Kulkarni  * @brief ecore_vf_pf_vport_stop - stop the VF's vport
277*14b24e2bSVaishali Kulkarni  *
278*14b24e2bSVaishali Kulkarni  * @param p_hwfn
279*14b24e2bSVaishali Kulkarni  *
280*14b24e2bSVaishali Kulkarni  * @return enum _ecore_status
281*14b24e2bSVaishali Kulkarni  */
282*14b24e2bSVaishali Kulkarni enum _ecore_status_t ecore_vf_pf_vport_stop(struct ecore_hwfn *p_hwfn);
283*14b24e2bSVaishali Kulkarni 
284*14b24e2bSVaishali Kulkarni enum _ecore_status_t ecore_vf_pf_filter_ucast(
285*14b24e2bSVaishali Kulkarni 			struct ecore_hwfn *p_hwfn,
286*14b24e2bSVaishali Kulkarni 			struct ecore_filter_ucast *p_param);
287*14b24e2bSVaishali Kulkarni 
288*14b24e2bSVaishali Kulkarni void ecore_vf_pf_filter_mcast(struct ecore_hwfn *p_hwfn,
289*14b24e2bSVaishali Kulkarni 			      struct ecore_filter_mcast *p_filter_cmd);
290*14b24e2bSVaishali Kulkarni 
291*14b24e2bSVaishali Kulkarni /**
292*14b24e2bSVaishali Kulkarni  * @brief ecore_vf_pf_int_cleanup - clean the SB of the VF
293*14b24e2bSVaishali Kulkarni  *
294*14b24e2bSVaishali Kulkarni  * @param p_hwfn
295*14b24e2bSVaishali Kulkarni  *
296*14b24e2bSVaishali Kulkarni  * @return enum _ecore_status
297*14b24e2bSVaishali Kulkarni  */
298*14b24e2bSVaishali Kulkarni enum _ecore_status_t ecore_vf_pf_int_cleanup(struct ecore_hwfn *p_hwfn);
299*14b24e2bSVaishali Kulkarni 
300*14b24e2bSVaishali Kulkarni /**
301*14b24e2bSVaishali Kulkarni  * @brief - return the link params in a given bulletin board
302*14b24e2bSVaishali Kulkarni  *
303*14b24e2bSVaishali Kulkarni  * @param p_hwfn
304*14b24e2bSVaishali Kulkarni  * @param p_params - pointer to a struct to fill with link params
305*14b24e2bSVaishali Kulkarni  * @param p_bulletin
306*14b24e2bSVaishali Kulkarni  */
307*14b24e2bSVaishali Kulkarni void __ecore_vf_get_link_params(struct ecore_hwfn *p_hwfn,
308*14b24e2bSVaishali Kulkarni 				struct ecore_mcp_link_params *p_params,
309*14b24e2bSVaishali Kulkarni 				struct ecore_bulletin_content *p_bulletin);
310*14b24e2bSVaishali Kulkarni 
311*14b24e2bSVaishali Kulkarni /**
312*14b24e2bSVaishali Kulkarni  * @brief - return the link state in a given bulletin board
313*14b24e2bSVaishali Kulkarni  *
314*14b24e2bSVaishali Kulkarni  * @param p_hwfn
315*14b24e2bSVaishali Kulkarni  * @param p_link - pointer to a struct to fill with link state
316*14b24e2bSVaishali Kulkarni  * @param p_bulletin
317*14b24e2bSVaishali Kulkarni  */
318*14b24e2bSVaishali Kulkarni void __ecore_vf_get_link_state(struct ecore_hwfn *p_hwfn,
319*14b24e2bSVaishali Kulkarni 			       struct ecore_mcp_link_state *p_link,
320*14b24e2bSVaishali Kulkarni 			       struct ecore_bulletin_content *p_bulletin);
321*14b24e2bSVaishali Kulkarni 
322*14b24e2bSVaishali Kulkarni /**
323*14b24e2bSVaishali Kulkarni  * @brief - return the link capabilities in a given bulletin board
324*14b24e2bSVaishali Kulkarni  *
325*14b24e2bSVaishali Kulkarni  * @param p_hwfn
326*14b24e2bSVaishali Kulkarni  * @param p_link - pointer to a struct to fill with link capabilities
327*14b24e2bSVaishali Kulkarni  * @param p_bulletin
328*14b24e2bSVaishali Kulkarni  */
329*14b24e2bSVaishali Kulkarni void __ecore_vf_get_link_caps(struct ecore_hwfn *p_hwfn,
330*14b24e2bSVaishali Kulkarni 			      struct ecore_mcp_link_capabilities *p_link_caps,
331*14b24e2bSVaishali Kulkarni 			      struct ecore_bulletin_content *p_bulletin);
332*14b24e2bSVaishali Kulkarni enum _ecore_status_t
333*14b24e2bSVaishali Kulkarni ecore_vf_pf_tunnel_param_update(struct ecore_hwfn *p_hwfn,
334*14b24e2bSVaishali Kulkarni 				struct ecore_tunnel_info *p_tunn);
335*14b24e2bSVaishali Kulkarni void ecore_vf_set_vf_start_tunn_update_param(struct ecore_tunnel_info *p_tun);
336*14b24e2bSVaishali Kulkarni #else
ecore_vf_hw_prepare(struct ecore_hwfn * p_hwfn)337*14b24e2bSVaishali Kulkarni static OSAL_INLINE enum _ecore_status_t ecore_vf_hw_prepare(struct ecore_hwfn *p_hwfn) {return ECORE_INVAL;}
ecore_vf_pf_rxq_start(struct ecore_hwfn * p_hwfn,struct ecore_queue_cid * p_cid,u16 bd_max_bytes,dma_addr_t bd_chain_phys_addr,dma_addr_t cqe_pbl_addr,u16 cqe_pbl_size,void OSAL_IOMEM ** pp_prod)338*14b24e2bSVaishali Kulkarni static OSAL_INLINE enum _ecore_status_t ecore_vf_pf_rxq_start(struct ecore_hwfn *p_hwfn, struct ecore_queue_cid *p_cid, u16 bd_max_bytes, dma_addr_t bd_chain_phys_addr, dma_addr_t cqe_pbl_addr, u16 cqe_pbl_size, void OSAL_IOMEM **pp_prod) {return ECORE_INVAL;}
ecore_vf_pf_txq_start(struct ecore_hwfn * p_hwfn,struct ecore_queue_cid * p_cid,dma_addr_t pbl_addr,u16 pbl_size,void OSAL_IOMEM ** pp_doorbell)339*14b24e2bSVaishali Kulkarni static OSAL_INLINE enum _ecore_status_t ecore_vf_pf_txq_start(struct ecore_hwfn *p_hwfn, struct ecore_queue_cid *p_cid, dma_addr_t pbl_addr, u16 pbl_size, void OSAL_IOMEM **pp_doorbell) {return ECORE_INVAL;}
340*14b24e2bSVaishali Kulkarni 
ecore_vf_pf_rxq_stop(struct ecore_hwfn * p_hwfn,struct ecore_queue_cid * p_cid,bool cqe_completion)341*14b24e2bSVaishali Kulkarni static OSAL_INLINE enum _ecore_status_t ecore_vf_pf_rxq_stop(struct ecore_hwfn *p_hwfn, struct ecore_queue_cid *p_cid, bool cqe_completion) {return ECORE_INVAL;}
ecore_vf_pf_txq_stop(struct ecore_hwfn * p_hwfn,struct ecore_queue_cid * p_cid)342*14b24e2bSVaishali Kulkarni static OSAL_INLINE enum _ecore_status_t ecore_vf_pf_txq_stop(struct ecore_hwfn *p_hwfn, struct ecore_queue_cid *p_cid) {return ECORE_INVAL;}
343*14b24e2bSVaishali Kulkarni #ifndef LINUX_REMOVE
ecore_vf_pf_rxqs_update(struct ecore_hwfn * p_hwfn,struct ecore_queue_cid ** pp_cid,u8 num_rxqs,u8 comp_cqe_flg,u8 comp_event_flg)344*14b24e2bSVaishali Kulkarni static OSAL_INLINE enum _ecore_status_t ecore_vf_pf_rxqs_update(struct ecore_hwfn *p_hwfn, struct ecore_queue_cid **pp_cid, u8 num_rxqs, u8 comp_cqe_flg, u8 comp_event_flg) {return ECORE_INVAL;}
345*14b24e2bSVaishali Kulkarni #endif
ecore_vf_pf_vport_update(struct ecore_hwfn * p_hwfn,struct ecore_sp_vport_update_params * p_params)346*14b24e2bSVaishali Kulkarni static OSAL_INLINE enum _ecore_status_t ecore_vf_pf_vport_update(struct ecore_hwfn *p_hwfn, struct ecore_sp_vport_update_params *p_params) {return ECORE_INVAL;}
ecore_vf_pf_reset(struct ecore_hwfn * p_hwfn)347*14b24e2bSVaishali Kulkarni static OSAL_INLINE enum _ecore_status_t ecore_vf_pf_reset(struct ecore_hwfn *p_hwfn) {return ECORE_INVAL;}
ecore_vf_pf_release(struct ecore_hwfn * p_hwfn)348*14b24e2bSVaishali Kulkarni static OSAL_INLINE enum _ecore_status_t ecore_vf_pf_release(struct ecore_hwfn *p_hwfn) {return ECORE_INVAL;}
ecore_vf_get_igu_sb_id(struct ecore_hwfn * p_hwfn,u16 sb_id)349*14b24e2bSVaishali Kulkarni static OSAL_INLINE u16 ecore_vf_get_igu_sb_id(struct ecore_hwfn *p_hwfn, u16 sb_id) {return 0;}
ecore_vf_set_sb_info(struct ecore_hwfn * p_hwfn,u16 sb_id,struct ecore_sb_info * p_sb)350*14b24e2bSVaishali Kulkarni static OSAL_INLINE void ecore_vf_set_sb_info(struct ecore_hwfn *p_hwfn, u16 sb_id, struct ecore_sb_info *p_sb) {}
351*14b24e2bSVaishali Kulkarni 
ecore_vf_pf_vport_start(struct ecore_hwfn * p_hwfn,u8 vport_id,u16 mtu,u8 inner_vlan_removal,enum ecore_tpa_mode tpa_mode,u8 max_buffers_per_cqe,u8 only_untagged)352*14b24e2bSVaishali Kulkarni static OSAL_INLINE enum _ecore_status_t ecore_vf_pf_vport_start(struct ecore_hwfn *p_hwfn, u8 vport_id, u16 mtu, u8 inner_vlan_removal, enum ecore_tpa_mode tpa_mode, u8 max_buffers_per_cqe, u8 only_untagged) {return ECORE_INVAL;}
ecore_vf_pf_vport_stop(struct ecore_hwfn * p_hwfn)353*14b24e2bSVaishali Kulkarni static OSAL_INLINE enum _ecore_status_t ecore_vf_pf_vport_stop(struct ecore_hwfn *p_hwfn) {return ECORE_INVAL;}
ecore_vf_pf_filter_ucast(struct ecore_hwfn * p_hwfn,struct ecore_filter_ucast * p_param)354*14b24e2bSVaishali Kulkarni static OSAL_INLINE enum _ecore_status_t ecore_vf_pf_filter_ucast(struct ecore_hwfn *p_hwfn, struct ecore_filter_ucast *p_param) {return ECORE_INVAL;}
ecore_vf_pf_filter_mcast(struct ecore_hwfn * p_hwfn,struct ecore_filter_mcast * p_filter_cmd)355*14b24e2bSVaishali Kulkarni static OSAL_INLINE void ecore_vf_pf_filter_mcast(struct ecore_hwfn *p_hwfn, struct ecore_filter_mcast *p_filter_cmd) {}
ecore_vf_pf_int_cleanup(struct ecore_hwfn * p_hwfn)356*14b24e2bSVaishali Kulkarni static OSAL_INLINE enum _ecore_status_t ecore_vf_pf_int_cleanup(struct ecore_hwfn *p_hwfn) {return ECORE_INVAL;}
__ecore_vf_get_link_params(struct ecore_hwfn * p_hwfn,struct ecore_mcp_link_params * p_params,struct ecore_bulletin_content * p_bulletin)357*14b24e2bSVaishali Kulkarni static OSAL_INLINE void __ecore_vf_get_link_params(struct ecore_hwfn *p_hwfn, struct ecore_mcp_link_params *p_params, struct ecore_bulletin_content *p_bulletin) {}
__ecore_vf_get_link_state(struct ecore_hwfn * p_hwfn,struct ecore_mcp_link_state * p_link,struct ecore_bulletin_content * p_bulletin)358*14b24e2bSVaishali Kulkarni static OSAL_INLINE void __ecore_vf_get_link_state(struct ecore_hwfn *p_hwfn, struct ecore_mcp_link_state *p_link, struct ecore_bulletin_content *p_bulletin) {}
__ecore_vf_get_link_caps(struct ecore_hwfn * p_hwfn,struct ecore_mcp_link_capabilities * p_link_caps,struct ecore_bulletin_content * p_bulletin)359*14b24e2bSVaishali Kulkarni static OSAL_INLINE void __ecore_vf_get_link_caps(struct ecore_hwfn *p_hwfn, struct ecore_mcp_link_capabilities *p_link_caps, struct ecore_bulletin_content *p_bulletin) {}
ecore_vf_pf_tunnel_param_update(struct ecore_hwfn * p_hwfn,struct ecore_tunnel_info * p_tunn)360*14b24e2bSVaishali Kulkarni static OSAL_INLINE enum _ecore_status_t ecore_vf_pf_tunnel_param_update(struct ecore_hwfn *p_hwfn, struct ecore_tunnel_info *p_tunn) { return ECORE_INVAL; }
ecore_vf_set_vf_start_tunn_update_param(struct ecore_tunnel_info * p_tun)361*14b24e2bSVaishali Kulkarni static OSAL_INLINE void ecore_vf_set_vf_start_tunn_update_param(struct ecore_tunnel_info *p_tun) { return; }
ecore_vf_pf_set_coalesce(struct ecore_hwfn * p_hwfn,u16 rx_coal,u16 tx_coal,struct ecore_queue_cid * p_cid)362*14b24e2bSVaishali Kulkarni static OSAL_INLINE enum _ecore_status_t ecore_vf_pf_set_coalesce(struct ecore_hwfn *p_hwfn,
363*14b24e2bSVaishali Kulkarni 					      u16 rx_coal, u16 tx_coal,
364*14b24e2bSVaishali Kulkarni 					      struct ecore_queue_cid *p_cid) {return ECORE_INVAL;}
365*14b24e2bSVaishali Kulkarni #endif
366*14b24e2bSVaishali Kulkarni 
367*14b24e2bSVaishali Kulkarni #endif /* __ECORE_VF_H__ */