xref: /freebsd/sys/dev/qlnx/qlnxe/ecore_sriov.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_SRIOV_H__
3011e25f0dSDavid C Somayajulu #define __ECORE_SRIOV_H__
3111e25f0dSDavid C Somayajulu 
3211e25f0dSDavid C Somayajulu #include "ecore_status.h"
3311e25f0dSDavid C Somayajulu #include "ecore_vfpf_if.h"
3411e25f0dSDavid C Somayajulu #include "ecore_iov_api.h"
3511e25f0dSDavid C Somayajulu #include "ecore_hsi_common.h"
3611e25f0dSDavid C Somayajulu #include "ecore_l2.h"
3711e25f0dSDavid C Somayajulu 
3811e25f0dSDavid C Somayajulu #define ECORE_ETH_MAX_VF_NUM_VLAN_FILTERS \
399efd0ba7SDavid C Somayajulu 	(MAX_NUM_VFS_E4 * ECORE_ETH_VF_NUM_VLAN_FILTERS)
4011e25f0dSDavid C Somayajulu 
4111e25f0dSDavid C Somayajulu /* Represents a full message. Both the request filled by VF
4211e25f0dSDavid C Somayajulu  * and the response filled by the PF. The VF needs one copy
4311e25f0dSDavid C Somayajulu  * of this message, it fills the request part and sends it to
4411e25f0dSDavid C Somayajulu  * the PF. The PF will copy the response to the response part for
4511e25f0dSDavid C Somayajulu  * the VF to later read it. The PF needs to hold a message like this
4611e25f0dSDavid C Somayajulu  * per VF, the request that is copied to the PF is placed in the
4711e25f0dSDavid C Somayajulu  * request size, and the response is filled by the PF before sending
4811e25f0dSDavid C Somayajulu  * it to the VF.
4911e25f0dSDavid C Somayajulu  */
5011e25f0dSDavid C Somayajulu struct ecore_vf_mbx_msg {
5111e25f0dSDavid C Somayajulu 	union vfpf_tlvs req;
5211e25f0dSDavid C Somayajulu 	union pfvf_tlvs resp;
5311e25f0dSDavid C Somayajulu };
5411e25f0dSDavid C Somayajulu 
5511e25f0dSDavid C Somayajulu /* This mailbox is maintained per VF in its PF
5611e25f0dSDavid C Somayajulu  * contains all information required for sending / receiving
5711e25f0dSDavid C Somayajulu  * a message
5811e25f0dSDavid C Somayajulu  */
5911e25f0dSDavid C Somayajulu struct ecore_iov_vf_mbx {
6011e25f0dSDavid C Somayajulu 	union vfpf_tlvs		*req_virt;
6111e25f0dSDavid C Somayajulu 	dma_addr_t		req_phys;
6211e25f0dSDavid C Somayajulu 	union pfvf_tlvs		*reply_virt;
6311e25f0dSDavid C Somayajulu 	dma_addr_t		reply_phys;
6411e25f0dSDavid C Somayajulu 
6511e25f0dSDavid C Somayajulu 	/* Address in VF where a pending message is located */
6611e25f0dSDavid C Somayajulu 	dma_addr_t		pending_req;
6711e25f0dSDavid C Somayajulu 
6811e25f0dSDavid C Somayajulu 	/* Message from VF awaits handling */
6911e25f0dSDavid C Somayajulu 	bool			b_pending_msg;
7011e25f0dSDavid C Somayajulu 
7111e25f0dSDavid C Somayajulu 	u8 *offset;
7211e25f0dSDavid C Somayajulu 
7311e25f0dSDavid C Somayajulu #ifdef CONFIG_ECORE_SW_CHANNEL
7411e25f0dSDavid C Somayajulu 	struct ecore_iov_sw_mbx sw_mbx;
7511e25f0dSDavid C Somayajulu #endif
7611e25f0dSDavid C Somayajulu 
7711e25f0dSDavid C Somayajulu 	/* VF GPA address */
7811e25f0dSDavid C Somayajulu 	u32			vf_addr_lo;
7911e25f0dSDavid C Somayajulu 	u32			vf_addr_hi;
8011e25f0dSDavid C Somayajulu 
8111e25f0dSDavid C Somayajulu 	struct vfpf_first_tlv	first_tlv;	/* saved VF request header */
8211e25f0dSDavid C Somayajulu 
8311e25f0dSDavid C Somayajulu 	u8			flags;
8411e25f0dSDavid C Somayajulu #define VF_MSG_INPROCESS	0x1	/* failsafe - the FW should prevent
8511e25f0dSDavid C Somayajulu 					 * more then one pending msg
8611e25f0dSDavid C Somayajulu 					 */
8711e25f0dSDavid C Somayajulu };
8811e25f0dSDavid C Somayajulu 
8911e25f0dSDavid C Somayajulu #define ECORE_IOV_LEGACY_QID_RX (0)
9011e25f0dSDavid C Somayajulu #define ECORE_IOV_LEGACY_QID_TX (1)
9111e25f0dSDavid C Somayajulu #define ECORE_IOV_QID_INVALID (0xFE)
9211e25f0dSDavid C Somayajulu 
9311e25f0dSDavid C Somayajulu struct ecore_vf_queue_cid {
9411e25f0dSDavid C Somayajulu 	bool b_is_tx;
9511e25f0dSDavid C Somayajulu 	struct ecore_queue_cid *p_cid;
9611e25f0dSDavid C Somayajulu };
9711e25f0dSDavid C Somayajulu 
9811e25f0dSDavid C Somayajulu /* Describes a qzone associated with the VF */
9911e25f0dSDavid C Somayajulu struct ecore_vf_queue {
10011e25f0dSDavid C Somayajulu 	/* Input from upper-layer, mapping relateive queue to queue-zone */
10111e25f0dSDavid C Somayajulu 	u16 fw_rx_qid;
10211e25f0dSDavid C Somayajulu 	u16 fw_tx_qid;
10311e25f0dSDavid C Somayajulu 
10411e25f0dSDavid C Somayajulu 	struct ecore_vf_queue_cid cids[MAX_QUEUES_PER_QZONE];
10511e25f0dSDavid C Somayajulu };
10611e25f0dSDavid C Somayajulu 
10711e25f0dSDavid C Somayajulu enum vf_state {
10811e25f0dSDavid C Somayajulu 	VF_FREE		= 0,	/* VF ready to be acquired holds no resc */
1099efd0ba7SDavid C Somayajulu 	VF_ACQUIRED	= 1,	/* VF, aquired, but not initalized */
11011e25f0dSDavid C Somayajulu 	VF_ENABLED	= 2,	/* VF, Enabled */
11111e25f0dSDavid C Somayajulu 	VF_RESET	= 3,	/* VF, FLR'd, pending cleanup */
11211e25f0dSDavid C Somayajulu 	VF_STOPPED      = 4     /* VF, Stopped */
11311e25f0dSDavid C Somayajulu };
11411e25f0dSDavid C Somayajulu 
11511e25f0dSDavid C Somayajulu struct ecore_vf_vlan_shadow {
11611e25f0dSDavid C Somayajulu 	bool used;
11711e25f0dSDavid C Somayajulu 	u16 vid;
11811e25f0dSDavid C Somayajulu };
11911e25f0dSDavid C Somayajulu 
12011e25f0dSDavid C Somayajulu struct ecore_vf_shadow_config {
12111e25f0dSDavid C Somayajulu 	/* Shadow copy of all guest vlans */
12211e25f0dSDavid C Somayajulu 	struct ecore_vf_vlan_shadow vlans[ECORE_ETH_VF_NUM_VLAN_FILTERS + 1];
12311e25f0dSDavid C Somayajulu 
12411e25f0dSDavid C Somayajulu 	/* Shadow copy of all configured MACs; Empty if forcing MACs */
12511e25f0dSDavid C Somayajulu 	u8 macs[ECORE_ETH_VF_NUM_MAC_FILTERS][ETH_ALEN];
12611e25f0dSDavid C Somayajulu 	u8 inner_vlan_removal;
12711e25f0dSDavid C Somayajulu };
12811e25f0dSDavid C Somayajulu 
12911e25f0dSDavid C Somayajulu /* PFs maintain an array of this structure, per VF */
13011e25f0dSDavid C Somayajulu struct ecore_vf_info {
13111e25f0dSDavid C Somayajulu 	struct ecore_iov_vf_mbx vf_mbx;
13211e25f0dSDavid C Somayajulu 	enum vf_state state;
13311e25f0dSDavid C Somayajulu 	bool b_init;
13411e25f0dSDavid C Somayajulu 	bool b_malicious;
13511e25f0dSDavid C Somayajulu 	u8			to_disable;
13611e25f0dSDavid C Somayajulu 
13711e25f0dSDavid C Somayajulu 	struct ecore_bulletin	bulletin;
13811e25f0dSDavid C Somayajulu 	dma_addr_t		vf_bulletin;
13911e25f0dSDavid C Somayajulu 
140217ec208SDavid C Somayajulu #ifdef CONFIG_ECORE_SW_CHANNEL
141217ec208SDavid C Somayajulu 	/* Determine whether PF communicate with VF using HW/SW channel */
142217ec208SDavid C Somayajulu 	bool	b_hw_channel;
143217ec208SDavid C Somayajulu #endif
144217ec208SDavid C Somayajulu 
14511e25f0dSDavid C Somayajulu 	/* PF saves a copy of the last VF acquire message */
14611e25f0dSDavid C Somayajulu 	struct vfpf_acquire_tlv acquire;
14711e25f0dSDavid C Somayajulu 
14811e25f0dSDavid C Somayajulu 	u32			concrete_fid;
14911e25f0dSDavid C Somayajulu 	u16			opaque_fid;
15011e25f0dSDavid C Somayajulu 	u16			mtu;
15111e25f0dSDavid C Somayajulu 
15211e25f0dSDavid C Somayajulu 	u8			vport_id;
15311e25f0dSDavid C Somayajulu 	u8			rss_eng_id;
15411e25f0dSDavid C Somayajulu 	u8			relative_vf_id;
15511e25f0dSDavid C Somayajulu 	u8			abs_vf_id;
15611e25f0dSDavid C Somayajulu #define ECORE_VF_ABS_ID(p_hwfn, p_vf)	(ECORE_PATH_ID(p_hwfn) ? \
15711e25f0dSDavid C Somayajulu 					 (p_vf)->abs_vf_id + MAX_NUM_VFS_BB : \
15811e25f0dSDavid C Somayajulu 					 (p_vf)->abs_vf_id)
15911e25f0dSDavid C Somayajulu 
16011e25f0dSDavid C Somayajulu 	u8			vport_instance; /* Number of active vports */
16111e25f0dSDavid C Somayajulu 	u8			num_rxqs;
16211e25f0dSDavid C Somayajulu 	u8			num_txqs;
16311e25f0dSDavid C Somayajulu 
16411e25f0dSDavid C Somayajulu 	u16			rx_coal;
16511e25f0dSDavid C Somayajulu 	u16			tx_coal;
16611e25f0dSDavid C Somayajulu 
16711e25f0dSDavid C Somayajulu 	u8			num_sbs;
16811e25f0dSDavid C Somayajulu 
16911e25f0dSDavid C Somayajulu 	u8			num_mac_filters;
17011e25f0dSDavid C Somayajulu 	u8			num_vlan_filters;
17111e25f0dSDavid C Somayajulu 
17211e25f0dSDavid C Somayajulu 	struct ecore_vf_queue	vf_queues[ECORE_MAX_VF_CHAINS_PER_PF];
17311e25f0dSDavid C Somayajulu 	u16			igu_sbs[ECORE_MAX_VF_CHAINS_PER_PF];
17411e25f0dSDavid C Somayajulu 
17511e25f0dSDavid C Somayajulu 	/* TODO - Only windows is using it - should be removed */
17611e25f0dSDavid C Somayajulu 	u8 was_malicious;
17711e25f0dSDavid C Somayajulu 	u8 num_active_rxqs;
17811e25f0dSDavid C Somayajulu 	void *ctx;
17911e25f0dSDavid C Somayajulu 	struct ecore_public_vf_info p_vf_info;
18011e25f0dSDavid C Somayajulu 	bool spoof_chk;		/* Current configured on HW */
18111e25f0dSDavid C Somayajulu 	bool req_spoofchk_val;  /* Requested value */
18211e25f0dSDavid C Somayajulu 
18311e25f0dSDavid C Somayajulu 	/* Stores the configuration requested by VF */
18411e25f0dSDavid C Somayajulu 	struct ecore_vf_shadow_config shadow_config;
18511e25f0dSDavid C Somayajulu 
18611e25f0dSDavid C Somayajulu 	/* A bitfield using bulletin's valid-map bits, used to indicate
18711e25f0dSDavid C Somayajulu 	 * which of the bulletin board features have been configured.
18811e25f0dSDavid C Somayajulu 	 */
18911e25f0dSDavid C Somayajulu 	u64 configured_features;
19011e25f0dSDavid C Somayajulu #define ECORE_IOV_CONFIGURED_FEATURES_MASK	((1 << MAC_ADDR_FORCED) | \
19111e25f0dSDavid C Somayajulu 						 (1 << VLAN_ADDR_FORCED))
19211e25f0dSDavid C Somayajulu };
19311e25f0dSDavid C Somayajulu 
19411e25f0dSDavid C Somayajulu /* This structure is part of ecore_hwfn and used only for PFs that have sriov
19511e25f0dSDavid C Somayajulu  * capability enabled.
19611e25f0dSDavid C Somayajulu  */
19711e25f0dSDavid C Somayajulu struct ecore_pf_iov {
1989efd0ba7SDavid C Somayajulu 	struct ecore_vf_info	vfs_array[MAX_NUM_VFS_E4];
19911e25f0dSDavid C Somayajulu 	u64			pending_flr[ECORE_VF_ARRAY_LENGTH];
20011e25f0dSDavid C Somayajulu 
20111e25f0dSDavid C Somayajulu #ifndef REMOVE_DBG
20211e25f0dSDavid C Somayajulu 	/* This doesn't serve anything functionally, but it makes windows
20311e25f0dSDavid C Somayajulu 	 * debugging of IOV related issues easier.
20411e25f0dSDavid C Somayajulu 	 */
20511e25f0dSDavid C Somayajulu 	u64			active_vfs[ECORE_VF_ARRAY_LENGTH];
20611e25f0dSDavid C Somayajulu #endif
20711e25f0dSDavid C Somayajulu 
20811e25f0dSDavid C Somayajulu 	/* Allocate message address continuosuly and split to each VF */
20911e25f0dSDavid C Somayajulu 	void			*mbx_msg_virt_addr;
21011e25f0dSDavid C Somayajulu 	dma_addr_t		mbx_msg_phys_addr;
21111e25f0dSDavid C Somayajulu 	u32			mbx_msg_size;
21211e25f0dSDavid C Somayajulu 	void			*mbx_reply_virt_addr;
21311e25f0dSDavid C Somayajulu 	dma_addr_t		mbx_reply_phys_addr;
21411e25f0dSDavid C Somayajulu 	u32			mbx_reply_size;
21511e25f0dSDavid C Somayajulu 	void			*p_bulletins;
21611e25f0dSDavid C Somayajulu 	dma_addr_t		bulletins_phys;
21711e25f0dSDavid C Somayajulu 	u32			bulletins_size;
21811e25f0dSDavid C Somayajulu };
21911e25f0dSDavid C Somayajulu 
22011e25f0dSDavid C Somayajulu #ifdef CONFIG_ECORE_SRIOV
22111e25f0dSDavid C Somayajulu /**
22211e25f0dSDavid C Somayajulu  * @brief Read sriov related information and allocated resources
223*04389c85SGordon Bergling  *  reads from configuration space, shmem, etc.
22411e25f0dSDavid C Somayajulu  *
22511e25f0dSDavid C Somayajulu  * @param p_hwfn
22611e25f0dSDavid C Somayajulu  *
22711e25f0dSDavid C Somayajulu  * @return enum _ecore_status_t
22811e25f0dSDavid C Somayajulu  */
22911e25f0dSDavid C Somayajulu enum _ecore_status_t ecore_iov_hw_info(struct ecore_hwfn *p_hwfn);
23011e25f0dSDavid C Somayajulu 
23111e25f0dSDavid C Somayajulu /**
23211e25f0dSDavid C Somayajulu  * @brief ecore_add_tlv - place a given tlv on the tlv buffer at next offset
23311e25f0dSDavid C Somayajulu  *
2349efd0ba7SDavid C Somayajulu  * @param offset
23511e25f0dSDavid C Somayajulu  * @param type
23611e25f0dSDavid C Somayajulu  * @param length
23711e25f0dSDavid C Somayajulu  *
23811e25f0dSDavid C Somayajulu  * @return pointer to the newly placed tlv
23911e25f0dSDavid C Somayajulu  */
2409efd0ba7SDavid C Somayajulu void *ecore_add_tlv(u8 **offset, u16 type, u16 length);
24111e25f0dSDavid C Somayajulu 
24211e25f0dSDavid C Somayajulu /**
24311e25f0dSDavid C Somayajulu  * @brief list the types and lengths of the tlvs on the buffer
24411e25f0dSDavid C Somayajulu  *
24511e25f0dSDavid C Somayajulu  * @param p_hwfn
24611e25f0dSDavid C Somayajulu  * @param tlvs_list
24711e25f0dSDavid C Somayajulu  */
24811e25f0dSDavid C Somayajulu void ecore_dp_tlv_list(struct ecore_hwfn *p_hwfn,
24911e25f0dSDavid C Somayajulu 		       void *tlvs_list);
25011e25f0dSDavid C Somayajulu 
25111e25f0dSDavid C Somayajulu /**
25211e25f0dSDavid C Somayajulu  * @brief ecore_iov_alloc - allocate sriov related resources
25311e25f0dSDavid C Somayajulu  *
25411e25f0dSDavid C Somayajulu  * @param p_hwfn
25511e25f0dSDavid C Somayajulu  *
25611e25f0dSDavid C Somayajulu  * @return enum _ecore_status_t
25711e25f0dSDavid C Somayajulu  */
25811e25f0dSDavid C Somayajulu enum _ecore_status_t ecore_iov_alloc(struct ecore_hwfn *p_hwfn);
25911e25f0dSDavid C Somayajulu 
26011e25f0dSDavid C Somayajulu /**
26111e25f0dSDavid C Somayajulu  * @brief ecore_iov_setup - setup sriov related resources
26211e25f0dSDavid C Somayajulu  *
26311e25f0dSDavid C Somayajulu  * @param p_hwfn
26411e25f0dSDavid C Somayajulu  */
2659efd0ba7SDavid C Somayajulu void ecore_iov_setup(struct ecore_hwfn	*p_hwfn);
26611e25f0dSDavid C Somayajulu 
26711e25f0dSDavid C Somayajulu /**
26811e25f0dSDavid C Somayajulu  * @brief ecore_iov_free - free sriov related resources
26911e25f0dSDavid C Somayajulu  *
27011e25f0dSDavid C Somayajulu  * @param p_hwfn
27111e25f0dSDavid C Somayajulu  */
27211e25f0dSDavid C Somayajulu void ecore_iov_free(struct ecore_hwfn *p_hwfn);
27311e25f0dSDavid C Somayajulu 
27411e25f0dSDavid C Somayajulu /**
27511e25f0dSDavid C Somayajulu  * @brief free sriov related memory that was allocated during hw_prepare
27611e25f0dSDavid C Somayajulu  *
27711e25f0dSDavid C Somayajulu  * @param p_dev
27811e25f0dSDavid C Somayajulu  */
27911e25f0dSDavid C Somayajulu void ecore_iov_free_hw_info(struct ecore_dev *p_dev);
28011e25f0dSDavid C Somayajulu 
28111e25f0dSDavid C Somayajulu /**
28211e25f0dSDavid C Somayajulu  * @brief Mark structs of vfs that have been FLR-ed.
28311e25f0dSDavid C Somayajulu  *
28411e25f0dSDavid C Somayajulu  * @param p_hwfn
28511e25f0dSDavid C Somayajulu  * @param disabled_vfs - bitmask of all VFs on path that were FLRed
28611e25f0dSDavid C Somayajulu  *
2879efd0ba7SDavid C Somayajulu  * @return true iff one of the PF's vfs got FLRed. false otherwise.
28811e25f0dSDavid C Somayajulu  */
28911e25f0dSDavid C Somayajulu bool ecore_iov_mark_vf_flr(struct ecore_hwfn *p_hwfn,
29011e25f0dSDavid C Somayajulu 			  u32 *disabled_vfs);
29111e25f0dSDavid C Somayajulu 
29211e25f0dSDavid C Somayajulu /**
29311e25f0dSDavid C Somayajulu  * @brief Search extended TLVs in request/reply buffer.
29411e25f0dSDavid C Somayajulu  *
29511e25f0dSDavid C Somayajulu  * @param p_hwfn
29611e25f0dSDavid C Somayajulu  * @param p_tlvs_list - Pointer to tlvs list
29711e25f0dSDavid C Somayajulu  * @param req_type - Type of TLV
29811e25f0dSDavid C Somayajulu  *
29911e25f0dSDavid C Somayajulu  * @return pointer to tlv type if found, otherwise returns NULL.
30011e25f0dSDavid C Somayajulu  */
30111e25f0dSDavid C Somayajulu void *ecore_iov_search_list_tlvs(struct ecore_hwfn *p_hwfn,
30211e25f0dSDavid C Somayajulu 				 void *p_tlvs_list, u16 req_type);
30311e25f0dSDavid C Somayajulu 
30411e25f0dSDavid C Somayajulu /**
30511e25f0dSDavid C Somayajulu  * @brief ecore_iov_get_vf_info - return the database of a
30611e25f0dSDavid C Somayajulu  *        specific VF
30711e25f0dSDavid C Somayajulu  *
30811e25f0dSDavid C Somayajulu  * @param p_hwfn
30911e25f0dSDavid C Somayajulu  * @param relative_vf_id - relative id of the VF for which info
31011e25f0dSDavid C Somayajulu  *			 is requested
31111e25f0dSDavid C Somayajulu  * @param b_enabled_only - false iff want to access even if vf is disabled
31211e25f0dSDavid C Somayajulu  *
31311e25f0dSDavid C Somayajulu  * @return struct ecore_vf_info*
31411e25f0dSDavid C Somayajulu  */
31511e25f0dSDavid C Somayajulu struct ecore_vf_info *ecore_iov_get_vf_info(struct ecore_hwfn *p_hwfn,
31611e25f0dSDavid C Somayajulu 					    u16 relative_vf_id,
31711e25f0dSDavid C Somayajulu 					    bool b_enabled_only);
31811e25f0dSDavid C Somayajulu #else
ecore_iov_hw_info(struct ecore_hwfn OSAL_UNUSED * p_hwfn)3199efd0ba7SDavid C Somayajulu static OSAL_INLINE enum _ecore_status_t ecore_iov_hw_info(struct ecore_hwfn OSAL_UNUSED *p_hwfn) {return ECORE_SUCCESS;}
ecore_add_tlv(u8 OSAL_UNUSED ** offset,OSAL_UNUSED u16 type,OSAL_UNUSED u16 length)320217ec208SDavid C Somayajulu static OSAL_INLINE void *ecore_add_tlv(u8 OSAL_UNUSED **offset, OSAL_UNUSED u16 type, OSAL_UNUSED u16 length) {return OSAL_NULL;}
ecore_dp_tlv_list(struct ecore_hwfn OSAL_UNUSED * p_hwfn,void OSAL_UNUSED * tlvs_list)3219efd0ba7SDavid C Somayajulu static OSAL_INLINE void ecore_dp_tlv_list(struct ecore_hwfn OSAL_UNUSED *p_hwfn, void OSAL_UNUSED *tlvs_list) {}
ecore_iov_alloc(struct ecore_hwfn OSAL_UNUSED * p_hwfn)3229efd0ba7SDavid C Somayajulu static OSAL_INLINE enum _ecore_status_t ecore_iov_alloc(struct ecore_hwfn OSAL_UNUSED *p_hwfn) {return ECORE_SUCCESS;}
ecore_iov_setup(struct ecore_hwfn OSAL_UNUSED * p_hwfn)3239efd0ba7SDavid C Somayajulu static OSAL_INLINE void ecore_iov_setup(struct ecore_hwfn OSAL_UNUSED *p_hwfn) {}
ecore_iov_free(struct ecore_hwfn OSAL_UNUSED * p_hwfn)3249efd0ba7SDavid C Somayajulu static OSAL_INLINE void ecore_iov_free(struct ecore_hwfn OSAL_UNUSED *p_hwfn) {}
ecore_iov_free_hw_info(struct ecore_dev OSAL_UNUSED * p_dev)3259efd0ba7SDavid C Somayajulu static OSAL_INLINE void ecore_iov_free_hw_info(struct ecore_dev OSAL_UNUSED *p_dev) {}
ecore_crc32(u32 OSAL_UNUSED crc,u8 OSAL_UNUSED * ptr,u32 OSAL_UNUSED length)3269efd0ba7SDavid C Somayajulu static OSAL_INLINE u32 ecore_crc32(u32 OSAL_UNUSED crc, u8 OSAL_UNUSED *ptr, u32 OSAL_UNUSED length) {return 0;}
ecore_iov_mark_vf_flr(struct ecore_hwfn OSAL_UNUSED * p_hwfn,u32 OSAL_UNUSED * disabled_vfs)3279efd0ba7SDavid C Somayajulu static OSAL_INLINE bool ecore_iov_mark_vf_flr(struct ecore_hwfn OSAL_UNUSED *p_hwfn, u32 OSAL_UNUSED *disabled_vfs) {return false;}
ecore_iov_search_list_tlvs(struct ecore_hwfn OSAL_UNUSED * p_hwfn,void OSAL_UNUSED * p_tlvs_list,u16 OSAL_UNUSED req_type)3289efd0ba7SDavid C Somayajulu static OSAL_INLINE void *ecore_iov_search_list_tlvs(struct ecore_hwfn OSAL_UNUSED *p_hwfn, void OSAL_UNUSED *p_tlvs_list, u16 OSAL_UNUSED req_type) {return OSAL_NULL;}
ecore_iov_get_vf_info(struct ecore_hwfn OSAL_UNUSED * p_hwfn,u16 OSAL_UNUSED relative_vf_id,bool OSAL_UNUSED b_enabled_only)3299efd0ba7SDavid C Somayajulu static OSAL_INLINE struct ecore_vf_info *ecore_iov_get_vf_info(struct ecore_hwfn OSAL_UNUSED *p_hwfn, u16 OSAL_UNUSED relative_vf_id, bool OSAL_UNUSED b_enabled_only) {return OSAL_NULL;}
33011e25f0dSDavid C Somayajulu 
33111e25f0dSDavid C Somayajulu #endif
33211e25f0dSDavid C Somayajulu #endif /* __ECORE_SRIOV_H__ */
333