* [PATCH] vdpa/ifc: improve device stop logic for block device
@ 2022-12-13 7:37 Andy Pei
2023-01-19 14:53 ` Maxime Coquelin
2023-02-03 14:55 ` Maxime Coquelin
0 siblings, 2 replies; 3+ messages in thread
From: Andy Pei @ 2022-12-13 7:37 UTC (permalink / raw)
To: dev; +Cc: chenbo.xia, maxime.coquelin
For block device, we make sure no IO is inflight before we
stop device. We terminate the notify relay process and wait
for all inflight IOs to be completed. So in this period, we
wait for hardware to update used index, there is no need to
relay new kick.
Signed-off-by: Andy Pei <andy.pei@intel.com>
---
drivers/vdpa/ifc/ifcvf_vdpa.c | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/drivers/vdpa/ifc/ifcvf_vdpa.c b/drivers/vdpa/ifc/ifcvf_vdpa.c
index 49d68ad..0822f47 100644
--- a/drivers/vdpa/ifc/ifcvf_vdpa.c
+++ b/drivers/vdpa/ifc/ifcvf_vdpa.c
@@ -367,11 +367,7 @@ struct rte_vdpa_dev_info {
(u16)(ring_state & IFCVF_16_BIT_MASK);
hw->vring[i].last_used_idx =
(u16)(ring_state >> 16);
- if (hw->vring[i].last_avail_idx !=
- hw->vring[i].last_used_idx) {
- ifcvf_notify_queue(hw, i);
- usleep(10);
- }
+ usleep(10);
} while (hw->vring[i].last_avail_idx !=
hw->vring[i].last_used_idx);
}
--
1.8.3.1
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] vdpa/ifc: improve device stop logic for block device
2022-12-13 7:37 [PATCH] vdpa/ifc: improve device stop logic for block device Andy Pei
@ 2023-01-19 14:53 ` Maxime Coquelin
2023-02-03 14:55 ` Maxime Coquelin
1 sibling, 0 replies; 3+ messages in thread
From: Maxime Coquelin @ 2023-01-19 14:53 UTC (permalink / raw)
To: Andy Pei, dev; +Cc: chenbo.xia
On 12/13/22 08:37, Andy Pei wrote:
> For block device, we make sure no IO is inflight before we
> stop device. We terminate the notify relay process and wait
> for all inflight IOs to be completed. So in this period, we
> wait for hardware to update used index, there is no need to
> relay new kick.
>
> Signed-off-by: Andy Pei <andy.pei@intel.com>
> ---
> drivers/vdpa/ifc/ifcvf_vdpa.c | 6 +-----
> 1 file changed, 1 insertion(+), 5 deletions(-)
>
> diff --git a/drivers/vdpa/ifc/ifcvf_vdpa.c b/drivers/vdpa/ifc/ifcvf_vdpa.c
> index 49d68ad..0822f47 100644
> --- a/drivers/vdpa/ifc/ifcvf_vdpa.c
> +++ b/drivers/vdpa/ifc/ifcvf_vdpa.c
> @@ -367,11 +367,7 @@ struct rte_vdpa_dev_info {
> (u16)(ring_state & IFCVF_16_BIT_MASK);
> hw->vring[i].last_used_idx =
> (u16)(ring_state >> 16);
> - if (hw->vring[i].last_avail_idx !=
> - hw->vring[i].last_used_idx) {
> - ifcvf_notify_queue(hw, i);
> - usleep(10);
> - }
> + usleep(10);
> } while (hw->vring[i].last_avail_idx !=
> hw->vring[i].last_used_idx);
> }
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Thanks,
Maxime
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] vdpa/ifc: improve device stop logic for block device
2022-12-13 7:37 [PATCH] vdpa/ifc: improve device stop logic for block device Andy Pei
2023-01-19 14:53 ` Maxime Coquelin
@ 2023-02-03 14:55 ` Maxime Coquelin
1 sibling, 0 replies; 3+ messages in thread
From: Maxime Coquelin @ 2023-02-03 14:55 UTC (permalink / raw)
To: Andy Pei, dev; +Cc: chenbo.xia
On 12/13/22 08:37, Andy Pei wrote:
> For block device, we make sure no IO is inflight before we
> stop device. We terminate the notify relay process and wait
> for all inflight IOs to be completed. So in this period, we
> wait for hardware to update used index, there is no need to
> relay new kick.
>
> Signed-off-by: Andy Pei <andy.pei@intel.com>
> ---
> drivers/vdpa/ifc/ifcvf_vdpa.c | 6 +-----
> 1 file changed, 1 insertion(+), 5 deletions(-)
>
Applied to dpdk-next-virtio/main.
Thanks,
Maxime
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-02-03 14:55 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-12-13 7:37 [PATCH] vdpa/ifc: improve device stop logic for block device Andy Pei
2023-01-19 14:53 ` Maxime Coquelin
2023-02-03 14:55 ` Maxime Coquelin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).