search for: pci_alloc_irq_vectors

Displaying 20 results from an estimated 42 matches for "pci_alloc_irq_vectors".

2017 Jan 27
0
[PATCH 4/9] virtio_pci: simplify MSI-X setup
...- nvectors = 1; - for (i = 0; i < nvqs; ++i) - if (callbacks[i]) - ++nvectors; - } else { - /* Second best: one for change, shared for all vqs. */ + nvectors = 1; + for (i = 0; i < nvqs; i++) { + if (callbacks[i]) + nvectors++; + } + + /* Try one vector per queue first. */ + err = pci_alloc_irq_vectors(vp_dev->pci_dev, nvectors, nvectors, + PCI_IRQ_MSIX); + if (err < 0) { + /* Fallback to one vector for config, one shared for queues. */ + shared = true; nvectors = 2; + err = pci_alloc_irq_vectors(vp_dev->pci_dev, nvectors, nvectors, + PCI_IRQ_MSIX); + if (err < 0) + retu...
2020 Jul 15
2
[PATCH 6/7] ifcvf: replace irq_request/free with helpers in vDPA core.
...gt;>> *adapter) >>> ? { >>> ????? struct pci_dev *pdev = adapter->pdev; >>> ????? struct ifcvf_hw *vf = &adapter->vf; >>> +??? struct vdpa_device *vdpa = &adapter->vdpa; >>> ????? int vector, i, ret, irq; >>> ? ????? ret = pci_alloc_irq_vectors(pdev, IFCVF_MAX_INTR, >>> @@ -73,6 +75,7 @@ static int ifcvf_request_irq(struct ifcvf_adapter >>> *adapter) >>> ?????????? pci_name(pdev)); >>> ????? vector = 0; >>> ????? irq = pci_irq_vector(pdev, vector); >>> +??? /* config interrupt */ >...
2020 Jul 15
2
[PATCH 6/7] ifcvf: replace irq_request/free with helpers in vDPA core.
...gt;>> *adapter) >>> ? { >>> ????? struct pci_dev *pdev = adapter->pdev; >>> ????? struct ifcvf_hw *vf = &adapter->vf; >>> +??? struct vdpa_device *vdpa = &adapter->vdpa; >>> ????? int vector, i, ret, irq; >>> ? ????? ret = pci_alloc_irq_vectors(pdev, IFCVF_MAX_INTR, >>> @@ -73,6 +75,7 @@ static int ifcvf_request_irq(struct ifcvf_adapter >>> *adapter) >>> ?????????? pci_name(pdev)); >>> ????? vector = 0; >>> ????? irq = pci_irq_vector(pdev, vector); >>> +??? /* config interrupt */ >...
2017 Feb 05
0
[PATCH 2/9] virtio_pci: use shared interrupts for virtqueues
..._affinity_masks - = kzalloc(nvectors * sizeof *vp_dev->msix_affinity_masks, - GFP_KERNEL); - if (!vp_dev->msix_affinity_masks) - goto error; - for (i = 0; i < nvectors; ++i) - if (!alloc_cpumask_var(&vp_dev->msix_affinity_masks[i], - GFP_KERNEL)) - goto error; - - err = pci_alloc_irq_vectors(vp_dev->pci_dev, nvectors, nvectors, - PCI_IRQ_MSIX); - if (err < 0) - goto error; - vp_dev->msix_enabled = 1; - - /* Set the vector used for configuration */ - v = vp_dev->msix_used_vectors; - snprintf(vp_dev->msix_names[v], sizeof *vp_dev->msix_names, - "%s-config&quot...
2020 May 13
0
[PATCH V2] ifcvf: move IRQ request/free to status change handlers
...f->vring[i]); > + > + ifcvf_free_irq_vectors(pdev); > +} > + > +static int ifcvf_request_irq(struct ifcvf_adapter *adapter) > +{ > + struct pci_dev *pdev = adapter->pdev; > + struct ifcvf_hw *vf = &adapter->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,...
2020 May 11
0
[PATCH] ifcvf: move IRQ request/free to status change handlers
...f->vring[i]); > + > + ifcvf_free_irq_vectors(pdev); > +} > + > +static int ifcvf_request_irq(struct ifcvf_adapter *adapter) > +{ > + struct pci_dev *pdev = adapter->pdev; > + struct ifcvf_hw *vf = &adapter->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,...
2017 Feb 05
13
automatic IRQ affinity for virtio V3
Hi Michael, hi Jason, This patches applies a few cleanups to the virtio PCI interrupt handling code, and then converts the virtio PCI code to use the automatic MSI-X vectors spreading, as well as using the information in virtio-blk and virtio-scsi to automatically align the blk-mq queues to the MSI-X vectors. Changes since V2: - remove a redundant callback check - calculate ->msix_vectors
2017 Feb 05
13
automatic IRQ affinity for virtio V3
Hi Michael, hi Jason, This patches applies a few cleanups to the virtio PCI interrupt handling code, and then converts the virtio PCI code to use the automatic MSI-X vectors spreading, as well as using the information in virtio-blk and virtio-scsi to automatically align the blk-mq queues to the MSI-X vectors. Changes since V2: - remove a redundant callback check - calculate ->msix_vectors
2020 May 12
1
[PATCH] ifcvf: move IRQ request/free to status change handlers
...;> + >>> +static int ifcvf_request_irq(struct ifcvf_adapter *adapter) >>> +{ >>> +??? struct pci_dev *pdev = adapter->pdev; >>> +??? struct ifcvf_hw *vf = &adapter->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...
2017 Jan 27
0
[PATCH 2/9] virtio_pci: use shared interrupts for virtqueues
..._affinity_masks - = kzalloc(nvectors * sizeof *vp_dev->msix_affinity_masks, - GFP_KERNEL); - if (!vp_dev->msix_affinity_masks) - goto error; - for (i = 0; i < nvectors; ++i) - if (!alloc_cpumask_var(&vp_dev->msix_affinity_masks[i], - GFP_KERNEL)) - goto error; - - err = pci_alloc_irq_vectors(vp_dev->pci_dev, nvectors, nvectors, - PCI_IRQ_MSIX); - if (err < 0) - goto error; - vp_dev->msix_enabled = 1; - - /* Set the vector used for configuration */ - v = vp_dev->msix_used_vectors; - snprintf(vp_dev->msix_names[v], sizeof *vp_dev->msix_names, - "%s-config&quot...
2016 Nov 17
13
automatic IRQ affinity for virtio
Hi Michael, this series contains a couple cleanups for the virtio_pci interrupt handling code, including a switch to the new pci_irq_alloc_vectors helper, and support for automatic affinity by the PCI layer if the consumers ask for it. It then converts over virtio_blk to use this functionality so that it's blk-mq queues are aligned to the MSI-X vector routing. I have a similar patch in the
2016 Nov 17
13
automatic IRQ affinity for virtio
Hi Michael, this series contains a couple cleanups for the virtio_pci interrupt handling code, including a switch to the new pci_irq_alloc_vectors helper, and support for automatic affinity by the PCI layer if the consumers ask for it. It then converts over virtio_blk to use this functionality so that it's blk-mq queues are aligned to the MSI-X vector routing. I have a similar patch in the
2017 Jan 27
15
automatic IRQ affinity for virtio V2
Hi Michael, hi Jason, This patches applies a few cleanups to the virtio PCI interrupt handling code, and then converts the virtio PCI code to use the automatic MSI-X vectors spreading, as well as using the information in virtio-blk and virtio-scsi to automatically align the blk-mq queues to the MSI-X vectors. Changes since V1: - dropped the patches already merged for 4.10-rc - new patch to
2017 Jan 27
15
automatic IRQ affinity for virtio V2
Hi Michael, hi Jason, This patches applies a few cleanups to the virtio PCI interrupt handling code, and then converts the virtio PCI code to use the automatic MSI-X vectors spreading, as well as using the information in virtio-blk and virtio-scsi to automatically align the blk-mq queues to the MSI-X vectors. Changes since V1: - dropped the patches already merged for 4.10-rc - new patch to
2020 May 12
0
[PATCH] ifcvf: move IRQ request/free to status change handlers
...;> + >>> +static int ifcvf_request_irq(struct ifcvf_adapter *adapter) >>> +{ >>> +??? struct pci_dev *pdev = adapter->pdev; >>> +??? struct ifcvf_hw *vf = &adapter->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...
2020 Jul 13
0
[PATCH 6/7] ifcvf: replace irq_request/free with helpers in vDPA core.
...@@ -60,6 +61,7 @@ static int ifcvf_request_irq(struct ifcvf_adapter *adapter) > { > struct pci_dev *pdev = adapter->pdev; > struct ifcvf_hw *vf = &adapter->vf; > + struct vdpa_device *vdpa = &adapter->vdpa; > int vector, i, ret, irq; > > ret = pci_alloc_irq_vectors(pdev, IFCVF_MAX_INTR, > @@ -73,6 +75,7 @@ static int ifcvf_request_irq(struct ifcvf_adapter *adapter) > pci_name(pdev)); > vector = 0; > irq = pci_irq_vector(pdev, vector); > + /* config interrupt */ Unnecessary changes. Thanks > ret = devm_request_irq(&pdev...
2020 Jul 15
0
[PATCH 6/7] ifcvf: replace irq_request/free with helpers in vDPA core.
...? { > > > > ????? struct pci_dev *pdev = adapter->pdev; > > > > ????? struct ifcvf_hw *vf = &adapter->vf; > > > > +??? struct vdpa_device *vdpa = &adapter->vdpa; > > > > ????? int vector, i, ret, irq; > > > > ? ????? ret = pci_alloc_irq_vectors(pdev, IFCVF_MAX_INTR, > > > > @@ -73,6 +75,7 @@ static int ifcvf_request_irq(struct > > > > ifcvf_adapter *adapter) > > > > ?????????? pci_name(pdev)); > > > > ????? vector = 0; > > > > ????? irq = pci_irq_vector(pdev, vector); > > &...
2020 Jul 17
0
[PATCH V2 5/6] ifcvf: replace irq_request/free with vDPA helpers
...@@ -60,6 +61,7 @@ static int ifcvf_request_irq(struct ifcvf_adapter *adapter) > { > struct pci_dev *pdev = adapter->pdev; > struct ifcvf_hw *vf = &adapter->vf; > + struct vdpa_device *vdpa = &adapter->vdpa; > int vector, i, ret, irq; > > ret = pci_alloc_irq_vectors(pdev, IFCVF_MAX_INTR, > @@ -73,6 +75,10 @@ static int ifcvf_request_irq(struct ifcvf_adapter *adapter) > pci_name(pdev)); > vector = 0; > irq = pci_irq_vector(pdev, vector); > + /* This isconfig interrupt, config accesses all go Missing a blank between is and config. Th...
2023 Jun 30
4
[PATCH virtio 0/4] pds_vdpa: mac, reset, and irq updates
v2 for internal review - heavily reworked NET_F_MAC patch, matches recent PR-68875 - reordered to put "clean and reset vqs" before "alloc-irq" to make them slightly simpler patches - other minor cleanups for simpler patches These are some fixes for device providing a MAC address, for allocating irq resources later to support vhost use, and for properly cleaning vq info
2023 Jun 30
4
[PATCH virtio 0/4] pds_vdpa: mac, reset, and irq updates
v2 for internal review - heavily reworked NET_F_MAC patch, matches recent PR-68875 - reordered to put "clean and reset vqs" before "alloc-irq" to make them slightly simpler patches - other minor cleanups for simpler patches These are some fixes for device providing a MAC address, for allocating irq resources later to support vhost use, and for properly cleaning vq info