xref: /freebsd/sys/dev/qlnx/qlnxe/ecore_vf.h (revision 95ee2897e98f5d444f26ed2334cc7c439f9c16c6)
111e25f0dSDavid C Somayajulu /*
211e25f0dSDavid C Somayajulu  * Copyright (c) 2017-2018 Cavium, Inc.
311e25f0dSDavid C Somayajulu  * All rights reserved.
411e25f0dSDavid C Somayajulu  *
511e25f0dSDavid C Somayajulu  *  Redistribution and use in source and binary forms, with or without
611e25f0dSDavid C Somayajulu  *  modification, are permitted provided that the following conditions
711e25f0dSDavid C Somayajulu  *  are met:
811e25f0dSDavid C Somayajulu  *
911e25f0dSDavid C Somayajulu  *  1. Redistributions of source code must retain the above copyright
1011e25f0dSDavid C Somayajulu  *     notice, this list of conditions and the following disclaimer.
1111e25f0dSDavid C Somayajulu  *  2. Redistributions in binary form must reproduce the above copyright
1211e25f0dSDavid C Somayajulu  *     notice, this list of conditions and the following disclaimer in the
1311e25f0dSDavid C Somayajulu  *     documentation and/or other materials provided with the distribution.
1411e25f0dSDavid C Somayajulu  *
1511e25f0dSDavid C Somayajulu  *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
1611e25f0dSDavid C Somayajulu  *  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
1711e25f0dSDavid C Somayajulu  *  IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
1811e25f0dSDavid C Somayajulu  *  ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
1911e25f0dSDavid C Somayajulu  *  LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
2011e25f0dSDavid C Somayajulu  *  CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
2111e25f0dSDavid C Somayajulu  *  SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
2211e25f0dSDavid C Somayajulu  *  INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
2311e25f0dSDavid C Somayajulu  *  CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
2411e25f0dSDavid C Somayajulu  *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
2511e25f0dSDavid C Somayajulu  *  POSSIBILITY OF SUCH DAMAGE.
2611e25f0dSDavid C Somayajulu  *
2711e25f0dSDavid C Somayajulu  */
2811e25f0dSDavid C Somayajulu 
2911e25f0dSDavid C Somayajulu #ifndef __ECORE_VF_H__
3011e25f0dSDavid C Somayajulu #define __ECORE_VF_H__
3111e25f0dSDavid C Somayajulu 
3211e25f0dSDavid C Somayajulu #include "ecore_status.h"
3311e25f0dSDavid C Somayajulu #include "ecore_vf_api.h"
3411e25f0dSDavid C Somayajulu #include "ecore_l2_api.h"
3511e25f0dSDavid C Somayajulu #include "ecore_vfpf_if.h"
3611e25f0dSDavid C Somayajulu 
3711e25f0dSDavid C Somayajulu /* Default number of CIDs [total of both Rx and Tx] to be requested
38*217ec208SDavid C Somayajulu  * by default, and maximum possible number.
3911e25f0dSDavid C Somayajulu  */
4011e25f0dSDavid C Somayajulu #define ECORE_ETH_VF_DEFAULT_NUM_CIDS	(32)
41*217ec208SDavid C Somayajulu #define ECORE_ETH_VF_MAX_NUM_CIDS	(255)
4211e25f0dSDavid C Somayajulu 
4311e25f0dSDavid C Somayajulu /* This data is held in the ecore_hwfn structure for VFs only. */
4411e25f0dSDavid C Somayajulu struct ecore_vf_iov {
4511e25f0dSDavid C Somayajulu 	union vfpf_tlvs			*vf2pf_request;
4611e25f0dSDavid C Somayajulu 	dma_addr_t			vf2pf_request_phys;
4711e25f0dSDavid C Somayajulu 	union pfvf_tlvs			*pf2vf_reply;
4811e25f0dSDavid C Somayajulu 	dma_addr_t			pf2vf_reply_phys;
4911e25f0dSDavid C Somayajulu 
5011e25f0dSDavid C Somayajulu 	/* Should be taken whenever the mailbox buffers are accessed */
5111e25f0dSDavid C Somayajulu 	osal_mutex_t			mutex;
5211e25f0dSDavid C Somayajulu 	u8				*offset;
5311e25f0dSDavid C Somayajulu 
5411e25f0dSDavid C Somayajulu 	/* Bulletin Board */
5511e25f0dSDavid C Somayajulu 	struct ecore_bulletin		bulletin;
5611e25f0dSDavid C Somayajulu 	struct ecore_bulletin_content	bulletin_shadow;
5711e25f0dSDavid C Somayajulu 
5811e25f0dSDavid C Somayajulu 	/* we set aside a copy of the acquire response */
5911e25f0dSDavid C Somayajulu 	struct pfvf_acquire_resp_tlv	acquire_resp;
6011e25f0dSDavid C Somayajulu 
6111e25f0dSDavid C Somayajulu 	/* In case PF originates prior to the fp-hsi version comparison,
6211e25f0dSDavid C Somayajulu 	 * this has to be propagated as it affects the fastpath.
6311e25f0dSDavid C Somayajulu 	 */
6411e25f0dSDavid C Somayajulu 	bool b_pre_fp_hsi;
6511e25f0dSDavid C Somayajulu 
6611e25f0dSDavid C Somayajulu 	/* Current day VFs are passing the SBs physical address on vport
6711e25f0dSDavid C Somayajulu 	 * start, and as they lack an IGU mapping they need to store the
6811e25f0dSDavid C Somayajulu 	 * addresses of previously registered SBs.
6911e25f0dSDavid C Somayajulu 	 * Even if we were to change configuration flow, due to backward
709efd0ba7SDavid C Somayajulu 	 * compatability [with older PFs] we'd still need to store these.
7111e25f0dSDavid C Somayajulu 	 */
7211e25f0dSDavid C Somayajulu 	struct ecore_sb_info *sbs_info[PFVF_MAX_SBS_PER_VF];
73*217ec208SDavid C Somayajulu 
74*217ec208SDavid C Somayajulu #ifdef CONFIG_ECORE_SW_CHANNEL
75*217ec208SDavid C Somayajulu 	/* Would be set if the VF is to try communicating with it PF
76*217ec208SDavid C Somayajulu 	 * using a hw channel.
77*217ec208SDavid C Somayajulu 	 */
78*217ec208SDavid C Somayajulu 	bool b_hw_channel;
79*217ec208SDavid C Somayajulu #endif
80*217ec208SDavid C Somayajulu 
81*217ec208SDavid C Somayajulu 	/* Determines whether VF utilizes doorbells via limited register
82*217ec208SDavid C Somayajulu 	 * bar or via the doorbell bar.
83*217ec208SDavid C Somayajulu 	 */
84*217ec208SDavid C Somayajulu 	bool b_doorbell_bar;
8511e25f0dSDavid C Somayajulu };
8611e25f0dSDavid C Somayajulu 
87*217ec208SDavid C Somayajulu /**
88*217ec208SDavid C Somayajulu  * @brief VF - Get coalesce per VF's relative queue.
89*217ec208SDavid C Somayajulu  *
90*217ec208SDavid C Somayajulu  * @param p_hwfn
91*217ec208SDavid C Somayajulu  * @param p_coal - coalesce value in micro second for VF queues.
92*217ec208SDavid C Somayajulu  * @param p_cid  - queue cid
93*217ec208SDavid C Somayajulu  *
94*217ec208SDavid C Somayajulu  **/
95*217ec208SDavid C Somayajulu enum _ecore_status_t ecore_vf_pf_get_coalesce(struct ecore_hwfn *p_hwfn,
96*217ec208SDavid C Somayajulu 					      u16 *p_coal,
9711e25f0dSDavid C Somayajulu 					      struct ecore_queue_cid *p_cid);
9811e25f0dSDavid C Somayajulu /**
9911e25f0dSDavid C Somayajulu  * @brief VF - Set Rx/Tx coalesce per VF's relative queue.
10011e25f0dSDavid C Somayajulu  *             Coalesce value '0' will omit the configuration.
10111e25f0dSDavid C Somayajulu  *
10211e25f0dSDavid C Somayajulu  * @param p_hwfn
10311e25f0dSDavid C Somayajulu  * @param rx_coal - coalesce value in micro second for rx queue
10411e25f0dSDavid C Somayajulu  * @param tx_coal - coalesce value in micro second for tx queue
105*217ec208SDavid C Somayajulu  * @param p_cid   - queue cid
10611e25f0dSDavid C Somayajulu  *
10711e25f0dSDavid C Somayajulu  **/
10811e25f0dSDavid C Somayajulu enum _ecore_status_t ecore_vf_pf_set_coalesce(struct ecore_hwfn *p_hwfn,
10911e25f0dSDavid C Somayajulu 					      u16 rx_coal, u16 tx_coal,
11011e25f0dSDavid C Somayajulu 					      struct ecore_queue_cid *p_cid);
11111e25f0dSDavid C Somayajulu 
11211e25f0dSDavid C Somayajulu #ifdef CONFIG_ECORE_SRIOV
11311e25f0dSDavid C Somayajulu /**
11411e25f0dSDavid C Somayajulu  * @brief hw preparation for VF
11511e25f0dSDavid C Somayajulu  *	sends ACQUIRE message
11611e25f0dSDavid C Somayajulu  *
11711e25f0dSDavid C Somayajulu  * @param p_hwfn
11811e25f0dSDavid C Somayajulu  *
11911e25f0dSDavid C Somayajulu  * @return enum _ecore_status_t
12011e25f0dSDavid C Somayajulu  */
12111e25f0dSDavid C Somayajulu enum _ecore_status_t ecore_vf_hw_prepare(struct ecore_hwfn *p_hwfn);
12211e25f0dSDavid C Somayajulu 
12311e25f0dSDavid C Somayajulu /**
12411e25f0dSDavid C Somayajulu  * @brief VF - start the RX Queue by sending a message to the PF
12511e25f0dSDavid C Somayajulu  *
12611e25f0dSDavid C Somayajulu  * @param p_hwfn
12711e25f0dSDavid C Somayajulu  * @param p_cid			- Only relative fields are relevant
12811e25f0dSDavid C Somayajulu  * @param bd_max_bytes 		- maximum number of bytes per bd
12911e25f0dSDavid C Somayajulu  * @param bd_chain_phys_addr 	- physical address of bd chain
13011e25f0dSDavid C Somayajulu  * @param cqe_pbl_addr 		- physical address of pbl
13111e25f0dSDavid C Somayajulu  * @param cqe_pbl_size 		- pbl size
13211e25f0dSDavid C Somayajulu  * @param pp_prod 		- pointer to the producer to be
13311e25f0dSDavid C Somayajulu  *				  used in fasthpath
13411e25f0dSDavid C Somayajulu  *
13511e25f0dSDavid C Somayajulu  * @return enum _ecore_status_t
13611e25f0dSDavid C Somayajulu  */
13711e25f0dSDavid C Somayajulu enum _ecore_status_t ecore_vf_pf_rxq_start(struct ecore_hwfn *p_hwfn,
13811e25f0dSDavid C Somayajulu 					   struct ecore_queue_cid *p_cid,
13911e25f0dSDavid C Somayajulu 					   u16 bd_max_bytes,
14011e25f0dSDavid C Somayajulu 					   dma_addr_t bd_chain_phys_addr,
14111e25f0dSDavid C Somayajulu 					   dma_addr_t cqe_pbl_addr,
14211e25f0dSDavid C Somayajulu 					   u16 cqe_pbl_size,
14311e25f0dSDavid C Somayajulu 					   void OSAL_IOMEM **pp_prod);
14411e25f0dSDavid C Somayajulu 
14511e25f0dSDavid C Somayajulu /**
14611e25f0dSDavid C Somayajulu  * @brief VF - start the TX queue by sending a message to the
14711e25f0dSDavid C Somayajulu  *        PF.
14811e25f0dSDavid C Somayajulu  *
14911e25f0dSDavid C Somayajulu  * @param p_hwfn
15011e25f0dSDavid C Somayajulu  * @param p_cid
15111e25f0dSDavid C Somayajulu  * @param bd_chain_phys_addr 	- physical address of tx chain
15211e25f0dSDavid C Somayajulu  * @param pp_doorbell 		- pointer to address to which to
15311e25f0dSDavid C Somayajulu  *      		write the doorbell too..
15411e25f0dSDavid C Somayajulu  *
15511e25f0dSDavid C Somayajulu  * @return enum _ecore_status_t
15611e25f0dSDavid C Somayajulu  */
15711e25f0dSDavid C Somayajulu enum _ecore_status_t
15811e25f0dSDavid C Somayajulu ecore_vf_pf_txq_start(struct ecore_hwfn *p_hwfn,
15911e25f0dSDavid C Somayajulu 		      struct ecore_queue_cid *p_cid,
16011e25f0dSDavid C Somayajulu 		      dma_addr_t pbl_addr, u16 pbl_size,
16111e25f0dSDavid C Somayajulu 		      void OSAL_IOMEM **pp_doorbell);
16211e25f0dSDavid C Somayajulu 
16311e25f0dSDavid C Somayajulu /**
16411e25f0dSDavid C Somayajulu  * @brief VF - stop the RX queue by sending a message to the PF
16511e25f0dSDavid C Somayajulu  *
16611e25f0dSDavid C Somayajulu  * @param p_hwfn
16711e25f0dSDavid C Somayajulu  * @param p_cid
16811e25f0dSDavid C Somayajulu  * @param cqe_completion
16911e25f0dSDavid C Somayajulu  *
17011e25f0dSDavid C Somayajulu  * @return enum _ecore_status_t
17111e25f0dSDavid C Somayajulu  */
17211e25f0dSDavid C Somayajulu enum _ecore_status_t ecore_vf_pf_rxq_stop(struct ecore_hwfn *p_hwfn,
17311e25f0dSDavid C Somayajulu 					  struct ecore_queue_cid *p_cid,
17411e25f0dSDavid C Somayajulu 					  bool cqe_completion);
17511e25f0dSDavid C Somayajulu 
17611e25f0dSDavid C Somayajulu /**
17711e25f0dSDavid C Somayajulu  * @brief VF - stop the TX queue by sending a message to the PF
17811e25f0dSDavid C Somayajulu  *
17911e25f0dSDavid C Somayajulu  * @param p_hwfn
18011e25f0dSDavid C Somayajulu  * @param p_cid
18111e25f0dSDavid C Somayajulu  *
18211e25f0dSDavid C Somayajulu  * @return enum _ecore_status_t
18311e25f0dSDavid C Somayajulu  */
18411e25f0dSDavid C Somayajulu enum _ecore_status_t ecore_vf_pf_txq_stop(struct ecore_hwfn *p_hwfn,
18511e25f0dSDavid C Somayajulu 					  struct ecore_queue_cid *p_cid);
18611e25f0dSDavid C Somayajulu 
18711e25f0dSDavid C Somayajulu /* TODO - fix all the !SRIOV prototypes */
18811e25f0dSDavid C Somayajulu 
1899efd0ba7SDavid C Somayajulu #ifndef LINUX_REMOVE
19011e25f0dSDavid C Somayajulu /**
19111e25f0dSDavid C Somayajulu  * @brief VF - update the RX queue by sending a message to the
19211e25f0dSDavid C Somayajulu  *        PF
19311e25f0dSDavid C Somayajulu  *
19411e25f0dSDavid C Somayajulu  * @param p_hwfn
19511e25f0dSDavid C Somayajulu  * @param pp_cid - list of queue-cids which we want to update
19611e25f0dSDavid C Somayajulu  * @param num_rxqs
19711e25f0dSDavid C Somayajulu  * @param comp_cqe_flg
19811e25f0dSDavid C Somayajulu  * @param comp_event_flg
19911e25f0dSDavid C Somayajulu  *
20011e25f0dSDavid C Somayajulu  * @return enum _ecore_status_t
20111e25f0dSDavid C Somayajulu  */
20211e25f0dSDavid C Somayajulu enum _ecore_status_t ecore_vf_pf_rxqs_update(struct ecore_hwfn *p_hwfn,
20311e25f0dSDavid C Somayajulu 					     struct ecore_queue_cid **pp_cid,
20411e25f0dSDavid C Somayajulu 					     u8 num_rxqs,
20511e25f0dSDavid C Somayajulu 					     u8 comp_cqe_flg,
20611e25f0dSDavid C Somayajulu 					     u8 comp_event_flg);
2079efd0ba7SDavid C Somayajulu #endif
20811e25f0dSDavid C Somayajulu 
20911e25f0dSDavid C Somayajulu /**
21011e25f0dSDavid C Somayajulu  * @brief VF - send a vport update command
21111e25f0dSDavid C Somayajulu  *
21211e25f0dSDavid C Somayajulu  * @param p_hwfn
21311e25f0dSDavid C Somayajulu  * @param params
21411e25f0dSDavid C Somayajulu  *
21511e25f0dSDavid C Somayajulu  * @return enum _ecore_status_t
21611e25f0dSDavid C Somayajulu  */
21711e25f0dSDavid C Somayajulu enum _ecore_status_t ecore_vf_pf_vport_update(struct ecore_hwfn *p_hwfn,
21811e25f0dSDavid C Somayajulu 					      struct ecore_sp_vport_update_params *p_params);
21911e25f0dSDavid C Somayajulu 
22011e25f0dSDavid C Somayajulu /**
22111e25f0dSDavid C Somayajulu  * @brief VF - send a close message to PF
22211e25f0dSDavid C Somayajulu  *
22311e25f0dSDavid C Somayajulu  * @param p_hwfn
22411e25f0dSDavid C Somayajulu  *
22511e25f0dSDavid C Somayajulu  * @return enum _ecore_status
22611e25f0dSDavid C Somayajulu  */
22711e25f0dSDavid C Somayajulu enum _ecore_status_t ecore_vf_pf_reset(struct ecore_hwfn *p_hwfn);
22811e25f0dSDavid C Somayajulu 
22911e25f0dSDavid C Somayajulu /**
23011e25f0dSDavid C Somayajulu  * @brief VF - free vf`s memories
23111e25f0dSDavid C Somayajulu  *
23211e25f0dSDavid C Somayajulu  * @param p_hwfn
23311e25f0dSDavid C Somayajulu  *
23411e25f0dSDavid C Somayajulu  * @return enum _ecore_status
23511e25f0dSDavid C Somayajulu  */
23611e25f0dSDavid C Somayajulu enum _ecore_status_t ecore_vf_pf_release(struct ecore_hwfn *p_hwfn);
23711e25f0dSDavid C Somayajulu 
23811e25f0dSDavid C Somayajulu /**
23911e25f0dSDavid C Somayajulu  * @brief ecore_vf_get_igu_sb_id - Get the IGU SB ID for a given
24011e25f0dSDavid C Somayajulu  *        sb_id. For VFs igu sbs don't have to be contiguous
24111e25f0dSDavid C Somayajulu  *
24211e25f0dSDavid C Somayajulu  * @param p_hwfn
24311e25f0dSDavid C Somayajulu  * @param sb_id
24411e25f0dSDavid C Somayajulu  *
24511e25f0dSDavid C Somayajulu  * @return INLINE u16
24611e25f0dSDavid C Somayajulu  */
24711e25f0dSDavid C Somayajulu u16 ecore_vf_get_igu_sb_id(struct ecore_hwfn *p_hwfn,
24811e25f0dSDavid C Somayajulu 			   u16               sb_id);
24911e25f0dSDavid C Somayajulu 
25011e25f0dSDavid C Somayajulu /**
25111e25f0dSDavid C Somayajulu  * @brief Stores [or removes] a configured sb_info.
25211e25f0dSDavid C Somayajulu  *
25311e25f0dSDavid C Somayajulu  * @param p_hwfn
25411e25f0dSDavid C Somayajulu  * @param sb_id - zero-based SB index [for fastpath]
25511e25f0dSDavid C Somayajulu  * @param sb_info - may be OSAL_NULL [during removal].
25611e25f0dSDavid C Somayajulu  */
25711e25f0dSDavid C Somayajulu void ecore_vf_set_sb_info(struct ecore_hwfn *p_hwfn,
25811e25f0dSDavid C Somayajulu 			  u16 sb_id, struct ecore_sb_info *p_sb);
25911e25f0dSDavid C Somayajulu 
26011e25f0dSDavid C Somayajulu /**
26111e25f0dSDavid C Somayajulu  * @brief ecore_vf_pf_vport_start - perform vport start for VF.
26211e25f0dSDavid C Somayajulu  *
26311e25f0dSDavid C Somayajulu  * @param p_hwfn
26411e25f0dSDavid C Somayajulu  * @param vport_id
26511e25f0dSDavid C Somayajulu  * @param mtu
26611e25f0dSDavid C Somayajulu  * @param inner_vlan_removal
26711e25f0dSDavid C Somayajulu  * @param tpa_mode
26811e25f0dSDavid C Somayajulu  * @param max_buffers_per_cqe,
26911e25f0dSDavid C Somayajulu  * @param only_untagged - default behavior regarding vlan acceptance
270*217ec208SDavid C Somayajulu  * @param zero_placement_offset - if set, zero padding will be inserted
27111e25f0dSDavid C Somayajulu  *
27211e25f0dSDavid C Somayajulu  * @return enum _ecore_status
27311e25f0dSDavid C Somayajulu  */
27411e25f0dSDavid C Somayajulu enum _ecore_status_t ecore_vf_pf_vport_start(
27511e25f0dSDavid C Somayajulu 			struct ecore_hwfn *p_hwfn,
27611e25f0dSDavid C Somayajulu 			u8 vport_id,
27711e25f0dSDavid C Somayajulu 			u16 mtu,
27811e25f0dSDavid C Somayajulu 			u8 inner_vlan_removal,
27911e25f0dSDavid C Somayajulu 			enum ecore_tpa_mode tpa_mode,
28011e25f0dSDavid C Somayajulu 			u8 max_buffers_per_cqe,
281*217ec208SDavid C Somayajulu 			u8 only_untagged,
282*217ec208SDavid C Somayajulu 			u8 zero_placement_offset);
28311e25f0dSDavid C Somayajulu 
28411e25f0dSDavid C Somayajulu /**
28511e25f0dSDavid C Somayajulu  * @brief ecore_vf_pf_vport_stop - stop the VF's vport
28611e25f0dSDavid C Somayajulu  *
28711e25f0dSDavid C Somayajulu  * @param p_hwfn
28811e25f0dSDavid C Somayajulu  *
28911e25f0dSDavid C Somayajulu  * @return enum _ecore_status
29011e25f0dSDavid C Somayajulu  */
29111e25f0dSDavid C Somayajulu enum _ecore_status_t ecore_vf_pf_vport_stop(struct ecore_hwfn *p_hwfn);
29211e25f0dSDavid C Somayajulu 
29311e25f0dSDavid C Somayajulu enum _ecore_status_t ecore_vf_pf_filter_ucast(
29411e25f0dSDavid C Somayajulu 			struct ecore_hwfn *p_hwfn,
29511e25f0dSDavid C Somayajulu 			struct ecore_filter_ucast *p_param);
29611e25f0dSDavid C Somayajulu 
29711e25f0dSDavid C Somayajulu void ecore_vf_pf_filter_mcast(struct ecore_hwfn *p_hwfn,
29811e25f0dSDavid C Somayajulu 			      struct ecore_filter_mcast *p_filter_cmd);
29911e25f0dSDavid C Somayajulu 
30011e25f0dSDavid C Somayajulu /**
30111e25f0dSDavid C Somayajulu  * @brief ecore_vf_pf_int_cleanup - clean the SB of the VF
30211e25f0dSDavid C Somayajulu  *
30311e25f0dSDavid C Somayajulu  * @param p_hwfn
30411e25f0dSDavid C Somayajulu  *
30511e25f0dSDavid C Somayajulu  * @return enum _ecore_status
30611e25f0dSDavid C Somayajulu  */
30711e25f0dSDavid C Somayajulu enum _ecore_status_t ecore_vf_pf_int_cleanup(struct ecore_hwfn *p_hwfn);
30811e25f0dSDavid C Somayajulu 
30911e25f0dSDavid C Somayajulu /**
31011e25f0dSDavid C Somayajulu  * @brief - return the link params in a given bulletin board
31111e25f0dSDavid C Somayajulu  *
31211e25f0dSDavid C Somayajulu  * @param p_params - pointer to a struct to fill with link params
31311e25f0dSDavid C Somayajulu  * @param p_bulletin
31411e25f0dSDavid C Somayajulu  */
3159efd0ba7SDavid C Somayajulu void __ecore_vf_get_link_params(struct ecore_mcp_link_params *p_params,
31611e25f0dSDavid C Somayajulu 				struct ecore_bulletin_content *p_bulletin);
31711e25f0dSDavid C Somayajulu 
31811e25f0dSDavid C Somayajulu /**
31911e25f0dSDavid C Somayajulu  * @brief - return the link state in a given bulletin board
32011e25f0dSDavid C Somayajulu  *
32111e25f0dSDavid C Somayajulu  * @param p_link - pointer to a struct to fill with link state
32211e25f0dSDavid C Somayajulu  * @param p_bulletin
32311e25f0dSDavid C Somayajulu  */
3249efd0ba7SDavid C Somayajulu void __ecore_vf_get_link_state(struct ecore_mcp_link_state *p_link,
32511e25f0dSDavid C Somayajulu 			       struct ecore_bulletin_content *p_bulletin);
32611e25f0dSDavid C Somayajulu 
32711e25f0dSDavid C Somayajulu /**
32811e25f0dSDavid C Somayajulu  * @brief - return the link capabilities in a given bulletin board
32911e25f0dSDavid C Somayajulu  *
33011e25f0dSDavid C Somayajulu  * @param p_link - pointer to a struct to fill with link capabilities
33111e25f0dSDavid C Somayajulu  * @param p_bulletin
33211e25f0dSDavid C Somayajulu  */
3339efd0ba7SDavid C Somayajulu void __ecore_vf_get_link_caps(struct ecore_mcp_link_capabilities *p_link_caps,
33411e25f0dSDavid C Somayajulu 			      struct ecore_bulletin_content *p_bulletin);
33511e25f0dSDavid C Somayajulu enum _ecore_status_t
33611e25f0dSDavid C Somayajulu ecore_vf_pf_tunnel_param_update(struct ecore_hwfn *p_hwfn,
33711e25f0dSDavid C Somayajulu 				struct ecore_tunnel_info *p_tunn);
33811e25f0dSDavid C Somayajulu void ecore_vf_set_vf_start_tunn_update_param(struct ecore_tunnel_info *p_tun);
339*217ec208SDavid C Somayajulu 
340*217ec208SDavid C Somayajulu u32 ecore_vf_hw_bar_size(struct ecore_hwfn *p_hwfn, enum BAR_ID bar_id);
34111e25f0dSDavid C Somayajulu #else
ecore_vf_hw_prepare(struct ecore_hwfn OSAL_UNUSED * p_hwfn)3429efd0ba7SDavid C Somayajulu static OSAL_INLINE enum _ecore_status_t ecore_vf_hw_prepare(struct ecore_hwfn OSAL_UNUSED *p_hwfn) {return ECORE_INVAL;}
ecore_vf_pf_rxq_start(struct ecore_hwfn OSAL_UNUSED * p_hwfn,struct ecore_queue_cid OSAL_UNUSED * p_cid,u16 OSAL_UNUSED bd_max_bytes,dma_addr_t OSAL_UNUSED bd_chain_phys_addr,dma_addr_t OSAL_UNUSED cqe_pbl_addr,u16 OSAL_UNUSED cqe_pbl_size,void OSAL_IOMEM OSAL_UNUSED ** pp_prod)3439efd0ba7SDavid C Somayajulu static OSAL_INLINE enum _ecore_status_t ecore_vf_pf_rxq_start(struct ecore_hwfn OSAL_UNUSED *p_hwfn, struct ecore_queue_cid OSAL_UNUSED *p_cid, u16 OSAL_UNUSED bd_max_bytes, dma_addr_t OSAL_UNUSED bd_chain_phys_addr, dma_addr_t OSAL_UNUSED cqe_pbl_addr, u16 OSAL_UNUSED cqe_pbl_size, void OSAL_IOMEM OSAL_UNUSED **pp_prod) {return ECORE_INVAL;}
ecore_vf_pf_txq_start(struct ecore_hwfn OSAL_UNUSED * p_hwfn,struct ecore_queue_cid OSAL_UNUSED * p_cid,dma_addr_t OSAL_UNUSED pbl_addr,u16 OSAL_UNUSED pbl_size,void OSAL_IOMEM OSAL_UNUSED ** pp_doorbell)3449efd0ba7SDavid C Somayajulu static OSAL_INLINE enum _ecore_status_t ecore_vf_pf_txq_start(struct ecore_hwfn OSAL_UNUSED *p_hwfn, struct ecore_queue_cid OSAL_UNUSED *p_cid, dma_addr_t OSAL_UNUSED pbl_addr, u16 OSAL_UNUSED pbl_size, void OSAL_IOMEM OSAL_UNUSED **pp_doorbell) {return ECORE_INVAL;}
ecore_vf_pf_rxq_stop(struct ecore_hwfn OSAL_UNUSED * p_hwfn,struct ecore_queue_cid OSAL_UNUSED * p_cid,bool OSAL_UNUSED cqe_completion)3459efd0ba7SDavid C Somayajulu static OSAL_INLINE enum _ecore_status_t ecore_vf_pf_rxq_stop(struct ecore_hwfn OSAL_UNUSED *p_hwfn, struct ecore_queue_cid OSAL_UNUSED *p_cid, bool OSAL_UNUSED cqe_completion) {return ECORE_INVAL;}
ecore_vf_pf_txq_stop(struct ecore_hwfn OSAL_UNUSED * p_hwfn,struct ecore_queue_cid OSAL_UNUSED * p_cid)3469efd0ba7SDavid C Somayajulu static OSAL_INLINE enum _ecore_status_t ecore_vf_pf_txq_stop(struct ecore_hwfn OSAL_UNUSED *p_hwfn, struct ecore_queue_cid OSAL_UNUSED *p_cid) {return ECORE_INVAL;}
3479efd0ba7SDavid C Somayajulu #ifndef LINUX_REMOVE
ecore_vf_pf_rxqs_update(struct ecore_hwfn OSAL_UNUSED * p_hwfn,struct ecore_queue_cid OSAL_UNUSED ** pp_cid,u8 OSAL_UNUSED num_rxqs,u8 OSAL_UNUSED comp_cqe_flg,u8 OSAL_UNUSED comp_event_flg)3489efd0ba7SDavid C Somayajulu static OSAL_INLINE enum _ecore_status_t ecore_vf_pf_rxqs_update(struct ecore_hwfn OSAL_UNUSED *p_hwfn, struct ecore_queue_cid OSAL_UNUSED **pp_cid, u8 OSAL_UNUSED num_rxqs, u8 OSAL_UNUSED comp_cqe_flg, u8 OSAL_UNUSED comp_event_flg) {return ECORE_INVAL;}
3499efd0ba7SDavid C Somayajulu #endif
ecore_vf_pf_vport_update(struct ecore_hwfn OSAL_UNUSED * p_hwfn,struct ecore_sp_vport_update_params OSAL_UNUSED * p_params)3509efd0ba7SDavid C Somayajulu static OSAL_INLINE enum _ecore_status_t ecore_vf_pf_vport_update(struct ecore_hwfn OSAL_UNUSED *p_hwfn, struct ecore_sp_vport_update_params OSAL_UNUSED *p_params) {return ECORE_INVAL;}
ecore_vf_pf_reset(struct ecore_hwfn OSAL_UNUSED * p_hwfn)3519efd0ba7SDavid C Somayajulu static OSAL_INLINE enum _ecore_status_t ecore_vf_pf_reset(struct ecore_hwfn OSAL_UNUSED *p_hwfn) {return ECORE_INVAL;}
ecore_vf_pf_release(struct ecore_hwfn OSAL_UNUSED * p_hwfn)3529efd0ba7SDavid C Somayajulu static OSAL_INLINE enum _ecore_status_t ecore_vf_pf_release(struct ecore_hwfn OSAL_UNUSED *p_hwfn) {return ECORE_INVAL;}
ecore_vf_get_igu_sb_id(struct ecore_hwfn OSAL_UNUSED * p_hwfn,u16 OSAL_UNUSED sb_id)3539efd0ba7SDavid C Somayajulu static OSAL_INLINE u16 ecore_vf_get_igu_sb_id(struct ecore_hwfn OSAL_UNUSED *p_hwfn, u16 OSAL_UNUSED sb_id) {return 0;}
ecore_vf_set_sb_info(struct ecore_hwfn OSAL_UNUSED * p_hwfn,u16 OSAL_UNUSED sb_id,struct ecore_sb_info OSAL_UNUSED * p_sb)3549efd0ba7SDavid C Somayajulu static OSAL_INLINE void ecore_vf_set_sb_info(struct ecore_hwfn OSAL_UNUSED *p_hwfn, u16 OSAL_UNUSED sb_id, struct ecore_sb_info OSAL_UNUSED *p_sb) {}
ecore_vf_pf_vport_start(struct ecore_hwfn OSAL_UNUSED * p_hwfn,u8 OSAL_UNUSED vport_id,u16 OSAL_UNUSED mtu,u8 OSAL_UNUSED inner_vlan_removal,enum ecore_tpa_mode OSAL_UNUSED tpa_mode,u8 OSAL_UNUSED max_buffers_per_cqe,u8 OSAL_UNUSED only_untagged,u8 OSAL_UNUSED zero_placement_offset)355*217ec208SDavid C Somayajulu static OSAL_INLINE enum _ecore_status_t ecore_vf_pf_vport_start(struct ecore_hwfn OSAL_UNUSED *p_hwfn, u8 OSAL_UNUSED vport_id, u16 OSAL_UNUSED mtu, u8 OSAL_UNUSED inner_vlan_removal, enum ecore_tpa_mode OSAL_UNUSED tpa_mode, u8 OSAL_UNUSED max_buffers_per_cqe, u8 OSAL_UNUSED only_untagged, u8 OSAL_UNUSED zero_placement_offset) {return ECORE_INVAL;}
ecore_vf_pf_vport_stop(struct ecore_hwfn OSAL_UNUSED * p_hwfn)3569efd0ba7SDavid C Somayajulu static OSAL_INLINE enum _ecore_status_t ecore_vf_pf_vport_stop(struct ecore_hwfn OSAL_UNUSED *p_hwfn) {return ECORE_INVAL;}
ecore_vf_pf_filter_ucast(struct ecore_hwfn OSAL_UNUSED * p_hwfn,struct ecore_filter_ucast OSAL_UNUSED * p_param)3579efd0ba7SDavid C Somayajulu static OSAL_INLINE enum _ecore_status_t ecore_vf_pf_filter_ucast(struct ecore_hwfn OSAL_UNUSED *p_hwfn, struct ecore_filter_ucast OSAL_UNUSED *p_param) {return ECORE_INVAL;}
ecore_vf_pf_filter_mcast(struct ecore_hwfn OSAL_UNUSED * p_hwfn,struct ecore_filter_mcast OSAL_UNUSED * p_filter_cmd)3589efd0ba7SDavid C Somayajulu static OSAL_INLINE void ecore_vf_pf_filter_mcast(struct ecore_hwfn OSAL_UNUSED *p_hwfn, struct ecore_filter_mcast OSAL_UNUSED *p_filter_cmd) {}
ecore_vf_pf_int_cleanup(struct ecore_hwfn OSAL_UNUSED * p_hwfn)3599efd0ba7SDavid C Somayajulu static OSAL_INLINE enum _ecore_status_t ecore_vf_pf_int_cleanup(struct ecore_hwfn OSAL_UNUSED *p_hwfn) {return ECORE_INVAL;}
__ecore_vf_get_link_params(struct ecore_mcp_link_params OSAL_UNUSED * p_params,struct ecore_bulletin_content OSAL_UNUSED * p_bulletin)360*217ec208SDavid C Somayajulu static OSAL_INLINE void __ecore_vf_get_link_params(struct ecore_mcp_link_params OSAL_UNUSED *p_params, struct ecore_bulletin_content OSAL_UNUSED *p_bulletin) {}
__ecore_vf_get_link_state(struct ecore_mcp_link_state OSAL_UNUSED * p_link,struct ecore_bulletin_content OSAL_UNUSED * p_bulletin)361*217ec208SDavid C Somayajulu static OSAL_INLINE void __ecore_vf_get_link_state(struct ecore_mcp_link_state OSAL_UNUSED *p_link, struct ecore_bulletin_content OSAL_UNUSED *p_bulletin) {}
__ecore_vf_get_link_caps(struct ecore_mcp_link_capabilities OSAL_UNUSED * p_link_caps,struct ecore_bulletin_content OSAL_UNUSED * p_bulletin)362*217ec208SDavid C Somayajulu static OSAL_INLINE void __ecore_vf_get_link_caps(struct ecore_mcp_link_capabilities OSAL_UNUSED *p_link_caps, struct ecore_bulletin_content OSAL_UNUSED *p_bulletin) {}
ecore_vf_pf_tunnel_param_update(struct ecore_hwfn OSAL_UNUSED * p_hwfn,struct ecore_tunnel_info OSAL_UNUSED * p_tunn)3639efd0ba7SDavid C Somayajulu static OSAL_INLINE enum _ecore_status_t ecore_vf_pf_tunnel_param_update(struct ecore_hwfn OSAL_UNUSED *p_hwfn, struct ecore_tunnel_info OSAL_UNUSED *p_tunn) { return ECORE_INVAL; }
ecore_vf_set_vf_start_tunn_update_param(struct ecore_tunnel_info OSAL_UNUSED * p_tun)3649efd0ba7SDavid C Somayajulu static OSAL_INLINE void ecore_vf_set_vf_start_tunn_update_param(struct ecore_tunnel_info OSAL_UNUSED *p_tun) { return; }
365*217ec208SDavid C Somayajulu 
366*217ec208SDavid C Somayajulu static OSAL_INLINE u32
ecore_vf_hw_bar_size(struct ecore_hwfn OSAL_UNUSED * p_hwfn,enum BAR_ID OSAL_UNUSED bar_id)367*217ec208SDavid C Somayajulu ecore_vf_hw_bar_size(struct ecore_hwfn OSAL_UNUSED *p_hwfn,
368*217ec208SDavid C Somayajulu 		     enum BAR_ID OSAL_UNUSED bar_id)
369*217ec208SDavid C Somayajulu {
370*217ec208SDavid C Somayajulu 	return 0;
371*217ec208SDavid C Somayajulu }
37211e25f0dSDavid C Somayajulu #endif
37311e25f0dSDavid C Somayajulu 
37411e25f0dSDavid C Somayajulu #endif /* __ECORE_VF_H__ */
375