This source file includes following definitions.
- qed_vf_get_link_params
- qed_vf_get_link_state
- qed_vf_get_link_caps
- qed_vf_get_num_rxqs
- qed_vf_get_num_txqs
- qed_vf_get_num_cids
- qed_vf_get_port_mac
- qed_vf_get_num_vlan_filters
- qed_vf_get_num_mac_filters
- qed_vf_check_mac
- qed_vf_get_fw_version
- qed_vf_hw_prepare
- qed_vf_pf_rxq_start
- qed_vf_pf_txq_start
- qed_vf_pf_rxq_stop
- qed_vf_pf_txq_stop
- qed_vf_pf_vport_update
- qed_vf_pf_reset
- qed_vf_pf_release
- qed_vf_get_igu_sb_id
- qed_vf_set_sb_info
- qed_vf_pf_vport_start
- qed_vf_pf_vport_stop
- qed_vf_pf_filter_ucast
- qed_vf_pf_filter_mcast
- qed_vf_pf_int_cleanup
- __qed_vf_get_link_params
- __qed_vf_get_link_state
- __qed_vf_get_link_caps
- qed_iov_vf_task
- qed_vf_set_vf_start_tunn_update_param
- qed_vf_pf_tunnel_param_update
- qed_vf_pf_bulletin_update_mac
- qed_vf_hw_bar_size
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 #ifndef _QED_VF_H
34 #define _QED_VF_H
35
36 #include "qed_l2.h"
37 #include "qed_mcp.h"
38
39 #define T_ETH_INDIRECTION_TABLE_SIZE 128
40 #define T_ETH_RSS_KEY_SIZE 10
41
42 struct vf_pf_resc_request {
43 u8 num_rxqs;
44 u8 num_txqs;
45 u8 num_sbs;
46 u8 num_mac_filters;
47 u8 num_vlan_filters;
48 u8 num_mc_filters;
49 u8 num_cids;
50 u8 padding;
51 };
52
53 struct hw_sb_info {
54 u16 hw_sb_id;
55 u8 sb_qid;
56 u8 padding[5];
57 };
58
59 #define TLV_BUFFER_SIZE 1024
60
61 enum {
62 PFVF_STATUS_WAITING,
63 PFVF_STATUS_SUCCESS,
64 PFVF_STATUS_FAILURE,
65 PFVF_STATUS_NOT_SUPPORTED,
66 PFVF_STATUS_NO_RESOURCE,
67 PFVF_STATUS_FORCED,
68 PFVF_STATUS_MALICIOUS,
69 };
70
71
72
73 struct channel_tlv {
74 u16 type;
75 u16 length;
76 };
77
78
79
80
81 struct vfpf_first_tlv {
82 struct channel_tlv tl;
83 u32 padding;
84 u64 reply_address;
85 };
86
87
88 struct pfvf_tlv {
89 struct channel_tlv tl;
90 u8 status;
91 u8 padding[3];
92 };
93
94
95 struct pfvf_def_resp_tlv {
96 struct pfvf_tlv hdr;
97 };
98
99
100 struct channel_list_end_tlv {
101 struct channel_tlv tl;
102 u8 padding[4];
103 };
104
105 #define VFPF_ACQUIRE_OS_LINUX (0)
106 #define VFPF_ACQUIRE_OS_WINDOWS (1)
107 #define VFPF_ACQUIRE_OS_ESX (2)
108 #define VFPF_ACQUIRE_OS_SOLARIS (3)
109 #define VFPF_ACQUIRE_OS_LINUX_USERSPACE (4)
110
111 struct vfpf_acquire_tlv {
112 struct vfpf_first_tlv first_tlv;
113
114 struct vf_pf_vfdev_info {
115 #define VFPF_ACQUIRE_CAP_PRE_FP_HSI (1 << 0)
116 #define VFPF_ACQUIRE_CAP_100G (1 << 1)
117
118
119
120
121 #define VFPF_ACQUIRE_CAP_QUEUE_QIDS BIT(2)
122
123
124
125
126
127 #define VFPF_ACQUIRE_CAP_PHYSICAL_BAR BIT(3)
128 u64 capabilities;
129 u8 fw_major;
130 u8 fw_minor;
131 u8 fw_revision;
132 u8 fw_engineering;
133 u32 driver_version;
134 u16 opaque_fid;
135 u8 os_type;
136 u8 eth_fp_hsi_major;
137 u8 eth_fp_hsi_minor;
138 u8 padding[3];
139 } vfdev_info;
140
141 struct vf_pf_resc_request resc_request;
142
143 u64 bulletin_addr;
144 u32 bulletin_size;
145 u32 padding;
146 };
147
148
149 struct vfpf_vport_update_rss_tlv {
150 struct channel_tlv tl;
151
152 u8 update_rss_flags;
153 #define VFPF_UPDATE_RSS_CONFIG_FLAG BIT(0)
154 #define VFPF_UPDATE_RSS_CAPS_FLAG BIT(1)
155 #define VFPF_UPDATE_RSS_IND_TABLE_FLAG BIT(2)
156 #define VFPF_UPDATE_RSS_KEY_FLAG BIT(3)
157
158 u8 rss_enable;
159 u8 rss_caps;
160 u8 rss_table_size_log;
161 u16 rss_ind_table[T_ETH_INDIRECTION_TABLE_SIZE];
162 u32 rss_key[T_ETH_RSS_KEY_SIZE];
163 };
164
165 struct pfvf_storm_stats {
166 u32 address;
167 u32 len;
168 };
169
170 struct pfvf_stats_info {
171 struct pfvf_storm_stats mstats;
172 struct pfvf_storm_stats pstats;
173 struct pfvf_storm_stats tstats;
174 struct pfvf_storm_stats ustats;
175 };
176
177 struct pfvf_acquire_resp_tlv {
178 struct pfvf_tlv hdr;
179
180 struct pf_vf_pfdev_info {
181 u32 chip_num;
182 u32 mfw_ver;
183
184 u16 fw_major;
185 u16 fw_minor;
186 u16 fw_rev;
187 u16 fw_eng;
188
189 u64 capabilities;
190 #define PFVF_ACQUIRE_CAP_DEFAULT_UNTAGGED BIT(0)
191 #define PFVF_ACQUIRE_CAP_100G BIT(1)
192
193
194
195
196
197
198 #define PFVF_ACQUIRE_CAP_POST_FW_OVERRIDE BIT(2)
199
200
201 #define PFVF_ACQUIRE_CAP_QUEUE_QIDS BIT(3)
202
203 u16 db_size;
204 u8 indices_per_sb;
205 u8 os_type;
206
207
208 u16 chip_rev;
209 u8 dev_type;
210
211
212 u8 bar_size;
213
214 struct pfvf_stats_info stats_info;
215
216 u8 port_mac[ETH_ALEN];
217
218
219
220
221
222
223 u8 major_fp_hsi;
224 u8 minor_fp_hsi;
225 } pfdev_info;
226
227 struct pf_vf_resc {
228 #define PFVF_MAX_QUEUES_PER_VF 16
229 #define PFVF_MAX_SBS_PER_VF 16
230 struct hw_sb_info hw_sbs[PFVF_MAX_SBS_PER_VF];
231 u8 hw_qid[PFVF_MAX_QUEUES_PER_VF];
232 u8 cid[PFVF_MAX_QUEUES_PER_VF];
233
234 u8 num_rxqs;
235 u8 num_txqs;
236 u8 num_sbs;
237 u8 num_mac_filters;
238 u8 num_vlan_filters;
239 u8 num_mc_filters;
240 u8 num_cids;
241 u8 padding;
242 } resc;
243
244 u32 bulletin_size;
245 u32 padding;
246 };
247
248 struct pfvf_start_queue_resp_tlv {
249 struct pfvf_tlv hdr;
250 u32 offset;
251 u8 padding[4];
252 };
253
254
255
256
257
258 struct vfpf_qid_tlv {
259 struct channel_tlv tl;
260 u8 qid;
261 u8 padding[3];
262 };
263
264
265 struct vfpf_start_rxq_tlv {
266 struct vfpf_first_tlv first_tlv;
267
268
269 u64 rxq_addr;
270 u64 deprecated_sge_addr;
271 u64 cqe_pbl_addr;
272
273 u16 cqe_pbl_size;
274 u16 hw_sb;
275 u16 rx_qid;
276 u16 hc_rate;
277
278 u16 bd_max_bytes;
279 u16 stat_id;
280 u8 sb_index;
281 u8 padding[3];
282 };
283
284 struct vfpf_start_txq_tlv {
285 struct vfpf_first_tlv first_tlv;
286
287
288 u64 pbl_addr;
289 u16 pbl_size;
290 u16 stat_id;
291 u16 tx_qid;
292 u16 hw_sb;
293
294 u32 flags;
295 u16 hc_rate;
296 u8 sb_index;
297 u8 padding[3];
298 };
299
300
301 struct vfpf_stop_rxqs_tlv {
302 struct vfpf_first_tlv first_tlv;
303
304 u16 rx_qid;
305
306
307 u8 num_rxqs;
308 u8 cqe_completion;
309 u8 padding[4];
310 };
311
312
313 struct vfpf_stop_txqs_tlv {
314 struct vfpf_first_tlv first_tlv;
315
316 u16 tx_qid;
317
318
319 u8 num_txqs;
320 u8 padding[5];
321 };
322
323 struct vfpf_update_rxq_tlv {
324 struct vfpf_first_tlv first_tlv;
325
326 u64 deprecated_sge_addr[PFVF_MAX_QUEUES_PER_VF];
327
328 u16 rx_qid;
329 u8 num_rxqs;
330 u8 flags;
331 #define VFPF_RXQ_UPD_INIT_SGE_DEPRECATE_FLAG BIT(0)
332 #define VFPF_RXQ_UPD_COMPLETE_CQE_FLAG BIT(1)
333 #define VFPF_RXQ_UPD_COMPLETE_EVENT_FLAG BIT(2)
334
335 u8 padding[4];
336 };
337
338
339 struct vfpf_q_mac_vlan_filter {
340 u32 flags;
341 #define VFPF_Q_FILTER_DEST_MAC_VALID 0x01
342 #define VFPF_Q_FILTER_VLAN_TAG_VALID 0x02
343 #define VFPF_Q_FILTER_SET_MAC 0x100
344
345 u8 mac[ETH_ALEN];
346 u16 vlan_tag;
347
348 u8 padding[4];
349 };
350
351
352 struct vfpf_vport_start_tlv {
353 struct vfpf_first_tlv first_tlv;
354
355 u64 sb_addr[PFVF_MAX_SBS_PER_VF];
356
357 u32 tpa_mode;
358 u16 dep1;
359 u16 mtu;
360
361 u8 vport_id;
362 u8 inner_vlan_removal;
363
364 u8 only_untagged;
365 u8 max_buffers_per_cqe;
366
367 u8 padding[4];
368 };
369
370
371 struct vfpf_vport_update_activate_tlv {
372 struct channel_tlv tl;
373 u8 update_rx;
374 u8 update_tx;
375 u8 active_rx;
376 u8 active_tx;
377 };
378
379 struct vfpf_vport_update_tx_switch_tlv {
380 struct channel_tlv tl;
381 u8 tx_switching;
382 u8 padding[3];
383 };
384
385 struct vfpf_vport_update_vlan_strip_tlv {
386 struct channel_tlv tl;
387 u8 remove_vlan;
388 u8 padding[3];
389 };
390
391 struct vfpf_vport_update_mcast_bin_tlv {
392 struct channel_tlv tl;
393 u8 padding[4];
394
395
396
397
398
399 u64 bins[4];
400 u64 obsolete_bins[4];
401 };
402
403 struct vfpf_vport_update_accept_param_tlv {
404 struct channel_tlv tl;
405 u8 update_rx_mode;
406 u8 update_tx_mode;
407 u8 rx_accept_filter;
408 u8 tx_accept_filter;
409 };
410
411 struct vfpf_vport_update_accept_any_vlan_tlv {
412 struct channel_tlv tl;
413 u8 update_accept_any_vlan_flg;
414 u8 accept_any_vlan;
415
416 u8 padding[2];
417 };
418
419 struct vfpf_vport_update_sge_tpa_tlv {
420 struct channel_tlv tl;
421
422 u16 sge_tpa_flags;
423 #define VFPF_TPA_IPV4_EN_FLAG BIT(0)
424 #define VFPF_TPA_IPV6_EN_FLAG BIT(1)
425 #define VFPF_TPA_PKT_SPLIT_FLAG BIT(2)
426 #define VFPF_TPA_HDR_DATA_SPLIT_FLAG BIT(3)
427 #define VFPF_TPA_GRO_CONSIST_FLAG BIT(4)
428
429 u8 update_sge_tpa_flags;
430 #define VFPF_UPDATE_SGE_DEPRECATED_FLAG BIT(0)
431 #define VFPF_UPDATE_TPA_EN_FLAG BIT(1)
432 #define VFPF_UPDATE_TPA_PARAM_FLAG BIT(2)
433
434 u8 max_buffers_per_cqe;
435
436 u16 deprecated_sge_buff_size;
437 u16 tpa_max_size;
438 u16 tpa_min_size_to_start;
439 u16 tpa_min_size_to_cont;
440
441 u8 tpa_max_aggs_num;
442 u8 padding[7];
443 };
444
445
446
447
448 struct vfpf_vport_update_tlv {
449 struct vfpf_first_tlv first_tlv;
450 };
451
452 struct vfpf_ucast_filter_tlv {
453 struct vfpf_first_tlv first_tlv;
454
455 u8 opcode;
456 u8 type;
457
458 u8 mac[ETH_ALEN];
459
460 u16 vlan;
461 u16 padding[3];
462 };
463
464
465 struct vfpf_update_tunn_param_tlv {
466 struct vfpf_first_tlv first_tlv;
467
468 u8 tun_mode_update_mask;
469 u8 tunn_mode;
470 u8 update_tun_cls;
471 u8 vxlan_clss;
472 u8 l2gre_clss;
473 u8 ipgre_clss;
474 u8 l2geneve_clss;
475 u8 ipgeneve_clss;
476 u8 update_geneve_port;
477 u8 update_vxlan_port;
478 u16 geneve_port;
479 u16 vxlan_port;
480 u8 padding[2];
481 };
482
483 struct pfvf_update_tunn_param_tlv {
484 struct pfvf_tlv hdr;
485
486 u16 tunn_feature_mask;
487 u8 vxlan_mode;
488 u8 l2geneve_mode;
489 u8 ipgeneve_mode;
490 u8 l2gre_mode;
491 u8 ipgre_mode;
492 u8 vxlan_clss;
493 u8 l2gre_clss;
494 u8 ipgre_clss;
495 u8 l2geneve_clss;
496 u8 ipgeneve_clss;
497 u16 vxlan_udp_port;
498 u16 geneve_udp_port;
499 };
500
501 struct tlv_buffer_size {
502 u8 tlv_buffer[TLV_BUFFER_SIZE];
503 };
504
505 struct vfpf_update_coalesce {
506 struct vfpf_first_tlv first_tlv;
507 u16 rx_coal;
508 u16 tx_coal;
509 u16 qid;
510 u8 padding[2];
511 };
512
513 struct vfpf_read_coal_req_tlv {
514 struct vfpf_first_tlv first_tlv;
515 u16 qid;
516 u8 is_rx;
517 u8 padding[5];
518 };
519
520 struct pfvf_read_coal_resp_tlv {
521 struct pfvf_tlv hdr;
522 u16 coal;
523 u8 padding[6];
524 };
525
526 struct vfpf_bulletin_update_mac_tlv {
527 struct vfpf_first_tlv first_tlv;
528 u8 mac[ETH_ALEN];
529 u8 padding[2];
530 };
531
532 union vfpf_tlvs {
533 struct vfpf_first_tlv first_tlv;
534 struct vfpf_acquire_tlv acquire;
535 struct vfpf_start_rxq_tlv start_rxq;
536 struct vfpf_start_txq_tlv start_txq;
537 struct vfpf_stop_rxqs_tlv stop_rxqs;
538 struct vfpf_stop_txqs_tlv stop_txqs;
539 struct vfpf_update_rxq_tlv update_rxq;
540 struct vfpf_vport_start_tlv start_vport;
541 struct vfpf_vport_update_tlv vport_update;
542 struct vfpf_ucast_filter_tlv ucast_filter;
543 struct vfpf_update_tunn_param_tlv tunn_param_update;
544 struct vfpf_update_coalesce update_coalesce;
545 struct vfpf_read_coal_req_tlv read_coal_req;
546 struct vfpf_bulletin_update_mac_tlv bulletin_update_mac;
547 struct tlv_buffer_size tlv_buf_size;
548 };
549
550 union pfvf_tlvs {
551 struct pfvf_def_resp_tlv default_resp;
552 struct pfvf_acquire_resp_tlv acquire_resp;
553 struct tlv_buffer_size tlv_buf_size;
554 struct pfvf_start_queue_resp_tlv queue_start;
555 struct pfvf_update_tunn_param_tlv tunn_param_resp;
556 struct pfvf_read_coal_resp_tlv read_coal_resp;
557 };
558
559 enum qed_bulletin_bit {
560
561 MAC_ADDR_FORCED = 0,
562
563 VLAN_ADDR_FORCED = 2,
564
565
566 VFPF_BULLETIN_UNTAGGED_DEFAULT = 3,
567 VFPF_BULLETIN_UNTAGGED_DEFAULT_FORCED = 4,
568
569
570
571
572 VFPF_BULLETIN_MAC_ADDR = 5
573 };
574
575 struct qed_bulletin_content {
576
577 u32 crc;
578
579 u32 version;
580
581
582 u64 valid_bitmap;
583
584
585 u8 mac[ETH_ALEN];
586
587
588 u8 default_only_untagged;
589 u8 padding;
590
591
592
593
594
595
596 u8 req_autoneg;
597 u8 req_autoneg_pause;
598 u8 req_forced_rx;
599 u8 req_forced_tx;
600 u8 padding2[4];
601
602 u32 req_adv_speed;
603 u32 req_forced_speed;
604 u32 req_loopback;
605 u32 padding3;
606
607 u8 link_up;
608 u8 full_duplex;
609 u8 autoneg;
610 u8 autoneg_complete;
611 u8 parallel_detection;
612 u8 pfc_enabled;
613 u8 partner_tx_flow_ctrl_en;
614 u8 partner_rx_flow_ctrl_en;
615 u8 partner_adv_pause;
616 u8 sfp_tx_fault;
617 u16 vxlan_udp_port;
618 u16 geneve_udp_port;
619 u8 padding4[2];
620
621 u32 speed;
622 u32 partner_adv_speed;
623
624 u32 capability_speed;
625
626
627 u16 pvid;
628 u16 padding5;
629 };
630
631 struct qed_bulletin {
632 dma_addr_t phys;
633 struct qed_bulletin_content *p_virt;
634 u32 size;
635 };
636
637 enum {
638 CHANNEL_TLV_NONE,
639 CHANNEL_TLV_ACQUIRE,
640 CHANNEL_TLV_VPORT_START,
641 CHANNEL_TLV_VPORT_UPDATE,
642 CHANNEL_TLV_VPORT_TEARDOWN,
643 CHANNEL_TLV_START_RXQ,
644 CHANNEL_TLV_START_TXQ,
645 CHANNEL_TLV_STOP_RXQS,
646 CHANNEL_TLV_STOP_TXQS,
647 CHANNEL_TLV_UPDATE_RXQ,
648 CHANNEL_TLV_INT_CLEANUP,
649 CHANNEL_TLV_CLOSE,
650 CHANNEL_TLV_RELEASE,
651 CHANNEL_TLV_LIST_END,
652 CHANNEL_TLV_UCAST_FILTER,
653 CHANNEL_TLV_VPORT_UPDATE_ACTIVATE,
654 CHANNEL_TLV_VPORT_UPDATE_TX_SWITCH,
655 CHANNEL_TLV_VPORT_UPDATE_VLAN_STRIP,
656 CHANNEL_TLV_VPORT_UPDATE_MCAST,
657 CHANNEL_TLV_VPORT_UPDATE_ACCEPT_PARAM,
658 CHANNEL_TLV_VPORT_UPDATE_RSS,
659 CHANNEL_TLV_VPORT_UPDATE_ACCEPT_ANY_VLAN,
660 CHANNEL_TLV_VPORT_UPDATE_SGE_TPA,
661 CHANNEL_TLV_UPDATE_TUNN_PARAM,
662 CHANNEL_TLV_COALESCE_UPDATE,
663 CHANNEL_TLV_QID,
664 CHANNEL_TLV_COALESCE_READ,
665 CHANNEL_TLV_BULLETIN_UPDATE_MAC,
666 CHANNEL_TLV_MAX,
667
668
669
670
671 CHANNEL_TLV_VPORT_UPDATE_MAX = CHANNEL_TLV_VPORT_UPDATE_SGE_TPA + 1,
672 };
673
674
675
676
677 #define QED_ETH_VF_DEFAULT_NUM_CIDS (32)
678 #define QED_ETH_VF_MAX_NUM_CIDS (250)
679
680
681 struct qed_vf_iov {
682 union vfpf_tlvs *vf2pf_request;
683 dma_addr_t vf2pf_request_phys;
684 union pfvf_tlvs *pf2vf_reply;
685 dma_addr_t pf2vf_reply_phys;
686
687
688 struct mutex mutex;
689 u8 *offset;
690
691
692 struct qed_bulletin bulletin;
693 struct qed_bulletin_content bulletin_shadow;
694
695
696 struct pfvf_acquire_resp_tlv acquire_resp;
697
698
699
700
701 bool b_pre_fp_hsi;
702
703
704
705
706
707
708
709 struct qed_sb_info *sbs_info[PFVF_MAX_SBS_PER_VF];
710
711
712
713
714 bool b_doorbell_bar;
715 };
716
717
718
719
720
721
722
723
724
725
726
727 int qed_vf_pf_set_coalesce(struct qed_hwfn *p_hwfn,
728 u16 rx_coal,
729 u16 tx_coal, struct qed_queue_cid *p_cid);
730
731
732
733
734
735
736
737
738
739 int qed_vf_pf_get_coalesce(struct qed_hwfn *p_hwfn,
740 u16 *p_coal, struct qed_queue_cid *p_cid);
741
742 #ifdef CONFIG_QED_SRIOV
743
744
745
746
747
748
749
750
751 int qed_vf_read_bulletin(struct qed_hwfn *p_hwfn, u8 *p_change);
752
753
754
755
756
757
758
759 void qed_vf_get_link_params(struct qed_hwfn *p_hwfn,
760 struct qed_mcp_link_params *params);
761
762
763
764
765
766
767
768 void qed_vf_get_link_state(struct qed_hwfn *p_hwfn,
769 struct qed_mcp_link_state *link);
770
771
772
773
774
775
776
777 void qed_vf_get_link_caps(struct qed_hwfn *p_hwfn,
778 struct qed_mcp_link_capabilities *p_link_caps);
779
780
781
782
783
784
785
786 void qed_vf_get_num_rxqs(struct qed_hwfn *p_hwfn, u8 *num_rxqs);
787
788
789
790
791
792
793
794 void qed_vf_get_num_txqs(struct qed_hwfn *p_hwfn, u8 *num_txqs);
795
796
797
798
799
800
801
802 void qed_vf_get_num_cids(struct qed_hwfn *p_hwfn, u8 *num_cids);
803
804
805
806
807
808
809
810 void qed_vf_get_port_mac(struct qed_hwfn *p_hwfn, u8 *port_mac);
811
812
813
814
815
816
817
818 void qed_vf_get_num_vlan_filters(struct qed_hwfn *p_hwfn,
819 u8 *num_vlan_filters);
820
821
822
823
824
825
826
827 void qed_vf_get_num_mac_filters(struct qed_hwfn *p_hwfn, u8 *num_mac_filters);
828
829
830
831
832
833
834
835
836
837 bool qed_vf_check_mac(struct qed_hwfn *p_hwfn, u8 *mac);
838
839
840
841
842
843
844
845
846
847
848 void qed_vf_get_fw_version(struct qed_hwfn *p_hwfn,
849 u16 *fw_major, u16 *fw_minor,
850 u16 *fw_rev, u16 *fw_eng);
851
852
853
854
855
856
857
858
859
860 int qed_vf_hw_prepare(struct qed_hwfn *p_hwfn);
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875 int qed_vf_pf_rxq_start(struct qed_hwfn *p_hwfn,
876 struct qed_queue_cid *p_cid,
877 u16 bd_max_bytes,
878 dma_addr_t bd_chain_phys_addr,
879 dma_addr_t cqe_pbl_addr,
880 u16 cqe_pbl_size, void __iomem **pp_prod);
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896 int
897 qed_vf_pf_txq_start(struct qed_hwfn *p_hwfn,
898 struct qed_queue_cid *p_cid,
899 dma_addr_t pbl_addr,
900 u16 pbl_size, void __iomem **pp_doorbell);
901
902
903
904
905
906
907
908
909
910
911 int qed_vf_pf_rxq_stop(struct qed_hwfn *p_hwfn,
912 struct qed_queue_cid *p_cid, bool cqe_completion);
913
914
915
916
917
918
919
920
921
922 int qed_vf_pf_txq_stop(struct qed_hwfn *p_hwfn, struct qed_queue_cid *p_cid);
923
924
925
926
927
928
929
930
931
932 int qed_vf_pf_vport_update(struct qed_hwfn *p_hwfn,
933 struct qed_sp_vport_update_params *p_params);
934
935
936
937
938
939
940
941
942
943 int qed_vf_pf_reset(struct qed_hwfn *p_hwfn);
944
945
946
947
948
949
950
951
952 int qed_vf_pf_release(struct qed_hwfn *p_hwfn);
953
954
955
956
957
958
959
960
961
962
963 u16 qed_vf_get_igu_sb_id(struct qed_hwfn *p_hwfn, u16 sb_id);
964
965
966
967
968
969
970
971
972 void qed_vf_set_sb_info(struct qed_hwfn *p_hwfn,
973 u16 sb_id, struct qed_sb_info *p_sb);
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988 int qed_vf_pf_vport_start(struct qed_hwfn *p_hwfn,
989 u8 vport_id,
990 u16 mtu,
991 u8 inner_vlan_removal,
992 enum qed_tpa_mode tpa_mode,
993 u8 max_buffers_per_cqe, u8 only_untagged);
994
995
996
997
998
999
1000
1001
1002 int qed_vf_pf_vport_stop(struct qed_hwfn *p_hwfn);
1003
1004 int qed_vf_pf_filter_ucast(struct qed_hwfn *p_hwfn,
1005 struct qed_filter_ucast *p_param);
1006
1007 void qed_vf_pf_filter_mcast(struct qed_hwfn *p_hwfn,
1008 struct qed_filter_mcast *p_filter_cmd);
1009
1010
1011
1012
1013
1014
1015
1016
1017 int qed_vf_pf_int_cleanup(struct qed_hwfn *p_hwfn);
1018
1019
1020
1021
1022
1023
1024
1025
1026 void __qed_vf_get_link_params(struct qed_hwfn *p_hwfn,
1027 struct qed_mcp_link_params *p_params,
1028 struct qed_bulletin_content *p_bulletin);
1029
1030
1031
1032
1033
1034
1035
1036
1037 void __qed_vf_get_link_state(struct qed_hwfn *p_hwfn,
1038 struct qed_mcp_link_state *p_link,
1039 struct qed_bulletin_content *p_bulletin);
1040
1041
1042
1043
1044
1045
1046
1047
1048 void __qed_vf_get_link_caps(struct qed_hwfn *p_hwfn,
1049 struct qed_mcp_link_capabilities *p_link_caps,
1050 struct qed_bulletin_content *p_bulletin);
1051
1052 void qed_iov_vf_task(struct work_struct *work);
1053 void qed_vf_set_vf_start_tunn_update_param(struct qed_tunnel_info *p_tun);
1054 int qed_vf_pf_tunnel_param_update(struct qed_hwfn *p_hwfn,
1055 struct qed_tunnel_info *p_tunn);
1056
1057 u32 qed_vf_hw_bar_size(struct qed_hwfn *p_hwfn, enum BAR_ID bar_id);
1058
1059
1060
1061
1062
1063 int qed_vf_pf_bulletin_update_mac(struct qed_hwfn *p_hwfn, u8 *p_mac);
1064
1065 #else
1066 static inline void qed_vf_get_link_params(struct qed_hwfn *p_hwfn,
1067 struct qed_mcp_link_params *params)
1068 {
1069 }
1070
1071 static inline void qed_vf_get_link_state(struct qed_hwfn *p_hwfn,
1072 struct qed_mcp_link_state *link)
1073 {
1074 }
1075
1076 static inline void
1077 qed_vf_get_link_caps(struct qed_hwfn *p_hwfn,
1078 struct qed_mcp_link_capabilities *p_link_caps)
1079 {
1080 }
1081
1082 static inline void qed_vf_get_num_rxqs(struct qed_hwfn *p_hwfn, u8 *num_rxqs)
1083 {
1084 }
1085
1086 static inline void qed_vf_get_num_txqs(struct qed_hwfn *p_hwfn, u8 *num_txqs)
1087 {
1088 }
1089
1090 static inline void qed_vf_get_num_cids(struct qed_hwfn *p_hwfn, u8 *num_cids)
1091 {
1092 }
1093
1094 static inline void qed_vf_get_port_mac(struct qed_hwfn *p_hwfn, u8 *port_mac)
1095 {
1096 }
1097
1098 static inline void qed_vf_get_num_vlan_filters(struct qed_hwfn *p_hwfn,
1099 u8 *num_vlan_filters)
1100 {
1101 }
1102
1103 static inline void qed_vf_get_num_mac_filters(struct qed_hwfn *p_hwfn,
1104 u8 *num_mac_filters)
1105 {
1106 }
1107
1108 static inline bool qed_vf_check_mac(struct qed_hwfn *p_hwfn, u8 *mac)
1109 {
1110 return false;
1111 }
1112
1113 static inline void qed_vf_get_fw_version(struct qed_hwfn *p_hwfn,
1114 u16 *fw_major, u16 *fw_minor,
1115 u16 *fw_rev, u16 *fw_eng)
1116 {
1117 }
1118
1119 static inline int qed_vf_hw_prepare(struct qed_hwfn *p_hwfn)
1120 {
1121 return -EINVAL;
1122 }
1123
1124 static inline int qed_vf_pf_rxq_start(struct qed_hwfn *p_hwfn,
1125 struct qed_queue_cid *p_cid,
1126 u16 bd_max_bytes,
1127 dma_addr_t bd_chain_phys_adr,
1128 dma_addr_t cqe_pbl_addr,
1129 u16 cqe_pbl_size, void __iomem **pp_prod)
1130 {
1131 return -EINVAL;
1132 }
1133
1134 static inline int qed_vf_pf_txq_start(struct qed_hwfn *p_hwfn,
1135 struct qed_queue_cid *p_cid,
1136 dma_addr_t pbl_addr,
1137 u16 pbl_size, void __iomem **pp_doorbell)
1138 {
1139 return -EINVAL;
1140 }
1141
1142 static inline int qed_vf_pf_rxq_stop(struct qed_hwfn *p_hwfn,
1143 struct qed_queue_cid *p_cid,
1144 bool cqe_completion)
1145 {
1146 return -EINVAL;
1147 }
1148
1149 static inline int qed_vf_pf_txq_stop(struct qed_hwfn *p_hwfn,
1150 struct qed_queue_cid *p_cid)
1151 {
1152 return -EINVAL;
1153 }
1154
1155 static inline int
1156 qed_vf_pf_vport_update(struct qed_hwfn *p_hwfn,
1157 struct qed_sp_vport_update_params *p_params)
1158 {
1159 return -EINVAL;
1160 }
1161
1162 static inline int qed_vf_pf_reset(struct qed_hwfn *p_hwfn)
1163 {
1164 return -EINVAL;
1165 }
1166
1167 static inline int qed_vf_pf_release(struct qed_hwfn *p_hwfn)
1168 {
1169 return -EINVAL;
1170 }
1171
1172 static inline u16 qed_vf_get_igu_sb_id(struct qed_hwfn *p_hwfn, u16 sb_id)
1173 {
1174 return 0;
1175 }
1176
1177 static inline void qed_vf_set_sb_info(struct qed_hwfn *p_hwfn, u16 sb_id,
1178 struct qed_sb_info *p_sb)
1179 {
1180 }
1181
1182 static inline int qed_vf_pf_vport_start(struct qed_hwfn *p_hwfn,
1183 u8 vport_id,
1184 u16 mtu,
1185 u8 inner_vlan_removal,
1186 enum qed_tpa_mode tpa_mode,
1187 u8 max_buffers_per_cqe,
1188 u8 only_untagged)
1189 {
1190 return -EINVAL;
1191 }
1192
1193 static inline int qed_vf_pf_vport_stop(struct qed_hwfn *p_hwfn)
1194 {
1195 return -EINVAL;
1196 }
1197
1198 static inline int qed_vf_pf_filter_ucast(struct qed_hwfn *p_hwfn,
1199 struct qed_filter_ucast *p_param)
1200 {
1201 return -EINVAL;
1202 }
1203
1204 static inline void qed_vf_pf_filter_mcast(struct qed_hwfn *p_hwfn,
1205 struct qed_filter_mcast *p_filter_cmd)
1206 {
1207 }
1208
1209 static inline int qed_vf_pf_int_cleanup(struct qed_hwfn *p_hwfn)
1210 {
1211 return -EINVAL;
1212 }
1213
1214 static inline void __qed_vf_get_link_params(struct qed_hwfn *p_hwfn,
1215 struct qed_mcp_link_params
1216 *p_params,
1217 struct qed_bulletin_content
1218 *p_bulletin)
1219 {
1220 }
1221
1222 static inline void __qed_vf_get_link_state(struct qed_hwfn *p_hwfn,
1223 struct qed_mcp_link_state *p_link,
1224 struct qed_bulletin_content
1225 *p_bulletin)
1226 {
1227 }
1228
1229 static inline void
1230 __qed_vf_get_link_caps(struct qed_hwfn *p_hwfn,
1231 struct qed_mcp_link_capabilities *p_link_caps,
1232 struct qed_bulletin_content *p_bulletin)
1233 {
1234 }
1235
1236 static inline void qed_iov_vf_task(struct work_struct *work)
1237 {
1238 }
1239
1240 static inline void
1241 qed_vf_set_vf_start_tunn_update_param(struct qed_tunnel_info *p_tun)
1242 {
1243 }
1244
1245 static inline int qed_vf_pf_tunnel_param_update(struct qed_hwfn *p_hwfn,
1246 struct qed_tunnel_info *p_tunn)
1247 {
1248 return -EINVAL;
1249 }
1250
1251 static inline int qed_vf_pf_bulletin_update_mac(struct qed_hwfn *p_hwfn,
1252 u8 *p_mac)
1253 {
1254 return -EINVAL;
1255 }
1256
1257 static inline u32
1258 qed_vf_hw_bar_size(struct qed_hwfn *p_hwfn,
1259 enum BAR_ID bar_id)
1260 {
1261 return 0;
1262 }
1263 #endif
1264
1265 #endif