[spp] [PATCH 2/3] spp_vf: improve command response time

x-fn-spp at sl.ntt-tx.co.jp x-fn-spp at sl.ntt-tx.co.jp
Fri Jan 11 05:27:42 CET 2019


From: Hideyuki Yamashita <yamashita.hideyuki at po.ntt-tx.co.jp>

This patch improves command response time of spp_vf.

Signed-off-by: Hideyuki Yamashita <yamashita.hideyuki at po.ntt-tx.co.jp>
Signed-off-by: Naoki Takada <takada.naoki at lab.ntt.co.jp>
---
 src/vf/spp_vf.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/src/vf/spp_vf.c b/src/vf/spp_vf.c
index 4e4a8e1..b81ad11 100644
--- a/src/vf/spp_vf.c
+++ b/src/vf/spp_vf.c
@@ -349,7 +349,12 @@ main(int argc, char *argv[])
 			if (unlikely(ret_do != SPP_RET_OK))
 				break;
 
-			sleep(1);
+		       /*
+			* To avoid making CPU busy, this thread waits
+			* here for 100 ms.
+			*/
+
+			usleep(100);
 
 #ifdef SPP_RINGLATENCYSTATS_ENABLE
 			print_ring_latency_stats();
-- 
2.17.1



More information about the spp mailing list