/openbmc/linux/drivers/net/ethernet/marvell/octeontx2/af/ |
H A D | rvu_switch.c | 11 static void rvu_switch_enable_lbk_link(struct rvu *rvu, u16 pcifunc, bool enable) in rvu_switch_enable_lbk_link() argument 13 struct rvu_pfvf *pfvf = rvu_get_pfvf(rvu, pcifunc); in rvu_switch_enable_lbk_link() 18 rvu_nix_tx_tl2_cfg(rvu, pfvf->nix_blkaddr, pcifunc, in rvu_switch_enable_lbk_link() 22 static int rvu_switch_install_rx_rule(struct rvu *rvu, u16 pcifunc, in rvu_switch_install_rx_rule() argument 29 pfvf = rvu_get_pfvf(rvu, pcifunc); in rvu_switch_install_rx_rule() 39 req.hdr.pcifunc = 0; /* AF is requester */ in rvu_switch_install_rx_rule() 40 req.vf = pcifunc; in rvu_switch_install_rx_rule() 51 static int rvu_switch_install_tx_rule(struct rvu *rvu, u16 pcifunc, u16 entry) in rvu_switch_install_tx_rule() argument 58 pfvf = rvu_get_pfvf(rvu, pcifunc); in rvu_switch_install_tx_rule() 66 rvu_switch_enable_lbk_link(rvu, pcifunc, true); in rvu_switch_install_tx_rule() [all …]
|
H A D | rvu_cgx.c | 455 inline bool is_cgx_config_permitted(struct rvu *rvu, u16 pcifunc) in is_cgx_config_permitted() argument 457 if ((pcifunc & RVU_PFVF_FUNC_MASK) || in is_cgx_config_permitted() 458 !is_pf_cgxmapped(rvu, rvu_get_pf(pcifunc))) in is_cgx_config_permitted() 483 int rvu_cgx_config_rxtx(struct rvu *rvu, u16 pcifunc, bool start) in rvu_cgx_config_rxtx() argument 485 int pf = rvu_get_pf(pcifunc); in rvu_cgx_config_rxtx() 490 if (!is_cgx_config_permitted(rvu, pcifunc)) in rvu_cgx_config_rxtx() 500 int rvu_cgx_tx_enable(struct rvu *rvu, u16 pcifunc, bool enable) in rvu_cgx_tx_enable() argument 502 int pf = rvu_get_pf(pcifunc); in rvu_cgx_tx_enable() 507 if (!is_cgx_config_permitted(rvu, pcifunc)) in rvu_cgx_tx_enable() 525 void rvu_cgx_disable_dmac_entries(struct rvu *rvu, u16 pcifunc) in rvu_cgx_disable_dmac_entries() argument [all …]
|
H A D | rvu.h | 717 static inline bool is_afvf(u16 pcifunc) in is_afvf() argument 719 return !(pcifunc & ~RVU_PFVF_FUNC_MASK); in is_afvf() 722 static inline bool is_vf(u16 pcifunc) in is_vf() argument 724 return !!(pcifunc & RVU_PFVF_FUNC_MASK); in is_vf() 728 static inline bool is_pffunc_af(u16 pcifunc) in is_pffunc_af() argument 730 return !pcifunc; in is_pffunc_af() 748 int rvu_get_pf(u16 pcifunc); 749 struct rvu_pfvf *rvu_get_pfvf(struct rvu *rvu, int pcifunc); 752 bool is_pffunc_map_valid(struct rvu *rvu, u16 pcifunc, int blktype); 753 int rvu_get_lf(struct rvu *rvu, struct rvu_block *block, u16 pcifunc, u16 slot); [all …]
|
H A D | rvu_nix.c | 20 static void nix_free_tx_vtag_entries(struct rvu *rvu, u16 pcifunc); 23 static int nix_update_mce_rule(struct rvu *rvu, u16 pcifunc, 29 struct nix_hw *nix_hw, u16 pcifunc); 30 static int nix_free_all_bandprof(struct rvu *rvu, u16 pcifunc); 80 u16 pcifunc; member 100 bool is_nixlf_attached(struct rvu *rvu, u16 pcifunc) in is_nixlf_attached() argument 102 struct rvu_pfvf *pfvf = rvu_get_pfvf(rvu, pcifunc); in is_nixlf_attached() 105 blkaddr = rvu_get_blkaddr(rvu, BLKTYPE_NIX, pcifunc); in is_nixlf_attached() 125 int nix_get_nixlf(struct rvu *rvu, u16 pcifunc, int *nixlf, int *nix_blkaddr) in nix_get_nixlf() argument 127 struct rvu_pfvf *pfvf = rvu_get_pfvf(rvu, pcifunc); in nix_get_nixlf() [all …]
|
H A 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 …]
|
H A 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()
|
H A D | mcs_rvu_if.c | 92 u16 pcifunc = event->pcifunc; in mcs_add_intr_wq_entry() local 97 if (pcifunc & RVU_PFVF_FUNC_MASK) in mcs_add_intr_wq_entry() 98 pfvf = &mcs->vf[rvu_get_hwvf(rvu, pcifunc)]; in mcs_add_intr_wq_entry() 100 pfvf = &mcs->pf[rvu_get_pf(pcifunc)]; in mcs_add_intr_wq_entry() 126 pf = rvu_get_pf(event->pcifunc); in mcs_notify_pfvf() 139 req->hdr.pcifunc = event->pcifunc; in mcs_notify_pfvf() 181 u16 pcifunc = req->hdr.pcifunc; in rvu_mbox_handler_mcs_intr_cfg() local 191 if (pcifunc & RVU_PFVF_FUNC_MASK) in rvu_mbox_handler_mcs_intr_cfg() 192 pfvf = &mcs->vf[rvu_get_hwvf(rvu, pcifunc)]; in rvu_mbox_handler_mcs_intr_cfg() 194 pfvf = &mcs->pf[rvu_get_pf(pcifunc)]; in rvu_mbox_handler_mcs_intr_cfg() [all …]
|
H A 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 …]
|
H A D | rvu_npa.c | 65 u16 pcifunc = req->hdr.pcifunc; in rvu_npa_aq_enq_inst() local 74 pfvf = rvu_get_pfvf(rvu, pcifunc); in rvu_npa_aq_enq_inst() 78 blkaddr = rvu_get_blkaddr(rvu, BLKTYPE_NPA, pcifunc); in rvu_npa_aq_enq_inst() 89 npalf = rvu_get_lf(rvu, block, pcifunc, 0); in rvu_npa_aq_enq_inst() 212 struct rvu_pfvf *pfvf = rvu_get_pfvf(rvu, req->hdr.pcifunc); in npa_lf_hwctx_disable() 222 aq_req.hdr.pcifunc = req->hdr.pcifunc; in npa_lf_hwctx_disable() 267 lock_ctx_req.hdr.pcifunc = req->hdr.pcifunc; in npa_lf_hwctx_lockdown() 275 req->hdr.pcifunc, in npa_lf_hwctx_lockdown() 333 u16 pcifunc = req->hdr.pcifunc; in rvu_mbox_handler_npa_lf_alloc() local 346 pfvf = rvu_get_pfvf(rvu, pcifunc); in rvu_mbox_handler_npa_lf_alloc() [all …]
|
H A D | rvu_cpt.c | 349 static bool is_cpt_pf(struct rvu *rvu, u16 pcifunc) in is_cpt_pf() argument 353 if (rvu_get_pf(pcifunc) != cpt_pf_num) in is_cpt_pf() 355 if (pcifunc & RVU_PFVF_FUNC_MASK) in is_cpt_pf() 361 static bool is_cpt_vf(struct rvu *rvu, u16 pcifunc) in is_cpt_vf() argument 365 if (rvu_get_pf(pcifunc) != cpt_pf_num) in is_cpt_vf() 367 if (!(pcifunc & RVU_PFVF_FUNC_MASK)) in is_cpt_vf() 388 u16 pcifunc = req->hdr.pcifunc; in rvu_mbox_handler_cpt_lf_alloc() local 402 num_lfs = rvu_get_rsrc_mapcount(rvu_get_pfvf(rvu, pcifunc), in rvu_mbox_handler_cpt_lf_alloc() 411 req->nix_pf_func = pcifunc; in rvu_mbox_handler_cpt_lf_alloc() 420 req->sso_pf_func = pcifunc; in rvu_mbox_handler_cpt_lf_alloc() [all …]
|
H A 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 72 pf = rvu_get_pf(pcifunc) & 0x1F; in rvu_get_lmtaddr() 74 ((pcifunc & RVU_PFVF_FUNC_MASK) & 0xFF); in rvu_get_lmtaddr() 99 static int rvu_update_lmtaddr(struct rvu *rvu, u16 pcifunc, u64 lmt_addr) in rvu_update_lmtaddr() argument 101 struct rvu_pfvf *pfvf = rvu_get_pfvf(rvu, pcifunc); in rvu_update_lmtaddr() 107 tbl_idx = rvu_get_lmtst_tbl_index(rvu, pcifunc); in rvu_update_lmtaddr() 138 struct rvu_pfvf *pfvf = rvu_get_pfvf(rvu, req->hdr.pcifunc); in rvu_mbox_handler_lmtst_tbl_setup() [all …]
|
H A D | rvu_npc_hash.c | 786 u8 ctype, u32 *seq_id, bool cmd, u32 mcam_idx, u16 pcifunc) in rvu_npc_exact_add_to_list() argument 835 entry->pcifunc = pcifunc; in rvu_npc_exact_add_to_list() 1019 u64 chan_val, u64 chan_mask, u16 pcifunc) in rvu_npc_exact_save_drop_rule_chan_and_mask() argument 1045 table->drop_rule_map[i].pcifunc = pcifunc; in rvu_npc_exact_save_drop_rule_chan_and_mask() 1105 return table->drop_rule_map[i].pcifunc; in rvu_npc_exact_drop_rule_to_pcifunc() 1127 u64 *mask, u16 *pcifunc) in rvu_npc_exact_get_drop_rule_info() argument 1157 if (pcifunc) in rvu_npc_exact_get_drop_rule_info() 1158 *pcifunc = table->drop_rule_map[i].pcifunc; in rvu_npc_exact_get_drop_rule_info() 1318 u32 mcam_idx, u16 pcifunc) in rvu_npc_exact_add_table_entry() argument 1348 mac, chan, ctype, seq_id, cmd, mcam_idx, pcifunc); in rvu_npc_exact_add_table_entry() [all …]
|
H A 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() 565 int mcs_alloc_ctrlpktrule(struct rsrc_bmap *rsrc, u16 *pf_map, u16 offset, u16 pcifunc) in mcs_alloc_ctrlpktrule() argument 577 pf_map[rsrc_id] = pcifunc; in mcs_alloc_ctrlpktrule() 584 u16 pcifunc = req->hdr.pcifunc; in mcs_free_ctrlpktrule() local 594 if (map->ctrlpktrule2pf_map[id] != pcifunc) in mcs_free_ctrlpktrule() 596 mcs_free_rsrc(&map->ctrlpktrule, map->ctrlpktrule2pf_map, id, pcifunc); in mcs_free_ctrlpktrule() [all …]
|
H A D | rvu_npc_hash.h | 160 u16 pcifunc; member 195 u16 pcifunc; member 231 void rvu_npc_exact_reset(struct rvu *rvu, u16 pcifunc); 235 void rvu_npc_exact_reset(struct rvu *rvu, u16 pcifunc); 237 int rvu_npc_exact_promisc_disable(struct rvu *rvu, u16 pcifunc); 238 int rvu_npc_exact_promisc_enable(struct rvu *rvu, u16 pcifunc);
|
H A D | mcs.h | 88 u16 pcifunc; member 181 int mcs_alloc_rsrc(struct rsrc_bmap *rsrc, u16 *pf_map, u16 pcifunc); 182 int mcs_free_rsrc(struct rsrc_bmap *rsrc, u16 *pf_map, int rsrc_id, u16 pcifunc); 184 u8 *sc_id, u8 *sa1_id, u8 *sa2_id, u16 pcifunc, int dir); 185 int mcs_free_all_rsrc(struct mcs *mcs, int dir, u16 pcifunc); 207 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);
|
H A D | rvu_debugfs.c | 666 static void get_lf_str_list(struct rvu_block block, int pcifunc, in get_lf_str_list() argument 675 if (block.fn_map[lf] != pcifunc) in get_lf_str_list() 704 u16 pcifunc; in get_max_column_width() local 713 pcifunc = pf << 10 | vf; in get_max_column_width() 714 if (!pcifunc) in get_max_column_width() 722 get_lf_str_list(block, pcifunc, buf); in get_max_column_width() 742 int pf, vf, pcifunc; in rvu_dbg_rsrc_attach_status() local 784 pcifunc = pf << 10 | vf; in rvu_dbg_rsrc_attach_status() 785 if (!pcifunc) in rvu_dbg_rsrc_attach_status() 806 get_lf_str_list(block, pcifunc, lfs); in rvu_dbg_rsrc_attach_status() [all …]
|
H A D | rvu_npc_fs.c | 1004 static void rvu_mcam_remove_counter_from_rule(struct rvu *rvu, u16 pcifunc, in rvu_mcam_remove_counter_from_rule() argument 1013 free_req.hdr.pcifunc = pcifunc; in rvu_mcam_remove_counter_from_rule() 1020 static void rvu_mcam_add_counter_to_rule(struct rvu *rvu, u16 pcifunc, in rvu_mcam_add_counter_to_rule() argument 1028 cntr_req.hdr.pcifunc = pcifunc; in rvu_mcam_add_counter_to_rule() 1108 if (is_pffunc_af(req->hdr.pcifunc)) in npc_update_tx_entry() 1146 u16 owner = req->hdr.pcifunc; in npc_install_flow() 1208 write_req.hdr.pcifunc = owner; in npc_install_flow() 1214 write_req.hdr.pcifunc = 0; in npc_install_flow() 1278 return rvu_nix_setup_ratelimit_aggr(rvu, req->hdr.pcifunc, in npc_install_flow() 1288 bool from_vf = !!(req->hdr.pcifunc & RVU_PFVF_FUNC_MASK); in rvu_mbox_handler_npc_install_flow() [all …]
|
H A D | mcs_cnf10kb.c | 187 event.pcifunc = mcs->tx.sa2pf_map[event.sa_id]; in cnf10kb_mcs_tx_pn_thresh_reached_handler() 214 event.pcifunc = mcs->tx.sa2pf_map[event.sa_id]; in cnf10kb_mcs_tx_pn_wrapped_handler() 229 event.pcifunc = mcs->pf_map[0]; in cnf10kb_mcs_bbe_intr_handler() 263 event.pcifunc = mcs->pf_map[0]; in cnf10kb_mcs_pab_intr_handler()
|
H A D | mbox.c | 413 otx2_reply_invalid_msg(struct otx2_mbox *mbox, int devid, u16 pcifunc, u16 id) in otx2_reply_invalid_msg() argument 424 rsp->hdr.pcifunc = pcifunc; in otx2_reply_invalid_msg()
|
/openbmc/linux/drivers/crypto/marvell/octeontx2/ |
H A D | otx2_cptpf_mbox.c | 45 msg->pcifunc = req->pcifunc; in forward_to_af() 79 rsp->hdr.pcifunc = req->pcifunc; in handle_msg_get_caps() 102 rsp->hdr.pcifunc = req->pcifunc; in handle_msg_get_eng_grp_num() 123 rsp->hdr.pcifunc = req->pcifunc; in handle_msg_kvf_limits() 145 req->hdr.pcifunc = OTX2_CPT_RVU_PFFUNC(cptpf->pf_id, 0); in send_inline_ipsec_inbound_msg() 353 msg->pcifunc = ((u16)cptpf->pf_id << RVU_PFVF_PF_SHIFT) | in otx2_cptpf_vfpf_mbox_handler() 428 cptpf->pf_id = (msg->pcifunc >> RVU_PFVF_PF_SHIFT) & in process_afpf_mbox_msg() 498 fwd->pcifunc = msg->pcifunc; in forward_to_vf() 526 vf_id = (msg->pcifunc >> RVU_PFVF_FUNC_SHIFT) & in otx2_cptpf_afpf_mbox_handler() 560 rsp->hdr.pcifunc = 0; in handle_msg_cpt_inst_lmtst()
|
H A D | otx2_cpt_mbox_common.c | 36 req->pcifunc = 0; in otx2_cpt_send_ready_msg() 64 reg_msg->hdr.pcifunc = 0; in otx2_cpt_add_read_af_reg() 89 reg_msg->hdr.pcifunc = 0; in otx2_cpt_add_write_af_reg() 142 req->hdr.pcifunc = 0; in otx2_cpt_attach_rscrs_msg() 172 req->hdr.pcifunc = 0; in otx2_cpt_detach_rsrcs_msg() 201 req->pcifunc = 0; in otx2_cpt_msix_offset_msg()
|
H A 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()
|
/openbmc/linux/drivers/net/ethernet/marvell/octeontx2/nic/ |
H A D | otx2_pf.c | 129 req->hdr.pcifunc &= RVU_PFVF_FUNC_MASK; in otx2_flr_handler() 130 req->hdr.pcifunc |= (vf + 1) & RVU_PFVF_FUNC_MASK; in otx2_flr_handler() 207 snprintf(irq_name, NAME_SIZE, "RVUPF%d_ME0", rvu_get_pf(pf->pcifunc)); in otx2_register_flr_me_intr() 217 snprintf(irq_name, NAME_SIZE, "RVUPF%d_FLR0", rvu_get_pf(pf->pcifunc)); in otx2_register_flr_me_intr() 229 rvu_get_pf(pf->pcifunc)); in otx2_register_flr_me_intr() 239 rvu_get_pf(pf->pcifunc)); in otx2_register_flr_me_intr() 476 msg->pcifunc &= RVU_PFVF_FUNC_MASK; in otx2_pfvf_mbox_handler() 477 msg->pcifunc |= (vf_idx + 1) & RVU_PFVF_FUNC_MASK; in otx2_pfvf_mbox_handler() 697 if (pf->pcifunc) in otx2_register_pfvf_mbox_intr() 699 "RVUPF%d_VF Mbox0", rvu_get_pf(pf->pcifunc)); in otx2_register_pfvf_mbox_intr() [all …]
|
H A 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() 679 n = (vf->pcifunc >> RVU_PFVF_FUNC_SHIFT) & RVU_PFVF_FUNC_MASK; in otx2vf_probe()
|
H A D | otx2_common.h | 484 u16 pcifunc; /* RVU PF_FUNC */ member 881 static inline bool is_otx2_vf(u16 pcifunc) in is_otx2_vf() argument 883 return !!(pcifunc & RVU_PFVF_FUNC_MASK); in is_otx2_vf() 886 static inline int rvu_get_pf(u16 pcifunc) in rvu_get_pf() argument 888 return (pcifunc >> RVU_PFVF_PF_SHIFT) & RVU_PFVF_PF_MASK; in rvu_get_pf()
|