search for: ifcvf_adapter

Displaying 20 results from an estimated 35 matches for "ifcvf_adapter".

Did you mean: iavf_adapter
2019 Oct 16
0
[RFC 2/2] vhost: IFC VF vdpa layer
...mdev_device *mdev) > +{ > + return IFC_SUPPORTED_FEATURES; I would expect this should be done by querying the hw. Or IFC VF can't get any update through its firmware? > +} > + > +static int ifcvf_mdev_set_features(struct mdev_device *mdev, u64 features) > +{ > + struct ifcvf_adapter *adapter = mdev_get_drvdata(mdev); > + struct ifcvf_hw *vf = IFC_PRIVATE_TO_VF(adapter); > + > + vf->req_features = features; > + > + return 0; > +} > + > +static u64 ifcvf_mdev_get_vq_state(struct mdev_device *mdev, u16 qid) > +{ > + struct ifcvf_adapter *adapter =...
2019 Oct 21
0
[RFC 2/2] vhost: IFC VF vdpa layer
...ust support these features. Ok, it should work but less flexible, we can change it in the future. > >> >> >>> +} >>> + >>> +static int ifcvf_mdev_set_features(struct mdev_device *mdev, u64 >>> features) >>> +{ >>> +??? struct ifcvf_adapter *adapter = mdev_get_drvdata(mdev); >>> +??? struct ifcvf_hw *vf = IFC_PRIVATE_TO_VF(adapter); >>> + >>> +??? vf->req_features = features; >>> + >>> +??? return 0; >>> +} >>> + >>> +static u64 ifcvf_mdev_get_vq_state(struct m...
2020 Jul 15
2
[PATCH 6/7] ifcvf: replace irq_request/free with helpers in vDPA core.
...--git a/drivers/vdpa/ifcvf/ifcvf_main.c >>> b/drivers/vdpa/ifcvf/ifcvf_main.c >>> index f5a60c1..65b84e1 100644 >>> --- a/drivers/vdpa/ifcvf/ifcvf_main.c >>> +++ b/drivers/vdpa/ifcvf/ifcvf_main.c >>> @@ -47,11 +47,12 @@ static void ifcvf_free_irq(struct ifcvf_adapter >>> *adapter, int queues) >>> ? { >>> ????? struct pci_dev *pdev = adapter->pdev; >>> ????? struct ifcvf_hw *vf = &adapter->vf; >>> +??? struct vdpa_device *vdpa = &adapter->vdpa; >>> ????? int i; >>> ? ? ????? for (i...
2020 Jul 15
2
[PATCH 6/7] ifcvf: replace irq_request/free with helpers in vDPA core.
...--git a/drivers/vdpa/ifcvf/ifcvf_main.c >>> b/drivers/vdpa/ifcvf/ifcvf_main.c >>> index f5a60c1..65b84e1 100644 >>> --- a/drivers/vdpa/ifcvf/ifcvf_main.c >>> +++ b/drivers/vdpa/ifcvf/ifcvf_main.c >>> @@ -47,11 +47,12 @@ static void ifcvf_free_irq(struct ifcvf_adapter >>> *adapter, int queues) >>> ? { >>> ????? struct pci_dev *pdev = adapter->pdev; >>> ????? struct ifcvf_hw *vf = &adapter->vf; >>> +??? struct vdpa_device *vdpa = &adapter->vdpa; >>> ????? int i; >>> ? ? ????? for (i...
2023 May 08
1
[PATCH V2 4/5] vDPA/ifcvf: synchronize irqs in the reset routine
...ig_irq(vf); ifcvf_free_irq_vectors(pdev); + vf->num_msix_vectors = 0; } /* ifcvf MSIX vectors allocator, this helper tries to allocate @@ -343,36 +344,11 @@ static int ifcvf_request_irq(struct ifcvf_hw *vf) if (ret) return ret; - return 0; -} - -static int ifcvf_stop_datapath(struct ifcvf_adapter *adapter) -{ - struct ifcvf_hw *vf = adapter->vf; - int i; - - for (i = 0; i < vf->nr_vring; i++) - vf->vring[i].cb.callback = NULL; - - ifcvf_stop_hw(vf); + vf->num_msix_vectors = nvectors; return 0; } -static void ifcvf_reset_vring(struct ifcvf_adapter *adapter) -{ - struct...
2023 May 24
2
[PATCH V2 4/5] vDPA/ifcvf: synchronize irqs in the reset routine
...gt; } > > /* ifcvf MSIX vectors allocator, this helper tries to allocate > @@ -343,36 +344,11 @@ static int ifcvf_request_irq(struct ifcvf_hw *vf) > if (ret) > return ret; > > - return 0; > -} > - > -static int ifcvf_stop_datapath(struct ifcvf_adapter *adapter) > -{ > - struct ifcvf_hw *vf = adapter->vf; > - int i; > - > - for (i = 0; i < vf->nr_vring; i++) > - vf->vring[i].cb.callback = NULL; > - > - ifcvf_stop_hw(vf); > + vf->num_msix_vectors = nvectors; >...
2019 Nov 06
0
[PATCH 2/2] IFC VDPA layer
...+static u64 ifcvf_mdev_get_mdev_features(struct mdev_device *mdev) > +{ > + return VIRTIO_MDEV_F_VERSION_1; > +} We've decide to remove 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&q...
2020 Jul 23
4
[PATCH 1/2] vdpa: ifcvf: return err when fail to request config irq
...main.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/vdpa/ifcvf/ifcvf_main.c b/drivers/vdpa/ifcvf/ifcvf_main.c index f5a60c14b979..ae7110955a44 100644 --- a/drivers/vdpa/ifcvf/ifcvf_main.c +++ b/drivers/vdpa/ifcvf/ifcvf_main.c @@ -76,6 +76,10 @@ static 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++) { snprint...
2020 Jul 23
4
[PATCH 1/2] vdpa: ifcvf: return err when fail to request config irq
...main.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/vdpa/ifcvf/ifcvf_main.c b/drivers/vdpa/ifcvf/ifcvf_main.c index f5a60c14b979..ae7110955a44 100644 --- a/drivers/vdpa/ifcvf/ifcvf_main.c +++ b/drivers/vdpa/ifcvf/ifcvf_main.c @@ -76,6 +76,10 @@ static 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++) { snprint...
2020 May 12
1
[PATCH] ifcvf: move IRQ request/free to status change handlers
...ndler(int irq, >>> void *arg) >>> ????? return IRQ_HANDLED; >>> ? } >>> ? +static void ifcvf_free_irq_vectors(void *data) >>> +{ >>> +??? pci_free_irq_vectors(data); >>> +} >>> + >>> +static void ifcvf_free_irq(struct ifcvf_adapter *adapter, int queues) >>> +{ >>> +??? struct pci_dev *pdev = adapter->pdev; >>> +??? struct ifcvf_hw *vf = &adapter->vf; >>> +??? int i; >>> + >>> + >>> +??? for (i = 0; i < queues; i++) >>> +??????? devm_free_irq(...
2019 Nov 08
0
[PATCH 1/2] IFC hardware operation layer
...base.c > @@ -0,0 +1,344 @@ > +// SPDX-License-Identifier: GPL-2.0-only > +/* > + * Copyright (C) 2019 Intel Corporation. > + */ > + > +#include "ifcvf_base.h" > + > +static void *get_cap_addr(struct ifcvf_hw *hw, struct virtio_pci_cap *cap) > +{ > + struct ifcvf_adapter *ifcvf; > + u32 length, offset; > + u8 bar; > + > + length = le32_to_cpu(cap->length); > + offset = le32_to_cpu(cap->offset); > + bar = le32_to_cpu(cap->bar); > + > + ifcvf = container_of(hw, struct ifcvf_adapter, vf); > + > + if (bar >= IFCVF_PCI_MAX_RESOU...
2019 Nov 05
1
[PATCH 1/2] IFC hardware operation layer
...base.c > @@ -0,0 +1,344 @@ > +// SPDX-License-Identifier: GPL-2.0-only > +/* > + * Copyright (C) 2019 Intel Corporation. > + */ > + > +#include "ifcvf_base.h" > + > +static void *get_cap_addr(struct ifcvf_hw *hw, struct virtio_pci_cap *cap) > +{ > + struct ifcvf_adapter *ifcvf; > + u32 length, offset; > + u8 bar; > + > + length = le32_to_cpu(cap->length); > + offset = le32_to_cpu(cap->offset); > + bar = le32_to_cpu(cap->bar); > + > + ifcvf = container_of(hw, struct ifcvf_adapter, vf); > + > + if (bar >= IFCVF_PCI_MAX_RESOU...
2020 Jul 13
0
[PATCH 6/7] ifcvf: replace irq_request/free with helpers in vDPA core.
...insertions(+), 5 deletions(-) > > diff --git a/drivers/vdpa/ifcvf/ifcvf_main.c b/drivers/vdpa/ifcvf/ifcvf_main.c > index f5a60c1..65b84e1 100644 > --- a/drivers/vdpa/ifcvf/ifcvf_main.c > +++ b/drivers/vdpa/ifcvf/ifcvf_main.c > @@ -47,11 +47,12 @@ static void ifcvf_free_irq(struct ifcvf_adapter *adapter, int queues) > { > struct pci_dev *pdev = adapter->pdev; > struct ifcvf_hw *vf = &adapter->vf; > + struct vdpa_device *vdpa = &adapter->vdpa; > int i; > > > for (i = 0; i < queues; i++) > - devm_free_irq(&pdev->dev,...
2020 Jul 17
0
[PATCH V2 5/6] ifcvf: replace irq_request/free with vDPA helpers
...insertions(+), 5 deletions(-) > > diff --git a/drivers/vdpa/ifcvf/ifcvf_main.c b/drivers/vdpa/ifcvf/ifcvf_main.c > index f5a60c1..bd2a317 100644 > --- a/drivers/vdpa/ifcvf/ifcvf_main.c > +++ b/drivers/vdpa/ifcvf/ifcvf_main.c > @@ -47,11 +47,12 @@ static void ifcvf_free_irq(struct ifcvf_adapter *adapter, int queues) > { > struct pci_dev *pdev = adapter->pdev; > struct ifcvf_hw *vf = &adapter->vf; > + struct vdpa_device *vdpa = &adapter->vdpa; > int i; > > > for (i = 0; i < queues; i++) > - devm_free_irq(&pdev->dev,...
2019 Nov 05
0
[PATCH 1/2] IFC hardware operation layer
...base.c > @@ -0,0 +1,344 @@ > +// SPDX-License-Identifier: GPL-2.0-only > +/* > + * Copyright (C) 2019 Intel Corporation. > + */ > + > +#include "ifcvf_base.h" > + > +static void *get_cap_addr(struct ifcvf_hw *hw, struct virtio_pci_cap *cap) > +{ > + struct ifcvf_adapter *ifcvf; > + u32 length, offset; > + u8 bar; > + > + length = le32_to_cpu(cap->length); > + offset = le32_to_cpu(cap->offset); > + bar = le32_to_cpu(cap->bar); > + > + ifcvf = container_of(hw, struct ifcvf_adapter, vf); > + > + if (bar >= IFCVF_PCI_MAX_RESOU...
2019 Nov 06
0
[PATCH 1/2] IFC hardware operation layer
...base.c > @@ -0,0 +1,344 @@ > +// SPDX-License-Identifier: GPL-2.0-only > +/* > + * Copyright (C) 2019 Intel Corporation. > + */ > + > +#include "ifcvf_base.h" > + > +static void *get_cap_addr(struct ifcvf_hw *hw, struct virtio_pci_cap *cap) > +{ > + struct ifcvf_adapter *ifcvf; > + u32 length, offset; > + u8 bar; > + > + length = le32_to_cpu(cap->length); > + offset = le32_to_cpu(cap->offset); > + bar = le32_to_cpu(cap->bar); > + > + ifcvf = container_of(hw, struct ifcvf_adapter, vf); > + > + if (bar >= IFCVF_PCI_MAX_RESOU...
2019 Oct 16
0
[RFC 1/2] vhost: IFC VF hardware operation layer
...ght (C) 2019 Intel Corporation. > + */ > + > +#include "ifcvf_base.h" > + > +static void *get_cap_addr(struct ifcvf_hw *hw, struct virtio_pci_cap *cap) > +{ > + u8 bar = cap->bar; > + u32 length = cap->length; > + u32 offset = cap->offset; > + struct ifcvf_adapter *ifcvf = > + container_of(hw, struct ifcvf_adapter, vf); > + > + if (bar >= IFCVF_PCI_MAX_RESOURCE) { > + IFC_ERR(ifcvf->dev, > + "Invalid bar number %u to get capabilities.\n", bar); > + return NULL; > + } > + > + if (offset + length < offset) { &...
2019 Oct 21
0
[RFC 1/2] vhost: IFC VF hardware operation layer
..." >>> + >>> +static void *get_cap_addr(struct ifcvf_hw *hw, struct >>> virtio_pci_cap *cap) >>> +{ >>> +??? u8 bar = cap->bar; >>> +??? u32 length = cap->length; >>> +??? u32 offset = cap->offset; >>> +??? struct ifcvf_adapter *ifcvf = >>> +??????? container_of(hw, struct ifcvf_adapter, vf); >>> + >>> +??? if (bar >= IFCVF_PCI_MAX_RESOURCE) { >>> +??????? IFC_ERR(ifcvf->dev, >>> +??????????? "Invalid bar number %u to get capabilities.\n", bar); >>> +??...
2020 May 13
0
[PATCH V2] ifcvf: move IRQ request/free to status change handlers
...pa/ifcvf/ifcvf_main.c > @@ -28,6 +28,60 @@ static irqreturn_t ifcvf_intr_handler(int irq, void *arg) > return IRQ_HANDLED; > } > > +static void ifcvf_free_irq_vectors(void *data) > +{ > + pci_free_irq_vectors(data); > +} > + > +static void ifcvf_free_irq(struct ifcvf_adapter *adapter, int queues) > +{ > + struct pci_dev *pdev = adapter->pdev; > + struct ifcvf_hw *vf = &adapter->vf; > + int i; > + > + > + for (i = 0; i < queues; i++) > + devm_free_irq(&pdev->dev, vf->vring[i].irq, &vf->vring[i]); > + > + ifcvf...
2020 May 11
0
[PATCH] ifcvf: move IRQ request/free to status change handlers
...pa/ifcvf/ifcvf_main.c > @@ -28,6 +28,60 @@ static irqreturn_t ifcvf_intr_handler(int irq, void *arg) > return IRQ_HANDLED; > } > > +static void ifcvf_free_irq_vectors(void *data) > +{ > + pci_free_irq_vectors(data); > +} > + > +static void ifcvf_free_irq(struct ifcvf_adapter *adapter, int queues) > +{ > + struct pci_dev *pdev = adapter->pdev; > + struct ifcvf_hw *vf = &adapter->vf; > + int i; > + > + > + for (i = 0; i < queues; i++) > + devm_free_irq(&pdev->dev, vf->vring[i].irq, &vf->vring[i]); > + > + ifcvf...