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