search for: ifcvf_max_queue_pair

Displaying 20 results from an estimated 21 matches for "ifcvf_max_queue_pair".

Did you mean: ifcvf_max_queue_pairs
2020 May 12
1
[PATCH] ifcvf: move IRQ request/free to status change handlers
..._MAX_INTR, >>> +??????????????????? IFCVF_MAX_INTR, PCI_IRQ_MSIX); >>> +??? if (ret < 0) { >>> +??????? IFCVF_ERR(pdev, "Failed to alloc IRQ vectors\n"); >>> +??????? return ret; >>> +??? } >>> + >>> +??? for (i = 0; i < IFCVF_MAX_QUEUE_PAIRS * 2; i++) { >>> +??????? snprintf(vf->vring[i].msix_name, 256, "ifcvf[%s]-%d\n", >>> +???????????? pci_name(pdev), i); >>> +??????? vector = i + IFCVF_MSI_QUEUE_OFF; >>> +??????? irq = pci_irq_vector(pdev, vector); >>> +??????? ret = devm_r...
2020 Apr 26
1
[PATCH 2/2] vdpa: implement config interrupt in IFCVF
...--git a/drivers/vdpa/ifcvf/ifcvf_base.h b/drivers/vdpa/ifcvf/ifcvf_base.h > index e803070..76928b0 100644 > --- a/drivers/vdpa/ifcvf/ifcvf_base.h > +++ b/drivers/vdpa/ifcvf/ifcvf_base.h > @@ -81,6 +81,8 @@ struct ifcvf_hw { > void __iomem *net_cfg; > struct vring_info vring[IFCVF_MAX_QUEUE_PAIRS * 2]; > void __iomem * const *base; > + char config_msix_name[256]; > + struct vdpa_callback config_cb; > }; > > struct ifcvf_adapter { > diff --git a/drivers/vdpa/ifcvf/ifcvf_main.c b/drivers/vdpa/ifcvf/ifcvf_main.c > index 8d54dc5..f7baeca 100644 > --- a/driv...
2019 Oct 21
0
[RFC 1/2] vhost: IFC VF hardware operation layer
...hw->notify_base == NULL || >>> +??????? hw->isr == NULL || hw->dev_cfg == NULL) { >>> +??????? IFC_ERR(&dev->dev, "Incomplete PCI capabilities.\n"); >>> +??????? return -1; >>> +??? } >>> + >>> +??? for (i = 0; i < (IFCVF_MAX_QUEUE_PAIRS * 2); i++) { >> >> >> Any reason for using hard coded queue pairs limit other than the >> max_queue_pairs in the net config? > Hi Jason, Thanks for your kindly comments. For now the driver don't > support MQ, we intend to provide a minimal feature sets in this...
2019 Nov 08
0
[PATCH 1/2] IFC hardware operation layer
...cap.cap_next; > + } > + > + if (hw->common_cfg == NULL || hw->notify_base == NULL || > + hw->isr == NULL || hw->net_cfg == NULL) { > + IFC_DBG(&dev->dev, "Incomplete PCI capabilities.\n"); > + return -1; > + } > + > + for (i = 0; i < IFCVF_MAX_QUEUE_PAIRS * 2; i++) { > + iowrite16(i, &hw->common_cfg->queue_select); > + notify_off = ioread16(&hw->common_cfg->queue_notify_off); > + hw->notify_addr[i] = (void *)((u8 *)hw->notify_base + > + notify_off * hw->notify_off_multiplier); > + } > + >...
2019 Nov 05
1
[PATCH 1/2] IFC hardware operation layer
...cap.cap_next; > + } > + > + if (hw->common_cfg == NULL || hw->notify_base == NULL || > + hw->isr == NULL || hw->net_cfg == NULL) { > + IFC_DBG(&dev->dev, "Incomplete PCI capabilities.\n"); > + return -1; > + } > + > + for (i = 0; i < IFCVF_MAX_QUEUE_PAIRS * 2; i++) { > + iowrite16(i, &hw->common_cfg->queue_select); > + notify_off = ioread16(&hw->common_cfg->queue_notify_off); > + hw->notify_addr[i] = (void *)((u8 *)hw->notify_base + > + notify_off * hw->notify_off_multiplier); > + } > + >...
2020 Jul 23
4
[PATCH 1/2] vdpa: ifcvf: return err when fail to request config irq
...c int ifcvf_request_irq(struct ifcvf_adapter *adapter) ret = devm_request_irq(&pdev->dev, irq, ifcvf_config_changed, 0, vf->config_msix_name, vf); + if (ret) { + IFCVF_ERR(pdev, "Failed to request config irq\n"); + return ret; + } for (i = 0; i < IFCVF_MAX_QUEUE_PAIRS * 2; i++) { snprintf(vf->vring[i].msix_name, 256, "ifcvf[%s]-%d\n", -- 2.20.1
2020 Jul 23
4
[PATCH 1/2] vdpa: ifcvf: return err when fail to request config irq
...c int ifcvf_request_irq(struct ifcvf_adapter *adapter) ret = devm_request_irq(&pdev->dev, irq, ifcvf_config_changed, 0, vf->config_msix_name, vf); + if (ret) { + IFCVF_ERR(pdev, "Failed to request config irq\n"); + return ret; + } for (i = 0; i < IFCVF_MAX_QUEUE_PAIRS * 2; i++) { snprintf(vf->vring[i].msix_name, 256, "ifcvf[%s]-%d\n", -- 2.20.1
2019 Nov 05
0
[PATCH 1/2] IFC hardware operation layer
...cap.cap_next; > + } > + > + if (hw->common_cfg == NULL || hw->notify_base == NULL || > + hw->isr == NULL || hw->net_cfg == NULL) { > + IFC_DBG(&dev->dev, "Incomplete PCI capabilities.\n"); > + return -1; > + } > + > + for (i = 0; i < IFCVF_MAX_QUEUE_PAIRS * 2; i++) { > + iowrite16(i, &hw->common_cfg->queue_select); > + notify_off = ioread16(&hw->common_cfg->queue_notify_off); > + hw->notify_addr[i] = (void *)((u8 *)hw->notify_base + > + notify_off * hw->notify_off_multiplier); > + } > + >...
2020 May 13
0
[PATCH V2] ifcvf: move IRQ request/free to status change handlers
...vf; > + int vector, i, ret, irq; > + > + ret = pci_alloc_irq_vectors(pdev, IFCVF_MAX_INTR, > + IFCVF_MAX_INTR, PCI_IRQ_MSIX); > + if (ret < 0) { > + IFCVF_ERR(pdev, "Failed to alloc IRQ vectors\n"); > + return ret; > + } > + > + for (i = 0; i < IFCVF_MAX_QUEUE_PAIRS * 2; i++) { > + snprintf(vf->vring[i].msix_name, 256, "ifcvf[%s]-%d\n", > + pci_name(pdev), i); > + vector = i + IFCVF_MSI_QUEUE_OFF; > + irq = pci_irq_vector(pdev, vector); > + ret = devm_request_irq(&pdev->dev, irq, > + ifcvf_intr_handler, 0...
2019 Nov 06
0
[PATCH 1/2] IFC hardware operation layer
...(hw->common_cfg == NULL || hw->notify_base == NULL || > + hw->isr == NULL || hw->net_cfg == NULL) { > + IFC_DBG(&dev->dev, "Incomplete PCI capabilities.\n"); > + return -1; Maybe it's better to fail eailier. > + } > + > + for (i = 0; i < IFCVF_MAX_QUEUE_PAIRS * 2; i++) { > + iowrite16(i, &hw->common_cfg->queue_select); > + notify_off = ioread16(&hw->common_cfg->queue_notify_off); > + hw->notify_addr[i] = (void *)((u8 *)hw->notify_base + > + notify_off * hw->notify_off_multiplier); It might be better...
2019 Oct 16
0
[RFC 1/2] vhost: IFC VF hardware operation layer
...= cap.cap_next; > + } > + > + if (hw->common_cfg == NULL || hw->notify_base == NULL || > + hw->isr == NULL || hw->dev_cfg == NULL) { > + IFC_ERR(&dev->dev, "Incomplete PCI capabilities.\n"); > + return -1; > + } > + > + for (i = 0; i < (IFCVF_MAX_QUEUE_PAIRS * 2); i++) { Any reason for using hard coded queue pairs limit other than the max_queue_pairs in the net config? > + iowrite16(i, &hw->common_cfg->queue_select); > + notify_off = ioread16(&hw->common_cfg->queue_notify_off); > + hw->notify_addr[i] = (void *)(...
2020 May 11
0
[PATCH] ifcvf: move IRQ request/free to status change handlers
...vf; > + int vector, i, ret, irq; > + > + ret = pci_alloc_irq_vectors(pdev, IFCVF_MAX_INTR, > + IFCVF_MAX_INTR, PCI_IRQ_MSIX); > + if (ret < 0) { > + IFCVF_ERR(pdev, "Failed to alloc IRQ vectors\n"); > + return ret; > + } > + > + for (i = 0; i < IFCVF_MAX_QUEUE_PAIRS * 2; i++) { > + snprintf(vf->vring[i].msix_name, 256, "ifcvf[%s]-%d\n", > + pci_name(pdev), i); > + vector = i + IFCVF_MSI_QUEUE_OFF; > + irq = pci_irq_vector(pdev, vector); > + ret = devm_request_irq(&pdev->dev, irq, > + ifcvf_intr_handler, 0...
2019 Oct 21
0
[RFC 2/2] vhost: IFC VF vdpa layer
...;> +??? return IFCVF_QUEUE_ALIGNMENT; >>> +} >>> + >>> +static int ifcvf_start_datapath(void *private) >>> +{ >>> +??? int i, ret; >>> +??? struct ifcvf_hw *vf = IFC_PRIVATE_TO_VF(private); >>> + >>> +??? for (i = 0; i < (IFCVF_MAX_QUEUE_PAIRS * 2); i++) { >>> +??????? if (!vf->vring[i].ready) >>> +??????????? break; >> >> >> Looks like error should be returned here? > agreed! >> >> >>> + >>> +??????? if (!vf->vring[i].size) >>> +??????????? break; >&...
2020 Apr 26
0
[PATCH V3 2/2] vdpa: implement config interrupt in IFCVF
...<< VIRTIO_NET_F_STATUS) | \ > (1ULL << VIRTIO_F_ORDER_PLATFORM) | \ > (1ULL << VIRTIO_F_IOMMU_PLATFORM) | \ > (1ULL << VIRTIO_NET_F_MRG_RXBUF)) > @@ -81,6 +82,8 @@ struct ifcvf_hw { > void __iomem *net_cfg; > struct vring_info vring[IFCVF_MAX_QUEUE_PAIRS * 2]; > void __iomem * const *base; > + char config_msix_name[256]; > + struct vdpa_callback config_cb; > }; > > struct ifcvf_adapter { > diff --git a/drivers/vdpa/ifcvf/ifcvf_main.c b/drivers/vdpa/ifcvf/ifcvf_main.c > index 8d54dc5..f7baeca 100644 > --- a/driv...
2019 Oct 16
0
[RFC 2/2] vhost: IFC VF vdpa layer
...+ > +static u16 ifcvf_mdev_get_vq_align(struct mdev_device *mdev) > +{ > + return IFCVF_QUEUE_ALIGNMENT; > +} > + > +static int ifcvf_start_datapath(void *private) > +{ > + int i, ret; > + struct ifcvf_hw *vf = IFC_PRIVATE_TO_VF(private); > + > + for (i = 0; i < (IFCVF_MAX_QUEUE_PAIRS * 2); i++) { > + if (!vf->vring[i].ready) > + break; Looks like error should be returned here? > + > + if (!vf->vring[i].size) > + break; > + > + if (!vf->vring[i].desc || !vf->vring[i].avail || > + !vf->vring[i].used) > + break; > + } &g...
2019 Nov 06
0
[PATCH 2/2] IFC VDPA layer
...emove this API. > + > +static int ifcvf_start_datapath(void *private) > +{ > + struct ifcvf_hw *vf = IFC_PRIVATE_TO_VF(private); > + struct ifcvf_adapter *ifcvf; > + int i, ret = 0; > + > + ifcvf = container_of(vf, struct ifcvf_adapter, vf); > + > + for (i = 0; i < IFCVF_MAX_QUEUE_PAIRS * 2; i++) { > + if (!vf->vring[i].ready) { > + IFC_ERR(ifcvf->dev, > + "Failed to start datapath, vring %d not ready.\n", i); > + return -EINVAL; > + } This should be not related. Driver can choose to not start a virtqueue. > + > + if (!vf->vring...
2020 Apr 02
0
[PATCH v2 -next] vdpa: remove unused variables 'ifcvf' and 'ifcvf_lm'
...fcvf_main.c @@ -31,11 +31,9 @@ static irqreturn_t ifcvf_intr_handler(int irq, void *arg) static int ifcvf_start_datapath(void *private) { struct ifcvf_hw *vf = ifcvf_private_to_vf(private); - struct ifcvf_adapter *ifcvf; u8 status; int ret; - ifcvf = vf_to_adapter(vf); vf->nr_vring = IFCVF_MAX_QUEUE_PAIRS * 2; ret = ifcvf_start_hw(vf); if (ret < 0) { -- 2.17.1
2020 May 12
0
[PATCH] ifcvf: move IRQ request/free to status change handlers
..._MAX_INTR, >>> +??????????????????? IFCVF_MAX_INTR, PCI_IRQ_MSIX); >>> +??? if (ret < 0) { >>> +??????? IFCVF_ERR(pdev, "Failed to alloc IRQ vectors\n"); >>> +??????? return ret; >>> +??? } >>> + >>> +??? for (i = 0; i < IFCVF_MAX_QUEUE_PAIRS * 2; i++) { >>> +??????? snprintf(vf->vring[i].msix_name, 256, "ifcvf[%s]-%d\n", >>> +???????????? pci_name(pdev), i); >>> +??????? vector = i + IFCVF_MSI_QUEUE_OFF; >>> +??????? irq = pci_irq_vector(pdev, vector); >>> +??????? ret = devm_r...
2020 Aug 07
0
[PATCH 1/2] vdpa: ifcvf: return err when fail to request config irq
...ter) > ret = devm_request_irq(&pdev->dev, irq, > ifcvf_config_changed, 0, > vf->config_msix_name, vf); > + if (ret) { > + IFCVF_ERR(pdev, "Failed to request config irq\n"); > + return ret; > + } > > for (i = 0; i < IFCVF_MAX_QUEUE_PAIRS * 2; i++) { > snprintf(vf->vring[i].msix_name, 256, "ifcvf[%s]-%d\n", Hi Michael: Any comments on this series? Thanks
2020 Sep 24
30
[RFC PATCH 00/24] Control VQ support in vDPA
Hi All: This series tries to add the support for control virtqueue in vDPA. Control virtqueue is used by networking device for accepting various commands from the driver. It's a must to support multiqueue and other configurations. When used by vhost-vDPA bus driver for VM, the control virtqueue should be shadowed via userspace VMM (Qemu) instead of being assigned directly to Guest. This is