Skip to content

Commit fa7008f

Browse files
dzhangalibabaqiluo-msft
authored andcommitted
swss: flush g_asicState after each event is done (sonic-net#570)
* swss: flush g_asicState after each event is done * add flush() after event is handled in case some entries are still in buffer, don't wait * with the changes in sairedis and swss-common, route performance improved by 200~300 routes/sec * swss-common: remove unnecessary flush() in timeout case and update comment * remove unnecessary flush() in timeout case and update comment
1 parent c429ddb commit fa7008f

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

orchagent/orchdaemon.cpp

+7-6
Original file line numberDiff line numberDiff line change
@@ -300,12 +300,6 @@ void OrchDaemon::start()
300300

301301
if (ret == Select::TIMEOUT)
302302
{
303-
/* Let sairedis to flush all SAI function call to ASIC DB.
304-
* Normally the redis pipeline will flush when enough request
305-
* accumulated. Still it is possible that small amount of
306-
* requests live in it. When the daemon has nothing to do, it
307-
* is a good chance to flush the pipeline */
308-
flush();
309303
continue;
310304
}
311305

@@ -319,5 +313,12 @@ void OrchDaemon::start()
319313
for (Orch *o : m_orchList)
320314
o->doTask();
321315

316+
/* Let sairedis to flush all SAI function call to ASIC DB.
317+
* Normally the redis pipeline will flush when enough request
318+
* accumulated. Still it is possible that small amount of
319+
* requests live in it. When the daemon has finished events/tasks, it
320+
* is a good chance to flush the pipeline before next select happened.
321+
*/
322+
flush();
322323
}
323324
}

0 commit comments

Comments
 (0)