Home
last modified time | relevance | path

Searched refs:pfvf (Results 1 – 25 of 32) sorted by relevance

12

/Linux-v5.15/drivers/net/ethernet/marvell/octeontx2/nic/
Dotx2_common.c18 struct otx2_nic *pfvf, int qidx) in otx2_nix_rq_op_stats() argument
23 ptr = (u64 *)otx2_get_regaddr(pfvf, NIX_LF_RQ_OP_OCTS); in otx2_nix_rq_op_stats()
26 ptr = (u64 *)otx2_get_regaddr(pfvf, NIX_LF_RQ_OP_PKTS); in otx2_nix_rq_op_stats()
31 struct otx2_nic *pfvf, int qidx) in otx2_nix_sq_op_stats() argument
36 ptr = (u64 *)otx2_get_regaddr(pfvf, NIX_LF_SQ_OP_OCTS); in otx2_nix_sq_op_stats()
39 ptr = (u64 *)otx2_get_regaddr(pfvf, NIX_LF_SQ_OP_PKTS); in otx2_nix_sq_op_stats()
43 void otx2_update_lmac_stats(struct otx2_nic *pfvf) in otx2_update_lmac_stats() argument
47 if (!netif_running(pfvf->netdev)) in otx2_update_lmac_stats()
50 mutex_lock(&pfvf->mbox.lock); in otx2_update_lmac_stats()
51 req = otx2_mbox_alloc_msg_cgx_stats(&pfvf->mbox); in otx2_update_lmac_stats()
[all …]
Dcn10k.c26 int cn10k_lmtst_init(struct otx2_nic *pfvf) in cn10k_lmtst_init() argument
33 if (!test_bit(CN10K_LMTST, &pfvf->hw.cap_flag)) { in cn10k_lmtst_init()
34 pfvf->hw_ops = &otx2_hw_ops; in cn10k_lmtst_init()
38 pfvf->hw_ops = &cn10k_hw_ops; in cn10k_lmtst_init()
40 pfvf->tot_lmt_lines = (num_online_cpus() * LMT_BURST_SIZE); in cn10k_lmtst_init()
41 pfvf->hw.lmt_info = alloc_percpu(struct otx2_lmt_info); in cn10k_lmtst_init()
43 mutex_lock(&pfvf->mbox.lock); in cn10k_lmtst_init()
44 req = otx2_mbox_alloc_msg_lmtst_tbl_setup(&pfvf->mbox); in cn10k_lmtst_init()
46 mutex_unlock(&pfvf->mbox.lock); in cn10k_lmtst_init()
52 err = qmem_alloc(pfvf->dev, &pfvf->dync_lmt, pfvf->tot_lmt_lines, in cn10k_lmtst_init()
[all …]
Dotx2_ethtool.c72 static struct cgx_fw_data *otx2_get_fwdata(struct otx2_nic *pfvf);
77 struct otx2_nic *pfvf = netdev_priv(netdev); in otx2_get_drvinfo() local
80 strlcpy(info->bus_info, pci_name(pfvf->pdev), sizeof(info->bus_info)); in otx2_get_drvinfo()
83 static void otx2_get_qset_strings(struct otx2_nic *pfvf, u8 **data, int qset) in otx2_get_qset_strings() argument
85 int start_qidx = qset * pfvf->hw.rx_queues; in otx2_get_qset_strings()
88 for (qidx = 0; qidx < pfvf->hw.rx_queues; qidx++) { in otx2_get_qset_strings()
95 for (qidx = 0; qidx < pfvf->hw.tx_queues; qidx++) { in otx2_get_qset_strings()
106 struct otx2_nic *pfvf = netdev_priv(netdev); in otx2_get_strings() local
122 otx2_get_qset_strings(pfvf, &data, 0); in otx2_get_strings()
142 static void otx2_get_qset_stats(struct otx2_nic *pfvf, in otx2_get_qset_stats() argument
[all …]
Dotx2_devlink.c15 struct otx2_nic *pfvf = otx2_dl->pfvf; in otx2_dl_mcam_count_validate() local
18 if (!pfvf->flow_cfg) { in otx2_dl_mcam_count_validate()
24 flow_cfg = pfvf->flow_cfg; in otx2_dl_mcam_count_validate()
38 struct otx2_nic *pfvf = otx2_dl->pfvf; in otx2_dl_mcam_count_set() local
40 if (!pfvf->flow_cfg) in otx2_dl_mcam_count_set()
43 otx2_alloc_mcam_entries(pfvf, ctx->val.vu16); in otx2_dl_mcam_count_set()
44 otx2_tc_alloc_ent_bitmap(pfvf); in otx2_dl_mcam_count_set()
53 struct otx2_nic *pfvf = otx2_dl->pfvf; in otx2_dl_mcam_count_get() local
56 if (!pfvf->flow_cfg) { in otx2_dl_mcam_count_get()
61 flow_cfg = pfvf->flow_cfg; in otx2_dl_mcam_count_get()
[all …]
Dotx2_flows.c15 static int otx2_mcam_entry_init(struct otx2_nic *pfvf);
33 static void otx2_clear_ntuple_flow_info(struct otx2_nic *pfvf, struct otx2_flow_config *flow_cfg) in otx2_clear_ntuple_flow_info() argument
35 devm_kfree(pfvf->dev, flow_cfg->flow_ent); in otx2_clear_ntuple_flow_info()
40 static int otx2_free_ntuple_mcam_entries(struct otx2_nic *pfvf) in otx2_free_ntuple_mcam_entries() argument
42 struct otx2_flow_config *flow_cfg = pfvf->flow_cfg; in otx2_free_ntuple_mcam_entries()
49 mutex_lock(&pfvf->mbox.lock); in otx2_free_ntuple_mcam_entries()
51 req = otx2_mbox_alloc_msg_npc_mcam_free_entry(&pfvf->mbox); in otx2_free_ntuple_mcam_entries()
58 err = otx2_sync_mbox_msg(&pfvf->mbox); in otx2_free_ntuple_mcam_entries()
62 mutex_unlock(&pfvf->mbox.lock); in otx2_free_ntuple_mcam_entries()
63 otx2_clear_ntuple_flow_info(pfvf, flow_cfg); in otx2_free_ntuple_mcam_entries()
[all …]
Dotx2_txrx.c44 static dma_addr_t otx2_dma_map_skb_frag(struct otx2_nic *pfvf, in otx2_dma_map_skb_frag() argument
62 return otx2_dma_map_page(pfvf, page, offset, *len, DMA_TO_DEVICE); in otx2_dma_map_skb_frag()
65 static void otx2_dma_unmap_skb_frags(struct otx2_nic *pfvf, struct sg_list *sg) in otx2_dma_unmap_skb_frags() argument
70 otx2_dma_unmap_page(pfvf, sg->dma_addr[seg], in otx2_dma_unmap_skb_frags()
76 static void otx2_snd_pkt_handler(struct otx2_nic *pfvf, in otx2_snd_pkt_handler() argument
89 if (unlikely(snd_comp->status) && netif_msg_tx_err(pfvf)) in otx2_snd_pkt_handler()
91 pfvf->netdev->name, cq->cint_idx, in otx2_snd_pkt_handler()
102 err = otx2_ptp_tstamp2time(pfvf, timestamp, &tsns); in otx2_snd_pkt_handler()
113 otx2_dma_unmap_skb_frags(pfvf, sg); in otx2_snd_pkt_handler()
118 static void otx2_set_rxtstamp(struct otx2_nic *pfvf, in otx2_set_rxtstamp() argument
[all …]
Dotx2_common.h162 struct otx2_nic *pfvf; member
427 static inline void otx2_setup_dev_hw_settings(struct otx2_nic *pfvf) in otx2_setup_dev_hw_settings() argument
429 struct otx2_hw *hw = &pfvf->hw; in otx2_setup_dev_hw_settings()
431 pfvf->hw.cq_time_wait = CQ_TIMER_THRESH_DEFAULT; in otx2_setup_dev_hw_settings()
432 pfvf->hw.cq_ecount_wait = CQ_CQE_THRESH_DEFAULT; in otx2_setup_dev_hw_settings()
433 pfvf->hw.cq_qcount_wait = CQ_QCOUNT_DEFAULT; in otx2_setup_dev_hw_settings()
437 if (is_96xx_A0(pfvf->pdev)) { in otx2_setup_dev_hw_settings()
441 pfvf->hw.cq_qcount_wait = 0x0; in otx2_setup_dev_hw_settings()
446 pfvf->hw.rq_skid = 600; in otx2_setup_dev_hw_settings()
447 pfvf->qset.rqe_cnt = Q_COUNT(Q_SIZE_1K); in otx2_setup_dev_hw_settings()
[all …]
Dotx2_ptp.c62 struct otx2_nic *pfvf = ptp->nic; in otx2_ptp_adjtime() local
64 mutex_lock(&pfvf->mbox.lock); in otx2_ptp_adjtime()
66 mutex_unlock(&pfvf->mbox.lock); in otx2_ptp_adjtime()
76 struct otx2_nic *pfvf = ptp->nic; in otx2_ptp_gettime() local
79 mutex_lock(&pfvf->mbox.lock); in otx2_ptp_gettime()
81 mutex_unlock(&pfvf->mbox.lock); in otx2_ptp_gettime()
93 struct otx2_nic *pfvf = ptp->nic; in otx2_ptp_settime() local
98 mutex_lock(&pfvf->mbox.lock); in otx2_ptp_settime()
100 mutex_unlock(&pfvf->mbox.lock); in otx2_ptp_settime()
111 int otx2_ptp_init(struct otx2_nic *pfvf) in otx2_ptp_init() argument
[all …]
Dcn10k.h13 static inline int mtu_to_dwrr_weight(struct otx2_nic *pfvf, int mtu) in mtu_to_dwrr_weight() argument
20 weight = mtu / pfvf->hw.dwrr_mtu; in mtu_to_dwrr_weight()
21 if (mtu % pfvf->hw.dwrr_mtu) in mtu_to_dwrr_weight()
30 int cn10k_lmtst_init(struct otx2_nic *pfvf);
31 int cn10k_free_all_ipolicers(struct otx2_nic *pfvf);
32 int cn10k_alloc_matchall_ipolicer(struct otx2_nic *pfvf);
33 int cn10k_free_matchall_ipolicer(struct otx2_nic *pfvf);
34 int cn10k_set_matchall_ipolicer_rate(struct otx2_nic *pfvf,
36 int cn10k_map_unmap_rq_policer(struct otx2_nic *pfvf, int rq_idx,
38 int cn10k_alloc_leaf_profile(struct otx2_nic *pfvf, u16 *leaf);
[all …]
Dotx2_ptp.h11 int otx2_ptp_init(struct otx2_nic *pfvf);
12 void otx2_ptp_destroy(struct otx2_nic *pfvf);
14 int otx2_ptp_clock_index(struct otx2_nic *pfvf);
15 int otx2_ptp_tstamp2time(struct otx2_nic *pfvf, u64 tstamp, u64 *tsns);
Dotx2_devlink.h13 struct otx2_nic *pfvf; member
17 int otx2_register_dl(struct otx2_nic *pfvf);
18 void otx2_unregister_dl(struct otx2_nic *pfvf);
Dotx2_dmac_flt.c73 static int otx2_dmacflt_do_remove(struct otx2_nic *pfvf, const u8 *mac, in otx2_dmacflt_do_remove() argument
79 mutex_lock(&pfvf->mbox.lock); in otx2_dmacflt_do_remove()
80 req = otx2_mbox_alloc_msg_cgx_mac_addr_del(&pfvf->mbox); in otx2_dmacflt_do_remove()
82 mutex_unlock(&pfvf->mbox.lock); in otx2_dmacflt_do_remove()
88 err = otx2_sync_mbox_msg(&pfvf->mbox); in otx2_dmacflt_do_remove()
89 mutex_unlock(&pfvf->mbox.lock); in otx2_dmacflt_do_remove()
Dotx2_pf.c46 static int otx2_config_hw_tx_tstamp(struct otx2_nic *pfvf, bool enable);
47 static int otx2_config_hw_rx_tstamp(struct otx2_nic *pfvf, bool enable);
456 pf = vf_mbox->pfvf; in otx2_pfvf_mbox_handler()
491 struct otx2_nic *pf = vf_mbox->pfvf; in otx2_pfvf_mbox_up_handler()
616 mbox->pfvf = pf; in otx2_pfvf_mbox_init()
818 pf = af_mbox->pfvf; in otx2_pfaf_mbox_handler()
921 struct otx2_nic *pf = af_mbox->pfvf; in otx2_pfaf_mbox_up_handler()
1041 mbox->pfvf = pf; in otx2_pfaf_mbox_init()
1906 static int otx2_config_hw_rx_tstamp(struct otx2_nic *pfvf, bool enable) in otx2_config_hw_rx_tstamp() argument
1911 if (pfvf->flags & OTX2_FLAG_RX_TSTAMP_ENABLED && enable) in otx2_config_hw_rx_tstamp()
[all …]
/Linux-v5.15/drivers/net/ethernet/marvell/octeontx2/af/
Drvu_npa.c61 struct rvu_pfvf *pfvf; in rvu_npa_aq_enq_inst() local
65 pfvf = rvu_get_pfvf(rvu, pcifunc); in rvu_npa_aq_enq_inst()
66 if (!pfvf->aura_ctx || req->aura_id >= pfvf->aura_ctx->qsize) in rvu_npa_aq_enq_inst()
70 if (!pfvf->npalf || blkaddr < 0) in rvu_npa_aq_enq_inst()
121 if (req->aura.pool_addr >= pfvf->pool_ctx->qsize) { in rvu_npa_aq_enq_inst()
126 req->aura.pool_addr = pfvf->pool_ctx->iova + in rvu_npa_aq_enq_inst()
127 (req->aura.pool_addr * pfvf->pool_ctx->entry_sz); in rvu_npa_aq_enq_inst()
158 __set_bit(req->aura_id, pfvf->aura_bmap); in rvu_npa_aq_enq_inst()
161 (test_bit(req->aura_id, pfvf->aura_bmap) & in rvu_npa_aq_enq_inst()
164 __set_bit(req->aura_id, pfvf->aura_bmap); in rvu_npa_aq_enq_inst()
[all …]
Drvu.c27 static void rvu_set_msix_offset(struct rvu *rvu, struct rvu_pfvf *pfvf,
29 static void rvu_clear_msix_offset(struct rvu *rvu, struct rvu_pfvf *pfvf,
336 static void rvu_update_rsrc_map(struct rvu *rvu, struct rvu_pfvf *pfvf, in rvu_update_rsrc_map() argument
364 pfvf->npalf = attach ? true : false; in rvu_update_rsrc_map()
365 num_lfs = pfvf->npalf; in rvu_update_rsrc_map()
369 pfvf->nixlf = attach ? true : false; in rvu_update_rsrc_map()
370 num_lfs = pfvf->nixlf; in rvu_update_rsrc_map()
373 attach ? pfvf->sso++ : pfvf->sso--; in rvu_update_rsrc_map()
374 num_lfs = pfvf->sso; in rvu_update_rsrc_map()
377 attach ? pfvf->ssow++ : pfvf->ssow--; in rvu_update_rsrc_map()
[all …]
Drvu_nix.c99 struct rvu_pfvf *pfvf = rvu_get_pfvf(rvu, pcifunc); in is_nixlf_attached() local
103 if (!pfvf->nixlf || blkaddr < 0) in is_nixlf_attached()
124 struct rvu_pfvf *pfvf = rvu_get_pfvf(rvu, pcifunc); in nix_get_nixlf() local
129 if (!pfvf->nixlf || blkaddr < 0) in nix_get_nixlf()
145 struct rvu_pfvf *pfvf; in nix_get_struct_ptrs() local
147 pfvf = rvu_get_pfvf(rvu, pcifunc); in nix_get_struct_ptrs()
149 if (!pfvf->nixlf || *blkaddr < 0) in nix_get_struct_ptrs()
293 struct rvu_pfvf *parent_pf, *pfvf = rvu_get_pfvf(rvu, pcifunc); in nix_interface_init() local
310 pfvf->cgx_lmac = rvu->pf2cgxlmac_map[pf]; in nix_interface_init()
311 rvu_get_cgx_lmac_id(pfvf->cgx_lmac, &cgx_id, &lmac_id); in nix_interface_init()
[all …]
Drvu_switch.c16 struct rvu_pfvf *pfvf; in rvu_switch_install_rx_rule() local
18 pfvf = rvu_get_pfvf(rvu, pcifunc); in rvu_switch_install_rx_rule()
23 if (!test_bit(NIXLF_INITIALIZED, &pfvf->flags)) in rvu_switch_install_rx_rule()
26 ether_addr_copy(req.packet.dmac, pfvf->mac_addr); in rvu_switch_install_rx_rule()
31 req.channel = pfvf->rx_chan_base; in rvu_switch_install_rx_rule()
33 req.intf = pfvf->nix_rx_intf; in rvu_switch_install_rx_rule()
44 struct rvu_pfvf *pfvf; in rvu_switch_install_tx_rule() local
47 pfvf = rvu_get_pfvf(rvu, pcifunc); in rvu_switch_install_tx_rule()
52 if (!test_bit(NIXLF_INITIALIZED, &pfvf->flags)) in rvu_switch_install_tx_rule()
55 lbkid = pfvf->nix_blkaddr == BLKADDR_NIX0 ? 0 : 1; in rvu_switch_install_tx_rule()
[all …]
Drvu_sdp.c52 struct rvu_pfvf *pfvf; in rvu_sdp_init() local
60 pfvf = &rvu->pf[sdp_pf_num[i]]; in rvu_sdp_init()
62 pfvf->sdp_info = devm_kzalloc(rvu->dev, in rvu_sdp_init()
65 if (!pfvf->sdp_info) in rvu_sdp_init()
82 struct rvu_pfvf *pfvf = rvu_get_pfvf(rvu, req->hdr.pcifunc); in rvu_mbox_handler_set_sdp_chan_info() local
84 memcpy(pfvf->sdp_info, &req->info, sizeof(struct sdp_node_info)); in rvu_mbox_handler_set_sdp_chan_info()
Drvu_cn10k.c98 struct rvu_pfvf *pfvf = rvu_get_pfvf(rvu, pcifunc); in rvu_update_lmtaddr() local
117 if (!pfvf->lmt_base_addr) in rvu_update_lmtaddr()
118 pfvf->lmt_base_addr = val; in rvu_update_lmtaddr()
135 struct rvu_pfvf *pfvf = rvu_get_pfvf(rvu, req->hdr.pcifunc); in rvu_mbox_handler_lmtst_tbl_setup() local
206 if (!pfvf->lmt_map_ent_w1) in rvu_mbox_handler_lmtst_tbl_setup()
207 pfvf->lmt_map_ent_w1 = val; in rvu_mbox_handler_lmtst_tbl_setup()
239 struct rvu_pfvf *pfvf = rvu_get_pfvf(rvu, pcifunc); in rvu_reset_lmt_map_tbl() local
246 if (pfvf->lmt_base_addr || pfvf->lmt_map_ent_w1) { in rvu_reset_lmt_map_tbl()
252 if (pfvf->lmt_base_addr) { in rvu_reset_lmt_map_tbl()
254 &pfvf->lmt_base_addr, in rvu_reset_lmt_map_tbl()
[all …]
Drvu_debugfs.c227 static void print_nix_qsize(struct seq_file *filp, struct rvu_pfvf *pfvf);
408 struct rvu_pfvf *pfvf; in rvu_dbg_rvu_pf_cgx_map_display() local
431 pfvf = rvu_get_pfvf(rvu, pcifunc); in rvu_dbg_rvu_pf_cgx_map_display()
433 if (pfvf->nix_blkaddr == BLKADDR_NIX0) in rvu_dbg_rvu_pf_cgx_map_display()
474 static void print_npa_qsize(struct seq_file *m, struct rvu_pfvf *pfvf) in print_npa_qsize() argument
482 if (!pfvf->aura_ctx) { in print_npa_qsize()
485 bitmap_print_to_pagebuf(false, buf, pfvf->aura_bmap, in print_npa_qsize()
486 pfvf->aura_ctx->qsize); in print_npa_qsize()
487 seq_printf(m, "Aura count : %d\n", pfvf->aura_ctx->qsize); in print_npa_qsize()
491 if (!pfvf->pool_ctx) { in print_npa_qsize()
[all …]
Drvu_npc_fs.c936 static void npc_update_rx_entry(struct rvu *rvu, struct rvu_pfvf *pfvf, in npc_update_rx_entry() argument
957 if (req->op == NIX_RX_ACTION_DEFAULT && pfvf->def_ucast_rule) in npc_update_rx_entry()
958 action = pfvf->def_ucast_rule->rx_action; in npc_update_rx_entry()
975 static void npc_update_tx_entry(struct rvu *rvu, struct rvu_pfvf *pfvf, in npc_update_tx_entry() argument
1012 int nixlf, struct rvu_pfvf *pfvf, in npc_install_flow() argument
1017 struct rvu_npc_mcam_rule *def_ucast_rule = pfvf->def_ucast_rule; in npc_install_flow()
1038 npc_update_rx_entry(rvu, pfvf, entry, req, target, pf_set_vfs_mac); in npc_install_flow()
1040 npc_update_tx_entry(rvu, pfvf, entry, req, target); in npc_install_flow()
1123 rule->intf = pfvf->nix_tx_intf; in npc_install_flow()
1125 rule->intf = pfvf->nix_rx_intf; in npc_install_flow()
[all …]
Drvu_npc.c85 void rvu_npc_set_pkind(struct rvu *rvu, int pkind, struct rvu_pfvf *pfvf) in rvu_npc_set_pkind() argument
150 struct rvu_pfvf *pfvf; in npc_get_ucast_mcam_index() local
152 pfvf = rvu_get_pfvf(rvu, pcifunc); in npc_get_ucast_mcam_index()
158 if (pfvf->nix_blkaddr == blkaddr) in npc_get_ucast_mcam_index()
406 struct rvu_pfvf *pfvf; in npc_fixup_vf_rule() local
418 pfvf = rvu_get_pfvf(rvu, target_func); in npc_fixup_vf_rule()
423 test_bit(NIXLF_INITIALIZED, &pfvf->flags))) in npc_fixup_vf_rule()
597 struct rvu_pfvf *pfvf = rvu_get_pfvf(rvu, pcifunc); in rvu_npc_install_ucast_entry() local
633 req.intf = pfvf->nix_rx_intf; in rvu_npc_install_ucast_entry()
647 struct rvu_pfvf *pfvf = rvu_get_pfvf(rvu, pcifunc); in rvu_npc_install_promisc_entry() local
[all …]
Drvu_cgx.c108 struct rvu_pfvf *pfvf = &rvu->pf[pf]; in rvu_map_cgx_nix_block() local
113 pfvf->nix_blkaddr = BLKADDR_NIX0; in rvu_map_cgx_nix_block()
115 pfvf->nix_blkaddr = BLKADDR_NIX1; in rvu_map_cgx_nix_block()
941 struct rvu_pfvf *parent_pf, *pfvf; in rvu_cgx_start_stop_io() local
948 pfvf = rvu_get_pfvf(rvu, pcifunc); in rvu_cgx_start_stop_io()
952 if (start && pfvf->cgx_in_use) in rvu_cgx_start_stop_io()
954 if (!start && !pfvf->cgx_in_use) in rvu_cgx_start_stop_io()
980 pfvf->cgx_in_use = start; in rvu_cgx_start_stop_io()
/Linux-v5.15/drivers/net/ethernet/chelsio/cxgb4/
Dsmt.c209 static struct smt_entry *t4_smt_alloc_switching(struct adapter *adap, u16 pfvf, in t4_smt_alloc_switching() argument
222 e->pfvf = pfvf; in t4_smt_alloc_switching()
Dsmt.h60 u16 pfvf; member

12