4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License, v.1, (the "License").
6 * You may not use this file except in compliance with the License.
8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 * or http://opensource.org/licenses/CDDL-1.0.
10 * See the License for the specific language governing permissions
11 * and limitations under the License.
13 * When distributing Covered Code, include this CDDL HEADER in each
14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 * If applicable, add the following below this CDDL HEADER, with the
16 * fields enclosed by brackets "[]" replaced with your own identifying
17 * information: Portions Copyright [yyyy] [name of copyright owner]
23 * Copyright 2014-2017 Cavium, Inc.
24 * The contents of this file are subject to the terms of the Common Development
25 * and Distribution License, v.1, (the "License").
27 * You may not use this file except in compliance with the License.
29 * You can obtain a copy of the License at available
30 * at http://opensource.org/licenses/CDDL-1.0
32 * See the License for the specific language governing permissions and
33 * limitations under the License.
36 #ifndef __ECORE_SRIOV_API_H__
37 #define __ECORE_SRIOV_API_H__
39 #include "common_hsi.h"
40 #include "ecore_status.h"
42 #define ECORE_ETH_VF_NUM_MAC_FILTERS 1
43 #define ECORE_ETH_VF_NUM_VLAN_FILTERS 2
44 #define ECORE_VF_ARRAY_LENGTH (3)
46 #define IS_VF(p_dev) ((p_dev)->b_is_vf)
47 #define IS_PF(p_dev) (!((p_dev)->b_is_vf))
48 #ifdef CONFIG_ECORE_SRIOV
49 #define IS_PF_SRIOV(p_hwfn) (!!((p_hwfn)->p_dev->p_iov_info))
51 #define IS_PF_SRIOV(p_hwfn) (0)
53 #define IS_PF_SRIOV_ALLOC(p_hwfn) (!!((p_hwfn)->pf_iov_info))
54 #define IS_PF_PDA(p_hwfn) 0 /* @@TBD Michalk */
56 /* @@@ TBD MichalK - what should this number be*/
57 #define ECORE_MAX_VF_CHAINS_PER_PF 16
59 /* vport update extended feature tlvs flags */
60 enum ecore_iov_vport_update_flag
{
61 ECORE_IOV_VP_UPDATE_ACTIVATE
= 0,
62 ECORE_IOV_VP_UPDATE_VLAN_STRIP
= 1,
63 ECORE_IOV_VP_UPDATE_TX_SWITCH
= 2,
64 ECORE_IOV_VP_UPDATE_MCAST
= 3,
65 ECORE_IOV_VP_UPDATE_ACCEPT_PARAM
= 4,
66 ECORE_IOV_VP_UPDATE_RSS
= 5,
67 ECORE_IOV_VP_UPDATE_ACCEPT_ANY_VLAN
= 6,
68 ECORE_IOV_VP_UPDATE_SGE_TPA
= 7,
69 ECORE_IOV_VP_UPDATE_MAX
= 8,
72 /*PF to VF STATUS is part of vfpf-channel API
73 and must be forward compatible */
74 enum ecore_iov_pf_to_vf_status
{
75 PFVF_STATUS_WAITING
= 0,
78 PFVF_STATUS_NOT_SUPPORTED
,
79 PFVF_STATUS_NO_RESOURCE
,
81 PFVF_STATUS_MALICIOUS
,
84 struct ecore_mcp_link_params
;
85 struct ecore_mcp_link_state
;
86 struct ecore_mcp_link_capabilities
;
88 /* These defines are used by the hw-channel; should never change order */
89 #define VFPF_ACQUIRE_OS_LINUX (0)
90 #define VFPF_ACQUIRE_OS_WINDOWS (1)
91 #define VFPF_ACQUIRE_OS_ESX (2)
92 #define VFPF_ACQUIRE_OS_SOLARIS (3)
93 #define VFPF_ACQUIRE_OS_LINUX_USERSPACE (4)
95 struct ecore_vf_acquire_sw_info
{
100 struct ecore_public_vf_info
{
101 /* These copies will later be reflected in the bulletin board,
102 * but this copy should be newer.
104 u8 forced_mac
[ETH_ALEN
];
108 struct ecore_iov_vf_init_params
{
111 /* Number of requested Queues; Currently, don't support different
112 * number of Rx/Tx queues.
114 /* TODO - remove this limitation */
117 /* Allow the client to choose which qzones to use for Rx/Tx,
118 * and which queue_base to use for Tx queues on a per-queue basis.
119 * Notice values should be relative to the PF resources.
121 u16 req_rx_queue
[ECORE_MAX_VF_CHAINS_PER_PF
];
122 u16 req_tx_queue
[ECORE_MAX_VF_CHAINS_PER_PF
];
126 /* Should be set in case RSS is going to be used for VF */
130 #ifdef CONFIG_ECORE_SW_CHANNEL
131 /* This is SW channel related only... */
133 VF_PF_UNKNOWN_STATE
= 0,
134 VF_PF_WAIT_FOR_START_REQUEST
= 1,
135 VF_PF_WAIT_FOR_NEXT_CHUNK_OF_REQUEST
= 2,
136 VF_PF_REQUEST_IN_PROCESSING
= 3,
137 VF_PF_RESPONSE_READY
= 4,
140 struct ecore_iov_sw_mbx
{
141 enum mbx_state mbx_state
;
151 * @brief Get the vf sw mailbox params
156 * @return struct ecore_iov_sw_mbx*
158 struct ecore_iov_sw_mbx
*
159 ecore_iov_get_vf_sw_mbx(struct ecore_hwfn
*p_hwfn
,
163 /* This struct is part of ecore_dev and contains data relevant to all hwfns;
164 * Initialized only if SR-IOV cpabability is exposed in PCIe config space.
166 struct ecore_hw_sriov_info
{
167 /* standard SRIOV capability fields, mostly for debugging */
168 int pos
; /* capability position */
169 int nres
; /* number of resources */
170 u32 cap
; /* SR-IOV Capabilities */
171 u16 ctrl
; /* SR-IOV Control */
172 u16 total_vfs
; /* total VFs associated with the PF */
173 u16 num_vfs
; /* number of vfs that have been started */
174 u16 initial_vfs
; /* initial VFs associated with the PF */
175 u16 nr_virtfn
; /* number of VFs available */
176 u16 offset
; /* first VF Routing ID offset */
177 u16 stride
; /* following VF stride */
178 u16 vf_device_id
; /* VF device id */
179 u32 pgsz
; /* page size for BAR alignment */
180 u8 link
; /* Function Dependency Link */
185 #ifdef CONFIG_ECORE_SRIOV
188 * @brief mark/clear all VFs before/after an incoming PCIe sriov
194 void ecore_iov_set_vfs_to_disable(struct ecore_dev
*p_dev
,
198 * @brief mark/clear chosen VF before/after an incoming PCIe
205 void ecore_iov_set_vf_to_disable(struct ecore_dev
*p_dev
,
210 * @brief ecore_iov_init_hw_for_vf - initialize the HW for
211 * enabling access of a VF. Also includes preparing the
212 * IGU for VF access. This needs to be called AFTER hw is
213 * initialized and BEFORE VF is loaded inside the VM.
219 * @return enum _ecore_status_t
222 ecore_iov_init_hw_for_vf(struct ecore_hwfn
*p_hwfn
,
223 struct ecore_ptt
*p_ptt
,
224 struct ecore_iov_vf_init_params
*p_params
);
227 * @brief ecore_iov_process_mbx_req - process a request received
234 void ecore_iov_process_mbx_req(struct ecore_hwfn
*p_hwfn
,
235 struct ecore_ptt
*p_ptt
,
239 * @brief ecore_iov_release_hw_for_vf - called once upper layer
240 * knows VF is done with - can release any resources
241 * allocated for VF at this point. this must be done once
242 * we know VF is no longer loaded in VM.
248 * @return enum _ecore_status_t
250 enum _ecore_status_t
ecore_iov_release_hw_for_vf(struct ecore_hwfn
*p_hwfn
,
251 struct ecore_ptt
*p_ptt
,
255 * @brief ecore_iov_set_vf_ctx - set a context for a given VF
261 * @return enum _ecore_status_t
263 enum _ecore_status_t
ecore_iov_set_vf_ctx(struct ecore_hwfn
*p_hwfn
,
268 * @brief FLR cleanup for all VFs
273 * @return enum _ecore_status_t
275 enum _ecore_status_t
ecore_iov_vf_flr_cleanup(struct ecore_hwfn
*p_hwfn
,
276 struct ecore_ptt
*p_ptt
);
279 * @brief FLR cleanup for single VF
285 * @return enum _ecore_status_t
288 ecore_iov_single_vf_flr_cleanup(struct ecore_hwfn
*p_hwfn
,
289 struct ecore_ptt
*p_ptt
,
293 * @brief Update the bulletin with link information. Notice this does NOT
294 * send a bulletin update, only updates the PF's bulletin.
298 * @param params - the link params to use for the VF link configuration
299 * @param link - the link output to use for the VF link configuration
300 * @param p_caps - the link default capabilities.
302 void ecore_iov_set_link(struct ecore_hwfn
*p_hwfn
,
304 struct ecore_mcp_link_params
*params
,
305 struct ecore_mcp_link_state
*link
,
306 struct ecore_mcp_link_capabilities
*p_caps
);
309 * @brief Returns link information as perceived by VF.
313 * @param p_params - the link params visible to vf.
314 * @param p_link - the link state visible to vf.
315 * @param p_caps - the link default capabilities visible to vf.
317 void ecore_iov_get_link(struct ecore_hwfn
*p_hwfn
,
319 struct ecore_mcp_link_params
*params
,
320 struct ecore_mcp_link_state
*link
,
321 struct ecore_mcp_link_capabilities
*p_caps
);
324 * @brief return if the VF is pending FLR
331 bool ecore_iov_is_vf_pending_flr(struct ecore_hwfn
*p_hwfn
,
335 * @brief Check if given VF ID @vfid is valid
336 * w.r.t. @b_enabled_only value
337 * if b_enabled_only = true - only enabled VF id is valid
338 * else any VF id less than max_vfs is valid
341 * @param rel_vf_id - Relative VF ID
342 * @param b_enabled_only - consider only enabled VF
343 * @param b_non_malicious - true iff we want to validate vf isn't malicious.
345 * @return bool - true for valid VF ID
347 bool ecore_iov_is_valid_vfid(struct ecore_hwfn
*p_hwfn
,
349 bool b_enabled_only
, bool b_non_malicious
);
352 * @brief Get VF's public info structure
355 * @param vfid - Relative VF ID
356 * @param b_enabled_only - false if want to access even if vf is disabled
358 * @return struct ecore_public_vf_info *
360 struct ecore_public_vf_info
*
361 ecore_iov_get_public_vf_info(struct ecore_hwfn
*p_hwfn
,
362 u16 vfid
, bool b_enabled_only
);
365 * @brief fills a bitmask of all VFs which have pending unhandled
370 void ecore_iov_pf_get_pending_events(struct ecore_hwfn
*p_hwfn
,
374 * @brief Copy VF's message to PF's buffer
380 * @return enum _ecore_status_t
382 enum _ecore_status_t
ecore_iov_copy_vf_msg(struct ecore_hwfn
*p_hwfn
,
383 struct ecore_ptt
*ptt
,
386 * @brief Set forced MAC address in PFs copy of bulletin board
387 * and configures FW/HW to support the configuration.
393 void ecore_iov_bulletin_set_forced_mac(struct ecore_hwfn
*p_hwfn
,
397 * @brief Set MAC address in PFs copy of bulletin board without
404 enum _ecore_status_t
ecore_iov_bulletin_set_mac(struct ecore_hwfn
*p_hwfn
,
408 * @brief Set default behaviour of VF in case no vlans are configured for it
409 * whether to accept only untagged traffic or all.
410 * Must be called prior to the VF vport-start.
413 * @param b_untagged_only
416 * @return ECORE_SUCCESS if configuration would stick.
419 ecore_iov_bulletin_set_forced_untagged_default(struct ecore_hwfn
*p_hwfn
,
420 bool b_untagged_only
,
424 * @brief Get VFs opaque fid.
430 void ecore_iov_get_vfs_opaque_fid(struct ecore_hwfn
*p_hwfn
, int vfid
,
434 * @brief Set forced VLAN [pvid] in PFs copy of bulletin board
435 * and configures FW/HW to support the configuration.
436 * Setting of pvid 0 would clear the feature.
441 void ecore_iov_bulletin_set_forced_vlan(struct ecore_hwfn
*p_hwfn
,
445 * @brief Check if VF has VPORT instance. This can be used
446 * to check if VPORT is active.
450 bool ecore_iov_vf_has_vport_instance(struct ecore_hwfn
*p_hwfn
, int vfid
);
453 * @brief PF posts the bulletin to the VF
459 * @return enum _ecore_status_t
461 enum _ecore_status_t
ecore_iov_post_vf_bulletin(struct ecore_hwfn
*p_hwfn
,
463 struct ecore_ptt
*p_ptt
);
466 * @brief Check if given VF (@vfid) is marked as stopped
471 * @return bool : true if stopped
473 bool ecore_iov_is_vf_stopped(struct ecore_hwfn
*p_hwfn
, int vfid
);
476 * @brief Configure VF anti spoofing
480 * @param val - spoofchk value - true/false
482 * @return enum _ecore_status_t
484 enum _ecore_status_t
ecore_iov_spoofchk_set(struct ecore_hwfn
*p_hwfn
,
488 * @brief Get VF's configured spoof value.
493 * @return bool - spoofchk value - true/false
495 bool ecore_iov_spoofchk_get(struct ecore_hwfn
*p_hwfn
, int vfid
);
498 * @brief Check for SRIOV sanity by PF.
503 * @return bool - true if sanity checks passes, else false
505 bool ecore_iov_pf_sanity_check(struct ecore_hwfn
*p_hwfn
, int vfid
);
508 * @brief Get the num of VF chains.
514 u8
ecore_iov_vf_chains_per_pf(struct ecore_hwfn
*p_hwfn
);
517 * @brief Get vf request mailbox params
521 * @param pp_req_virt_addr
522 * @param p_req_virt_size
524 void ecore_iov_get_vf_req_virt_mbx_params(struct ecore_hwfn
*p_hwfn
,
526 void **pp_req_virt_addr
,
527 u16
*p_req_virt_size
);
530 * @brief Get vf mailbox params
534 * @param pp_reply_virt_addr
535 * @param p_reply_virt_size
537 void ecore_iov_get_vf_reply_virt_mbx_params(struct ecore_hwfn
*p_hwfn
,
539 void **pp_reply_virt_addr
,
540 u16
*p_reply_virt_size
);
543 * @brief Validate if the given length is a valid vfpf message
550 bool ecore_iov_is_valid_vfpf_msg_length(u32 length
);
553 * @brief Return the max pfvf message length
557 u32
ecore_iov_pfvf_msg_length(void);
560 * @brief Returns forced MAC address if one is configured
565 * @return OSAL_NULL if mac isn't forced; Otherwise, returns MAC.
567 u8
*ecore_iov_bulletin_get_forced_mac(struct ecore_hwfn
*p_hwfn
,
571 * @brief Returns pvid if one is configured
576 * @return 0 if no pvid is configured, otherwise the pvid.
578 u16
ecore_iov_bulletin_get_forced_vlan(struct ecore_hwfn
*p_hwfn
,
581 * @brief Configure VFs tx rate
586 * @param val - tx rate value in Mb/sec.
588 * @return enum _ecore_status_t
590 enum _ecore_status_t
ecore_iov_configure_tx_rate(struct ecore_hwfn
*p_hwfn
,
591 struct ecore_ptt
*p_ptt
,
595 * @brief - Retrieves the statistics associated with a VF
600 * @param p_stats - this will be filled with the VF statistics
602 * @return ECORE_SUCCESS iff statistics were retrieved. Error otherwise.
604 enum _ecore_status_t
ecore_iov_get_vf_stats(struct ecore_hwfn
*p_hwfn
,
605 struct ecore_ptt
*p_ptt
,
607 struct ecore_eth_stats
*p_stats
);
610 * @brief - Retrieves num of rxqs chains
615 * @return num of rxqs chains.
617 u8
ecore_iov_get_vf_num_rxqs(struct ecore_hwfn
*p_hwfn
,
621 * @brief - Retrieves num of active rxqs chains
628 u8
ecore_iov_get_vf_num_active_rxqs(struct ecore_hwfn
*p_hwfn
,
632 * @brief - Retrieves ctx pointer
639 void *ecore_iov_get_vf_ctx(struct ecore_hwfn
*p_hwfn
,
643 * @brief - Retrieves VF`s num sbs
650 u8
ecore_iov_get_vf_num_sbs(struct ecore_hwfn
*p_hwfn
,
654 * @brief - Returm true if VF is waiting for acquire
661 bool ecore_iov_is_vf_wait_for_acquire(struct ecore_hwfn
*p_hwfn
,
665 * @brief - Returm true if VF is acquired but not initialized
672 bool ecore_iov_is_vf_acquired_not_initialized(struct ecore_hwfn
*p_hwfn
,
676 * @brief - Returm true if VF is acquired and initialized
683 bool ecore_iov_is_vf_initialized(struct ecore_hwfn
*p_hwfn
,
687 * @brief - Returm true if VF has started in FW
694 bool ecore_iov_is_vf_started(struct ecore_hwfn
*p_hwfn
,
698 * @brief - Get VF's vport min rate configured.
702 * @return - rate in Mbps
704 int ecore_iov_get_vf_min_rate(struct ecore_hwfn
*p_hwfn
, int vfid
);
707 * @brief - Configure min rate for VF's vport.
710 * @param - rate in Mbps
714 enum _ecore_status_t
ecore_iov_configure_min_tx_rate(struct ecore_dev
*p_dev
,
720 * @brief ecore_pf_configure_vf_queue_coalesce - PF configure coalesce parameters
721 * of VFs for Rx and Tx queue.
722 * While the API allows setting coalescing per-qid, all queues sharing a SB
723 * should be in same range [i.e., either 0-0x7f, 0x80-0xff or 0x100-0x1ff]
724 * otherwise configuration would break.
727 * @param rx_coal - Rx Coalesce value in micro seconds.
728 * @param tx_coal - TX Coalesce value in micro seconds.
735 ecore_iov_pf_configure_vf_queue_coalesce(struct ecore_hwfn
*p_hwfn
,
736 u16 rx_coal
, u16 tx_coal
,
740 * @brief - Given a VF index, return index of next [including that] active VF.
745 * @return E4_MAX_NUM_VFS in case no further active VFs, otherwise index.
747 u16
ecore_iov_get_next_active_vf(struct ecore_hwfn
*p_hwfn
, u16 rel_vf_id
);
748 void ecore_iov_bulletin_set_udp_ports(struct ecore_hwfn
*p_hwfn
, int vfid
,
749 u16 vxlan_port
, u16 geneve_port
);
752 static OSAL_INLINE
void ecore_iov_set_vfs_to_disable(struct ecore_dev
*p_dev
, u8 to_disable
) {}
753 static OSAL_INLINE
void ecore_iov_set_vf_to_disable(struct ecore_dev
*p_dev
, u16 rel_vf_id
, u8 to_disable
) {}
754 static OSAL_INLINE
enum _ecore_status_t
ecore_iov_init_hw_for_vf(struct ecore_hwfn
*p_hwfn
, struct ecore_ptt
*p_ptt
, struct ecore_iov_vf_init_params
*p_params
) {return ECORE_INVAL
;}
755 static OSAL_INLINE
void ecore_iov_process_mbx_req(struct ecore_hwfn
*p_hwfn
, struct ecore_ptt
*p_ptt
, int vfid
) {}
756 static OSAL_INLINE
enum _ecore_status_t
ecore_iov_release_hw_for_vf(struct ecore_hwfn
*p_hwfn
, struct ecore_ptt
*p_ptt
, u16 rel_vf_id
) {return ECORE_SUCCESS
;}
757 static OSAL_INLINE
enum _ecore_status_t
ecore_iov_set_vf_ctx(struct ecore_hwfn
*p_hwfn
, u16 vf_id
, void *ctx
) {return ECORE_INVAL
;}
758 static OSAL_INLINE
enum _ecore_status_t
ecore_iov_vf_flr_cleanup(struct ecore_hwfn
*p_hwfn
, struct ecore_ptt
*p_ptt
) {return ECORE_INVAL
;}
759 static OSAL_INLINE
enum _ecore_status_t
ecore_iov_single_vf_flr_cleanup(struct ecore_hwfn
*p_hwfn
, struct ecore_ptt
*p_ptt
, u16 rel_vf_id
) {return ECORE_INVAL
;}
760 static OSAL_INLINE
void ecore_iov_set_link(struct ecore_hwfn
*p_hwfn
, u16 vfid
, struct ecore_mcp_link_params
*params
, struct ecore_mcp_link_state
*link
, struct ecore_mcp_link_capabilities
*p_caps
) {}
761 static OSAL_INLINE
void ecore_iov_get_link(struct ecore_hwfn
*p_hwfn
, u16 vfid
, struct ecore_mcp_link_params
*params
, struct ecore_mcp_link_state
*link
, struct ecore_mcp_link_capabilities
*p_caps
) {}
762 static OSAL_INLINE
bool ecore_iov_is_vf_pending_flr(struct ecore_hwfn
*p_hwfn
, u16 rel_vf_id
) {return false;}
763 static OSAL_INLINE
bool ecore_iov_is_valid_vfid(struct ecore_hwfn
*p_hwfn
, int rel_vf_id
, bool b_enabled_only
) {return false;}
764 static OSAL_INLINE
struct ecore_public_vf_info
* ecore_iov_get_public_vf_info(struct ecore_hwfn
*p_hwfn
, u16 vfid
, bool b_enabled_only
) {return OSAL_NULL
;}
765 static OSAL_INLINE
void ecore_iov_pf_add_pending_events(struct ecore_hwfn
*p_hwfn
, u8 vfid
) {}
766 static OSAL_INLINE
void ecore_iov_pf_get_and_clear_pending_events(struct ecore_hwfn
*p_hwfn
, u64
*events
) {}
767 static OSAL_INLINE
enum _ecore_status_t
ecore_iov_copy_vf_msg(struct ecore_hwfn
*p_hwfn
, struct ecore_ptt
*ptt
, int vfid
) {return ECORE_INVAL
;}
768 static OSAL_INLINE
void ecore_iov_bulletin_set_forced_mac(struct ecore_hwfn
*p_hwfn
, u8
*mac
, int vfid
) {}
769 static OSAL_INLINE
enum _ecore_status_t
ecore_iov_bulletin_set_mac(struct ecore_hwfn
*p_hwfn
, u8
*mac
, int vfid
) {return ECORE_INVAL
;}
770 static OSAL_INLINE
enum _ecore_status_t
ecore_iov_bulletin_set_forced_untagged_default(struct ecore_hwfn
*p_hwfn
, bool b_untagged_only
, int vfid
) {return ECORE_INVAL
;}
771 static OSAL_INLINE
void ecore_iov_get_vfs_opaque_fid(struct ecore_hwfn
*p_hwfn
, int vfid
, u16
*opaque_fid
) {}
772 static OSAL_INLINE
void ecore_iov_bulletin_set_forced_vlan(struct ecore_hwfn p_hwfn
, u16 pvid
, int vfid
) {}
774 static OSAL_INLINE
bool ecore_iov_vf_has_vport_instance(struct ecore_hwfn
*p_hwfn
, int vfid
) {return false;}
775 static OSAL_INLINE
enum _ecore_status_t
ecore_iov_post_vf_bulletin(struct ecore_hwfn
*p_hwfn
, int vfid
, struct ecore_ptt
*p_ptt
) {return ECORE_INVAL
;}
776 static OSAL_INLINE
bool ecore_iov_is_vf_stopped(struct ecore_hwfn
*p_hwfn
, int vfid
) {return false;}
777 static OSAL_INLINE
enum _ecore_status_t
ecore_iov_spoofchk_set(struct ecore_hwfn
*p_hwfn
, int vfid
, bool val
) {return ECORE_INVAL
;}
778 static OSAL_INLINE
bool ecore_iov_spoofchk_get(struct ecore_hwfn
*p_hwfn
, int vfid
) {return false;}
779 static OSAL_INLINE
bool ecore_iov_pf_sanity_check(struct ecore_hwfn
*p_hwfn
, int vfid
) {return false;}
780 static OSAL_INLINE u8
ecore_iov_vf_chains_per_pf(struct ecore_hwfn
*p_hwfn
) {return 0;}
781 static OSAL_INLINE
void ecore_iov_get_vf_req_virt_mbx_params(struct ecore_hwfn
*p_hwfn
, u16 rel_vf_id
, void **pp_req_virt_addr
, u16
*p_req_virt_size
) {}
782 static OSAL_INLINE
void ecore_iov_get_vf_reply_virt_mbx_params(struct ecore_hwfn
*p_hwfn
, u16 rel_vf_id
, void **pp_reply_virt_addr
, u16
*p_reply_virt_size
) {}
783 static OSAL_INLINE
bool ecore_iov_is_valid_vfpf_msg_length(u32 length
) {return false;}
784 static OSAL_INLINE u32
ecore_iov_pfvf_msg_length(void) {return 0;}
785 static OSAL_INLINE u8
*ecore_iov_bulletin_get_forced_mac(struct ecore_hwfn
*p_hwfn
, u16 rel_vf_id
) {return OSAL_NULL
;}
786 static OSAL_INLINE u16
ecore_iov_bulletin_get_forced_vlan(struct ecore_hwfn
*p_hwfn
, u16 rel_vf_id
) {return 0;}
787 static OSAL_INLINE
enum _ecore_status_t
ecore_iov_configure_tx_rate(struct ecore_hwfn
*p_hwfn
, struct ecore_ptt
*p_ptt
, int vfid
, int val
) { return ECORE_INVAL
; }
788 static OSAL_INLINE
enum _ecore_status_t
ecore_iov_get_vf_stats(struct ecore_hwfn
*p_hwfn
, struct ecore_ptt
*p_ptt
, int vfid
, struct ecore_eth_stats
*p_stats
) { return ECORE_INVAL
; }
790 static OSAL_INLINE u8
ecore_iov_get_vf_num_rxqs(struct ecore_hwfn
*p_hwfn
, u16 rel_vf_id
) {return 0;}
791 static OSAL_INLINE u8
ecore_iov_get_vf_num_active_rxqs(struct ecore_hwfn
*p_hwfn
, u16 rel_vf_id
) {return 0;}
792 static OSAL_INLINE
void *ecore_iov_get_vf_ctx(struct ecore_hwfn
*p_hwfn
, u16 rel_vf_id
) {return OSAL_NULL
;}
793 static OSAL_INLINE u8
ecore_iov_get_vf_num_sbs(struct ecore_hwfn
*p_hwfn
, u16 rel_vf_id
) {return 0;}
794 static OSAL_INLINE
bool ecore_iov_is_vf_wait_for_acquire(struct ecore_hwfn
*p_hwfn
, u16 rel_vf_id
) {return false;}
795 static OSAL_INLINE
bool ecore_iov_is_vf_acquired_not_initialized(struct ecore_hwfn
*p_hwfn
, u16 rel_vf_id
) {return false;}
796 static OSAL_INLINE
bool ecore_iov_is_vf_initialized(struct ecore_hwfn
*p_hwfn
, u16 rel_vf_id
) {return false;}
797 static OSAL_INLINE
int ecore_iov_get_vf_min_rate(struct ecore_hwfn
*p_hwfn
, int vfid
) { return 0; }
798 static OSAL_INLINE
enum _ecore_status_t
ecore_iov_configure_min_tx_rate(struct ecore_dev
*p_dev
, int vfid
, u32 rate
) { return ECORE_INVAL
; }
800 static OSAL_INLINE
void ecore_iov_bulletin_set_udp_ports(struct ecore_hwfn
*p_hwfn
, int vfid
, u16 vxlan_port
, u16 geneve_port
) { return; }
801 static OSAL_INLINE u16
ecore_iov_get_next_active_vf(struct ecore_hwfn
*p_hwfn
, u16 rel_vf_id
) { return E4_MAX_NUM_VFS
; }
804 #define ecore_for_each_vf(_p_hwfn, _i) \
805 for (_i = ecore_iov_get_next_active_vf(_p_hwfn, 0); \
806 _i < E4_MAX_NUM_VFS; \
807 _i = ecore_iov_get_next_active_vf(_p_hwfn, _i + 1))