Lines Matching refs:pfvf

72 	struct otx2_nic *pfvf = netdev_priv(netdev);  in otx2_get_drvinfo()  local
75 strlcpy(info->bus_info, pci_name(pfvf->pdev), sizeof(info->bus_info)); in otx2_get_drvinfo()
78 static void otx2_get_qset_strings(struct otx2_nic *pfvf, u8 **data, int qset) in otx2_get_qset_strings() argument
80 int start_qidx = qset * pfvf->hw.rx_queues; in otx2_get_qset_strings()
83 for (qidx = 0; qidx < pfvf->hw.rx_queues; qidx++) { in otx2_get_qset_strings()
90 for (qidx = 0; qidx < pfvf->hw.tx_queues; qidx++) { in otx2_get_qset_strings()
101 struct otx2_nic *pfvf = netdev_priv(netdev); in otx2_get_strings() local
117 otx2_get_qset_strings(pfvf, &data, 0); in otx2_get_strings()
133 static void otx2_get_qset_stats(struct otx2_nic *pfvf, in otx2_get_qset_stats() argument
138 if (!pfvf) in otx2_get_qset_stats()
140 for (qidx = 0; qidx < pfvf->hw.rx_queues; qidx++) { in otx2_get_qset_stats()
141 if (!otx2_update_rq_stats(pfvf, qidx)) { in otx2_get_qset_stats()
147 *((*data)++) = ((u64 *)&pfvf->qset.rq[qidx].stats) in otx2_get_qset_stats()
151 for (qidx = 0; qidx < pfvf->hw.tx_queues; qidx++) { in otx2_get_qset_stats()
152 if (!otx2_update_sq_stats(pfvf, qidx)) { in otx2_get_qset_stats()
158 *((*data)++) = ((u64 *)&pfvf->qset.sq[qidx].stats) in otx2_get_qset_stats()
167 struct otx2_nic *pfvf = netdev_priv(netdev); in otx2_get_ethtool_stats() local
170 otx2_get_dev_stats(pfvf); in otx2_get_ethtool_stats()
172 *(data++) = ((u64 *)&pfvf->hw.dev_stats) in otx2_get_ethtool_stats()
176 *(data++) = atomic_read(&((atomic_t *)&pfvf->hw.drv_stats) in otx2_get_ethtool_stats()
179 otx2_get_qset_stats(pfvf, stats, &data); in otx2_get_ethtool_stats()
180 otx2_update_lmac_stats(pfvf); in otx2_get_ethtool_stats()
182 *(data++) = pfvf->hw.cgx_rx_stats[stat]; in otx2_get_ethtool_stats()
184 *(data++) = pfvf->hw.cgx_tx_stats[stat]; in otx2_get_ethtool_stats()
185 *(data++) = pfvf->reset_count; in otx2_get_ethtool_stats()
190 struct otx2_nic *pfvf = netdev_priv(netdev); in otx2_get_sset_count() local
197 (pfvf->hw.rx_queues + pfvf->hw.tx_queues); in otx2_get_sset_count()
207 struct otx2_nic *pfvf = netdev_priv(dev); in otx2_get_channels() local
209 channel->max_rx = pfvf->hw.max_queues; in otx2_get_channels()
210 channel->max_tx = pfvf->hw.max_queues; in otx2_get_channels()
212 channel->rx_count = pfvf->hw.rx_queues; in otx2_get_channels()
213 channel->tx_count = pfvf->hw.tx_queues; in otx2_get_channels()
220 struct otx2_nic *pfvf = netdev_priv(dev); in otx2_set_channels() local
235 pfvf->hw.rx_queues = channel->rx_count; in otx2_set_channels()
236 pfvf->hw.tx_queues = channel->tx_count; in otx2_set_channels()
237 pfvf->qset.cq_cnt = pfvf->hw.tx_queues + pfvf->hw.rx_queues; in otx2_set_channels()
244 pfvf->hw.tx_queues, pfvf->hw.rx_queues); in otx2_set_channels()
252 struct otx2_nic *pfvf = netdev_priv(netdev); in otx2_get_pauseparam() local
255 if (is_otx2_lbkvf(pfvf->pdev)) in otx2_get_pauseparam()
258 req = otx2_mbox_alloc_msg_cgx_cfg_pause_frm(&pfvf->mbox); in otx2_get_pauseparam()
262 if (!otx2_sync_mbox_msg(&pfvf->mbox)) { in otx2_get_pauseparam()
264 otx2_mbox_get_rsp(&pfvf->mbox.mbox, 0, &req->hdr); in otx2_get_pauseparam()
273 struct otx2_nic *pfvf = netdev_priv(netdev); in otx2_set_pauseparam() local
278 if (is_otx2_lbkvf(pfvf->pdev)) in otx2_set_pauseparam()
282 pfvf->flags |= OTX2_FLAG_RX_PAUSE_ENABLED; in otx2_set_pauseparam()
284 pfvf->flags &= ~OTX2_FLAG_RX_PAUSE_ENABLED; in otx2_set_pauseparam()
287 pfvf->flags |= OTX2_FLAG_TX_PAUSE_ENABLED; in otx2_set_pauseparam()
289 pfvf->flags &= ~OTX2_FLAG_TX_PAUSE_ENABLED; in otx2_set_pauseparam()
291 return otx2_config_pause_frm(pfvf); in otx2_set_pauseparam()
297 struct otx2_nic *pfvf = netdev_priv(netdev); in otx2_get_ringparam() local
298 struct otx2_qset *qs = &pfvf->qset; in otx2_get_ringparam()
309 struct otx2_nic *pfvf = netdev_priv(netdev); in otx2_set_ringparam() local
311 struct otx2_qset *qs = &pfvf->qset; in otx2_set_ringparam()
322 if (rx_count < pfvf->hw.rq_skid) in otx2_set_ringparam()
323 rx_count = pfvf->hw.rq_skid; in otx2_set_ringparam()
353 struct otx2_nic *pfvf = netdev_priv(netdev); in otx2_get_coalesce() local
354 struct otx2_hw *hw = &pfvf->hw; in otx2_get_coalesce()
367 struct otx2_nic *pfvf = netdev_priv(netdev); in otx2_set_coalesce() local
368 struct otx2_hw *hw = &pfvf->hw; in otx2_set_coalesce()
413 for (qidx = 0; qidx < pfvf->hw.cint_cnt; qidx++) in otx2_set_coalesce()
414 otx2_config_irq_coalescing(pfvf, qidx); in otx2_set_coalesce()
420 static int otx2_get_rss_hash_opts(struct otx2_nic *pfvf, in otx2_get_rss_hash_opts() argument
423 struct otx2_rss_info *rss = &pfvf->hw.rss_info; in otx2_get_rss_hash_opts()
465 static int otx2_set_rss_hash_opts(struct otx2_nic *pfvf, in otx2_set_rss_hash_opts() argument
468 struct otx2_rss_info *rss = &pfvf->hw.rss_info; in otx2_set_rss_hash_opts()
473 netdev_err(pfvf->netdev, in otx2_set_rss_hash_opts()
539 otx2_set_flowkey_cfg(pfvf); in otx2_set_rss_hash_opts()
546 struct otx2_nic *pfvf = netdev_priv(dev); in otx2_get_rxnfc() local
551 nfc->data = pfvf->hw.rx_queues; in otx2_get_rxnfc()
555 return otx2_get_rss_hash_opts(pfvf, nfc); in otx2_get_rxnfc()
564 struct otx2_nic *pfvf = netdev_priv(dev); in otx2_set_rxnfc() local
569 ret = otx2_set_rss_hash_opts(pfvf, nfc); in otx2_set_rxnfc()
580 struct otx2_nic *pfvf = netdev_priv(netdev); in otx2_get_rxfh_key_size() local
583 rss = &pfvf->hw.rss_info; in otx2_get_rxfh_key_size()
590 struct otx2_nic *pfvf = netdev_priv(dev); in otx2_get_rxfh_indir_size() local
592 return pfvf->hw.rss_info.rss_size; in otx2_get_rxfh_indir_size()
599 struct otx2_nic *pfvf = netdev_priv(dev); in otx2_get_rxfh() local
603 rss = &pfvf->hw.rss_info; in otx2_get_rxfh()
623 struct otx2_nic *pfvf = netdev_priv(dev); in otx2_set_rxfh() local
630 rss = &pfvf->hw.rss_info; in otx2_set_rxfh()
644 otx2_set_rss_key(pfvf); in otx2_set_rxfh()
647 otx2_set_rss_table(pfvf); in otx2_set_rxfh()
653 struct otx2_nic *pfvf = netdev_priv(netdev); in otx2_get_msglevel() local
655 return pfvf->msg_enable; in otx2_get_msglevel()
660 struct otx2_nic *pfvf = netdev_priv(netdev); in otx2_set_msglevel() local
662 pfvf->msg_enable = val; in otx2_set_msglevel()
667 struct otx2_nic *pfvf = netdev_priv(netdev); in otx2_get_link() local
670 if (is_otx2_lbkvf(pfvf->pdev)) in otx2_get_link()
672 return pfvf->linfo.link_up; in otx2_get_link()
678 struct otx2_nic *pfvf = netdev_priv(netdev); in otx2_get_ts_info() local
680 if (!pfvf->ptp) in otx2_get_ts_info()
690 info->phc_index = otx2_ptp_clock_index(pfvf); in otx2_get_ts_info()