search for: ifcvf_stop_datapath

Displaying 14 results from an estimated 14 matches for "ifcvf_stop_datapath".

2020 May 12
1
[PATCH] ifcvf: move IRQ request/free to status change handlers
...vf; >>> +??? u8 status_old; >>> +??? int ret; >>> ? ????? vf? = vdpa_to_vf(vdpa_dev); >>> ????? adapter = dev_get_drvdata(vdpa_dev->dev.parent); >>> +??? status_old = ifcvf_get_status(vf); >>> ? ????? if (status == 0) { >>> ????????? ifcvf_stop_datapath(adapter); >>> @@ -128,7 +185,22 @@ static void ifcvf_vdpa_set_status(struct >>> vdpa_device *vdpa_dev, u8 status) >>> ????????? return; >>> ????? } >>> ? -??? if (status & VIRTIO_CONFIG_S_DRIVER_OK) { >>> +??? if ((status_old & VIRTIO_C...
2023 May 08
1
[PATCH V2 4/5] vDPA/ifcvf: synchronize irqs in the reset routine
..._irq(vf); ifcvf_free_config_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...
2023 May 24
2
[PATCH V2 4/5] vDPA/ifcvf: synchronize irqs in the reset routine
...>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_vec...
2020 May 13
0
[PATCH V2] ifcvf: move IRQ request/free to status change handlers
...ations to the driver before DRIVER_OK. This comment needs to be checked as I said previously. It's only needed if we're sure ifcvf can generate interrupt before DRIVER_OK. > > Signed-off-by: Zhu Lingshan <lingshan.zhu at intel.com> > --- > changes from V1: > remove ifcvf_stop_datapath() in status == 0 handler, we don't need to do this > twice; handle status == 0 after DRIVER_OK -> !DRIVER_OK handler (Jason Wang) Patch looks good to me, but with this patch ping cannot work on my machine. (It works without this patch). Thanks > > drivers/vdpa/ifcvf/ifcvf_ma...
2020 May 11
0
[PATCH] ifcvf: move IRQ request/free to status change handlers
...{ > struct ifcvf_adapter *adapter; > struct ifcvf_hw *vf; > + u8 status_old; > + int ret; > > vf = vdpa_to_vf(vdpa_dev); > adapter = dev_get_drvdata(vdpa_dev->dev.parent); > + status_old = ifcvf_get_status(vf); > > if (status == 0) { > ifcvf_stop_datapath(adapter); > @@ -128,7 +185,22 @@ static void ifcvf_vdpa_set_status(struct vdpa_device *vdpa_dev, u8 status) > return; > } > > - if (status & VIRTIO_CONFIG_S_DRIVER_OK) { > + if ((status_old & VIRTIO_CONFIG_S_DRIVER_OK) && > + !(status & VIRTIO_...
2023 Mar 31
7
[PATCH 0/5] vDPA/ifcvf: implement immediate initialization mechanism
Formerly, ifcvf driver has implemented a lazy-initialization mechanism for the virtqueues and other config space contents, it would store all configurations that passed down from the userspace, then load them to the device config space upon DRIVER_OK. This can not serve live migration, so this series implement an immediate initialization mechanism, which means rather than the former store-load
2023 May 08
6
[PATCH V2 0/5] vDPA/ifcvf: implement immediate initialization mechanism
Formerly, ifcvf driver has implemented a lazy-initialization mechanism for the virtqueues and other config space contents, it would store all configurations that passed down from the userspace, then load them to the device config space upon DRIVER_OK. This can not serve live migration, so this series implement an immediate initialization mechanism, which means rather than the former store-load
2019 Oct 21
0
[RFC 2/2] vhost: IFC VF vdpa layer
...g[i].avail || >>> +??????????? !vf->vring[i].used) >>> +??????????? break; >>> +??? } >>> +??? vf->nr_vring = i; >>> + >>> +??? ret = ifcvf_start_hw(vf); >>> +??? return ret; >>> +} >>> + >>> +static int ifcvf_stop_datapath(void *private) >>> +{ >>> +??? struct ifcvf_hw *vf = IFC_PRIVATE_TO_VF(private); >>> +??? int i; >>> + >>> +??? for (i = 0; i < IFCVF_MAX_QUEUES; i++) >>> +??????? vf->vring[i].cb.callback = NULL; >> >> >> Any synchroniza...
2020 May 13
0
[PATCH V2] ifcvf: move IRQ request/free to status change handlers
...checked as I said previously. It's only >> needed if we're sure ifcvf can generate interrupt before DRIVER_OK. >> >> >>> >>> Signed-off-by: Zhu Lingshan <lingshan.zhu at intel.com> >>> --- >>> changes from V1: >>> remove ifcvf_stop_datapath() in status == 0 handler, we don't need >>> to do this >>> twice; handle status == 0 after DRIVER_OK -> !DRIVER_OK handler >>> (Jason Wang) >> >> >> Patch looks good to me, but with this patch ping cannot work on my >> machine. (It works...
2020 May 13
0
[PATCH V2] ifcvf: move IRQ request/free to status change handlers
...checked as I said previously. It's only >> needed if we're sure ifcvf can generate interrupt before DRIVER_OK. >> >> >>> >>> Signed-off-by: Zhu Lingshan <lingshan.zhu at intel.com> >>> --- >>> changes from V1: >>> remove ifcvf_stop_datapath() in status == 0 handler, we don't need >>> to do this >>> twice; handle status == 0 after DRIVER_OK -> !DRIVER_OK handler >>> (Jason Wang) >> >> >> Patch looks good to me, but with this patch ping cannot work on my >> machine. (It works...
2020 May 19
0
[PATCH V2] ifcvf: move IRQ request/free to status change handlers
...ly >>>> needed if we're sure ifcvf can generate interrupt before DRIVER_OK. >>>> >>>> >>>>> Signed-off-by: Zhu Lingshan <lingshan.zhu at intel.com> >>>>> --- >>>>> changes from V1: >>>>> remove ifcvf_stop_datapath() in status == 0 handler, we don't need >>>>> to do this >>>>> twice; handle status == 0 after DRIVER_OK -> !DRIVER_OK handler >>>>> (Jason Wang) >>>> >>>> Patch looks good to me, but with this patch ping cannot work on my...
2019 Oct 16
0
[RFC 2/2] vhost: IFC VF vdpa layer
...+ > + if (!vf->vring[i].size) > + break; > + > + if (!vf->vring[i].desc || !vf->vring[i].avail || > + !vf->vring[i].used) > + break; > + } > + vf->nr_vring = i; > + > + ret = ifcvf_start_hw(vf); > + return ret; > +} > + > +static int ifcvf_stop_datapath(void *private) > +{ > + struct ifcvf_hw *vf = IFC_PRIVATE_TO_VF(private); > + int i; > + > + for (i = 0; i < IFCVF_MAX_QUEUES; i++) > + vf->vring[i].cb.callback = NULL; Any synchronization is needed for the vq irq handler? > + > + ifcvf_stop_hw(vf); > + > +...
2023 Mar 31
1
[PATCH 3/5] retire ifcvf_start_datapath and ifcvf_add_status
...t_datapath(struct ifcvf_adapter *adapter) -{ - struct ifcvf_hw *vf = adapter->vf; - u8 status; - int ret; - - ret = ifcvf_start_hw(vf); - if (ret < 0) { - status = ifcvf_get_status(vf); - status |= VIRTIO_CONFIG_S_FAILED; - ifcvf_set_status(vf, status); - } - - return ret; -} - static int ifcvf_stop_datapath(struct ifcvf_adapter *adapter) { struct ifcvf_hw *vf = adapter->vf; @@ -452,13 +436,11 @@ static u8 ifcvf_vdpa_get_status(struct vdpa_device *vdpa_dev) static void ifcvf_vdpa_set_status(struct vdpa_device *vdpa_dev, u8 status) { - struct ifcvf_adapter *adapter; struct ifcvf_hw *vf; u8...
2019 Nov 06
0
[PATCH 2/2] IFC VDPA layer
...n -EINVAL; > + } > + } > + > + vf->nr_vring = i; > + ret = ifcvf_start_hw(vf); So basically there's no need for ifcvf_start_hw() to care about vq enablement, virtio core will take care of that through set_vq_ready(). > + > + return ret; > +} > + > +static int ifcvf_stop_datapath(void *private) > +{ > + struct ifcvf_hw *vf = IFC_PRIVATE_TO_VF(private); > + int i; > + > + for (i = 0; i < IFCVF_MAX_QUEUES; i++) > + vf->vring[i].cb.callback = NULL; > + > + ifcvf_stop_hw(vf); > + > + return 0; > +} > + > +static void ifcvf_reset_vri...