DPDK patches and discussions
 help / color / mirror / Atom feed
From: Sunil Kumar Kori <skori@marvell.com>
To: Jerin Jacob <jerinj@marvell.com>,
	Nithin Dabilpuram <ndabilpuram@marvell.com>,
	Vamsi Attunuru <vattunuru@marvell.com>
Cc: <dev@dpdk.org>, Sunil Kumar Kori <skori@marvell.com>
Subject: [dpdk-dev] [PATCH] common/octeontx2: reduce wait time for mbox messages
Date: Mon, 16 Dec 2019 20:32:53 +0530	[thread overview]
Message-ID: <20191216150253.22835-1-skori@marvell.com> (raw)

After each mbox send operation, context waits for minimum 1ms to get
corresponding response although response can come earlier.
So reducing wait time to lower granularity.

Signed-off-by: Sunil Kumar Kori <skori@marvell.com>
---
 drivers/common/octeontx2/otx2_mbox.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/common/octeontx2/otx2_mbox.c b/drivers/common/octeontx2/otx2_mbox.c
index c359bf42f..cc341aac3 100644
--- a/drivers/common/octeontx2/otx2_mbox.c
+++ b/drivers/common/octeontx2/otx2_mbox.c
@@ -278,8 +278,9 @@ mbox_wait(struct otx2_mbox *mbox, int devid, uint32_t rst_timo)
 	volatile struct otx2_mbox_dev *mdev = &mbox->dev[devid];
 	uint32_t timeout = 0, sleep = 1;
 
+	rst_timo  = rst_timo * 1000; /* Milli seconds to micro seconds */
 	while (mdev->num_msgs > mdev->msgs_acked) {
-		rte_delay_ms(sleep);
+		rte_delay_us(sleep);
 		timeout += sleep;
 		if (timeout >= rst_timo) {
 			struct mbox_hdr *tx_hdr =
-- 
2.17.1


             reply	other threads:[~2019-12-16 15:03 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-16 15:02 Sunil Kumar Kori [this message]
2020-01-14  3:49 ` Jerin Jacob
  -- strict thread matches above, loose matches on Subject: below --
2019-12-16 14:55 Sunil Kumar Kori

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=20191216150253.22835-1-skori@marvell.com \
    --to=skori@marvell.com \
    --cc=dev@dpdk.org \
    --cc=jerinj@marvell.com \
    --cc=ndabilpuram@marvell.com \
    --cc=vattunuru@marvell.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).