Lines Matching refs:pfvf
79 otx2_read64(pfvf, NIX_LF_RX_STATX(reg))
81 otx2_read64(pfvf, NIX_LF_TX_STATX(reg))
162 struct otx2_nic *pfvf; member
593 static inline void otx2_setup_dev_hw_settings(struct otx2_nic *pfvf) in otx2_setup_dev_hw_settings() argument
595 struct otx2_hw *hw = &pfvf->hw; in otx2_setup_dev_hw_settings()
597 pfvf->hw.cq_time_wait = CQ_TIMER_THRESH_DEFAULT; in otx2_setup_dev_hw_settings()
598 pfvf->hw.cq_ecount_wait = CQ_CQE_THRESH_DEFAULT; in otx2_setup_dev_hw_settings()
599 pfvf->hw.cq_qcount_wait = CQ_QCOUNT_DEFAULT; in otx2_setup_dev_hw_settings()
603 if (is_96xx_A0(pfvf->pdev)) { in otx2_setup_dev_hw_settings()
607 pfvf->hw.cq_qcount_wait = 0x0; in otx2_setup_dev_hw_settings()
612 pfvf->hw.rq_skid = 600; in otx2_setup_dev_hw_settings()
613 pfvf->qset.rqe_cnt = Q_COUNT(Q_SIZE_1K); in otx2_setup_dev_hw_settings()
615 if (is_96xx_B0(pfvf->pdev)) in otx2_setup_dev_hw_settings()
618 if (!is_dev_otx2(pfvf->pdev)) { in otx2_setup_dev_hw_settings()
626 if (is_dev_cn10kb(pfvf->pdev)) in otx2_setup_dev_hw_settings()
743 static inline void __cn10k_aura_freeptr(struct otx2_nic *pfvf, u64 aura, in __cn10k_aura_freeptr() argument
750 lmt_info = per_cpu_ptr(pfvf->hw.lmt_info, smp_processor_id()); in __cn10k_aura_freeptr()
751 tar_addr = (__force u64)otx2_get_regaddr(pfvf, NPA_LF_AURA_BATCH_FREE0); in __cn10k_aura_freeptr()
777 struct otx2_nic *pfvf = dev; in cn10k_aura_freeptr() local
783 __cn10k_aura_freeptr(pfvf, aura, ptrs, 2); in cn10k_aura_freeptr()
788 static inline u64 otx2_aura_allocptr(struct otx2_nic *pfvf, int aura) in otx2_aura_allocptr() argument
790 u64 *ptr = (__force u64 *)otx2_get_regaddr(pfvf, NPA_LF_AURA_OP_ALLOCX(0)); in otx2_aura_allocptr()
799 struct otx2_nic *pfvf = dev; in otx2_aura_freeptr() local
800 void __iomem *addr = otx2_get_regaddr(pfvf, NPA_LF_AURA_OP_FREE0); in otx2_aura_freeptr()
805 static inline int otx2_get_pool_idx(struct otx2_nic *pfvf, int type, int idx) in otx2_get_pool_idx() argument
808 return pfvf->hw.rqpool_cnt + idx; in otx2_get_pool_idx()
882 otx2_mbox_up_handler_ ## _fn_name(struct otx2_nic *pfvf, \
908 static inline dma_addr_t otx2_dma_map_page(struct otx2_nic *pfvf, in otx2_dma_map_page() argument
915 iova = dma_map_page_attrs(pfvf->dev, page, in otx2_dma_map_page()
917 if (unlikely(dma_mapping_error(pfvf->dev, iova))) in otx2_dma_map_page()
922 static inline void otx2_dma_unmap_page(struct otx2_nic *pfvf, in otx2_dma_unmap_page() argument
926 dma_unmap_page_attrs(pfvf->dev, addr, size, in otx2_dma_unmap_page()
930 static inline u16 otx2_get_smq_idx(struct otx2_nic *pfvf, u16 qidx) in otx2_get_smq_idx() argument
936 if (qidx < NIX_PF_PFC_PRIO_MAX && pfvf->pfc_alloc_status[qidx]) in otx2_get_smq_idx()
937 return pfvf->pfc_schq_list[NIX_TXSCH_LVL_SMQ][qidx]; in otx2_get_smq_idx()
940 if (qidx >= pfvf->hw.non_qos_queues) { in otx2_get_smq_idx()
941 smq = pfvf->qos.qid_to_sqmap[qidx - pfvf->hw.non_qos_queues]; in otx2_get_smq_idx()
943 idx = qidx % pfvf->hw.txschq_cnt[NIX_TXSCH_LVL_SMQ]; in otx2_get_smq_idx()
944 smq = pfvf->hw.txschq_list[NIX_TXSCH_LVL_SMQ][idx]; in otx2_get_smq_idx()
950 static inline u16 otx2_get_total_tx_queues(struct otx2_nic *pfvf) in otx2_get_total_tx_queues() argument
952 return pfvf->hw.non_qos_queues + pfvf->hw.tc_tx_queues; in otx2_get_total_tx_queues()
966 static inline int otx2_tc_flower_rule_cnt(struct otx2_nic *pfvf) in otx2_tc_flower_rule_cnt() argument
969 if (!pfvf->flow_cfg) in otx2_tc_flower_rule_cnt()
972 return pfvf->flow_cfg->nr_flows; in otx2_tc_flower_rule_cnt()
976 void otx2_free_cints(struct otx2_nic *pfvf, int n);
977 void otx2_set_cints_affinity(struct otx2_nic *pfvf);
979 int otx2_hw_set_mtu(struct otx2_nic *pfvf, int mtu);
982 void otx2_config_irq_coalescing(struct otx2_nic *pfvf, int qidx);
983 int otx2_config_pause_frm(struct otx2_nic *pfvf);
984 void otx2_setup_segmentation(struct otx2_nic *pfvf);
985 int otx2_reset_mac_stats(struct otx2_nic *pfvf);
988 int otx2_attach_npa_nix(struct otx2_nic *pfvf);
990 int otx2_config_npa(struct otx2_nic *pfvf);
991 int otx2_sq_aura_pool_init(struct otx2_nic *pfvf);
992 int otx2_rq_aura_pool_init(struct otx2_nic *pfvf);
993 void otx2_aura_pool_free(struct otx2_nic *pfvf);
994 void otx2_free_aura_ptr(struct otx2_nic *pfvf, int type);
995 void otx2_sq_free_sqbs(struct otx2_nic *pfvf);
996 int otx2_config_nix(struct otx2_nic *pfvf);
997 int otx2_config_nix_queues(struct otx2_nic *pfvf);
998 int otx2_txschq_config(struct otx2_nic *pfvf, int lvl, int prio, bool pfc_en);
999 int otx2_txsch_alloc(struct otx2_nic *pfvf);
1000 void otx2_txschq_stop(struct otx2_nic *pfvf);
1001 void otx2_txschq_free_one(struct otx2_nic *pfvf, u16 lvl, u16 schq);
1002 void otx2_free_pending_sqe(struct otx2_nic *pfvf);
1003 void otx2_sqb_flush(struct otx2_nic *pfvf);
1004 int otx2_alloc_rbuf(struct otx2_nic *pfvf, struct otx2_pool *pool,
1006 int otx2_rxtx_enable(struct otx2_nic *pfvf, bool enable);
1008 int otx2_nix_config_bp(struct otx2_nic *pfvf, bool enable);
1009 int otx2_nix_cpt_config_bp(struct otx2_nic *pfvf, bool enable);
1010 void otx2_cleanup_rx_cqes(struct otx2_nic *pfvf, struct otx2_cq_queue *cq, int qidx);
1011 void otx2_cleanup_tx_cqes(struct otx2_nic *pfvf, struct otx2_cq_queue *cq);
1012 int otx2_sq_init(struct otx2_nic *pfvf, u16 qidx, u16 sqb_aura);
1015 int otx2_alloc_buffer(struct otx2_nic *pfvf, struct otx2_cq_queue *cq,
1017 int otx2_pool_init(struct otx2_nic *pfvf, u16 pool_id,
1019 int otx2_aura_init(struct otx2_nic *pfvf, int aura_id,
1024 int otx2_init_hw_resources(struct otx2_nic *pfvf);
1037 int otx2_rss_init(struct otx2_nic *pfvf);
1038 int otx2_set_flowkey_cfg(struct otx2_nic *pfvf);
1039 void otx2_set_rss_key(struct otx2_nic *pfvf);
1040 int otx2_set_rss_table(struct otx2_nic *pfvf, int ctx_id);
1043 void mbox_handler_msix_offset(struct otx2_nic *pfvf,
1045 void mbox_handler_npa_lf_alloc(struct otx2_nic *pfvf,
1047 void mbox_handler_nix_lf_alloc(struct otx2_nic *pfvf,
1051 void mbox_handler_cgx_stats(struct otx2_nic *pfvf,
1053 void mbox_handler_cgx_fec_stats(struct otx2_nic *pfvf,
1055 void otx2_set_fec_stats_count(struct otx2_nic *pfvf);
1056 void mbox_handler_nix_bp_enable(struct otx2_nic *pfvf,
1060 void otx2_get_dev_stats(struct otx2_nic *pfvf);
1063 void otx2_update_lmac_stats(struct otx2_nic *pfvf);
1064 void otx2_update_lmac_fec_stats(struct otx2_nic *pfvf);
1065 int otx2_update_rq_stats(struct otx2_nic *pfvf, int qidx);
1066 int otx2_update_sq_stats(struct otx2_nic *pfvf, int qidx);
1079 int otx2vf_mcam_flow_init(struct otx2_nic *pfvf);
1080 int otx2_alloc_mcam_entries(struct otx2_nic *pfvf, u16 count);
1083 int otx2_destroy_mcam_flows(struct otx2_nic *pfvf);
1084 int otx2_get_flow(struct otx2_nic *pfvf,
1086 int otx2_get_all_flows(struct otx2_nic *pfvf,
1088 int otx2_add_flow(struct otx2_nic *pfvf,
1090 int otx2_remove_flow(struct otx2_nic *pfvf, u32 location);
1092 void otx2_rss_ctx_flow_del(struct otx2_nic *pfvf, int ctx_id);
1096 int otx2_install_rxvlan_offload_flow(struct otx2_nic *pfvf);
1097 bool otx2_xdp_sq_append_pkt(struct otx2_nic *pfvf, u64 iova, int len, u16 qidx);
1098 u16 otx2_get_max_mtu(struct otx2_nic *pfvf);
1101 int otx2_smq_flush(struct otx2_nic *pfvf, int smq);
1102 void otx2_free_bufs(struct otx2_nic *pfvf, struct otx2_pool *pool,
1104 int otx2_mcam_entry_init(struct otx2_nic *pfvf);
1119 void otx2_dmacflt_update_pfmac_flow(struct otx2_nic *pfvf);
1123 void otx2_update_bpid_in_rqctx(struct otx2_nic *pfvf, int vlan_prio, int qidx, bool pfc_enable);
1124 int otx2_config_priority_flow_ctrl(struct otx2_nic *pfvf);
1127 int otx2_pfc_txschq_config(struct otx2_nic *pfvf);
1128 int otx2_pfc_txschq_alloc(struct otx2_nic *pfvf);
1129 int otx2_pfc_txschq_update(struct otx2_nic *pfvf);
1130 int otx2_pfc_txschq_stop(struct otx2_nic *pfvf);
1135 int cn10k_mcs_init(struct otx2_nic *pfvf);
1136 void cn10k_mcs_free(struct otx2_nic *pfvf);
1137 void cn10k_handle_mcs_event(struct otx2_nic *pfvf, struct mcs_intr_info *event);
1139 static inline int cn10k_mcs_init(struct otx2_nic *pfvf) { return 0; } in cn10k_mcs_init() argument
1140 static inline void cn10k_mcs_free(struct otx2_nic *pfvf) {} in cn10k_mcs_free() argument
1141 static inline void cn10k_handle_mcs_event(struct otx2_nic *pfvf, in cn10k_handle_mcs_event() argument
1147 static inline void otx2_qos_init(struct otx2_nic *pfvf, int qos_txqs) in otx2_qos_init() argument
1149 struct otx2_hw *hw = &pfvf->hw; in otx2_qos_init()
1152 INIT_LIST_HEAD(&pfvf->qos.qos_tree); in otx2_qos_init()
1153 mutex_init(&pfvf->qos.qos_lock); in otx2_qos_init()
1156 static inline void otx2_shutdown_qos(struct otx2_nic *pfvf) in otx2_shutdown_qos() argument
1158 mutex_destroy(&pfvf->qos.qos_lock); in otx2_shutdown_qos()
1163 int otx2_get_txq_by_classid(struct otx2_nic *pfvf, u16 classid);
1164 void otx2_qos_config_txschq(struct otx2_nic *pfvf);
1165 void otx2_clean_qos_queues(struct otx2_nic *pfvf);
1175 dma_addr_t otx2_dma_map_skb_frag(struct otx2_nic *pfvf,
1177 void otx2_dma_unmap_skb_frags(struct otx2_nic *pfvf, struct sg_list *sg);