Lines Matching refs:pfvf

71 	otx2_read64(pfvf, NIX_LF_RX_STATX(reg))
73 otx2_read64(pfvf, NIX_LF_TX_STATX(reg))
181 struct otx2_nic *pfvf; member
579 static inline void otx2_setup_dev_hw_settings(struct otx2_nic *pfvf) in otx2_setup_dev_hw_settings() argument
581 struct otx2_hw *hw = &pfvf->hw; in otx2_setup_dev_hw_settings()
583 pfvf->hw.cq_time_wait = CQ_TIMER_THRESH_DEFAULT; in otx2_setup_dev_hw_settings()
584 pfvf->hw.cq_ecount_wait = CQ_CQE_THRESH_DEFAULT; in otx2_setup_dev_hw_settings()
585 pfvf->hw.cq_qcount_wait = CQ_QCOUNT_DEFAULT; in otx2_setup_dev_hw_settings()
589 if (is_96xx_A0(pfvf->pdev)) { in otx2_setup_dev_hw_settings()
593 pfvf->hw.cq_qcount_wait = 0x0; in otx2_setup_dev_hw_settings()
598 pfvf->hw.rq_skid = 600; in otx2_setup_dev_hw_settings()
599 pfvf->qset.rqe_cnt = Q_COUNT(Q_SIZE_1K); in otx2_setup_dev_hw_settings()
601 if (is_96xx_B0(pfvf->pdev)) in otx2_setup_dev_hw_settings()
604 if (!is_dev_otx2(pfvf->pdev)) { in otx2_setup_dev_hw_settings()
612 if (is_dev_cn10kb(pfvf->pdev)) in otx2_setup_dev_hw_settings()
726 static inline void __cn10k_aura_freeptr(struct otx2_nic *pfvf, u64 aura, in __cn10k_aura_freeptr() argument
733 lmt_info = per_cpu_ptr(pfvf->hw.lmt_info, smp_processor_id()); in __cn10k_aura_freeptr()
734 tar_addr = (__force u64)otx2_get_regaddr(pfvf, NPA_LF_AURA_BATCH_FREE0); in __cn10k_aura_freeptr()
760 struct otx2_nic *pfvf = dev; in cn10k_aura_freeptr() local
766 __cn10k_aura_freeptr(pfvf, aura, ptrs, 2); in cn10k_aura_freeptr()
771 static inline u64 otx2_aura_allocptr(struct otx2_nic *pfvf, int aura) in otx2_aura_allocptr() argument
773 u64 *ptr = (__force u64 *)otx2_get_regaddr(pfvf, NPA_LF_AURA_OP_ALLOCX(0)); in otx2_aura_allocptr()
782 struct otx2_nic *pfvf = dev; in otx2_aura_freeptr() local
783 void __iomem *addr = otx2_get_regaddr(pfvf, NPA_LF_AURA_OP_FREE0); in otx2_aura_freeptr()
788 static inline int otx2_get_pool_idx(struct otx2_nic *pfvf, int type, int idx) in otx2_get_pool_idx() argument
791 return pfvf->hw.rqpool_cnt + idx; in otx2_get_pool_idx()
865 otx2_mbox_up_handler_ ## _fn_name(struct otx2_nic *pfvf, \
891 static inline dma_addr_t otx2_dma_map_page(struct otx2_nic *pfvf, in otx2_dma_map_page() argument
898 iova = dma_map_page_attrs(pfvf->dev, page, in otx2_dma_map_page()
900 if (unlikely(dma_mapping_error(pfvf->dev, iova))) in otx2_dma_map_page()
905 static inline void otx2_dma_unmap_page(struct otx2_nic *pfvf, in otx2_dma_unmap_page() argument
909 dma_unmap_page_attrs(pfvf->dev, addr, size, in otx2_dma_unmap_page()
913 static inline u16 otx2_get_smq_idx(struct otx2_nic *pfvf, u16 qidx) in otx2_get_smq_idx() argument
917 if (qidx < NIX_PF_PFC_PRIO_MAX && pfvf->pfc_alloc_status[qidx]) in otx2_get_smq_idx()
918 return pfvf->pfc_schq_list[NIX_TXSCH_LVL_SMQ][qidx]; in otx2_get_smq_idx()
921 if (qidx >= pfvf->hw.non_qos_queues) in otx2_get_smq_idx()
922 smq = pfvf->qos.qid_to_sqmap[qidx - pfvf->hw.non_qos_queues]; in otx2_get_smq_idx()
924 smq = pfvf->hw.txschq_list[NIX_TXSCH_LVL_SMQ][0]; in otx2_get_smq_idx()
929 static inline u16 otx2_get_total_tx_queues(struct otx2_nic *pfvf) in otx2_get_total_tx_queues() argument
931 return pfvf->hw.non_qos_queues + pfvf->hw.tc_tx_queues; in otx2_get_total_tx_queues()
945 static inline int otx2_tc_flower_rule_cnt(struct otx2_nic *pfvf) in otx2_tc_flower_rule_cnt() argument
948 if (!pfvf->flow_cfg) in otx2_tc_flower_rule_cnt()
951 return pfvf->flow_cfg->nr_flows; in otx2_tc_flower_rule_cnt()
955 void otx2_free_cints(struct otx2_nic *pfvf, int n);
956 void otx2_set_cints_affinity(struct otx2_nic *pfvf);
958 int otx2_hw_set_mtu(struct otx2_nic *pfvf, int mtu);
961 void otx2_config_irq_coalescing(struct otx2_nic *pfvf, int qidx);
962 int otx2_config_pause_frm(struct otx2_nic *pfvf);
963 void otx2_setup_segmentation(struct otx2_nic *pfvf);
966 int otx2_attach_npa_nix(struct otx2_nic *pfvf);
968 int otx2_config_npa(struct otx2_nic *pfvf);
969 int otx2_sq_aura_pool_init(struct otx2_nic *pfvf);
970 int otx2_rq_aura_pool_init(struct otx2_nic *pfvf);
971 void otx2_aura_pool_free(struct otx2_nic *pfvf);
972 void otx2_free_aura_ptr(struct otx2_nic *pfvf, int type);
973 void otx2_sq_free_sqbs(struct otx2_nic *pfvf);
974 int otx2_config_nix(struct otx2_nic *pfvf);
975 int otx2_config_nix_queues(struct otx2_nic *pfvf);
976 int otx2_txschq_config(struct otx2_nic *pfvf, int lvl, int prio, bool pfc_en);
977 int otx2_txsch_alloc(struct otx2_nic *pfvf);
978 void otx2_txschq_stop(struct otx2_nic *pfvf);
979 void otx2_txschq_free_one(struct otx2_nic *pfvf, u16 lvl, u16 schq);
980 void otx2_free_pending_sqe(struct otx2_nic *pfvf);
981 void otx2_sqb_flush(struct otx2_nic *pfvf);
982 int otx2_alloc_rbuf(struct otx2_nic *pfvf, struct otx2_pool *pool,
984 int otx2_rxtx_enable(struct otx2_nic *pfvf, bool enable);
986 int otx2_nix_config_bp(struct otx2_nic *pfvf, bool enable);
987 void otx2_cleanup_rx_cqes(struct otx2_nic *pfvf, struct otx2_cq_queue *cq, int qidx);
988 void otx2_cleanup_tx_cqes(struct otx2_nic *pfvf, struct otx2_cq_queue *cq);
989 int otx2_sq_init(struct otx2_nic *pfvf, u16 qidx, u16 sqb_aura);
992 int otx2_alloc_buffer(struct otx2_nic *pfvf, struct otx2_cq_queue *cq,
994 int otx2_pool_init(struct otx2_nic *pfvf, u16 pool_id,
996 int otx2_aura_init(struct otx2_nic *pfvf, int aura_id,
1000 int otx2_rss_init(struct otx2_nic *pfvf);
1001 int otx2_set_flowkey_cfg(struct otx2_nic *pfvf);
1002 void otx2_set_rss_key(struct otx2_nic *pfvf);
1003 int otx2_set_rss_table(struct otx2_nic *pfvf, int ctx_id);
1006 void mbox_handler_msix_offset(struct otx2_nic *pfvf,
1008 void mbox_handler_npa_lf_alloc(struct otx2_nic *pfvf,
1010 void mbox_handler_nix_lf_alloc(struct otx2_nic *pfvf,
1014 void mbox_handler_cgx_stats(struct otx2_nic *pfvf,
1016 void mbox_handler_cgx_fec_stats(struct otx2_nic *pfvf,
1018 void otx2_set_fec_stats_count(struct otx2_nic *pfvf);
1019 void mbox_handler_nix_bp_enable(struct otx2_nic *pfvf,
1023 void otx2_get_dev_stats(struct otx2_nic *pfvf);
1026 void otx2_update_lmac_stats(struct otx2_nic *pfvf);
1027 void otx2_update_lmac_fec_stats(struct otx2_nic *pfvf);
1028 int otx2_update_rq_stats(struct otx2_nic *pfvf, int qidx);
1029 int otx2_update_sq_stats(struct otx2_nic *pfvf, int qidx);
1042 int otx2vf_mcam_flow_init(struct otx2_nic *pfvf);
1043 int otx2_alloc_mcam_entries(struct otx2_nic *pfvf, u16 count);
1046 int otx2_destroy_mcam_flows(struct otx2_nic *pfvf);
1047 int otx2_get_flow(struct otx2_nic *pfvf,
1049 int otx2_get_all_flows(struct otx2_nic *pfvf,
1051 int otx2_add_flow(struct otx2_nic *pfvf,
1053 int otx2_remove_flow(struct otx2_nic *pfvf, u32 location);
1055 void otx2_rss_ctx_flow_del(struct otx2_nic *pfvf, int ctx_id);
1059 int otx2_install_rxvlan_offload_flow(struct otx2_nic *pfvf);
1060 bool otx2_xdp_sq_append_pkt(struct otx2_nic *pfvf, u64 iova, int len, u16 qidx);
1061 u16 otx2_get_max_mtu(struct otx2_nic *pfvf);
1064 int otx2_smq_flush(struct otx2_nic *pfvf, int smq);
1065 void otx2_free_bufs(struct otx2_nic *pfvf, struct otx2_pool *pool,
1081 void otx2_dmacflt_update_pfmac_flow(struct otx2_nic *pfvf);
1085 void otx2_update_bpid_in_rqctx(struct otx2_nic *pfvf, int vlan_prio, int qidx, bool pfc_enable);
1086 int otx2_config_priority_flow_ctrl(struct otx2_nic *pfvf);
1089 int otx2_pfc_txschq_config(struct otx2_nic *pfvf);
1090 int otx2_pfc_txschq_alloc(struct otx2_nic *pfvf);
1091 int otx2_pfc_txschq_update(struct otx2_nic *pfvf);
1092 int otx2_pfc_txschq_stop(struct otx2_nic *pfvf);
1097 int cn10k_mcs_init(struct otx2_nic *pfvf);
1098 void cn10k_mcs_free(struct otx2_nic *pfvf);
1099 void cn10k_handle_mcs_event(struct otx2_nic *pfvf, struct mcs_intr_info *event);
1101 static inline int cn10k_mcs_init(struct otx2_nic *pfvf) { return 0; } in cn10k_mcs_init() argument
1102 static inline void cn10k_mcs_free(struct otx2_nic *pfvf) {} in cn10k_mcs_free() argument
1103 static inline void cn10k_handle_mcs_event(struct otx2_nic *pfvf, in cn10k_handle_mcs_event() argument
1109 static inline void otx2_qos_init(struct otx2_nic *pfvf, int qos_txqs) in otx2_qos_init() argument
1111 struct otx2_hw *hw = &pfvf->hw; in otx2_qos_init()
1114 INIT_LIST_HEAD(&pfvf->qos.qos_tree); in otx2_qos_init()
1115 mutex_init(&pfvf->qos.qos_lock); in otx2_qos_init()
1118 static inline void otx2_shutdown_qos(struct otx2_nic *pfvf) in otx2_shutdown_qos() argument
1120 mutex_destroy(&pfvf->qos.qos_lock); in otx2_shutdown_qos()
1125 int otx2_get_txq_by_classid(struct otx2_nic *pfvf, u16 classid);
1126 void otx2_qos_config_txschq(struct otx2_nic *pfvf);
1127 void otx2_clean_qos_queues(struct otx2_nic *pfvf);