| /linux/drivers/net/ethernet/marvell/octeontx2/af/ |
| H A D | rvu_rep.c | 38 struct rvu_pfvf *pfvf = rvu_get_pfvf(rvu, event->pcifunc); in rvu_rep_up_notify() 42 pf = rvu_get_pf(rvu->pdev, event->pcifunc); in rvu_rep_up_notify() 54 msg->hdr.pcifunc = event->pcifunc; in rvu_rep_up_notify() 105 if (!is_pf_func_valid(rvu, req->pcifunc)) in rvu_mbox_handler_rep_event_notify() 120 int rvu_rep_notify_pfvf_state(struct rvu *rvu, u16 pcifunc, bool enable) in rvu_rep_notify_pfvf_state() argument 125 if (!is_pf_cgxmapped(rvu, rvu_get_pf(rvu->pdev, pcifunc))) in rvu_rep_notify_pfvf_state() 137 req->hdr.pcifunc = rvu->rep_pcifunc; in rvu_rep_notify_pfvf_state() 139 req->pcifunc = pcifunc; in rvu_rep_notify_pfvf_state() 159 u16 pcifunc = req->pcifunc; in rvu_mbox_handler_nix_lf_stats() local 164 err = nix_get_nixlf(rvu, pcifunc, &nixlf, &blkaddr); in rvu_mbox_handler_nix_lf_stats() [all …]
|
| H A D | rvu_switch.c | 11 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.h | 167 u32 pcifunc; member 886 static inline bool is_lbk_vf(struct rvu *rvu, u16 pcifunc) in is_lbk_vf() argument 888 return (!(pcifunc & ~RVU_PFVF_FUNC_MASK) && in is_lbk_vf() 892 static inline bool is_vf(u16 pcifunc) in is_vf() argument 894 return !!(pcifunc & RVU_PFVF_FUNC_MASK); in is_vf() 898 static inline bool is_pffunc_af(u16 pcifunc) in is_pffunc_af() argument 900 return !pcifunc; in is_pffunc_af() 919 struct rvu_pfvf *rvu_get_pfvf(struct rvu *rvu, int pcifunc); 922 bool is_pf_func_valid(struct rvu *rvu, u16 pcifunc); 923 bool is_pffunc_map_valid(struct rvu *rvu, u16 pcifunc, int blktype); [all …]
|
| H A D | rvu_cgx.c | 457 inline bool is_cgx_config_permitted(struct rvu *rvu, u16 pcifunc) in is_cgx_config_permitted() argument 459 if ((pcifunc & RVU_PFVF_FUNC_MASK) || in is_cgx_config_permitted() 460 !is_pf_cgxmapped(rvu, rvu_get_pf(rvu->pdev, pcifunc))) in is_cgx_config_permitted() 485 int rvu_cgx_config_rxtx(struct rvu *rvu, u16 pcifunc, bool start) in rvu_cgx_config_rxtx() argument 487 int pf = rvu_get_pf(rvu->pdev, pcifunc); in rvu_cgx_config_rxtx() 492 if (!is_cgx_config_permitted(rvu, pcifunc)) in rvu_cgx_config_rxtx() 502 int rvu_cgx_tx_enable(struct rvu *rvu, u16 pcifunc, bool enable) in rvu_cgx_tx_enable() argument 504 int pf = rvu_get_pf(rvu->pdev, pcifunc); in rvu_cgx_tx_enable() 509 if (!is_cgx_config_permitted(rvu, pcifunc)) in rvu_cgx_tx_enable() 527 void rvu_cgx_disable_dmac_entries(struct rvu *rvu, u16 pcifunc) in rvu_cgx_disable_dmac_entries() argument [all …]
|
| H A D | rvu_nix.c | 21 static void nix_free_tx_vtag_entries(struct rvu *rvu, u16 pcifunc); 24 static int nix_update_mce_rule(struct rvu *rvu, u16 pcifunc, 30 struct nix_hw *nix_hw, u16 pcifunc); 31 static int nix_free_all_bandprof(struct rvu *rvu, u16 pcifunc); 35 static int nix_get_tx_link(struct rvu *rvu, u16 pcifunc); 85 u16 pcifunc; member 109 bool is_nixlf_attached(struct rvu *rvu, u16 pcifunc) in is_nixlf_attached() argument 111 struct rvu_pfvf *pfvf = rvu_get_pfvf(rvu, pcifunc); in is_nixlf_attached() 114 blkaddr = rvu_get_blkaddr(rvu, BLKTYPE_NIX, pcifunc); in is_nixlf_attached() 134 int nix_get_nixlf(struct rvu *rvu, u16 pcifunc, int *nixlf, int *nix_blkaddr) in nix_get_nixlf() argument [all …]
|
| H A D | rvu_npc.c | 37 int blkaddr, u16 pcifunc); 39 u16 pcifunc); 98 int npc_config_ts_kpuaction(struct rvu *rvu, int pf, u16 pcifunc, bool enable) in npc_config_ts_kpuaction() argument 109 blkaddr = rvu_get_blkaddr(rvu, BLKTYPE_NPC, pcifunc); in npc_config_ts_kpuaction() 126 static int npc_get_ucast_mcam_index(struct npc_mcam *mcam, u16 pcifunc, in npc_get_ucast_mcam_index() argument 135 pfvf = rvu_get_pfvf(rvu, pcifunc); in npc_get_ucast_mcam_index() 152 u16 pcifunc, int nixlf, int type) in npc_get_nixlf_mcam_index() argument 162 rc = npc_cn20k_dft_rules_idx_get(rvu, pcifunc, &bcast, &mcast, in npc_get_nixlf_mcam_index() 167 if (is_lbk_vf(rvu, pcifunc)) { in npc_get_nixlf_mcam_index() 173 if (is_cgx_vf(rvu, pcifunc)) { in npc_get_nixlf_mcam_index() [all …]
|
| H A D | rvu_sdp.c | 20 bool is_sdp_pfvf(struct rvu *rvu, u16 pcifunc) in is_sdp_pfvf() argument 22 u16 pf = rvu_get_pf(rvu->pdev, pcifunc); in is_sdp_pfvf() 37 bool is_sdp_pf(struct rvu *rvu, u16 pcifunc) in is_sdp_pf() argument 39 return (is_sdp_pfvf(rvu, pcifunc) && in is_sdp_pf() 40 !(pcifunc & RVU_PFVF_FUNC_MASK)); in is_sdp_pf() 44 bool is_sdp_vf(struct rvu *rvu, u16 pcifunc) in is_sdp_vf() argument 46 if (!(pcifunc & ~RVU_PFVF_FUNC_MASK)) in is_sdp_vf() 49 return (is_sdp_pfvf(rvu, pcifunc) && in is_sdp_vf() 50 !!(pcifunc & RVU_PFVF_FUNC_MASK)); in is_sdp_vf() 97 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(rvu->pdev, pcifunc)]; in mcs_add_intr_wq_entry() 126 pf = rvu_get_pf(rvu->pdev, event->pcifunc); in mcs_notify_pfvf() 139 req->hdr.pcifunc = event->pcifunc; in mcs_notify_pfvf() 183 u16 pcifunc = req->hdr.pcifunc; in rvu_mbox_handler_mcs_intr_cfg() local 193 if (pcifunc & RVU_PFVF_FUNC_MASK) in rvu_mbox_handler_mcs_intr_cfg() 194 pfvf = &mcs->vf[rvu_get_hwvf(rvu, pcifunc)]; in rvu_mbox_handler_mcs_intr_cfg() 196 pfvf = &mcs->pf[rvu_get_pf(rvu->pdev, pcifunc)]; in rvu_mbox_handler_mcs_intr_cfg() [all …]
|
| H A D | rvu_cpt.c | 409 static bool is_cpt_pf(struct rvu *rvu, u16 pcifunc) in is_cpt_pf() argument 413 if (rvu_get_pf(rvu->pdev, pcifunc) != cpt_pf_num) in is_cpt_pf() 415 if (pcifunc & RVU_PFVF_FUNC_MASK) in is_cpt_pf() 421 static bool is_cpt_vf(struct rvu *rvu, u16 pcifunc) in is_cpt_vf() argument 425 if (rvu_get_pf(rvu->pdev, pcifunc) != cpt_pf_num) in is_cpt_vf() 427 if (!(pcifunc & RVU_PFVF_FUNC_MASK)) in is_cpt_vf() 448 u16 pcifunc = req->hdr.pcifunc; in rvu_mbox_handler_cpt_lf_alloc() local 462 num_lfs = rvu_get_rsrc_mapcount(rvu_get_pfvf(rvu, pcifunc), in rvu_mbox_handler_cpt_lf_alloc() 471 req->nix_pf_func = pcifunc; in rvu_mbox_handler_cpt_lf_alloc() 480 req->sso_pf_func = pcifunc; in rvu_mbox_handler_cpt_lf_alloc() [all …]
|
| H A D | rvu_cn10k.c | 67 static u32 rvu_get_lmtst_tbl_index(struct rvu *rvu, u16 pcifunc) in rvu_get_lmtst_tbl_index() argument 69 return ((rvu_get_pf(rvu->pdev, pcifunc) * LMT_MAX_VFS) + in rvu_get_lmtst_tbl_index() 70 (pcifunc & RVU_PFVF_FUNC_MASK)) * LMT_MAPTBL_ENTRY_SIZE; in rvu_get_lmtst_tbl_index() 73 static int rvu_get_lmtaddr(struct rvu *rvu, u16 pcifunc, in rvu_get_lmtaddr() argument 86 pf = rvu_get_pf(rvu->pdev, pcifunc) & RVU_OTX2_PFVF_PF_MASK; in rvu_get_lmtaddr() 88 ((pcifunc & RVU_PFVF_FUNC_MASK) & 0xFF); in rvu_get_lmtaddr() 113 static int rvu_update_lmtaddr(struct rvu *rvu, u16 pcifunc, u64 lmt_addr) in rvu_update_lmtaddr() argument 115 struct rvu_pfvf *pfvf = rvu_get_pfvf(rvu, pcifunc); in rvu_update_lmtaddr() 121 tbl_idx = rvu_get_lmtst_tbl_index(rvu, pcifunc); in rvu_update_lmtaddr() 152 struct rvu_pfvf *pfvf = rvu_get_pfvf(rvu, req->hdr.pcifunc); in rvu_mbox_handler_lmtst_tbl_setup() [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_fs.c | 1252 static void rvu_mcam_remove_counter_from_rule(struct rvu *rvu, u16 pcifunc, in rvu_mcam_remove_counter_from_rule() argument 1263 __rvu_mcam_remove_counter_from_rule(rvu, pcifunc, rule); in rvu_mcam_remove_counter_from_rule() 1268 static void rvu_mcam_add_counter_to_rule(struct rvu *rvu, u16 pcifunc, in rvu_mcam_add_counter_to_rule() argument 1276 __rvu_mcam_add_counter_to_rule(rvu, pcifunc, rule, rsp); in rvu_mcam_add_counter_to_rule() 1292 if (req->hdr.pcifunc && in npc_mcast_update_action_index() 1294 mce_index = rvu_nix_mcast_get_mce_index(rvu, req->hdr.pcifunc, req->index); in npc_mcast_update_action_index() 1400 if (is_pffunc_af(req->hdr.pcifunc)) in npc_update_tx_entry() 1448 u16 owner = req->hdr.pcifunc; in npc_install_flow() 1519 write_req.hdr.pcifunc = owner; in npc_install_flow() 1535 write_req.hdr.pcifunc = 0; in npc_install_flow() [all …]
|
| H A D | rvu_debugfs.c | 649 static void get_lf_str_list(const struct rvu_block *block, int pcifunc, in get_lf_str_list() argument 658 if (block->fn_map[lf] != pcifunc) in get_lf_str_list() 687 u16 pcifunc; in get_max_column_width() local 696 pcifunc = rvu_make_pcifunc(rvu->pdev, pf, vf); in get_max_column_width() 697 if (!pcifunc) in get_max_column_width() 705 get_lf_str_list(&block, pcifunc, buf); in get_max_column_width() 725 int pf, vf, pcifunc; in rvu_dbg_rsrc_attach_status() local 767 pcifunc = rvu_make_pcifunc(rvu->pdev, pf, vf); in rvu_dbg_rsrc_attach_status() 768 if (!pcifunc) in rvu_dbg_rsrc_attach_status() 789 get_lf_str_list(&block, pcifunc, lfs); in rvu_dbg_rsrc_attach_status() [all …]
|
| 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 | 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 | 353 msg->id, msg->pcifunc); in otx2_mbox_msg_send_data() 518 otx2_reply_invalid_msg(struct otx2_mbox *mbox, int devid, u16 pcifunc, u16 id) in otx2_reply_invalid_msg() argument 529 rsp->hdr.pcifunc = pcifunc; in otx2_reply_invalid_msg()
|
| H A D | mbox.h | 102 u16 pcifunc; /* Who's sending this msg */ member 133 u16 pcifunc, u16 id); 1414 u16 pcifunc[NIX_MCE_ENTRY_MAX]; member 1515 u16 pcifunc; member 1521 u16 pcifunc; member 1805 u16 pcifunc; member
|
| /linux/drivers/net/ethernet/marvell/octeontx2/nic/ |
| H A D | rep.c | 59 req->hdr.pcifunc = rep->pcifunc; in rvu_rep_mcam_flow_init() 120 priv->pcifunc = rep->pcifunc; in rvu_rep_setup_tc_cb() 210 evt.pcifunc = rep->pcifunc; in rvu_rep_dl_port_fn_hw_addr_set() 245 if (!(rep->pcifunc & RVU_PFVF_FUNC_MASK)) { in rvu_rep_devlink_port_register() 247 attrs.phys.port_number = rvu_get_pf(priv->pdev, rep->pcifunc); in rvu_rep_devlink_port_register() 250 attrs.pci_vf.pf = rvu_get_pf(priv->pdev, rep->pcifunc); in rvu_rep_devlink_port_register() 251 attrs.pci_vf.vf = rep->pcifunc & RVU_PFVF_FUNC_MASK; in rvu_rep_devlink_port_register() 267 static int rvu_rep_get_repid(struct otx2_nic *priv, u16 pcifunc) in rvu_rep_get_repid() argument 272 if (priv->rep_pf_map[rep_id] == pcifunc) in rvu_rep_get_repid() 289 req->pcifunc = data->pcifunc; in rvu_rep_notify_pfvf() [all …]
|
| H A D | otx2_pf.c | 131 req->hdr.pcifunc &= RVU_PFVF_FUNC_MASK; in otx2_flr_handler() 132 req->hdr.pcifunc |= (vf + 1) & RVU_PFVF_FUNC_MASK; in otx2_flr_handler() 210 rvu_get_pf(pf->pdev, pf->pcifunc)); in otx2_register_flr_me_intr() 221 rvu_get_pf(pf->pdev, pf->pcifunc)); in otx2_register_flr_me_intr() 233 rvu_get_pf(pf->pdev, pf->pcifunc)); in otx2_register_flr_me_intr() 243 rvu_get_pf(pf->pdev, pf->pcifunc)); in otx2_register_flr_me_intr() 481 msg->pcifunc &= ~RVU_PFVF_FUNC_MASK; in otx2_pfvf_mbox_handler() 482 msg->pcifunc |= (vf_idx + 1) & RVU_PFVF_FUNC_MASK; in otx2_pfvf_mbox_handler() 736 if (pf->pcifunc) in otx2_register_pfvf_mbox_intr() 738 "RVUPF%d_VF Mbox0", rvu_get_pf(pf->pdev, pf->pcifunc)); in otx2_register_pfvf_mbox_intr() [all …]
|
| H A D | rep.h | 43 u16 pcifunc; member
|
| H A D | otx2_tc.c | 389 ureq->pcifunc[0] = nic->pcifunc; in otx2_tc_update_mcast() 451 if (rvu_get_pf(nic->pdev, nic->pcifunc) != in otx2_tc_parse_actions() 452 rvu_get_pf(nic->pdev, priv->pcifunc)) { in otx2_tc_parse_actions() 457 req->vf = priv->pcifunc & RVU_PFVF_FUNC_MASK; in otx2_tc_parse_actions() 460 req->vf = rdev->pcifunc & RVU_PFVF_FUNC_MASK; in otx2_tc_parse_actions() 520 dummy_grp_update_req.pcifunc[num_intf] = priv->pcifunc; in otx2_tc_parse_actions() 1315 req->vf = nic->pcifunc; in otx2_tc_add_flow()
|
| H A D | cn20k.c | 218 if (pf->pcifunc) in cn20k_register_pfvf_mbox_intr() 221 pf->pcifunc), vec / 2, vec % 2); in cn20k_register_pfvf_mbox_intr() 493 if (is_otx2_vf(nic->pcifunc)) in cn20k_tc_alloc_entry()
|
| H A D | otx2_flows.c | 197 pfvf->pcifunc); in otx2_alloc_mcam_entries() 227 if (!is_otx2_vf(pfvf->pcifunc)) { in otx2_alloc_mcam_entries() 306 pfvf->pcifunc); in otx2_mcam_entry_init() 1207 pfvf->pcifunc); in otx2_add_flow_msg() 1383 if (!is_otx2_vf(pfvf->pcifunc) && !vf_num && in otx2_add_flow()
|
| /linux/drivers/net/ethernet/marvell/octeontx2/af/cn20k/ |
| H A D | npc.c | 38 #define NPC_DFT_RULE_ID_MK(pcifunc, id) \ argument 39 ((pcifunc) | FIELD_PREP(GENMASK_ULL(31, 16), id)) 406 static int npc_vidx_maps_add_entry(struct rvu *rvu, u16 mcam_idx, int pcifunc, in npc_vidx_maps_add_entry() argument 1367 struct rvu_pfvf *pfvf = rvu_get_pfvf(rvu, req->hdr.pcifunc); in rvu_mbox_handler_npc_cn20k_mcam_write_entry() 1369 u16 pcifunc = req->hdr.pcifunc; in rvu_mbox_handler_npc_cn20k_mcam_write_entry() local 1380 rc = npc_mcam_verify_entry(mcam, pcifunc, req->entry); in rvu_mbox_handler_npc_cn20k_mcam_write_entry() 1395 if (is_pffunc_af(req->hdr.pcifunc)) in rvu_mbox_handler_npc_cn20k_mcam_write_entry() 1412 u16 pcifunc = req->hdr.pcifunc; in rvu_mbox_handler_npc_cn20k_mcam_read_entry() local 1422 rc = npc_mcam_verify_entry(mcam, pcifunc, req->entry); in rvu_mbox_handler_npc_cn20k_mcam_read_entry() 1438 struct rvu_pfvf *pfvf = rvu_get_pfvf(rvu, req->hdr.pcifunc); in rvu_mbox_handler_npc_cn20k_mcam_alloc_and_write_entry() [all …]
|
| /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->pdev, cptpf->pf_id, 0); in send_inline_ipsec_inbound_msg() 396 msg->pcifunc = rvu_make_pcifunc(cptpf->pdev, cptpf->pf_id, in otx2_cptpf_vfpf_mbox_handler() 472 cptpf->pf_id = rvu_get_pf(cptpf->pdev, msg->pcifunc); in process_afpf_mbox_msg() 551 fwd->pcifunc = msg->pcifunc; in forward_to_vf() 579 vf_id = (msg->pcifunc >> RVU_PFVF_FUNC_SHIFT) & in otx2_cptpf_afpf_mbox_handler() 613 rsp->hdr.pcifunc = 0; in handle_msg_cpt_inst_lmtst()
|