search for: ifcvf_reset_vring

Displaying 11 results from an estimated 11 matches for "ifcvf_reset_vring".

2023 May 08
1
[PATCH V2 4/5] vDPA/ifcvf: synchronize irqs in the reset routine
...le (ifcvf_get_status(hw)) + msleep(1); } u64 ifcvf_get_hw_features(struct ifcvf_hw *hw) @@ -368,20 +365,42 @@ void ifcvf_set_vq_ready(struct ifcvf_hw *hw, u16 qid, bool ready) vp_iowrite16(ready, &cfg->queue_enable); } -static void ifcvf_hw_disable(struct ifcvf_hw *hw) +static void ifcvf_reset_vring(struct ifcvf_hw *hw) { - u32 i; + u16 qid; + + for (qid = 0; qid < hw->nr_vring; qid++) { + hw->vring[qid].cb.callback = NULL; + hw->vring[qid].cb.private = NULL; + ifcvf_set_vq_vector(hw, qid, VIRTIO_MSI_NO_VECTOR); + } +} +static void ifcvf_reset_config_handler(struct ifcvf_hw *...
2023 May 24
2
[PATCH V2 4/5] vDPA/ifcvf: synchronize irqs in the reset routine
...> > u64 ifcvf_get_hw_features(struct ifcvf_hw *hw) > @@ -368,20 +365,42 @@ void ifcvf_set_vq_ready(struct ifcvf_hw *hw, u16 qid, bool ready) > vp_iowrite16(ready, &cfg->queue_enable); > } > > -static void ifcvf_hw_disable(struct ifcvf_hw *hw) > +static void ifcvf_reset_vring(struct ifcvf_hw *hw) > { > - u32 i; > + u16 qid; > + > + for (qid = 0; qid < hw->nr_vring; qid++) { > + hw->vring[qid].cb.callback = NULL; > + hw->vring[qid].cb.private = NULL; > + ifcvf_set_vq_vector(h...
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
2023 May 08
1
[PATCH V2 1/5] vDPA/ifcvf: virt queue ops take immediate actions
...eady(struct ifcvf_hw *hw, u16 qid, bool ready); #endif /* _IFCVF_H_ */ diff --git a/drivers/vdpa/ifcvf/ifcvf_main.c b/drivers/vdpa/ifcvf/ifcvf_main.c index 7f78c47e40d6..1357c67014ab 100644 --- a/drivers/vdpa/ifcvf/ifcvf_main.c +++ b/drivers/vdpa/ifcvf/ifcvf_main.c @@ -382,10 +382,6 @@ static void ifcvf_reset_vring(struct ifcvf_adapter *adapter) for (i = 0; i < vf->nr_vring; i++) { vf->vring[i].last_avail_idx = 0; - vf->vring[i].desc = 0; - vf->vring[i].avail = 0; - vf->vring[i].used = 0; - vf->vring[i].ready = 0; vf->vring[i].cb.callback = NULL; vf->vring[i].cb.pri...
2019 Oct 21
0
[RFC 2/2] vhost: IFC VF vdpa layer
...ot be effected. Ok I think you mean when ifcvf_stop_hw() return, hardware will not respond to e.g kick and other events etc. >> >> >>> + >>> +??? ifcvf_stop_hw(vf); >>> + >>> +??? return 0; >>> +} >>> + >>> +static void ifcvf_reset_vring(struct ifcvf_adapter *adapter) >>> +{ >>> +??? int i; >>> +??? struct ifcvf_hw *vf = IFC_PRIVATE_TO_VF(adapter); >>> + >>> +??? for (i = 0; i < IFCVF_MAX_QUEUE_PAIRS * 2; i++) { >>> +??????? vf->vring[i].last_used_idx = 0; >>> +??...
2019 Oct 16
0
[RFC 2/2] vhost: IFC VF vdpa layer
..._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); > + > + return 0; > +} > + > +static void ifcvf_reset_vring(struct ifcvf_adapter *adapter) > +{ > + int i; > + struct ifcvf_hw *vf = IFC_PRIVATE_TO_VF(adapter); > + > + for (i = 0; i < IFCVF_MAX_QUEUE_PAIRS * 2; i++) { > + vf->vring[i].last_used_idx = 0; > + vf->vring[i].last_avail_idx = 0; > + vf->vring[i].desc = 0; &...
2019 Nov 06
0
[PATCH 2/2] IFC VDPA layer
...f_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_vring(struct ifcvf_adapter *adapter) > +{ > + struct ifcvf_hw *vf = IFC_PRIVATE_TO_VF(adapter); > + struct virtio_pci_common_cfg *cfg; > + u8 *lm_cfg; > + int i; > + > + cfg = vf->common_cfg; > + lm_cfg = vf->lm_cfg; > + > + for (i = 0; i < IFCVF_MAX_QUEUE_PAIRS * 2...
2020 May 13
0
[PATCH V2] ifcvf: move IRQ request/free to status change handlers
...> - if (status == 0) { > + if ((status_old & VIRTIO_CONFIG_S_DRIVER_OK) && > + !(status & VIRTIO_CONFIG_S_DRIVER_OK)) { > ifcvf_stop_datapath(adapter); > + ifcvf_free_irq(adapter, IFCVF_MAX_QUEUE_PAIRS * 2); > + } > + > + if (status == 0) { > ifcvf_reset_vring(adapter); > return; > } > > - if (status & VIRTIO_CONFIG_S_DRIVER_OK) { > + if ((status & VIRTIO_CONFIG_S_DRIVER_OK) && > + !(status_old & VIRTIO_CONFIG_S_DRIVER_OK)) { > + ret = ifcvf_request_irq(adapter); > + if (ret) { > + status =...
2023 Mar 31
1
[PATCH 1/5] virt queue ops take immediate actions
...eady(struct ifcvf_hw *hw, u16 qid, bool ready); #endif /* _IFCVF_H_ */ diff --git a/drivers/vdpa/ifcvf/ifcvf_main.c b/drivers/vdpa/ifcvf/ifcvf_main.c index 7f78c47e40d6..1357c67014ab 100644 --- a/drivers/vdpa/ifcvf/ifcvf_main.c +++ b/drivers/vdpa/ifcvf/ifcvf_main.c @@ -382,10 +382,6 @@ static void ifcvf_reset_vring(struct ifcvf_adapter *adapter) for (i = 0; i < vf->nr_vring; i++) { vf->vring[i].last_avail_idx = 0; - vf->vring[i].desc = 0; - vf->vring[i].avail = 0; - vf->vring[i].used = 0; - vf->vring[i].ready = 0; vf->vring[i].cb.callback = NULL; vf->vring[i].cb.pri...
2020 May 12
1
[PATCH] ifcvf: move IRQ request/free to status change handlers
On 2020/5/11 ??6:11, Zhu, Lingshan wrote: > > > On 5/11/2020 5:26 PM, Jason Wang wrote: >> >> On 2020/5/11 ??3:19, Zhu Lingshan wrote: >>> This commit move IRQ request and free operations from probe() >>> to VIRTIO status change handler to comply with VIRTIO spec. >>> >>> VIRTIO spec 1.1, section 2.1.2 Device Requirements: Device Status