aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/qede/base/ecore_iov_api.h
blob: b34a9c6bb2900dbbec62b5876d404f0f94e577a8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
/*
 * Copyright (c) 2016 QLogic Corporation.
 * All rights reserved.
 * www.qlogic.com
 *
 * See LICENSE.qede_pmd for copyright and licensing details.
 */

#ifndef __ECORE_SRIOV_API_H__
#define __ECORE_SRIOV_API_H__

#include "ecore_status.h"

#define ECORE_VF_ARRAY_LENGTH (3)

#define IS_VF(p_dev)		((p_dev)->b_is_vf)
#define IS_PF(p_dev)		(!((p_dev)->b_is_vf))
#ifdef CONFIG_ECORE_SRIOV
#define IS_PF_SRIOV(p_hwfn)	(!!((p_hwfn)->p_dev->sriov_info.total_vfs))
#else
#define IS_PF_SRIOV(p_hwfn)	(0)
#endif
#define IS_PF_SRIOV_ALLOC(p_hwfn)	(!!((p_hwfn)->pf_iov_info))
#define IS_PF_PDA(p_hwfn)	0	/* @@TBD Michalk */

/* @@@ TBD MichalK - what should this number be*/
#define ECORE_MAX_VF_CHAINS_PER_PF 16

/* vport update extended feature tlvs flags */
enum ecore_iov_vport_update_flag {
	ECORE_IOV_VP_UPDATE_ACTIVATE = 0,
	ECORE_IOV_VP_UPDATE_VLAN_STRIP = 1,
	ECORE_IOV_VP_UPDATE_TX_SWITCH = 2,
	ECORE_IOV_VP_UPDATE_MCAST = 3,
	ECORE_IOV_VP_UPDATE_ACCEPT_PARAM = 4,
	ECORE_IOV_VP_UPDATE_RSS = 5,
	ECORE_IOV_VP_UPDATE_ACCEPT_ANY_VLAN = 6,
	ECORE_IOV_VP_UPDATE_SGE_TPA = 7,
	ECORE_IOV_VP_UPDATE_MAX = 8,
};

struct ecore_mcp_link_params;
struct ecore_mcp_link_state;
struct ecore_mcp_link_capabilities;

/* These defines are used by the hw-channel; should never change order */
#define VFPF_ACQUIRE_OS_LINUX (0)
#define VFPF_ACQUIRE_OS_WINDOWS (1)
#define VFPF_ACQUIRE_OS_ESX (2)
#define VFPF_ACQUIRE_OS_SOLARIS (3)
#define VFPF_ACQUIRE_OS_LINUX_USERSPACE (4)

struct ecore_vf_acquire_sw_info {
	u32 driver_version;
	u8 os_type;
	bool override_fw_version;
};

struct ecore_public_vf_info {
	/* These copies will later be reflected in the bulletin board,
	 * but this copy should be newer.
	 */
	u8 forced_mac[ETH_ALEN];
	u16 forced_vlan;
};

#ifdef CONFIG_ECORE_SW_CHANNEL
/* This is SW channel related only... */
enum mbx_state {
	VF_PF_UNKNOWN_STATE = 0,
	VF_PF_WAIT_FOR_START_REQUEST = 1,
	VF_PF_WAIT_FOR_NEXT_CHUNK_OF_REQUEST = 2,
	VF_PF_REQUEST_IN_PROCESSING = 3,
	VF_PF_RESPONSE_READY = 4,
};

struct ecore_iov_sw_mbx {
	enum mbx_state mbx_state;

	u32 request_size;
	u32 request_offset;

	u32 response_size;
	u32 response_offset;
};

/**
 * @brief Get the vf sw mailbox params
 *
 * @param p_hwfn
 * @param rel_vf_id
 *
 * @return struct ecore_iov_sw_mbx*
 */
struct ecore_iov_sw_mbx *ecore_iov_get_vf_sw_mbx(struct ecore_hwfn *p_hwfn,
						 u16 rel_vf_id);
#endif

#ifdef CONFIG_ECORE_SRIOV
/**
 * @brief mark/clear all VFs before/after an incoming PCIe sriov
 *        disable.
 *
 * @param p_hwfn
 * @param to_disable
 */
void ecore_iov_set_vfs_to_disable(struct ecore_hwfn *p_hwfn, u8 to_disable);

/**
 * @brief mark/clear chosen VFs before/after an incoming PCIe
 *        sriov disable.
 *
 * @param p_hwfn
 * @param to_disable
 */
void ecore_iov_set_vf_to_disable(struct ecore_hwfn *p_hwfn,
				 u16 rel_vf_id, u8 to_disable);

/**
 *
 * @brief ecore_iov_init_hw_for_vf - initialize the HW for
 *        enabling access of a VF. Also includes preparing the
 *        IGU for VF access. This needs to be called AFTER hw is
 *        initialized and BEFORE VF is loaded inside the VM.
 *
 * @param p_hwfn
 * @param p_ptt
 * @param rel_vf_id
 * @param num_rx_queues
 *
 * @return enum _ecore_status_t
 */
enum _ecore_status_t ecore_iov_init_hw_for_vf(struct ecore_hwfn *p_hwfn,
					      struct ecore_ptt *p_ptt,
					      u16 rel_vf_id, u16 num_rx_queues);

/**
 * @brief ecore_iov_process_mbx_req - process a request received
 *        from the VF
 *
 * @param p_hwfn
 * @param p_ptt
 * @param vfid
 */
void ecore_iov_process_mbx_req(struct ecore_hwfn *p_hwfn,
			       struct ecore_ptt *p_ptt, int vfid);

/**
 * @brief ecore_iov_release_hw_for_vf - called once upper layer
 *        knows VF is done with - can release any resources
 *        allocated for VF at this point. this must be done once
 *        we know VF is no longer loaded in VM.
 *
 * @param p_hwfn
 * @param p_ptt
 * @param rel_vf_id
 *
 * @return enum _ecore_status_t
 */
enum _ecore_status_t ecore_iov_release_hw_for_vf(struct ecore_hwfn *p_hwfn,
						 struct ecore_ptt *p_ptt,
						 u16 rel_vf_id);

#ifndef LINUX_REMOVE
/**
 * @brief ecore_iov_set_vf_ctx - set a context for a given VF
 *
 * @param p_hwfn
 * @param vf_id
 * @param ctx
 *
 * @return enum _ecore_status_t
 */
enum _ecore_status_t ecore_iov_set_vf_ctx(struct ecore_hwfn *p_hwfn,
					  u16 vf_id, void *ctx);
#endif

/**
 * @brief FLR cleanup for all VFs
 *
 * @param p_hwfn
 * @param p_ptt
 *
 * @return enum _ecore_status_t
 */
enum _ecore_status_t ecore_iov_vf_flr_cleanup(struct ecore_hwfn *p_hwfn,
					      struct ecore_ptt *p_ptt);

/**
 * @brief FLR cleanup for single VF
 *
 * @param p_hwfn
 * @param p_ptt
 * @param rel_vf_id
 *
 * @return enum _ecore_status_t
 */
enum _ecore_status_t
ecore_iov_single_vf_flr_cleanup(struct ecore_hwfn *p_hwfn,
				struct ecore_ptt *p_ptt, u16 rel_vf_id);

/**
 * @brief Update the bulletin with link information. Notice this does NOT
 *        send a bulletin update, only updates the PF's bulletin.
 *
 * @param p_hwfn
 * @param p_vf
 * @param params - the link params to use for the VF link configuration
 * @param link - the link output to use for the VF link configuration
 * @param p_caps - the link default capabilities.
 */
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);

/**
 * @brief Returns link information as perceived by VF.
 *
 * @param p_hwfn
 * @param p_vf
 * @param p_params - the link params visible to vf.
 * @param p_link - the link state visible to vf.
 * @param p_caps - the link default capabilities visible to vf.
 */
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);

/**
 * @brief return if the VF is pending FLR
 *
 * @param p_hwfn
 * @param rel_vf_id
 *
 * @return bool
 */
bool ecore_iov_is_vf_pending_flr(struct ecore_hwfn *p_hwfn, u16 rel_vf_id);

/**
 * @brief Check if given VF ID @vfid is valid
 *        w.r.t. @b_enabled_only value
 *        if b_enabled_only = true - only enabled VF id is valid
 *        else any VF id less than max_vfs is valid
 *
 * @param p_hwfn
 * @param rel_vf_id - Relative VF ID
 * @param b_enabled_only - consider only enabled VF
 *
 * @return bool - true for valid VF ID
 */
bool ecore_iov_is_valid_vfid(struct ecore_hwfn *p_hwfn,
			     int rel_vf_id, bool b_enabled_only);

/**
 * @brief Get VF's public info structure
 *
 * @param p_hwfn
 * @param vfid - Relative VF ID
 * @param b_enabled_only - false if want to access even if vf is disabled
 *
 * @return struct ecore_public_vf_info *
 */
struct ecore_public_vf_info *ecore_iov_get_public_vf_info(struct ecore_hwfn
							  *p_hwfn, u16 vfid,
							  bool b_enabled_only);

/**
 * @brief Set pending events bitmap for given @vfid
 *
 * @param p_hwfn
 * @param vfid
 */
void ecore_iov_pf_add_pending_events(struct ecore_hwfn *p_hwfn, u8 vfid);

/**
 * @brief Copy pending events bitmap in @events and clear
 *	  original copy of events
 *
 * @param p_hwfn
 */
void ecore_iov_pf_get_and_clear_pending_events(struct ecore_hwfn *p_hwfn,
					       u64 *events);

/**
 * @brief Copy VF's message to PF's buffer
 *
 * @param p_hwfn
 * @param ptt
 * @param vfid
 *
 * @return enum _ecore_status_t
 */
enum _ecore_status_t ecore_iov_copy_vf_msg(struct ecore_hwfn *p_hwfn,
					   struct ecore_ptt *ptt, int vfid);
/**
 * @brief Set forced MAC address in PFs copy of bulletin board
 *        and configures FW/HW to support the configuration.
 *
 * @param p_hwfn
 * @param mac
 * @param vfid
 */
void ecore_iov_bulletin_set_forced_mac(struct ecore_hwfn *p_hwfn,
				       u8 *mac, int vfid);

/**
 * @brief Set MAC address in PFs copy of bulletin board without
 *        configuring FW/HW.
 *
 * @param p_hwfn
 * @param mac
 * @param vfid
 */
enum _ecore_status_t ecore_iov_bulletin_set_mac(struct ecore_hwfn *p_hwfn,
						u8 *mac, int vfid);

/**
 * @brief Set forced VLAN [pvid] in PFs copy of bulletin board
 *        and configures FW/HW to support the configuration.
 *        Setting of pvid 0 would clear the feature.
 * @param p_hwfn
 * @param pvid
 * @param vfid
 */
void ecore_iov_bulletin_set_forced_vlan(struct ecore_hwfn *p_hwfn,
					u16 pvid, int vfid);

/**
 * @brief Set default behaviour of VF in case no vlans are configured for it
 *        whether to accept only untagged traffic or all.
 *        Must be called prior to the VF vport-start.
 *
 * @param p_hwfn
 * @param b_untagged_only
 * @param vfid
 *
 * @return ECORE_SUCCESS if configuration would stick.
 */
enum _ecore_status_t
ecore_iov_bulletin_set_forced_untagged_default(struct ecore_hwfn *p_hwfn,
					       bool b_untagged_only, int vfid);
/**
 * @brief Get VFs opaque fid.
 *
 * @param p_hwfn
 * @param vfid
 * @param opaque_fid
 */
void ecore_iov_get_vfs_opaque_fid(struct ecore_hwfn *p_hwfn, int vfid,
				  u16 *opaque_fid);

/**
 * @brief Get VFs VPORT id.
 *
 * @param p_hwfn
 * @param vfid
 * @param vport id
 */
void ecore_iov_get_vfs_vport_id(struct ecore_hwfn *p_hwfn, int vfid,
				u8 *p_vport_id);

/**
 * @brief Check if VF has VPORT instance. This can be used
 *	  to check if VPORT is active.
 *
 * @param p_hwfn
 */
bool ecore_iov_vf_has_vport_instance(struct ecore_hwfn *p_hwfn, int vfid);

/**
 * @brief PF posts the bulletin to the VF
 *
 * @param p_hwfn
 * @param p_vf
 * @param p_ptt
 *
 * @return enum _ecore_status_t
 */
enum _ecore_status_t ecore_iov_post_vf_bulletin(struct ecore_hwfn *p_hwfn,
						int vfid,
						struct ecore_ptt *p_ptt);

/**
 * @brief Check if given VF (@vfid) is marked as stopped
 *
 * @param p_hwfn
 * @param vfid
 *
 * @return bool : true if stopped
 */
bool ecore_iov_is_vf_stopped(struct ecore_hwfn *p_hwfn, int vfid);

/**
 * @brief Configure VF anti spoofing
 *
 * @param p_hwfn
 * @param vfid
 * @param val - spoofchk value - true/false
 *
 * @return enum _ecore_status_t
 */
enum _ecore_status_t ecore_iov_spoofchk_set(struct ecore_hwfn *p_hwfn,
					    int vfid, bool val);

/**
 * @brief Get VF's configured spoof value.
 *
 * @param p_hwfn
 * @param vfid
 *
 * @return bool - spoofchk value - true/false
 */
bool ecore_iov_spoofchk_get(struct ecore_hwfn *p_hwfn, int vfid);

/**
 * @brief Check for SRIOV sanity by PF.
 *
 * @param p_hwfn
 * @param vfid
 *
 * @return bool - true if sanity checks passes, else false
 */
bool ecore_iov_pf_sanity_check(struct ecore_hwfn *p_hwfn, int vfid);

/**
 * @brief Get the num of VF chains.
 *
 * @param p_hwfn
 *
 * @return u8
 */
u8 ecore_iov_vf_chains_per_pf(struct ecore_hwfn *p_hwfn);

/**
 * @brief Get vf request mailbox params
 *
 * @param p_hwfn
 * @param rel_vf_id
 * @param pp_req_virt_addr
 * @param p_req_virt_size
 */
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);

/**
 * @brief Get vf mailbox params
 *
 * @param p_hwfn
 * @param rel_vf_id
 * @param pp_reply_virt_addr
 * @param p_reply_virt_size
 */
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);

/**
 * @brief Validate if the given length is a valid vfpf message
 *        length
 *
 * @param length
 *
 * @return bool
 */
bool ecore_iov_is_valid_vfpf_msg_length(u32 length);

/**
 * @brief Return the max pfvf message length
 *
 * @return u32
 */
u32 ecore_iov_pfvf_msg_length(void);

/**
 * @brief Returns forced MAC address if one is configured
 *
 * @parm p_hwfn
 * @parm rel_vf_id
 *
 * @return OSAL_NULL if mac isn't forced; Otherwise, returns MAC.
 */
u8 *ecore_iov_bulletin_get_forced_mac(struct ecore_hwfn *p_hwfn, u16 rel_vf_id);

/**
 * @brief Returns pvid if one is configured
 *
 * @parm p_hwfn
 * @parm rel_vf_id
 *
 * @return 0 if no pvid is configured, otherwise the pvid.
 */
u16 ecore_iov_bulletin_get_forced_vlan(struct ecore_hwfn *p_hwfn,
				       u16 rel_vf_id);
/**
 * @brief Configure VFs tx rate
 *
 * @param p_hwfn
 * @param p_ptt
 * @param vfid
 * @param val - tx rate value in Mb/sec.
 *
 * @return enum _ecore_status_t
 */
enum _ecore_status_t ecore_iov_configure_tx_rate(struct ecore_hwfn *p_hwfn,
						 struct ecore_ptt *p_ptt,
						 int vfid, int val);

/**
 * @brief - Retrieves the statistics associated with a VF
 *
 * @param p_hwfn
 * @param p_ptt
 * @param vfid
 * @param p_stats - this will be filled with the VF statistics
 *
 * @return ECORE_SUCCESS iff statistics were retrieved. Error otherwise.
 */
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);

/**
 * @brief - Retrieves num of rxqs chains
 *
 * @param p_hwfn
 * @param rel_vf_id
 *
 * @return num of rxqs chains.
 */
u8 ecore_iov_get_vf_num_rxqs(struct ecore_hwfn *p_hwfn, u16 rel_vf_id);

/**
 * @brief - Retrieves num of active rxqs chains
 *
 * @param p_hwfn
 * @param rel_vf_id
 *
 * @return
 */
u8 ecore_iov_get_vf_num_active_rxqs(struct ecore_hwfn *p_hwfn, u16 rel_vf_id);

/**
 * @brief - Retrieves ctx pointer
 *
 * @param p_hwfn
 * @param rel_vf_id
 *
 * @return
 */
void *ecore_iov_get_vf_ctx(struct ecore_hwfn *p_hwfn, u16 rel_vf_id);

/**
 * @brief - Retrieves VF`s num sbs
 *
 * @param p_hwfn
 * @param rel_vf_id
 *
 * @return
 */
u8 ecore_iov_get_vf_num_sbs(struct ecore_hwfn *p_hwfn, u16 rel_vf_id);

/**
 * @brief - Returm true if VF is waiting for acquire
 *
 * @param p_hwfn
 * @param rel_vf_id
 *
 * @return
 */
bool ecore_iov_is_vf_wait_for_acquire(struct ecore_hwfn *p_hwfn, u16 rel_vf_id);

/**
 * @brief - Returm true if VF is acquired but not initialized
 *
 * @param p_hwfn
 * @param rel_vf_id
 *
 * @return
 */
bool ecore_iov_is_vf_acquired_not_initialized(struct ecore_hwfn *p_hwfn,
					      u16 rel_vf_id);

/**
 * @brief - Returm true if VF is acquired and initialized
 *
 * @param p_hwfn
 * @param rel_vf_id
 *
 * @return
 */
bool ecore_iov_is_vf_initialized(struct ecore_hwfn *p_hwfn, u16 rel_vf_id);

/**
 * @brief - Get VF's vport min rate configured.
 * @param p_hwfn
 * @param rel_vf_id
 *
 * @return - rate in Mbps
 */
int ecore_iov_get_vf_min_rate(struct ecore_hwfn *p_hwfn, int vfid);

/**
 * @brief - Configure min rate for VF's vport.
 * @param p_dev
 * @param vfid
 * @param - rate in Mbps
 *
 * @return
 */
enum _ecore_status_t ecore_iov_configure_min_tx_rate(struct ecore_dev *p_dev,
						     int vfid, u32 rate);
#else
static OSAL_INLINE void ecore_iov_set_vfs_to_disable(struct ecore_hwfn *p_hwfn,
						     u8 to_disable)
{
}

static OSAL_INLINE void ecore_iov_set_vf_to_disable(struct ecore_hwfn *p_hwfn,
						    u16 rel_vf_id,
						    u8 to_disable)
{
}

static OSAL_INLINE enum _ecore_status_t ecore_iov_init_hw_for_vf(struct
								 ecore_hwfn
								 * p_hwfn,
								 struct
								 ecore_ptt
								 * p_ptt,
								 u16 rel_vf_id,
								 u16
								 num_rx_queues)
{
	return ECORE_INVAL;
}

static OSAL_INLINE void ecore_iov_process_mbx_req(struct ecore_hwfn *p_hwfn,
						  struct ecore_ptt *p_ptt,
						  int vfid)
{
}

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;
}

#ifndef LINUX_REMOVE
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;
}
#endif
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;
}

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;
}

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)
{
}

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)
{
}

static OSAL_INLINE bool ecore_iov_is_vf_pending_flr(struct ecore_hwfn *p_hwfn,
						    u16 rel_vf_id)
{
	return false;
}

static OSAL_INLINE bool ecore_iov_is_valid_vfid(struct ecore_hwfn *p_hwfn,
						int rel_vf_id,
						bool b_enabled_only)
{
	return false;
}

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;
}

static OSAL_INLINE void ecore_iov_pf_add_pending_events(struct ecore_hwfn
							*p_hwfn, u8 vfid)
{
}

static OSAL_INLINE void ecore_iov_pf_get_and_clear_pending_events(struct
								  ecore_hwfn
								  * p_hwfn,
								  u64 *events)
{
}

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;
}

static OSAL_INLINE void ecore_iov_bulletin_set_forced_mac(struct ecore_hwfn
							  *p_hwfn, u8 *mac,
							  int vfid)
{
}

static OSAL_INLINE enum _ecore_status_t ecore_iov_bulletin_set_mac(struct
								   ecore_hwfn
								   * p_hwfn,
								   u8 *mac,
								   int vfid)
{
	return ECORE_INVAL;
}

static OSAL_INLINE void ecore_iov_bulletin_set_forced_vlan(struct ecore_hwfn
							   p_hwfn, u16 pvid,
							   int vfid)
{
}

static OSAL_INLINE void ecore_iov_get_vfs_opaque_fid(struct ecore_hwfn *p_hwfn,
						     int vfid, u16 *opaque_fid)
{
}

static OSAL_INLINE void ecore_iov_get_vfs_vport_id(struct ecore_hwfn *p_hwfn,
						   int vfid, u8 *p_vport_id)
{
}

static OSAL_INLINE bool ecore_iov_vf_has_vport_instance(struct ecore_hwfn
							*p_hwfn, int vfid)
{
	return false;
}

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;
}

static OSAL_INLINE bool ecore_iov_is_vf_stopped(struct ecore_hwfn *p_hwfn,
						int vfid)
{
	return false;
}

static OSAL_INLINE enum _ecore_status_t ecore_iov_spoofchk_set(struct ecore_hwfn
							       *p_hwfn,
							       int vfid,
							       bool val)
{
	return ECORE_INVAL;
}

static OSAL_INLINE bool ecore_iov_spoofchk_get(struct ecore_hwfn *p_hwfn,
					       int vfid)
{
	return false;
}

static OSAL_INLINE bool ecore_iov_pf_sanity_check(struct ecore_hwfn *p_hwfn,
						  int vfid)
{
	return false;
}

static OSAL_INLINE u8 ecore_iov_vf_chains_per_pf(struct ecore_hwfn *p_hwfn)
{
	return 0;
}

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)
{
}

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)
{
}

static OSAL_INLINE bool ecore_iov_is_valid_vfpf_msg_length(u32 length)
{
	return false;
}

static OSAL_INLINE u32 ecore_iov_pfvf_msg_length(void)
{
	return 0;
}

static OSAL_INLINE u8 *ecore_iov_bulletin_get_forced_mac(struct ecore_hwfn
							 *p_hwfn, u16 rel_vf_id)
{
	return OSAL_NULL;
}

static OSAL_INLINE u16 ecore_iov_bulletin_get_forced_vlan(struct ecore_hwfn
							  *p_hwfn,
							  u16 rel_vf_id)
{
	return 0;
}

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;
}

static OSAL_INLINE u8 ecore_iov_get_vf_num_rxqs(struct ecore_hwfn *p_hwfn,
						u16 rel_vf_id)
{
	return 0;
}

static OSAL_INLINE u8 ecore_iov_get_vf_num_active_rxqs(struct ecore_hwfn
						       *p_hwfn, u16 rel_vf_id)
{
	return 0;
}

static OSAL_INLINE void *ecore_iov_get_vf_ctx(struct ecore_hwfn *p_hwfn,
					      u16 rel_vf_id)
{
	return OSAL_NULL;
}

static OSAL_INLINE u8 ecore_iov_get_vf_num_sbs(struct ecore_hwfn *p_hwfn,
					       u16 rel_vf_id)
{
	return 0;
}

static OSAL_INLINE bool ecore_iov_is_vf_wait_for_acquire(struct ecore_hwfn
							 *p_hwfn, u16 rel_vf_id)
{
	return false;
}

static OSAL_INLINE bool ecore_iov_is_vf_acquired_not_initialized(struct
								 ecore_hwfn
								 * p_hwfn,
								 u16 rel_vf_id)
{
	return false;
}

static OSAL_INLINE bool ecore_iov_is_vf_initialized(struct ecore_hwfn *p_hwfn,
						    u16 rel_vf_id)
{
	return false;
}

static OSAL_INLINE int ecore_iov_get_vf_min_rate(struct ecore_hwfn *p_hwfn,
						 int vfid)
{
	return 0;
}

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;
}
#endif
#endif