search for: ifcvf_max_intr

Displaying 18 results from an estimated 18 matches for "ifcvf_max_intr".

2020 May 13
0
[PATCH V2] ifcvf: move IRQ request/free to status change handlers
...+ 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, 256, "ifcvf[%s]...
2020 May 11
0
[PATCH] ifcvf: move IRQ request/free to status change handlers
...+ 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, 256, "ifcvf[%s]...
2020 May 12
1
[PATCH] ifcvf: move IRQ request/free to status change handlers
...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...
2020 Jul 15
2
[PATCH 6/7] ifcvf: replace irq_request/free with helpers in vDPA core.
...t;> ? { >>> ????? 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 */ >> >> >&gt...
2020 Jul 15
2
[PATCH 6/7] ifcvf: replace irq_request/free with helpers in vDPA core.
...t;> ? { >>> ????? 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 */ >> >> >&gt...
2020 May 12
0
[PATCH] ifcvf: move IRQ request/free to status change handlers
...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...
2019 Oct 21
0
[RFC 2/2] vhost: IFC VF vdpa layer
...f_init_msix(struct ifcvf_adapter *adapter) >>> +{ >>> +??? int vector, i, ret, irq; >>> +??? struct pci_dev *pdev = to_pci_dev(adapter->dev); >>> +??? struct ifcvf_hw *vf = &adapter->vf; >>> + >>> +??? ret = pci_alloc_irq_vectors(pdev, IFCVF_MAX_INTR, >>> +??????????? IFCVF_MAX_INTR, PCI_IRQ_MSIX); >>> +??? if (ret < 0) { >>> +??????? IFC_ERR(adapter->dev, "Failed to alloc irq vectors.\n"); >>> +??????? return ret; >>> +??? } >>> + >>> +??? for (i = 0; i < IFCVF_M...
2020 Jul 13
0
[PATCH 6/7] ifcvf: replace irq_request/free with helpers in vDPA core.
...t 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->dev, irq, >...
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); > > > > +??? /* conf...
2020 Jul 17
0
[PATCH V2 5/6] ifcvf: replace irq_request/free with vDPA helpers
...t 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. Thanks > + * thro...
2019 Oct 16
0
[RFC 2/2] vhost: IFC VF vdpa layer
...ed through get_mdev_features. > + > +static int ifcvf_init_msix(struct ifcvf_adapter *adapter) > +{ > + int vector, i, ret, irq; > + struct pci_dev *pdev = to_pci_dev(adapter->dev); > + struct ifcvf_hw *vf = &adapter->vf; > + > + ret = pci_alloc_irq_vectors(pdev, IFCVF_MAX_INTR, > + IFCVF_MAX_INTR, PCI_IRQ_MSIX); > + if (ret < 0) { > + IFC_ERR(adapter->dev, "Failed to alloc irq vectors.\n"); > + return ret; > + } > + > + for (i = 0; i < IFCVF_MAX_QUEUE_PAIRS * 2; i++) { > + vector = i + IFCVF_MSI_QUEUE_OFF; > + irq = pci...
2019 Nov 06
0
[PATCH 2/2] IFC VDPA layer
...VIRTIO_NET_F_STATUS. > +}; > + > +static int ifcvf_init_msix(struct ifcvf_adapter *adapter) > +{ > + struct pci_dev *pdev = to_pci_dev(adapter->dev); > + 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) { > + IFC_ERR(adapter->dev, "Failed to alloc irq vectors.\n"); > + return ret; > + } > + > + for (i = 0; i < IFCVF_MAX_QUEUE_PAIRS * 2; i++) { > + vector = i + IFCVF_MSI_QUEUE_OFF; > + irq...
2019 Nov 08
0
[PATCH 1/2] IFC hardware operation layer
...ev_err(dev, fmt, ##__VA_ARGS__) > +#define IFC_DBG(dev, fmt, ...) dev_dbg(dev, fmt, ##__VA_ARGS__) > +#define IFC_INFO(dev, fmt, ...) dev_info(dev, fmt, ##__VA_ARGS__) > + > +#define IFC_PRIVATE_TO_VF(adapter) \ > + (&((struct ifcvf_adapter *)adapter)->vf) > + > +#define IFCVF_MAX_INTR (IFCVF_MAX_QUEUE_PAIRS * 2 + 1) > + > +struct ifcvf_net_config { > + u8 mac[6]; > + u16 status; > + u16 max_virtqueue_pairs; > +} __packed; > + > +struct ifcvf_pci_mem_resource { > + /* Physical address, 0 if not resource. */ > + u64 phys_addr; > + /* Le...
2019 Nov 05
1
[PATCH 1/2] IFC hardware operation layer
...ev_err(dev, fmt, ##__VA_ARGS__) > +#define IFC_DBG(dev, fmt, ...) dev_dbg(dev, fmt, ##__VA_ARGS__) > +#define IFC_INFO(dev, fmt, ...) dev_info(dev, fmt, ##__VA_ARGS__) > + > +#define IFC_PRIVATE_TO_VF(adapter) \ > + (&((struct ifcvf_adapter *)adapter)->vf) > + > +#define IFCVF_MAX_INTR (IFCVF_MAX_QUEUE_PAIRS * 2 + 1) > + > +struct ifcvf_net_config { > + u8 mac[6]; > + u16 status; > + u16 max_virtqueue_pairs; > +} __packed; > + > +struct ifcvf_pci_mem_resource { > + /* Physical address, 0 if not resource. */ > + u64 phys_addr; > + /* Le...
2019 Nov 05
0
[PATCH 1/2] IFC hardware operation layer
...ev_err(dev, fmt, ##__VA_ARGS__) > +#define IFC_DBG(dev, fmt, ...) dev_dbg(dev, fmt, ##__VA_ARGS__) > +#define IFC_INFO(dev, fmt, ...) dev_info(dev, fmt, ##__VA_ARGS__) > + > +#define IFC_PRIVATE_TO_VF(adapter) \ > + (&((struct ifcvf_adapter *)adapter)->vf) > + > +#define IFCVF_MAX_INTR (IFCVF_MAX_QUEUE_PAIRS * 2 + 1) > + > +struct ifcvf_net_config { > + u8 mac[6]; > + u16 status; > + u16 max_virtqueue_pairs; > +} __packed; Looks like a partial copy of virtio_net_config - reuse that one instead? > + > +struct ifcvf_pci_mem_resource { > + /* Phy...
2019 Nov 06
0
[PATCH 1/2] IFC hardware operation layer
...ev_err(dev, fmt, ##__VA_ARGS__) > +#define IFC_DBG(dev, fmt, ...) dev_dbg(dev, fmt, ##__VA_ARGS__) > +#define IFC_INFO(dev, fmt, ...) dev_info(dev, fmt, ##__VA_ARGS__) > + > +#define IFC_PRIVATE_TO_VF(adapter) \ > + (&((struct ifcvf_adapter *)adapter)->vf) > + > +#define IFCVF_MAX_INTR (IFCVF_MAX_QUEUE_PAIRS * 2 + 1) > + > +struct ifcvf_net_config { > + u8 mac[6]; > + u16 status; > + u16 max_virtqueue_pairs; > +} __packed; Why not just use virtio_net_config? > + > +struct ifcvf_pci_mem_resource { > + /* Physical address, 0 if not resource. */ &...
2019 Oct 16
0
[RFC 1/2] vhost: IFC VF hardware operation layer
...uct ifcvf_net_config *dev_cfg; > + struct vring_info vring[IFCVF_MAX_QUEUE_PAIRS * 2]; > + struct ifcvf_pci_mem_resource mem_resource[IFCVF_PCI_MAX_RESOURCE]; > +}; > + > +#define IFC_PRIVATE_TO_VF(adapter) \ > + (&((struct ifcvf_adapter *)adapter)->vf) > + > +#define IFCVF_MAX_INTR (IFCVF_MAX_QUEUE_PAIRS * 2 + 1) The extra one means the config interrupt? > + > +struct ifcvf_adapter { > + struct device *dev; > + struct mutex mdev_lock; Not used in the patch, move to next one? > + int mdev_count; Not used. > + struct list_head dma_maps; This is n...
2019 Oct 21
0
[RFC 1/2] vhost: IFC VF hardware operation layer
...AIRS * 2]; >>> +??? struct??? ifcvf_pci_mem_resource >>> mem_resource[IFCVF_PCI_MAX_RESOURCE]; >>> +}; >>> + >>> +#define IFC_PRIVATE_TO_VF(adapter) \ >>> +??? (&((struct ifcvf_adapter *)adapter)->vf) >>> + >>> +#define IFCVF_MAX_INTR (IFCVF_MAX_QUEUE_PAIRS * 2 + 1) >> >> >> The extra one means the config interrupt? > Yes. Ok, when we support control vq, it should be changed to 2*N + 2. Thanks >> >> >>> + >>> +struct ifcvf_adapter { >>> +??? struct??? device *dev;...