DPDK patches and discussions
 help / color / mirror / Atom feed
From: Andy Pei <andy.pei@intel.com>
To: dev@dpdk.org
Cc: chenbo.xia@intel.com, maxime.coquelin@redhat.com
Subject: [PATCH] vdpa/ifc: improve device stop logic for block device
Date: Tue, 13 Dec 2022 15:37:35 +0800	[thread overview]
Message-ID: <1670917055-229334-1-git-send-email-andy.pei@intel.com> (raw)

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


             reply	other threads:[~2022-12-13  8:30 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-13  7:37 Andy Pei [this message]
2023-01-19 14:53 ` Maxime Coquelin
2023-02-03 14:55 ` Maxime Coquelin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1670917055-229334-1-git-send-email-andy.pei@intel.com \
    --to=andy.pei@intel.com \
    --cc=chenbo.xia@intel.com \
    --cc=dev@dpdk.org \
    --cc=maxime.coquelin@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).