Lines Matching refs:vf

119 	int vf, reg = 0;
121 vf = flrwork - pf->flr_wrk;
130 req->hdr.pcifunc |= (vf + 1) & RVU_PFVF_FUNC_MASK;
133 if (vf >= 64) {
135 vf = vf - 64;
138 otx2_write64(pf, RVU_PF_VFTRPENDX(reg), BIT_ULL(vf));
139 otx2_write64(pf, RVU_PF_VFFLR_INT_ENA_W1SX(reg), BIT_ULL(vf));
148 int reg, dev, vf, start_vf, num_reg = 1;
159 for (vf = 0; vf < 64; vf++) {
160 if (!(intr & BIT_ULL(vf)))
162 dev = vf + start_vf;
165 otx2_write64(pf, RVU_PF_VFFLR_INTX(reg), BIT_ULL(vf));
168 BIT_ULL(vf));
177 int vf, reg, num_reg = 1;
187 for (vf = 0; vf < 64; vf++) {
188 if (!(intr & BIT_ULL(vf)))
191 otx2_write64(pf, RVU_PF_VFTRPENDX(reg), BIT_ULL(vf));
193 otx2_write64(pf, RVU_PF_VFME_INTX(reg), BIT_ULL(vf));
274 int vf;
287 for (vf = 0; vf < num_vfs; vf++) {
288 pf->flr_wrk[vf].pf = pf;
289 INIT_WORK(&pf->flr_wrk[vf].work, otx2_flr_handler);
356 int dir, int vf, int num_msgs)
369 src_mdev = &src_mbox->dev[vf];
371 src_mbox->rx_start + (vf * MBOX_SIZE);
394 "AF not responding to VF%d messages\n", vf);
409 pf->mbox.bbuf_base, vf);
425 dst_mdev = &dst_mbox->mbox_up.dev[vf];
429 err = otx2_sync_mbox_up_msg(dst_mbox, vf);
432 "VF%d is not responding to mailbox\n", vf);
439 otx2_forward_msg_pfvf(&pf->mbox_pfvf->mbox_up.dev[vf],
441 pf->mbox_pfvf[vf].bbuf_base,
572 int err, vf;
616 for (vf = 0; vf < numvfs; vf++) {
1694 int vf;
1701 for (vf = 0; vf < pci_num_vf(pfvf->pdev); vf++)
1702 if (pfvf->vf_configs[vf].trusted)
2365 static int otx2_do_set_vf_mac(struct otx2_nic *pf, int vf, const u8 *mac)
2384 req->vf = vf + 1;
2393 static int otx2_set_vf_mac(struct net_device *netdev, int vf, u8 *mac)
2403 if (vf >= pf->total_vfs)
2409 config = &pf->vf_configs[vf];
2412 ret = otx2_do_set_vf_mac(pf, vf, mac);
2420 static int otx2_do_set_vf_vlan(struct otx2_nic *pf, int vf, u16 vlan, u8 qos,
2432 config = &pf->vf_configs[vf];
2462 idx = ((vf * OTX2_PER_VF_VLAN_FLOWS) + OTX2_VF_VLAN_RX_INDEX);
2475 idx = ((vf * OTX2_PER_VF_VLAN_FLOWS) + OTX2_VF_VLAN_TX_INDEX);
2490 idx = ((vf * OTX2_PER_VF_VLAN_FLOWS) + OTX2_VF_VLAN_RX_INDEX);
2499 req->vf = vf + 1;
2541 idx = ((vf * OTX2_PER_VF_VLAN_FLOWS) + OTX2_VF_VLAN_TX_INDEX);
2546 req->vf = vf + 1;
2559 static int otx2_set_vf_vlan(struct net_device *netdev, int vf, u16 vlan, u8 qos,
2568 if (vf >= pci_num_vf(pdev))
2581 return otx2_do_set_vf_vlan(pf, vf, vlan, qos, proto);
2584 static int otx2_get_vf_config(struct net_device *netdev, int vf,
2594 if (vf >= pci_num_vf(pdev))
2597 config = &pf->vf_configs[vf];
2598 ivi->vf = vf;
2712 static int otx2_set_vf_permissions(struct otx2_nic *pf, int vf,
2729 if (pf->vf_configs[vf].trusted)
2733 req->vf = vf;
2740 static int otx2_ndo_set_vf_trust(struct net_device *netdev, int vf,
2747 if (vf >= pci_num_vf(pdev))
2750 if (pf->vf_configs[vf].trusted == enable)
2753 pf->vf_configs[vf].trusted = enable;
2754 rc = otx2_set_vf_permissions(pf, vf, OTX2_TRUSTED_VF);
2757 pf->vf_configs[vf].trusted = !enable;
2760 vf, enable ? "" : "not ");