Displaying 20 results from an estimated 44 matches for "max_vq".
Did you mean:
max_vqs
2009 Jul 23
0
[PATCH 2/2] virtio: retry on vector assignment failure
...msix(struct pci_dev *dev, struct msix_entry *entries,
- int *options, int noptions)
-{
- int i;
- for (i = 0; i < noptions; ++i)
- if (!pci_enable_msix(dev, entries, options[i]))
- return options[i];
- return -EBUSY;
-}
-
-static int vp_request_vectors(struct virtio_device *vdev, unsigned max_vqs)
+static int vp_request_vectors(struct virtio_device *vdev, unsigned max_vqs,
+ int nvectors)
{
struct virtio_pci_device *vp_dev = to_vp_device(vdev);
const char *name = dev_name(&vp_dev->vdev.dev);
unsigned i, v;
int err = -ENOMEM;
- /* We want at most one vector per queue...
2009 Jul 23
0
[PATCH 2/2] virtio: retry on vector assignment failure
...msix(struct pci_dev *dev, struct msix_entry *entries,
- int *options, int noptions)
-{
- int i;
- for (i = 0; i < noptions; ++i)
- if (!pci_enable_msix(dev, entries, options[i]))
- return options[i];
- return -EBUSY;
-}
-
-static int vp_request_vectors(struct virtio_device *vdev, unsigned max_vqs)
+static int vp_request_vectors(struct virtio_device *vdev, unsigned max_vqs,
+ int nvectors)
{
struct virtio_pci_device *vp_dev = to_vp_device(vdev);
const char *name = dev_name(&vp_dev->vdev.dev);
unsigned i, v;
int err = -ENOMEM;
- /* We want at most one vector per queue...
2009 Jul 23
0
qemu-kvm missing some msix capability check
...enable_msix(dev, entries, options[i]))
> - return options[i];
> - return -EBUSY;
> + int err = pci_enable_msix(dev, entries, nvectors);
> + if (err > 0)
> + err = -ENOSPC;
> + return err;
> }
>
> -static int vp_request_vectors(struct virtio_device *vdev, unsigned max_vqs)
> +static int vp_request_irq(struct virtio_device *vdev)
> +{
> + struct virtio_pci_device *vp_dev = to_vp_device(vdev);
> + int err;
> + /* Can't allocate enough MSI-X vectors, use regular interrupt */
> + vp_dev->msix_vectors = 0;
> + err = request_irq(vp_dev->pci...
2009 Jul 23
0
qemu-kvm missing some msix capability check
...enable_msix(dev, entries, options[i]))
> - return options[i];
> - return -EBUSY;
> + int err = pci_enable_msix(dev, entries, nvectors);
> + if (err > 0)
> + err = -ENOSPC;
> + return err;
> }
>
> -static int vp_request_vectors(struct virtio_device *vdev, unsigned max_vqs)
> +static int vp_request_irq(struct virtio_device *vdev)
> +{
> + struct virtio_pci_device *vp_dev = to_vp_device(vdev);
> + int err;
> + /* Can't allocate enough MSI-X vectors, use regular interrupt */
> + vp_dev->msix_vectors = 0;
> + err = request_irq(vp_dev->pci...
2022 Oct 21
5
[PATCH v3 0/4] vDPA: initial config export via "vdpa dev show"
...e subject to the dynamics
of feature negotiation or possible change by driver to the config
space.
Examples:
1) Create vDPA by default without any config attribute
$ vdpa dev add mgmtdev pci/0000:41:04.2 name vdpa0
$ vdpa dev show vdpa0
vdpa0: type network mgmtdev pci/0000:41:04.2 vendor_id 5555 max_vqs 9 max_vq_size 256
$ vdpa dev -jp show vdpa0
{
"dev": {
"vdpa0": {
"type": "network",
"mgmtdev": "pci/0000:41:04.2",
"vendor_id": 5555,
"max_vqs": 9,...
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
2020 Jul 16
0
[PATCH vhost next 10/10] vdpa/mlx5: Add VDPA driver for supported mlx5 devices
...> +
> + MLX5_SET(rqtc, rqtc, list_q_type, MLX5_RQTC_LIST_Q_TYPE_VIRTIO_NET_Q);
> + MLX5_SET(rqtc, rqtc, rqt_max_size, 1 << log_max_rqt);
> + MLX5_SET(rqtc, rqtc, rqt_actual_size, 1);
> + list = MLX5_ADDR_OF(rqtc, rqtc, rq_num[0]);
> + for (i = 0, j = 0; j < ndev->mvdev.max_vqs; j++) {
> + if (!ndev->vqs[j].initialized)
> + continue;
> +
> + if (!vq_is_tx(ndev->vqs[j].index)) {
> + list[i] = cpu_to_be32(ndev->vqs[j].virtq_id);
> + i++;
> + }
> + }
> +
> + err = mlx5_vdpa_create_rqt(&ndev->mvdev, in, inlen, &ndev-...
2009 Apr 27
0
[PATCH 8/8] virtio_pci: optional MSI-X support
...dev->msix_preset_vectors; ++i)
+ free_irq(vp_dev->msix_entries[i].vector, vp_dev);
+
+ if (!vp_dev->msix_preset_vectors)
+ free_irq(vp_dev->pci_dev->irq, vp_dev);
+}
+
+/* the config->request_vqs() implementation */
+static int vp_request_vqs(struct virtio_device *vdev, unsigned max_vqs) {
+ struct virtio_pci_device *vp_dev = to_vp_device(vdev);
+ const char *name = dev_name(&vp_dev->vdev.dev);
+ unsigned i, vectors;
+ int err = -ENOMEM;
+
+ /* We need at most one vector per queue and one for config changes */
+ vectors = vq_vector(max_vqs);
+ vp_dev->msix_entries = kma...
2009 Apr 27
0
[PATCH 8/8] virtio_pci: optional MSI-X support
...dev->msix_preset_vectors; ++i)
+ free_irq(vp_dev->msix_entries[i].vector, vp_dev);
+
+ if (!vp_dev->msix_preset_vectors)
+ free_irq(vp_dev->pci_dev->irq, vp_dev);
+}
+
+/* the config->request_vqs() implementation */
+static int vp_request_vqs(struct virtio_device *vdev, unsigned max_vqs) {
+ struct virtio_pci_device *vp_dev = to_vp_device(vdev);
+ const char *name = dev_name(&vp_dev->vdev.dev);
+ unsigned i, vectors;
+ int err = -ENOMEM;
+
+ /* We need at most one vector per queue and one for config changes */
+ vectors = vq_vector(max_vqs);
+ vp_dev->msix_entries = kma...
2009 May 07
1
[PATCH 3/3] virtio_pci: optional MSI-X support
...free_irq(vp_dev->pci_dev->irq, vp_dev);
+
+ if (vp_dev->msix_enabled) {
+ vp_dev->msix_enabled = 0;
+ pci_disable_msix(vp_dev->pci_dev);
}
- spin_unlock_irqrestore(&vp_dev->lock, flags);
+}
- return ret;
+static int vp_request_vectors(struct virtio_device *vdev, unsigned max_vqs)
+{
+ struct virtio_pci_device *vp_dev = to_vp_device(vdev);
+ const char *name = dev_name(&vp_dev->vdev.dev);
+ unsigned i, vectors;
+ int err = -ENOMEM;
+
+ /* We need at most one vector per queue and one for config changes */
+ vectors = VP_MSIX_VQ_VECTOR + max_vqs;
+ vp_dev->msix_ent...
2009 May 07
1
[PATCH 3/3] virtio_pci: optional MSI-X support
...free_irq(vp_dev->pci_dev->irq, vp_dev);
+
+ if (vp_dev->msix_enabled) {
+ vp_dev->msix_enabled = 0;
+ pci_disable_msix(vp_dev->pci_dev);
}
- spin_unlock_irqrestore(&vp_dev->lock, flags);
+}
- return ret;
+static int vp_request_vectors(struct virtio_device *vdev, unsigned max_vqs)
+{
+ struct virtio_pci_device *vp_dev = to_vp_device(vdev);
+ const char *name = dev_name(&vp_dev->vdev.dev);
+ unsigned i, vectors;
+ int err = -ENOMEM;
+
+ /* We need at most one vector per queue and one for config changes */
+ vectors = VP_MSIX_VQ_VECTOR + max_vqs;
+ vp_dev->msix_ent...
2009 May 14
1
[PATCHv6 4/4] virtio_pci: optional MSI-X support
...msix(struct pci_dev *dev, struct msix_entry *entries,
+ int *options, int noptions)
+{
+ int i;
+ for (i = 0; i < noptions; ++i)
+ if (!pci_enable_msix(dev, entries, options[i]))
+ return options[i];
+ return -EBUSY;
+}
+
+static int vp_request_vectors(struct virtio_device *vdev, unsigned max_vqs)
+{
+ struct virtio_pci_device *vp_dev = to_vp_device(vdev);
+ const char *name = dev_name(&vp_dev->vdev.dev);
+ unsigned i, v;
+ int err = -ENOMEM;
+ /* We want at most one vector per queue and one for config changes.
+ * Fallback to separate vectors for config and a shared for queues.
+...
2009 May 14
1
[PATCHv6 4/4] virtio_pci: optional MSI-X support
...msix(struct pci_dev *dev, struct msix_entry *entries,
+ int *options, int noptions)
+{
+ int i;
+ for (i = 0; i < noptions; ++i)
+ if (!pci_enable_msix(dev, entries, options[i]))
+ return options[i];
+ return -EBUSY;
+}
+
+static int vp_request_vectors(struct virtio_device *vdev, unsigned max_vqs)
+{
+ struct virtio_pci_device *vp_dev = to_vp_device(vdev);
+ const char *name = dev_name(&vp_dev->vdev.dev);
+ unsigned i, v;
+ int err = -ENOMEM;
+ /* We want at most one vector per queue and one for config changes.
+ * Fallback to separate vectors for config and a shared for queues.
+...
2009 Jul 26
0
[PATCHv3 2/2] virtio: refactor find_vqs
...msix(struct pci_dev *dev, struct msix_entry *entries,
- int *options, int noptions)
-{
- int i;
- for (i = 0; i < noptions; ++i)
- if (!pci_enable_msix(dev, entries, options[i]))
- return options[i];
- return -EBUSY;
-}
-
-static int vp_request_vectors(struct virtio_device *vdev, unsigned max_vqs)
+static int vp_request_vectors(struct virtio_device *vdev, int nvectors,
+ bool per_vq_vectors)
{
struct virtio_pci_device *vp_dev = to_vp_device(vdev);
const char *name = dev_name(&vp_dev->vdev.dev);
unsigned i, v;
int err = -ENOMEM;
- /* We want at most one vector per qu...
2009 Jul 26
0
[PATCHv3 2/2] virtio: refactor find_vqs
...msix(struct pci_dev *dev, struct msix_entry *entries,
- int *options, int noptions)
-{
- int i;
- for (i = 0; i < noptions; ++i)
- if (!pci_enable_msix(dev, entries, options[i]))
- return options[i];
- return -EBUSY;
-}
-
-static int vp_request_vectors(struct virtio_device *vdev, unsigned max_vqs)
+static int vp_request_vectors(struct virtio_device *vdev, int nvectors,
+ bool per_vq_vectors)
{
struct virtio_pci_device *vp_dev = to_vp_device(vdev);
const char *name = dev_name(&vp_dev->vdev.dev);
unsigned i, v;
int err = -ENOMEM;
- /* We want at most one vector per qu...
2023 Mar 17
0
[PATCH RFC v2 virtio 2/7] pds_vdpa: get vdpa management info
...t; + struct pds_vdpa_comp ident_comp = {0};
> >> + struct vdpa_mgmt_dev *mgmt;
> >> + struct device *pf_dev;
> >> + struct pci_dev *pdev;
> >> + dma_addr_t ident_pa;
> >> + struct device *dev;
> >> + u16 max_vqs;
> >> + int err;
> >> +
> >> + dev = &vdpa_aux->padev->aux_dev.dev;
> >> + pdev = vdpa_aux->padev->vf->pdev;
> >> + mgmt = &vdpa_aux->vdpa_mdev;
> >> +
> >> + /* Get resource info...
2023 Jan 30
6
[PATCH 0/6] features provisioning fixes and mlx5_vdpa support
This patchset is pre-requisite to export and provision device
config attributes and features for vdpa live migration, in a way
backward and forward compatibility can be retained. The follow up
work [1] will need to be built around the new feature provisioning
uAPI, with which it's easier to formalize migration compatibility
support at the driver level.
Thanks,
-Siwei
[1] [PATCH v3 0/4] vDPA:
2023 Jan 31
7
[PATCH v2 0/7] features provisioning fixes and mlx5_vdpa support
This patchset is pre-requisite to export and provision device
config attributes and features for vdpa live migration, in a way
backward and forward compatibility can be retained. The follow up
work [1] will need to be built around the new feature provisioning
uAPI, with which it's easier to formalize migration compatibility
support at the driver level.
Thanks,
-Siwei
[1] [PATCH v3 0/4] vDPA:
2023 Feb 03
6
[PATCH v3 0/6] features provisioning fixes and mlx5_vdpa support
This patchset is pre-requisite to export and provision device
config attributes and features for vdpa live migration, in a way
backward and forward compatibility can be retained. The follow up
work [1] will need to be built around the new feature provisioning
uAPI, with which it's easier to formalize migration compatibility
support at the driver level.
Thanks,
-Siwei
[1] [PATCH v3 0/4] vDPA: