/linux-6.1.9/drivers/net/ethernet/marvell/octeontx2/af/ |
D | rvu_switch.c | 11 static int rvu_switch_install_rx_rule(struct rvu *rvu, u16 pcifunc, in rvu_switch_install_rx_rule() argument 18 pfvf = rvu_get_pfvf(rvu, pcifunc); in rvu_switch_install_rx_rule() 28 req.hdr.pcifunc = 0; /* AF is requester */ in rvu_switch_install_rx_rule() 29 req.vf = pcifunc; in rvu_switch_install_rx_rule() 40 static int rvu_switch_install_tx_rule(struct rvu *rvu, u16 pcifunc, u16 entry) in rvu_switch_install_tx_rule() argument 47 pfvf = rvu_get_pfvf(rvu, pcifunc); in rvu_switch_install_tx_rule() 58 req.hdr.pcifunc = 0; /* AF is requester */ in rvu_switch_install_tx_rule() 59 req.vf = pcifunc; in rvu_switch_install_tx_rule() 75 u16 pcifunc, entry = 0; in rvu_switch_install_rules() local 83 pcifunc = pf << 10; in rvu_switch_install_rules() [all …]
|
D | rvu_cgx.c | 414 inline bool is_cgx_config_permitted(struct rvu *rvu, u16 pcifunc) in is_cgx_config_permitted() argument 416 if ((pcifunc & RVU_PFVF_FUNC_MASK) || in is_cgx_config_permitted() 417 !is_pf_cgxmapped(rvu, rvu_get_pf(pcifunc))) in is_cgx_config_permitted() 442 int rvu_cgx_config_rxtx(struct rvu *rvu, u16 pcifunc, bool start) in rvu_cgx_config_rxtx() argument 444 int pf = rvu_get_pf(pcifunc); in rvu_cgx_config_rxtx() 449 if (!is_cgx_config_permitted(rvu, pcifunc)) in rvu_cgx_config_rxtx() 467 void rvu_cgx_disable_dmac_entries(struct rvu *rvu, u16 pcifunc) in rvu_cgx_disable_dmac_entries() argument 469 int pf = rvu_get_pf(pcifunc); in rvu_cgx_disable_dmac_entries() 475 if (!is_cgx_config_permitted(rvu, pcifunc)) in rvu_cgx_disable_dmac_entries() 479 rvu_npc_exact_reset(rvu, pcifunc); in rvu_cgx_disable_dmac_entries() [all …]
|
D | rvu_nix.c | 19 static void nix_free_tx_vtag_entries(struct rvu *rvu, u16 pcifunc); 22 static int nix_update_mce_rule(struct rvu *rvu, u16 pcifunc, 28 struct nix_hw *nix_hw, u16 pcifunc); 29 static int nix_free_all_bandprof(struct rvu *rvu, u16 pcifunc); 79 u16 pcifunc; member 99 bool is_nixlf_attached(struct rvu *rvu, u16 pcifunc) in is_nixlf_attached() argument 101 struct rvu_pfvf *pfvf = rvu_get_pfvf(rvu, pcifunc); in is_nixlf_attached() 104 blkaddr = rvu_get_blkaddr(rvu, BLKTYPE_NIX, pcifunc); in is_nixlf_attached() 124 int nix_get_nixlf(struct rvu *rvu, u16 pcifunc, int *nixlf, int *nix_blkaddr) in nix_get_nixlf() argument 126 struct rvu_pfvf *pfvf = rvu_get_pfvf(rvu, pcifunc); in nix_get_nixlf() [all …]
|
D | rvu.h | 652 static inline bool is_afvf(u16 pcifunc) in is_afvf() argument 654 return !(pcifunc & ~RVU_PFVF_FUNC_MASK); in is_afvf() 657 static inline bool is_vf(u16 pcifunc) in is_vf() argument 659 return !!(pcifunc & RVU_PFVF_FUNC_MASK); in is_vf() 663 static inline bool is_pffunc_af(u16 pcifunc) in is_pffunc_af() argument 665 return !pcifunc; in is_pffunc_af() 683 int rvu_get_pf(u16 pcifunc); 684 struct rvu_pfvf *rvu_get_pfvf(struct rvu *rvu, int pcifunc); 687 bool is_pffunc_map_valid(struct rvu *rvu, u16 pcifunc, int blktype); 688 int rvu_get_lf(struct rvu *rvu, struct rvu_block *block, u16 pcifunc, u16 slot); [all …]
|
D | rvu_npc.c | 33 int blkaddr, u16 pcifunc); 35 u16 pcifunc); 66 u16 pcifunc) in npc_mcam_verify_pf_func() argument 80 (pcifunc & ~RVU_PFVF_FUNC_MASK))) in npc_mcam_verify_pf_func() 116 int npc_config_ts_kpuaction(struct rvu *rvu, int pf, u16 pcifunc, bool enable) in npc_config_ts_kpuaction() argument 127 blkaddr = rvu_get_blkaddr(rvu, BLKTYPE_NPC, pcifunc); in npc_config_ts_kpuaction() 144 static int npc_get_ucast_mcam_index(struct npc_mcam *mcam, u16 pcifunc, in npc_get_ucast_mcam_index() argument 153 pfvf = rvu_get_pfvf(rvu, pcifunc); in npc_get_ucast_mcam_index() 170 u16 pcifunc, int nixlf, int type) in npc_get_nixlf_mcam_index() argument 172 int pf = rvu_get_pf(pcifunc); in npc_get_nixlf_mcam_index() [all …]
|
D | rvu_sdp.c | 20 bool is_sdp_pfvf(u16 pcifunc) in is_sdp_pfvf() argument 22 u16 pf = rvu_get_pf(pcifunc); in is_sdp_pfvf() 37 bool is_sdp_pf(u16 pcifunc) in is_sdp_pf() argument 39 return (is_sdp_pfvf(pcifunc) && in is_sdp_pf() 40 !(pcifunc & RVU_PFVF_FUNC_MASK)); in is_sdp_pf() 43 bool is_sdp_vf(u16 pcifunc) in is_sdp_vf() argument 45 return (is_sdp_pfvf(pcifunc) && in is_sdp_vf() 46 !!(pcifunc & RVU_PFVF_FUNC_MASK)); in is_sdp_vf() 85 struct rvu_pfvf *pfvf = rvu_get_pfvf(rvu, req->hdr.pcifunc); in rvu_mbox_handler_set_sdp_chan_info()
|
D | rvu.c | 31 static void __rvu_flr_handler(struct rvu *rvu, u16 pcifunc); 225 int rvu_get_lf(struct rvu *rvu, struct rvu_block *block, u16 pcifunc, u16 slot) in rvu_get_lf() argument 232 if (block->fn_map[lf] == pcifunc) { in rvu_get_lf() 253 int rvu_get_blkaddr(struct rvu *rvu, int blktype, u16 pcifunc) in rvu_get_blkaddr() argument 268 if (!pcifunc) { in rvu_get_blkaddr() 284 if (!pcifunc) { in rvu_get_blkaddr() 292 if (pcifunc & RVU_PFVF_FUNC_MASK) { in rvu_get_blkaddr() 294 devnum = rvu_get_hwvf(rvu, pcifunc); in rvu_get_blkaddr() 297 devnum = rvu_get_pf(pcifunc); in rvu_get_blkaddr() 342 struct rvu_block *block, u16 pcifunc, in rvu_update_rsrc_map() argument [all …]
|
D | mcs_rvu_if.c | 55 u16 pcifunc = event->pcifunc; in mcs_add_intr_wq_entry() local 60 if (pcifunc & RVU_PFVF_FUNC_MASK) in mcs_add_intr_wq_entry() 61 pfvf = &mcs->vf[rvu_get_hwvf(rvu, pcifunc)]; in mcs_add_intr_wq_entry() 63 pfvf = &mcs->pf[rvu_get_pf(pcifunc)]; in mcs_add_intr_wq_entry() 89 pf = rvu_get_pf(event->pcifunc); in mcs_notify_pfvf() 98 req->hdr.pcifunc = event->pcifunc; in mcs_notify_pfvf() 139 u16 pcifunc = req->hdr.pcifunc; in rvu_mbox_handler_mcs_intr_cfg() local 149 if (pcifunc & RVU_PFVF_FUNC_MASK) in rvu_mbox_handler_mcs_intr_cfg() 150 pfvf = &mcs->vf[rvu_get_hwvf(rvu, pcifunc)]; in rvu_mbox_handler_mcs_intr_cfg() 152 pfvf = &mcs->pf[rvu_get_pf(pcifunc)]; in rvu_mbox_handler_mcs_intr_cfg() [all …]
|
D | rvu_npa.c | 56 u16 pcifunc = req->hdr.pcifunc; in rvu_npa_aq_enq_inst() local 65 pfvf = rvu_get_pfvf(rvu, pcifunc); in rvu_npa_aq_enq_inst() 69 blkaddr = rvu_get_blkaddr(rvu, BLKTYPE_NPA, pcifunc); in rvu_npa_aq_enq_inst() 80 npalf = rvu_get_lf(rvu, block, pcifunc, 0); in rvu_npa_aq_enq_inst() 203 struct rvu_pfvf *pfvf = rvu_get_pfvf(rvu, req->hdr.pcifunc); in npa_lf_hwctx_disable() 213 aq_req.hdr.pcifunc = req->hdr.pcifunc; in npa_lf_hwctx_disable() 258 lock_ctx_req.hdr.pcifunc = req->hdr.pcifunc; in npa_lf_hwctx_lockdown() 266 req->hdr.pcifunc, in npa_lf_hwctx_lockdown() 324 u16 pcifunc = req->hdr.pcifunc; in rvu_mbox_handler_npa_lf_alloc() local 337 pfvf = rvu_get_pfvf(rvu, pcifunc); in rvu_mbox_handler_npa_lf_alloc() [all …]
|
D | rvu_cpt.c | 291 static bool is_cpt_pf(struct rvu *rvu, u16 pcifunc) in is_cpt_pf() argument 295 if (rvu_get_pf(pcifunc) != cpt_pf_num) in is_cpt_pf() 297 if (pcifunc & RVU_PFVF_FUNC_MASK) in is_cpt_pf() 303 static bool is_cpt_vf(struct rvu *rvu, u16 pcifunc) in is_cpt_vf() argument 307 if (rvu_get_pf(pcifunc) != cpt_pf_num) in is_cpt_vf() 309 if (!(pcifunc & RVU_PFVF_FUNC_MASK)) in is_cpt_vf() 330 u16 pcifunc = req->hdr.pcifunc; in rvu_mbox_handler_cpt_lf_alloc() local 344 num_lfs = rvu_get_rsrc_mapcount(rvu_get_pfvf(rvu, pcifunc), in rvu_mbox_handler_cpt_lf_alloc() 353 req->nix_pf_func = pcifunc; in rvu_mbox_handler_cpt_lf_alloc() 362 req->sso_pf_func = pcifunc; in rvu_mbox_handler_cpt_lf_alloc() [all …]
|
D | rvu_cn10k.c | 53 static u32 rvu_get_lmtst_tbl_index(struct rvu *rvu, u16 pcifunc) in rvu_get_lmtst_tbl_index() argument 55 return ((rvu_get_pf(pcifunc) * rvu->hw->total_vfs) + in rvu_get_lmtst_tbl_index() 56 (pcifunc & RVU_PFVF_FUNC_MASK)) * LMT_MAPTBL_ENTRY_SIZE; in rvu_get_lmtst_tbl_index() 59 static int rvu_get_lmtaddr(struct rvu *rvu, u16 pcifunc, in rvu_get_lmtaddr() argument 71 pf = rvu_get_pf(pcifunc) & 0x1F; in rvu_get_lmtaddr() 73 ((pcifunc & RVU_PFVF_FUNC_MASK) & 0xFF); in rvu_get_lmtaddr() 96 static int rvu_update_lmtaddr(struct rvu *rvu, u16 pcifunc, u64 lmt_addr) in rvu_update_lmtaddr() argument 98 struct rvu_pfvf *pfvf = rvu_get_pfvf(rvu, pcifunc); in rvu_update_lmtaddr() 104 tbl_idx = rvu_get_lmtst_tbl_index(rvu, pcifunc); in rvu_update_lmtaddr() 135 struct rvu_pfvf *pfvf = rvu_get_pfvf(rvu, req->hdr.pcifunc); in rvu_mbox_handler_lmtst_tbl_setup() [all …]
|
D | mcs.c | 292 int mcs_clear_all_stats(struct mcs *mcs, u16 pcifunc, int dir) in mcs_clear_all_stats() argument 304 if (map->flowid2pf_map[id] != pcifunc) in mcs_clear_all_stats() 311 if (map->secy2pf_map[id] != pcifunc) in mcs_clear_all_stats() 318 if (map->sc2pf_map[id] != pcifunc) in mcs_clear_all_stats() 325 if (map->sa2pf_map[id] != pcifunc) in mcs_clear_all_stats() 555 int mcs_alloc_ctrlpktrule(struct rsrc_bmap *rsrc, u16 *pf_map, u16 offset, u16 pcifunc) in mcs_alloc_ctrlpktrule() argument 567 pf_map[rsrc_id] = pcifunc; in mcs_alloc_ctrlpktrule() 574 u16 pcifunc = req->hdr.pcifunc; in mcs_free_ctrlpktrule() local 584 if (map->ctrlpktrule2pf_map[id] != pcifunc) in mcs_free_ctrlpktrule() 586 mcs_free_rsrc(&map->ctrlpktrule, map->ctrlpktrule2pf_map, id, pcifunc); in mcs_free_ctrlpktrule() [all …]
|
D | rvu_npc_hash.c | 748 u8 ctype, u32 *seq_id, bool cmd, u32 mcam_idx, u16 pcifunc) in rvu_npc_exact_add_to_list() argument 797 entry->pcifunc = pcifunc; in rvu_npc_exact_add_to_list() 981 u64 chan_val, u64 chan_mask, u16 pcifunc) in rvu_npc_exact_save_drop_rule_chan_and_mask() argument 1007 table->drop_rule_map[i].pcifunc = pcifunc; in rvu_npc_exact_save_drop_rule_chan_and_mask() 1067 return table->drop_rule_map[i].pcifunc; in rvu_npc_exact_drop_rule_to_pcifunc() 1089 u64 *mask, u16 *pcifunc) in rvu_npc_exact_get_drop_rule_info() argument 1119 if (pcifunc) in rvu_npc_exact_get_drop_rule_info() 1120 *pcifunc = table->drop_rule_map[i].pcifunc; in rvu_npc_exact_get_drop_rule_info() 1278 u32 mcam_idx, u16 pcifunc) in rvu_npc_exact_add_table_entry() argument 1308 mac, chan, ctype, seq_id, cmd, mcam_idx, pcifunc); in rvu_npc_exact_add_table_entry() [all …]
|
D | rvu_npc_hash.h | 154 u16 pcifunc; member 189 u16 pcifunc; member 225 void rvu_npc_exact_reset(struct rvu *rvu, u16 pcifunc); 229 void rvu_npc_exact_reset(struct rvu *rvu, u16 pcifunc); 231 int rvu_npc_exact_promisc_disable(struct rvu *rvu, u16 pcifunc); 232 int rvu_npc_exact_promisc_enable(struct rvu *rvu, u16 pcifunc);
|
D | mcs.h | 97 u16 pcifunc; member 186 int mcs_alloc_rsrc(struct rsrc_bmap *rsrc, u16 *pf_map, u16 pcifunc); 187 int mcs_free_rsrc(struct rsrc_bmap *rsrc, u16 *pf_map, int rsrc_id, u16 pcifunc); 189 u8 *sc_id, u8 *sa1_id, u8 *sa2_id, u16 pcifunc, int dir); 190 int mcs_free_all_rsrc(struct mcs *mcs, int dir, u16 pcifunc); 212 int mcs_alloc_ctrlpktrule(struct rsrc_bmap *rsrc, u16 *pf_map, u16 offset, u16 pcifunc); 241 int mcs_clear_all_stats(struct mcs *mcs, u16 pcifunc, int dir);
|
D | rvu_debugfs.c | 668 static void get_lf_str_list(struct rvu_block block, int pcifunc, in get_lf_str_list() argument 677 if (block.fn_map[lf] != pcifunc) in get_lf_str_list() 706 u16 pcifunc; in get_max_column_width() local 715 pcifunc = pf << 10 | vf; in get_max_column_width() 716 if (!pcifunc) in get_max_column_width() 724 get_lf_str_list(block, pcifunc, buf); in get_max_column_width() 744 int pf, vf, pcifunc; in rvu_dbg_rsrc_attach_status() local 786 pcifunc = pf << 10 | vf; in rvu_dbg_rsrc_attach_status() 787 if (!pcifunc) in rvu_dbg_rsrc_attach_status() 808 get_lf_str_list(block, pcifunc, lfs); in rvu_dbg_rsrc_attach_status() [all …]
|
D | rvu_npc_fs.c | 930 static void rvu_mcam_remove_counter_from_rule(struct rvu *rvu, u16 pcifunc, in rvu_mcam_remove_counter_from_rule() argument 939 free_req.hdr.pcifunc = pcifunc; in rvu_mcam_remove_counter_from_rule() 946 static void rvu_mcam_add_counter_to_rule(struct rvu *rvu, u16 pcifunc, in rvu_mcam_add_counter_to_rule() argument 954 cntr_req.hdr.pcifunc = pcifunc; in rvu_mcam_add_counter_to_rule() 1022 if (is_pffunc_af(req->hdr.pcifunc)) in npc_update_tx_entry() 1060 u16 owner = req->hdr.pcifunc; in npc_install_flow() 1122 write_req.hdr.pcifunc = owner; in npc_install_flow() 1128 write_req.hdr.pcifunc = 0; in npc_install_flow() 1191 return rvu_nix_setup_ratelimit_aggr(rvu, req->hdr.pcifunc, in npc_install_flow() 1201 bool from_vf = !!(req->hdr.pcifunc & RVU_PFVF_FUNC_MASK); in rvu_mbox_handler_npc_install_flow() [all …]
|
D | mcs_cnf10kb.c | 184 event.pcifunc = mcs->tx.sa2pf_map[event.sa_id]; in cnf10kb_mcs_tx_pn_thresh_reached_handler() 211 event.pcifunc = mcs->tx.sa2pf_map[event.sa_id]; in cnf10kb_mcs_tx_pn_wrapped_handler()
|
D | mbox.c | 371 otx2_reply_invalid_msg(struct otx2_mbox *mbox, int devid, u16 pcifunc, u16 id) in otx2_reply_invalid_msg() argument 382 rsp->hdr.pcifunc = pcifunc; in otx2_reply_invalid_msg()
|
/linux-6.1.9/drivers/crypto/marvell/octeontx2/ |
D | otx2_cptpf_mbox.c | 31 msg->pcifunc = req->pcifunc; in forward_to_af() 65 rsp->hdr.pcifunc = req->pcifunc; in handle_msg_get_caps() 88 rsp->hdr.pcifunc = req->pcifunc; in handle_msg_get_eng_grp_num() 109 rsp->hdr.pcifunc = req->pcifunc; in handle_msg_kvf_limits() 202 msg->pcifunc = ((u16)cptpf->pf_id << RVU_PFVF_PF_SHIFT) | in otx2_cptpf_vfpf_mbox_handler() 260 cptpf->pf_id = (msg->pcifunc >> RVU_PFVF_PF_SHIFT) & in process_afpf_mbox_msg() 327 fwd->pcifunc = msg->pcifunc; in forward_to_vf() 355 vf_id = (msg->pcifunc >> RVU_PFVF_FUNC_SHIFT) & in otx2_cptpf_afpf_mbox_handler()
|
D | otx2_cpt_mbox_common.c | 35 req->pcifunc = 0; in otx2_cpt_send_ready_msg() 60 reg_msg->hdr.pcifunc = 0; in otx2_cpt_add_read_af_reg() 85 reg_msg->hdr.pcifunc = 0; in otx2_cpt_add_write_af_reg() 135 req->hdr.pcifunc = 0; in otx2_cpt_attach_rscrs_msg() 163 req->hdr.pcifunc = 0; in otx2_cpt_detach_rsrcs_msg() 190 req->pcifunc = 0; in otx2_cpt_msix_offset_msg()
|
D | otx2_cptvf_mbox.c | 92 cptvf->vf_id = ((msg->pcifunc >> RVU_PFVF_FUNC_SHIFT) in process_pfvf_mbox_mbox_msg() 183 req->hdr.pcifunc = OTX2_CPT_RVU_PFFUNC(cptvf->vf_id, 0); in otx2_cptvf_send_eng_grp_num_msg() 204 req->pcifunc = OTX2_CPT_RVU_PFFUNC(cptvf->vf_id, 0); in otx2_cptvf_send_kvf_limits_msg()
|
/linux-6.1.9/drivers/net/ethernet/marvell/octeontx2/nic/ |
D | otx2_pf.c | 127 req->hdr.pcifunc &= RVU_PFVF_FUNC_MASK; in otx2_flr_handler() 128 req->hdr.pcifunc |= (vf + 1) & RVU_PFVF_FUNC_MASK; in otx2_flr_handler() 205 snprintf(irq_name, NAME_SIZE, "RVUPF%d_ME0", rvu_get_pf(pf->pcifunc)); in otx2_register_flr_me_intr() 215 snprintf(irq_name, NAME_SIZE, "RVUPF%d_FLR0", rvu_get_pf(pf->pcifunc)); in otx2_register_flr_me_intr() 227 rvu_get_pf(pf->pcifunc)); in otx2_register_flr_me_intr() 237 rvu_get_pf(pf->pcifunc)); in otx2_register_flr_me_intr() 487 msg->pcifunc &= RVU_PFVF_FUNC_MASK; in otx2_pfvf_mbox_handler() 488 msg->pcifunc |= (vf_idx + 1) & RVU_PFVF_FUNC_MASK; in otx2_pfvf_mbox_handler() 706 if (pf->pcifunc) in otx2_register_pfvf_mbox_intr() 708 "RVUPF%d_VF Mbox0", rvu_get_pf(pf->pcifunc)); in otx2_register_pfvf_mbox_intr() [all …]
|
D | otx2_common.h | 458 u16 pcifunc; /* RVU PF_FUNC */ member 854 static inline bool is_otx2_vf(u16 pcifunc) in is_otx2_vf() argument 856 return !!(pcifunc & RVU_PFVF_FUNC_MASK); in is_otx2_vf() 859 static inline int rvu_get_pf(u16 pcifunc) in rvu_get_pf() argument 861 return (pcifunc >> RVU_PFVF_PF_SHIFT) & RVU_PFVF_PF_MASK; in rvu_get_pf()
|
D | otx2_vf.c | 62 vf->pcifunc = msg->pcifunc; in otx2vf_process_vfaf_mbox_msg() 137 rsp->hdr.pcifunc = 0; in otx2vf_process_mbox_msg_up() 667 n = (vf->pcifunc >> RVU_PFVF_FUNC_SHIFT) & RVU_PFVF_FUNC_MASK; in otx2vf_probe()
|