Lines Matching defs:pfvf

71 	otx2_read64(pfvf, NIX_LF_RX_STATX(reg))
73 otx2_read64(pfvf, NIX_LF_TX_STATX(reg))
181 struct otx2_nic *pfvf;
581 static inline void otx2_setup_dev_hw_settings(struct otx2_nic *pfvf)
583 struct otx2_hw *hw = &pfvf->hw;
585 pfvf->hw.cq_time_wait = CQ_TIMER_THRESH_DEFAULT;
586 pfvf->hw.cq_ecount_wait = CQ_CQE_THRESH_DEFAULT;
587 pfvf->hw.cq_qcount_wait = CQ_QCOUNT_DEFAULT;
591 if (is_96xx_A0(pfvf->pdev)) {
595 pfvf->hw.cq_qcount_wait = 0x0;
600 pfvf->hw.rq_skid = 600;
601 pfvf->qset.rqe_cnt = Q_COUNT(Q_SIZE_1K);
603 if (is_96xx_B0(pfvf->pdev))
606 if (!is_dev_otx2(pfvf->pdev)) {
614 if (is_dev_cn10kb(pfvf->pdev))
728 static inline void __cn10k_aura_freeptr(struct otx2_nic *pfvf, u64 aura,
735 lmt_info = per_cpu_ptr(pfvf->hw.lmt_info, smp_processor_id());
736 tar_addr = (__force u64)otx2_get_regaddr(pfvf, NPA_LF_AURA_BATCH_FREE0);
762 struct otx2_nic *pfvf = dev;
768 __cn10k_aura_freeptr(pfvf, aura, ptrs, 2);
773 static inline u64 otx2_aura_allocptr(struct otx2_nic *pfvf, int aura)
775 u64 *ptr = (__force u64 *)otx2_get_regaddr(pfvf, NPA_LF_AURA_OP_ALLOCX(0));
784 struct otx2_nic *pfvf = dev;
785 void __iomem *addr = otx2_get_regaddr(pfvf, NPA_LF_AURA_OP_FREE0);
790 static inline int otx2_get_pool_idx(struct otx2_nic *pfvf, int type, int idx)
793 return pfvf->hw.rqpool_cnt + idx;
867 otx2_mbox_up_handler_ ## _fn_name(struct otx2_nic *pfvf, \
893 static inline dma_addr_t otx2_dma_map_page(struct otx2_nic *pfvf,
900 iova = dma_map_page_attrs(pfvf->dev, page,
902 if (unlikely(dma_mapping_error(pfvf->dev, iova)))
907 static inline void otx2_dma_unmap_page(struct otx2_nic *pfvf,
911 dma_unmap_page_attrs(pfvf->dev, addr, size,
915 static inline u16 otx2_get_smq_idx(struct otx2_nic *pfvf, u16 qidx)
919 if (qidx < NIX_PF_PFC_PRIO_MAX && pfvf->pfc_alloc_status[qidx])
920 return pfvf->pfc_schq_list[NIX_TXSCH_LVL_SMQ][qidx];
923 if (qidx >= pfvf->hw.non_qos_queues)
924 smq = pfvf->qos.qid_to_sqmap[qidx - pfvf->hw.non_qos_queues];
926 smq = pfvf->hw.txschq_list[NIX_TXSCH_LVL_SMQ][0];
931 static inline u16 otx2_get_total_tx_queues(struct otx2_nic *pfvf)
933 return pfvf->hw.non_qos_queues + pfvf->hw.tc_tx_queues;
947 static inline int otx2_tc_flower_rule_cnt(struct otx2_nic *pfvf)
950 if (!pfvf->flow_cfg)
953 return pfvf->flow_cfg->nr_flows;
957 void otx2_free_cints(struct otx2_nic *pfvf, int n);
958 void otx2_set_cints_affinity(struct otx2_nic *pfvf);
960 int otx2_hw_set_mtu(struct otx2_nic *pfvf, int mtu);
963 void otx2_config_irq_coalescing(struct otx2_nic *pfvf, int qidx);
964 int otx2_config_pause_frm(struct otx2_nic *pfvf);
965 void otx2_setup_segmentation(struct otx2_nic *pfvf);
966 int otx2_reset_mac_stats(struct otx2_nic *pfvf);
969 int otx2_attach_npa_nix(struct otx2_nic *pfvf);
971 int otx2_config_npa(struct otx2_nic *pfvf);
972 int otx2_sq_aura_pool_init(struct otx2_nic *pfvf);
973 int otx2_rq_aura_pool_init(struct otx2_nic *pfvf);
974 void otx2_aura_pool_free(struct otx2_nic *pfvf);
975 void otx2_free_aura_ptr(struct otx2_nic *pfvf, int type);
976 void otx2_sq_free_sqbs(struct otx2_nic *pfvf);
977 int otx2_config_nix(struct otx2_nic *pfvf);
978 int otx2_config_nix_queues(struct otx2_nic *pfvf);
979 int otx2_txschq_config(struct otx2_nic *pfvf, int lvl, int prio, bool pfc_en);
980 int otx2_txsch_alloc(struct otx2_nic *pfvf);
981 void otx2_txschq_stop(struct otx2_nic *pfvf);
982 void otx2_txschq_free_one(struct otx2_nic *pfvf, u16 lvl, u16 schq);
983 void otx2_free_pending_sqe(struct otx2_nic *pfvf);
984 void otx2_sqb_flush(struct otx2_nic *pfvf);
985 int otx2_alloc_rbuf(struct otx2_nic *pfvf, struct otx2_pool *pool,
987 int otx2_rxtx_enable(struct otx2_nic *pfvf, bool enable);
989 int otx2_nix_config_bp(struct otx2_nic *pfvf, bool enable);
990 void otx2_cleanup_rx_cqes(struct otx2_nic *pfvf, struct otx2_cq_queue *cq, int qidx);
991 void otx2_cleanup_tx_cqes(struct otx2_nic *pfvf, struct otx2_cq_queue *cq);
992 int otx2_sq_init(struct otx2_nic *pfvf, u16 qidx, u16 sqb_aura);
995 int otx2_alloc_buffer(struct otx2_nic *pfvf, struct otx2_cq_queue *cq,
997 int otx2_pool_init(struct otx2_nic *pfvf, u16 pool_id,
999 int otx2_aura_init(struct otx2_nic *pfvf, int aura_id,
1003 int otx2_rss_init(struct otx2_nic *pfvf);
1004 int otx2_set_flowkey_cfg(struct otx2_nic *pfvf);
1005 void otx2_set_rss_key(struct otx2_nic *pfvf);
1006 int otx2_set_rss_table(struct otx2_nic *pfvf, int ctx_id);
1009 void mbox_handler_msix_offset(struct otx2_nic *pfvf,
1011 void mbox_handler_npa_lf_alloc(struct otx2_nic *pfvf,
1013 void mbox_handler_nix_lf_alloc(struct otx2_nic *pfvf,
1017 void mbox_handler_cgx_stats(struct otx2_nic *pfvf,
1019 void mbox_handler_cgx_fec_stats(struct otx2_nic *pfvf,
1021 void otx2_set_fec_stats_count(struct otx2_nic *pfvf);
1022 void mbox_handler_nix_bp_enable(struct otx2_nic *pfvf,
1026 void otx2_get_dev_stats(struct otx2_nic *pfvf);
1029 void otx2_update_lmac_stats(struct otx2_nic *pfvf);
1030 void otx2_update_lmac_fec_stats(struct otx2_nic *pfvf);
1031 int otx2_update_rq_stats(struct otx2_nic *pfvf, int qidx);
1032 int otx2_update_sq_stats(struct otx2_nic *pfvf, int qidx);
1045 int otx2vf_mcam_flow_init(struct otx2_nic *pfvf);
1046 int otx2_alloc_mcam_entries(struct otx2_nic *pfvf, u16 count);
1049 int otx2_destroy_mcam_flows(struct otx2_nic *pfvf);
1050 int otx2_get_flow(struct otx2_nic *pfvf,
1052 int otx2_get_all_flows(struct otx2_nic *pfvf,
1054 int otx2_add_flow(struct otx2_nic *pfvf,
1056 int otx2_remove_flow(struct otx2_nic *pfvf, u32 location);
1058 void otx2_rss_ctx_flow_del(struct otx2_nic *pfvf, int ctx_id);
1062 int otx2_install_rxvlan_offload_flow(struct otx2_nic *pfvf);
1063 bool otx2_xdp_sq_append_pkt(struct otx2_nic *pfvf, u64 iova, int len, u16 qidx);
1064 u16 otx2_get_max_mtu(struct otx2_nic *pfvf);
1067 int otx2_smq_flush(struct otx2_nic *pfvf, int smq);
1068 void otx2_free_bufs(struct otx2_nic *pfvf, struct otx2_pool *pool,
1084 void otx2_dmacflt_update_pfmac_flow(struct otx2_nic *pfvf);
1088 void otx2_update_bpid_in_rqctx(struct otx2_nic *pfvf, int vlan_prio, int qidx, bool pfc_enable);
1089 int otx2_config_priority_flow_ctrl(struct otx2_nic *pfvf);
1092 int otx2_pfc_txschq_config(struct otx2_nic *pfvf);
1093 int otx2_pfc_txschq_alloc(struct otx2_nic *pfvf);
1094 int otx2_pfc_txschq_update(struct otx2_nic *pfvf);
1095 int otx2_pfc_txschq_stop(struct otx2_nic *pfvf);
1100 int cn10k_mcs_init(struct otx2_nic *pfvf);
1101 void cn10k_mcs_free(struct otx2_nic *pfvf);
1102 void cn10k_handle_mcs_event(struct otx2_nic *pfvf, struct mcs_intr_info *event);
1104 static inline int cn10k_mcs_init(struct otx2_nic *pfvf) { return 0; }
1105 static inline void cn10k_mcs_free(struct otx2_nic *pfvf) {}
1106 static inline void cn10k_handle_mcs_event(struct otx2_nic *pfvf,
1112 static inline void otx2_qos_init(struct otx2_nic *pfvf, int qos_txqs)
1114 struct otx2_hw *hw = &pfvf->hw;
1117 INIT_LIST_HEAD(&pfvf->qos.qos_tree);
1118 mutex_init(&pfvf->qos.qos_lock);
1121 static inline void otx2_shutdown_qos(struct otx2_nic *pfvf)
1123 mutex_destroy(&pfvf->qos.qos_lock);
1128 int otx2_get_txq_by_classid(struct otx2_nic *pfvf, u16 classid);
1129 void otx2_qos_config_txschq(struct otx2_nic *pfvf);
1130 void otx2_clean_qos_queues(struct otx2_nic *pfvf);