Soft Patch Panel
 help / color / mirror / Atom feed
From: ogawa.yasufumi@lab.ntt.co.jp
To: ferruh.yigit@intel.com, spp@dpdk.org, ogawa.yasufumi@lab.ntt.co.jp
Subject: [spp] [PATCH 2/4] primary: change interval to retry connection
Date: Tue, 15 Jan 2019 12:29:06 +0900	[thread overview]
Message-ID: <1547522948-10285-3-git-send-email-ogawa.yasufumi@lab.ntt.co.jp> (raw)
In-Reply-To: <1547522948-10285-1-git-send-email-ogawa.yasufumi@lab.ntt.co.jp>

From: Yasufumi Ogawa <ogawa.yasufumi@lab.ntt.co.jp>

This update is to change interval time of connection retry from fixed
`sleep(1)` to `usleep(CONN_RETRY_USEC)` to be configurable.

Signed-off-by: Yasufumi Ogawa <ogawa.yasufumi@lab.ntt.co.jp>
---
 src/primary/main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/primary/main.c b/src/primary/main.c
index 12b86e5..81d1aec 100644
--- a/src/primary/main.c
+++ b/src/primary/main.c
@@ -414,7 +414,7 @@ main(int argc, char *argv[])
 	while (on) {
 		ret = do_connection(&connected, &sock);
 		if (ret < 0) {
-			sleep(1);
+			usleep(CONN_RETRY_USEC);
 			continue;
 		}
 
-- 
2.17.1

  parent reply	other threads:[~2019-01-15  3:31 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-15  3:29 [spp] [PATCH 0/4] Fix bug of fixing slow command reply ogawa.yasufumi
2019-01-15  3:29 ` [spp] [PATCH 1/4] shared: define interval time to retry connection ogawa.yasufumi
2019-01-15  3:29 ` ogawa.yasufumi [this message]
2019-01-15  3:29 ` [spp] [PATCH 3/4] spp_nfv: change interval " ogawa.yasufumi
2019-01-15  3:29 ` [spp] [PATCH 4/4] spp_vf: fix bug of fixing slow command reply ogawa.yasufumi

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=1547522948-10285-3-git-send-email-ogawa.yasufumi@lab.ntt.co.jp \
    --to=ogawa.yasufumi@lab.ntt.co.jp \
    --cc=ferruh.yigit@intel.com \
    --cc=spp@dpdk.org \
    /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).