net/qede/base: update formatting and comments
[dpdk.git] / drivers / net / qede / base / ecore_iov_api.h
1 /*
2  * Copyright (c) 2016 QLogic Corporation.
3  * All rights reserved.
4  * www.qlogic.com
5  *
6  * See LICENSE.qede_pmd for copyright and licensing details.
7  */
8
9 #ifndef __ECORE_SRIOV_API_H__
10 #define __ECORE_SRIOV_API_H__
11
12 #include "ecore_status.h"
13
14 #define ECORE_VF_ARRAY_LENGTH (3)
15
16 #define IS_VF(p_dev)            ((p_dev)->b_is_vf)
17 #define IS_PF(p_dev)            (!((p_dev)->b_is_vf))
18 #ifdef CONFIG_ECORE_SRIOV
19 #define IS_PF_SRIOV(p_hwfn)     (!!((p_hwfn)->p_dev->sriov_info.total_vfs))
20 #else
21 #define IS_PF_SRIOV(p_hwfn)     (0)
22 #endif
23 #define IS_PF_SRIOV_ALLOC(p_hwfn)       (!!((p_hwfn)->pf_iov_info))
24 #define IS_PF_PDA(p_hwfn)       0 /* @@TBD Michalk */
25
26 /* @@@ TBD MichalK - what should this number be*/
27 #define ECORE_MAX_VF_CHAINS_PER_PF 16
28
29 /* vport update extended feature tlvs flags */
30 enum ecore_iov_vport_update_flag {
31         ECORE_IOV_VP_UPDATE_ACTIVATE            = 0,
32         ECORE_IOV_VP_UPDATE_VLAN_STRIP          = 1,
33         ECORE_IOV_VP_UPDATE_TX_SWITCH           = 2,
34         ECORE_IOV_VP_UPDATE_MCAST               = 3,
35         ECORE_IOV_VP_UPDATE_ACCEPT_PARAM        = 4,
36         ECORE_IOV_VP_UPDATE_RSS                 = 5,
37         ECORE_IOV_VP_UPDATE_ACCEPT_ANY_VLAN     = 6,
38         ECORE_IOV_VP_UPDATE_SGE_TPA             = 7,
39         ECORE_IOV_VP_UPDATE_MAX                 = 8,
40 };
41
42 struct ecore_mcp_link_params;
43 struct ecore_mcp_link_state;
44 struct ecore_mcp_link_capabilities;
45
46 /* These defines are used by the hw-channel; should never change order */
47 #define VFPF_ACQUIRE_OS_LINUX (0)
48 #define VFPF_ACQUIRE_OS_WINDOWS (1)
49 #define VFPF_ACQUIRE_OS_ESX (2)
50 #define VFPF_ACQUIRE_OS_SOLARIS (3)
51 #define VFPF_ACQUIRE_OS_LINUX_USERSPACE (4)
52
53 struct ecore_vf_acquire_sw_info {
54         u32 driver_version;
55         u8 os_type;
56
57         /* We have several close releases that all use ~same FW with different
58          * versions [making it incompatible as the versioning scheme is still
59          * tied directly to FW version], allow to override the checking. Only
60          * those versions would actually support this feature [so it would not
61          * break forward compatibility with newer HV drivers that are no longer
62          * suited].
63          */
64         bool override_fw_version;
65 };
66
67 struct ecore_public_vf_info {
68         /* These copies will later be reflected in the bulletin board,
69          * but this copy should be newer.
70          */
71         u8 forced_mac[ETH_ALEN];
72         u16 forced_vlan;
73 };
74
75 #ifdef CONFIG_ECORE_SW_CHANNEL
76 /* This is SW channel related only... */
77 enum mbx_state {
78         VF_PF_UNKNOWN_STATE                     = 0,
79         VF_PF_WAIT_FOR_START_REQUEST            = 1,
80         VF_PF_WAIT_FOR_NEXT_CHUNK_OF_REQUEST    = 2,
81         VF_PF_REQUEST_IN_PROCESSING             = 3,
82         VF_PF_RESPONSE_READY                    = 4,
83 };
84
85 struct ecore_iov_sw_mbx {
86         enum mbx_state          mbx_state;
87
88         u32                     request_size;
89         u32                     request_offset;
90
91         u32                     response_size;
92         u32                     response_offset;
93 };
94
95 /**
96  * @brief Get the vf sw mailbox params
97  *
98  * @param p_hwfn
99  * @param rel_vf_id
100  *
101  * @return struct ecore_iov_sw_mbx*
102  */
103 struct ecore_iov_sw_mbx *ecore_iov_get_vf_sw_mbx(struct ecore_hwfn *p_hwfn,
104                         u16 rel_vf_id);
105 #endif
106
107 #ifdef CONFIG_ECORE_SRIOV
108 /**
109  * @brief mark/clear all VFs before/after an incoming PCIe sriov
110  *        disable.
111  *
112  * @param p_hwfn
113  * @param to_disable
114  */
115 void ecore_iov_set_vfs_to_disable(struct ecore_hwfn *p_hwfn, u8 to_disable);
116
117 /**
118  * @brief mark/clear chosen VFs before/after an incoming PCIe
119  *        sriov disable.
120  *
121  * @param p_hwfn
122  * @param to_disable
123  */
124 void ecore_iov_set_vf_to_disable(struct ecore_hwfn *p_hwfn,
125                                  u16 rel_vf_id, u8 to_disable);
126
127 /**
128  *
129  * @brief ecore_iov_init_hw_for_vf - initialize the HW for
130  *        enabling access of a VF. Also includes preparing the
131  *        IGU for VF access. This needs to be called AFTER hw is
132  *        initialized and BEFORE VF is loaded inside the VM.
133  *
134  * @param p_hwfn
135  * @param p_ptt
136  * @param rel_vf_id
137  * @param num_rx_queues
138  *
139  * @return enum _ecore_status_t
140  */
141 enum _ecore_status_t ecore_iov_init_hw_for_vf(struct ecore_hwfn *p_hwfn,
142                                               struct ecore_ptt *p_ptt,
143                                               u16 rel_vf_id,
144                                               u16 num_rx_queues);
145
146 /**
147  * @brief ecore_iov_process_mbx_req - process a request received
148  *        from the VF
149  *
150  * @param p_hwfn
151  * @param p_ptt
152  * @param vfid
153  */
154 void ecore_iov_process_mbx_req(struct ecore_hwfn *p_hwfn,
155                                struct ecore_ptt *p_ptt,
156                                int vfid);
157
158 /**
159  * @brief ecore_iov_release_hw_for_vf - called once upper layer
160  *        knows VF is done with - can release any resources
161  *        allocated for VF at this point. this must be done once
162  *        we know VF is no longer loaded in VM.
163  *
164  * @param p_hwfn
165  * @param p_ptt
166  * @param rel_vf_id
167  *
168  * @return enum _ecore_status_t
169  */
170 enum _ecore_status_t ecore_iov_release_hw_for_vf(struct ecore_hwfn *p_hwfn,
171                                                  struct ecore_ptt *p_ptt,
172                                                  u16 rel_vf_id);
173
174 #ifndef LINUX_REMOVE
175 /**
176  * @brief ecore_iov_set_vf_ctx - set a context for a given VF
177  *
178  * @param p_hwfn
179  * @param vf_id
180  * @param ctx
181  *
182  * @return enum _ecore_status_t
183  */
184 enum _ecore_status_t ecore_iov_set_vf_ctx(struct ecore_hwfn *p_hwfn,
185                                           u16 vf_id, void *ctx);
186 #endif
187
188 /**
189  * @brief FLR cleanup for all VFs
190  *
191  * @param p_hwfn
192  * @param p_ptt
193  *
194  * @return enum _ecore_status_t
195  */
196 enum _ecore_status_t ecore_iov_vf_flr_cleanup(struct ecore_hwfn *p_hwfn,
197                                               struct ecore_ptt *p_ptt);
198
199 /**
200  * @brief FLR cleanup for single VF
201  *
202  * @param p_hwfn
203  * @param p_ptt
204  * @param rel_vf_id
205  *
206  * @return enum _ecore_status_t
207  */
208 enum _ecore_status_t
209 ecore_iov_single_vf_flr_cleanup(struct ecore_hwfn *p_hwfn,
210                                 struct ecore_ptt *p_ptt,
211                                 u16 rel_vf_id);
212
213 /**
214  * @brief Update the bulletin with link information. Notice this does NOT
215  *        send a bulletin update, only updates the PF's bulletin.
216  *
217  * @param p_hwfn
218  * @param p_vf
219  * @param params - the link params to use for the VF link configuration
220  * @param link - the link output to use for the VF link configuration
221  * @param p_caps - the link default capabilities.
222  */
223 void ecore_iov_set_link(struct ecore_hwfn *p_hwfn,
224                         u16 vfid,
225                         struct ecore_mcp_link_params *params,
226                         struct ecore_mcp_link_state *link,
227                         struct ecore_mcp_link_capabilities *p_caps);
228
229 /**
230  * @brief Returns link information as perceived by VF.
231  *
232  * @param p_hwfn
233  * @param p_vf
234  * @param p_params - the link params visible to vf.
235  * @param p_link - the link state visible to vf.
236  * @param p_caps - the link default capabilities visible to vf.
237  */
238 void ecore_iov_get_link(struct ecore_hwfn *p_hwfn,
239                         u16 vfid,
240                         struct ecore_mcp_link_params *params,
241                         struct ecore_mcp_link_state *link,
242                         struct ecore_mcp_link_capabilities *p_caps);
243
244 /**
245  * @brief return if the VF is pending FLR
246  *
247  * @param p_hwfn
248  * @param rel_vf_id
249  *
250  * @return bool
251  */
252 bool ecore_iov_is_vf_pending_flr(struct ecore_hwfn *p_hwfn,
253                                  u16 rel_vf_id);
254
255 /**
256  * @brief Check if given VF ID @vfid is valid
257  *        w.r.t. @b_enabled_only value
258  *        if b_enabled_only = true - only enabled VF id is valid
259  *        else any VF id less than max_vfs is valid
260  *
261  * @param p_hwfn
262  * @param rel_vf_id - Relative VF ID
263  * @param b_enabled_only - consider only enabled VF
264  *
265  * @return bool - true for valid VF ID
266  */
267 bool ecore_iov_is_valid_vfid(struct ecore_hwfn *p_hwfn,
268                              int rel_vf_id,
269                              bool b_enabled_only);
270
271 /**
272  * @brief Get VF's public info structure
273  *
274  * @param p_hwfn
275  * @param vfid - Relative VF ID
276  * @param b_enabled_only - false if want to access even if vf is disabled
277  *
278  * @return struct ecore_public_vf_info *
279  */
280 struct ecore_public_vf_info*
281 ecore_iov_get_public_vf_info(struct ecore_hwfn *p_hwfn,
282                              u16 vfid, bool b_enabled_only);
283
284 /**
285  * @brief Set pending events bitmap for given @vfid
286  *
287  * @param p_hwfn
288  * @param vfid
289  */
290 void ecore_iov_pf_add_pending_events(struct ecore_hwfn *p_hwfn, u8 vfid);
291
292 /**
293  * @brief Copy pending events bitmap in @events and clear
294  *        original copy of events
295  *
296  * @param p_hwfn
297  */
298 void ecore_iov_pf_get_and_clear_pending_events(struct ecore_hwfn *p_hwfn,
299                                                u64 *events);
300
301 /**
302  * @brief Copy VF's message to PF's buffer
303  *
304  * @param p_hwfn
305  * @param ptt
306  * @param vfid
307  *
308  * @return enum _ecore_status_t
309  */
310 enum _ecore_status_t ecore_iov_copy_vf_msg(struct ecore_hwfn *p_hwfn,
311                                            struct ecore_ptt *ptt,
312                                            int vfid);
313 /**
314  * @brief Set forced MAC address in PFs copy of bulletin board
315  *        and configures FW/HW to support the configuration.
316  *
317  * @param p_hwfn
318  * @param mac
319  * @param vfid
320  */
321 void ecore_iov_bulletin_set_forced_mac(struct ecore_hwfn *p_hwfn,
322                                        u8 *mac, int vfid);
323
324 /**
325  * @brief Set MAC address in PFs copy of bulletin board without
326  *        configuring FW/HW.
327  *
328  * @param p_hwfn
329  * @param mac
330  * @param vfid
331  */
332 enum _ecore_status_t ecore_iov_bulletin_set_mac(struct ecore_hwfn *p_hwfn,
333                                                 u8 *mac, int vfid);
334
335 /**
336  * @brief Set forced VLAN [pvid] in PFs copy of bulletin board
337  *        and configures FW/HW to support the configuration.
338  *        Setting of pvid 0 would clear the feature.
339  * @param p_hwfn
340  * @param pvid
341  * @param vfid
342  */
343 void ecore_iov_bulletin_set_forced_vlan(struct ecore_hwfn *p_hwfn,
344                                         u16 pvid, int vfid);
345
346 /**
347  * @brief Set default behaviour of VF in case no vlans are configured for it
348  *        whether to accept only untagged traffic or all.
349  *        Must be called prior to the VF vport-start.
350  *
351  * @param p_hwfn
352  * @param b_untagged_only
353  * @param vfid
354  *
355  * @return ECORE_SUCCESS if configuration would stick.
356  */
357 enum _ecore_status_t
358 ecore_iov_bulletin_set_forced_untagged_default(struct ecore_hwfn *p_hwfn,
359                                                bool b_untagged_only,
360                                                int vfid);
361
362 /**
363  * @brief Get VFs opaque fid.
364  *
365  * @param p_hwfn
366  * @param vfid
367  * @param opaque_fid
368  */
369 void ecore_iov_get_vfs_opaque_fid(struct ecore_hwfn *p_hwfn, int vfid,
370                                   u16 *opaque_fid);
371
372 /**
373  * @brief Get VFs VPORT id.
374  *
375  * @param p_hwfn
376  * @param vfid
377  * @param vport id
378  */
379 void ecore_iov_get_vfs_vport_id(struct ecore_hwfn *p_hwfn, int vfid,
380                                 u8 *p_vport_id);
381
382 /**
383  * @brief Check if VF has VPORT instance. This can be used
384  *        to check if VPORT is active.
385  *
386  * @param p_hwfn
387  */
388 bool ecore_iov_vf_has_vport_instance(struct ecore_hwfn *p_hwfn, int vfid);
389
390 /**
391  * @brief PF posts the bulletin to the VF
392  *
393  * @param p_hwfn
394  * @param p_vf
395  * @param p_ptt
396  *
397  * @return enum _ecore_status_t
398  */
399 enum _ecore_status_t ecore_iov_post_vf_bulletin(struct ecore_hwfn *p_hwfn,
400                                                 int vfid,
401                                                 struct ecore_ptt *p_ptt);
402
403 /**
404  * @brief Check if given VF (@vfid) is marked as stopped
405  *
406  * @param p_hwfn
407  * @param vfid
408  *
409  * @return bool : true if stopped
410  */
411 bool ecore_iov_is_vf_stopped(struct ecore_hwfn *p_hwfn, int vfid);
412
413 /**
414  * @brief Configure VF anti spoofing
415  *
416  * @param p_hwfn
417  * @param vfid
418  * @param val - spoofchk value - true/false
419  *
420  * @return enum _ecore_status_t
421  */
422 enum _ecore_status_t ecore_iov_spoofchk_set(struct ecore_hwfn *p_hwfn,
423                                             int vfid, bool val);
424
425 /**
426  * @brief Get VF's configured spoof value.
427  *
428  * @param p_hwfn
429  * @param vfid
430  *
431  * @return bool - spoofchk value - true/false
432  */
433 bool ecore_iov_spoofchk_get(struct ecore_hwfn *p_hwfn, int vfid);
434
435 /**
436  * @brief Check for SRIOV sanity by PF.
437  *
438  * @param p_hwfn
439  * @param vfid
440  *
441  * @return bool - true if sanity checks passes, else false
442  */
443 bool ecore_iov_pf_sanity_check(struct ecore_hwfn *p_hwfn, int vfid);
444
445 /**
446  * @brief Get the num of VF chains.
447  *
448  * @param p_hwfn
449  *
450  * @return u8
451  */
452 u8 ecore_iov_vf_chains_per_pf(struct ecore_hwfn *p_hwfn);
453
454 /**
455  * @brief Get vf request mailbox params
456  *
457  * @param p_hwfn
458  * @param rel_vf_id
459  * @param pp_req_virt_addr
460  * @param p_req_virt_size
461  */
462 void ecore_iov_get_vf_req_virt_mbx_params(struct ecore_hwfn *p_hwfn,
463                                           u16 rel_vf_id,
464                                           void **pp_req_virt_addr,
465                                           u16 *p_req_virt_size);
466
467 /**
468  * @brief Get vf mailbox params
469  *
470  * @param p_hwfn
471  * @param rel_vf_id
472  * @param pp_reply_virt_addr
473  * @param p_reply_virt_size
474  */
475 void ecore_iov_get_vf_reply_virt_mbx_params(struct ecore_hwfn *p_hwfn,
476                                             u16 rel_vf_id,
477                                             void **pp_reply_virt_addr,
478                                             u16 *p_reply_virt_size);
479
480 /**
481  * @brief Validate if the given length is a valid vfpf message
482  *        length
483  *
484  * @param length
485  *
486  * @return bool
487  */
488 bool ecore_iov_is_valid_vfpf_msg_length(u32 length);
489
490 /**
491  * @brief Return the max pfvf message length
492  *
493  * @return u32
494  */
495 u32 ecore_iov_pfvf_msg_length(void);
496
497 /**
498  * @brief Returns forced MAC address if one is configured
499  *
500  * @parm p_hwfn
501  * @parm rel_vf_id
502  *
503  * @return OSAL_NULL if mac isn't forced; Otherwise, returns MAC.
504  */
505 u8 *ecore_iov_bulletin_get_forced_mac(struct ecore_hwfn *p_hwfn,
506                                       u16 rel_vf_id);
507
508 /**
509  * @brief Returns pvid if one is configured
510  *
511  * @parm p_hwfn
512  * @parm rel_vf_id
513  *
514  * @return 0 if no pvid is configured, otherwise the pvid.
515  */
516 u16 ecore_iov_bulletin_get_forced_vlan(struct ecore_hwfn *p_hwfn,
517                                        u16 rel_vf_id);
518 /**
519  * @brief Configure VFs tx rate
520  *
521  * @param p_hwfn
522  * @param p_ptt
523  * @param vfid
524  * @param val - tx rate value in Mb/sec.
525  *
526  * @return enum _ecore_status_t
527  */
528 enum _ecore_status_t ecore_iov_configure_tx_rate(struct ecore_hwfn *p_hwfn,
529                                                  struct ecore_ptt *p_ptt,
530                                                  int vfid, int val);
531
532 /**
533  * @brief - Retrieves the statistics associated with a VF
534  *
535  * @param p_hwfn
536  * @param p_ptt
537  * @param vfid
538  * @param p_stats - this will be filled with the VF statistics
539  *
540  * @return ECORE_SUCCESS iff statistics were retrieved. Error otherwise.
541  */
542 enum _ecore_status_t ecore_iov_get_vf_stats(struct ecore_hwfn *p_hwfn,
543                                             struct ecore_ptt *p_ptt,
544                                             int vfid,
545                                             struct ecore_eth_stats *p_stats);
546
547 /**
548  * @brief - Retrieves num of rxqs chains
549  *
550  * @param p_hwfn
551  * @param rel_vf_id
552  *
553  * @return num of rxqs chains.
554  */
555 u8 ecore_iov_get_vf_num_rxqs(struct ecore_hwfn *p_hwfn,
556                              u16 rel_vf_id);
557
558 /**
559  * @brief - Retrieves num of active rxqs chains
560  *
561  * @param p_hwfn
562  * @param rel_vf_id
563  *
564  * @return
565  */
566 u8 ecore_iov_get_vf_num_active_rxqs(struct ecore_hwfn *p_hwfn,
567                                     u16 rel_vf_id);
568
569 /**
570  * @brief - Retrieves ctx pointer
571  *
572  * @param p_hwfn
573  * @param rel_vf_id
574  *
575  * @return
576  */
577 void *ecore_iov_get_vf_ctx(struct ecore_hwfn *p_hwfn,
578                            u16 rel_vf_id);
579
580 /**
581  * @brief - Retrieves VF`s num sbs
582  *
583  * @param p_hwfn
584  * @param rel_vf_id
585  *
586  * @return
587  */
588 u8 ecore_iov_get_vf_num_sbs(struct ecore_hwfn *p_hwfn,
589                             u16 rel_vf_id);
590
591 /**
592  * @brief - Returm true if VF is waiting for acquire
593  *
594  * @param p_hwfn
595  * @param rel_vf_id
596  *
597  * @return
598  */
599 bool ecore_iov_is_vf_wait_for_acquire(struct ecore_hwfn *p_hwfn,
600                                       u16 rel_vf_id);
601
602 /**
603  * @brief - Returm true if VF is acquired but not initialized
604  *
605  * @param p_hwfn
606  * @param rel_vf_id
607  *
608  * @return
609  */
610 bool ecore_iov_is_vf_acquired_not_initialized(struct ecore_hwfn *p_hwfn,
611                                               u16 rel_vf_id);
612
613 /**
614  * @brief - Returm true if VF is acquired and initialized
615  *
616  * @param p_hwfn
617  * @param rel_vf_id
618  *
619  * @return
620  */
621 bool ecore_iov_is_vf_initialized(struct ecore_hwfn *p_hwfn,
622                                  u16 rel_vf_id);
623
624 /**
625  * @brief - Get VF's vport min rate configured.
626  * @param p_hwfn
627  * @param rel_vf_id
628  *
629  * @return - rate in Mbps
630  */
631 int ecore_iov_get_vf_min_rate(struct ecore_hwfn *p_hwfn, int vfid);
632
633 /**
634  * @brief - Configure min rate for VF's vport.
635  * @param p_dev
636  * @param vfid
637  * @param - rate in Mbps
638  *
639  * @return
640  */
641 enum _ecore_status_t ecore_iov_configure_min_tx_rate(struct ecore_dev *p_dev,
642                                                      int vfid, u32 rate);
643 #else
644 static OSAL_INLINE void ecore_iov_set_vfs_to_disable(struct ecore_hwfn *p_hwfn,
645                                                      u8 to_disable)
646 {
647 }
648
649 static OSAL_INLINE void ecore_iov_set_vf_to_disable(struct ecore_hwfn *p_hwfn,
650                                                     u16 rel_vf_id,
651                                                     u8 to_disable)
652 {
653 }
654
655 static OSAL_INLINE enum _ecore_status_t ecore_iov_init_hw_for_vf(struct
656                                                                  ecore_hwfn
657                                                                  * p_hwfn,
658                                                                  struct
659                                                                  ecore_ptt
660                                                                  * p_ptt,
661                                                                  u16 rel_vf_id,
662                                                                  u16
663                                                                  num_rx_queues)
664 {
665         return ECORE_INVAL;
666 }
667
668 static OSAL_INLINE void ecore_iov_process_mbx_req(struct ecore_hwfn *p_hwfn,
669                                                   struct ecore_ptt *p_ptt,
670                                                   int vfid)
671 {
672 }
673
674 static OSAL_INLINE enum _ecore_status_t ecore_iov_release_hw_for_vf(struct
675                                                                     ecore_hwfn
676                                                                     * p_hwfn,
677                                                                     struct
678                                                                     ecore_ptt
679                                                                     * p_ptt,
680                                                                     u16
681                                                                     rel_vf_id)
682 {
683         return ECORE_SUCCESS;
684 }
685
686 #ifndef LINUX_REMOVE
687 static OSAL_INLINE enum _ecore_status_t ecore_iov_set_vf_ctx(struct ecore_hwfn
688                                                              *p_hwfn, u16 vf_id,
689                                                              void *ctx)
690 {
691         return ECORE_INVAL;
692 }
693 #endif
694 static OSAL_INLINE enum _ecore_status_t ecore_iov_vf_flr_cleanup(struct
695                                                                  ecore_hwfn
696                                                                  * p_hwfn,
697                                                                  struct
698                                                                  ecore_ptt
699                                                                  * p_ptt)
700 {
701         return ECORE_INVAL;
702 }
703
704 static OSAL_INLINE enum _ecore_status_t ecore_iov_single_vf_flr_cleanup(
705         struct ecore_hwfn *p_hwfn, struct ecore_ptt *p_ptt, u16 rel_vf_id)
706 {
707         return ECORE_INVAL;
708 }
709
710 static OSAL_INLINE void ecore_iov_set_link(struct ecore_hwfn *p_hwfn, u16 vfid,
711                                            struct ecore_mcp_link_params *params,
712                                            struct ecore_mcp_link_state *link,
713                                            struct ecore_mcp_link_capabilities
714                                            *p_caps)
715 {
716 }
717
718 static OSAL_INLINE void ecore_iov_get_link(struct ecore_hwfn *p_hwfn, u16 vfid,
719                                            struct ecore_mcp_link_params *params,
720                                            struct ecore_mcp_link_state *link,
721                                            struct ecore_mcp_link_capabilities
722                                            *p_caps)
723 {
724 }
725
726 static OSAL_INLINE bool ecore_iov_is_vf_pending_flr(struct ecore_hwfn *p_hwfn,
727                                                     u16 rel_vf_id)
728 {
729         return false;
730 }
731
732 static OSAL_INLINE bool ecore_iov_is_valid_vfid(struct ecore_hwfn *p_hwfn,
733                                                 int rel_vf_id,
734                                                 bool b_enabled_only)
735 {
736         return false;
737 }
738
739 static OSAL_INLINE struct ecore_public_vf_info *
740         ecore_iov_get_public_vf_info(struct ecore_hwfn *p_hwfn, u16 vfid,
741                                   bool b_enabled_only)
742 {
743         return OSAL_NULL;
744 }
745
746 static OSAL_INLINE void ecore_iov_pf_add_pending_events(struct ecore_hwfn
747                                                         *p_hwfn, u8 vfid)
748 {
749 }
750
751 static OSAL_INLINE void ecore_iov_pf_get_and_clear_pending_events(struct
752                                                                   ecore_hwfn
753                                                                   * p_hwfn,
754                                                                   u64 *events)
755 {
756 }
757
758 static OSAL_INLINE enum _ecore_status_t ecore_iov_copy_vf_msg(struct ecore_hwfn
759                                                               *p_hwfn,
760                                                               struct ecore_ptt
761                                                               *ptt, int vfid)
762 {
763         return ECORE_INVAL;
764 }
765
766 static OSAL_INLINE void ecore_iov_bulletin_set_forced_mac(struct ecore_hwfn
767                                                           *p_hwfn, u8 *mac,
768                                                           int vfid)
769 {
770 }
771
772 static OSAL_INLINE enum _ecore_status_t ecore_iov_bulletin_set_mac(struct
773                                                                    ecore_hwfn
774                                                                    * p_hwfn,
775                                                                    u8 *mac,
776                                                                    int vfid)
777 {
778         return ECORE_INVAL;
779 }
780
781 static OSAL_INLINE void ecore_iov_bulletin_set_forced_vlan(struct ecore_hwfn
782                                                            p_hwfn, u16 pvid,
783                                                            int vfid)
784 {
785 }
786
787 static OSAL_INLINE void ecore_iov_get_vfs_opaque_fid(struct ecore_hwfn *p_hwfn,
788                                                      int vfid, u16 *opaque_fid)
789 {
790 }
791
792 static OSAL_INLINE void ecore_iov_get_vfs_vport_id(struct ecore_hwfn *p_hwfn,
793                                                    int vfid, u8 *p_vport_id)
794 {
795 }
796
797 static OSAL_INLINE bool ecore_iov_vf_has_vport_instance(struct ecore_hwfn
798                                                         *p_hwfn, int vfid)
799 {
800         return false;
801 }
802
803 static OSAL_INLINE enum _ecore_status_t ecore_iov_post_vf_bulletin(struct
804                                                                    ecore_hwfn
805                                                                    * p_hwfn,
806                                                                    int vfid,
807                                                                    struct
808                                                                    ecore_ptt
809                                                                    * p_ptt)
810 {
811         return ECORE_INVAL;
812 }
813
814 static OSAL_INLINE bool ecore_iov_is_vf_stopped(struct ecore_hwfn *p_hwfn,
815                                                 int vfid)
816 {
817         return false;
818 }
819
820 static OSAL_INLINE enum _ecore_status_t ecore_iov_spoofchk_set(struct ecore_hwfn
821                                                                *p_hwfn,
822                                                                int vfid,
823                                                                bool val)
824 {
825         return ECORE_INVAL;
826 }
827
828 static OSAL_INLINE bool ecore_iov_spoofchk_get(struct ecore_hwfn *p_hwfn,
829                                                int vfid)
830 {
831         return false;
832 }
833
834 static OSAL_INLINE bool ecore_iov_pf_sanity_check(struct ecore_hwfn *p_hwfn,
835                                                   int vfid)
836 {
837         return false;
838 }
839
840 static OSAL_INLINE u8 ecore_iov_vf_chains_per_pf(struct ecore_hwfn *p_hwfn)
841 {
842         return 0;
843 }
844
845 static OSAL_INLINE void ecore_iov_get_vf_req_virt_mbx_params(struct ecore_hwfn
846                                                              *p_hwfn,
847                                                              u16 rel_vf_id,
848                                                              void
849                                                              **pp_req_virt_addr,
850                                                              u16 *
851                                                              p_req_virt_size)
852 {
853 }
854
855 static OSAL_INLINE void ecore_iov_get_vf_reply_virt_mbx_params(struct ecore_hwfn
856                                                                *p_hwfn,
857                                                                u16 rel_vf_id,
858                                                                void
859                                                        **pp_reply_virt_addr,
860                                                                u16 *
861                                                        p_reply_virt_size)
862 {
863 }
864
865 static OSAL_INLINE bool ecore_iov_is_valid_vfpf_msg_length(u32 length)
866 {
867         return false;
868 }
869
870 static OSAL_INLINE u32 ecore_iov_pfvf_msg_length(void)
871 {
872         return 0;
873 }
874
875 static OSAL_INLINE u8 *ecore_iov_bulletin_get_forced_mac(struct ecore_hwfn
876                                                          *p_hwfn, u16 rel_vf_id)
877 {
878         return OSAL_NULL;
879 }
880
881 static OSAL_INLINE u16 ecore_iov_bulletin_get_forced_vlan(struct ecore_hwfn
882                                                           *p_hwfn,
883                                                           u16 rel_vf_id)
884 {
885         return 0;
886 }
887
888 static OSAL_INLINE enum _ecore_status_t ecore_iov_configure_tx_rate(struct
889                                                                     ecore_hwfn
890                                                                     * p_hwfn,
891                                                                     struct
892                                                                     ecore_ptt
893                                                                     * p_ptt,
894                                                                     int vfid,
895                                                                     int val)
896 {
897         return ECORE_INVAL;
898 }
899
900 static OSAL_INLINE u8 ecore_iov_get_vf_num_rxqs(struct ecore_hwfn *p_hwfn,
901                                                 u16 rel_vf_id)
902 {
903         return 0;
904 }
905
906 static OSAL_INLINE u8 ecore_iov_get_vf_num_active_rxqs(struct ecore_hwfn
907                                                        *p_hwfn, u16 rel_vf_id)
908 {
909         return 0;
910 }
911
912 static OSAL_INLINE void *ecore_iov_get_vf_ctx(struct ecore_hwfn *p_hwfn,
913                                               u16 rel_vf_id)
914 {
915         return OSAL_NULL;
916 }
917
918 static OSAL_INLINE u8 ecore_iov_get_vf_num_sbs(struct ecore_hwfn *p_hwfn,
919                                                u16 rel_vf_id)
920 {
921         return 0;
922 }
923
924 static OSAL_INLINE bool ecore_iov_is_vf_wait_for_acquire(struct ecore_hwfn
925                                                          *p_hwfn, u16 rel_vf_id)
926 {
927         return false;
928 }
929
930 static OSAL_INLINE bool ecore_iov_is_vf_acquired_not_initialized(struct
931                                                                  ecore_hwfn
932                                                                  * p_hwfn,
933                                                                  u16 rel_vf_id)
934 {
935         return false;
936 }
937
938 static OSAL_INLINE bool ecore_iov_is_vf_initialized(struct ecore_hwfn *p_hwfn,
939                                                     u16 rel_vf_id)
940 {
941         return false;
942 }
943
944 static OSAL_INLINE int ecore_iov_get_vf_min_rate(struct ecore_hwfn *p_hwfn,
945                                                  int vfid)
946 {
947         return 0;
948 }
949
950 static OSAL_INLINE enum _ecore_status_t ecore_iov_configure_min_tx_rate(
951         struct ecore_dev *p_dev, int vfid, u32 rate)
952 {
953         return ECORE_INVAL;
954 }
955 #endif
956 #endif