[ovs-dev,v4,3/3] dpif-netdev: Don't uninit emc on reload.

Submitted by Ilya Maximets on July 21, 2017, 12:51 p.m.


Message ID 1500641502-31926-4-git-send-email-i.maximets@samsung.com
State New
Headers show

Commit Message

Ilya Maximets July 21, 2017, 12:51 p.m.
There are many reasons for reloading of pmd threads:
	* reconfiguration of one of the ports.
	* Adjusting of static_tx_qid.
	* Adding new tx/rx ports.

In many cases EMC is still useful after reload and uninit
will only lead to unnecessary upcalls/classifier lookups.

Such behaviour slows down the datapath. Uninit itself slows
down the reload path. All this factors leads to additional
unexpected latencies/drops on events not directly connected
to current PMD thread.

Lets not uninitialize emc cache on reload path.
'emc_cache_slow_sweep()' and replacements should free all
the old/unwanted entries.

Signed-off-by: Ilya Maximets <i.maximets@samsung.com>
Acked-by: Cian Ferriter <cian.ferriter@intel.com>
Tested-by: Cian Ferriter <cian.ferriter@intel.com>
 lib/dpif-netdev.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Patch hide | download patch | download mbox

diff --git a/lib/dpif-netdev.c b/lib/dpif-netdev.c
index a1e8c56..74d3535 100644
--- a/lib/dpif-netdev.c
+++ b/lib/dpif-netdev.c
@@ -3810,9 +3810,9 @@  pmd_thread_main(void *f_)
     poll_cnt = pmd_load_queues_and_ports(pmd, &poll_list);
+    emc_cache_init(&pmd->flow_cache);
-    emc_cache_init(&pmd->flow_cache);
     /* List port/core affinity */
     for (i = 0; i < poll_cnt; i++) {
@@ -3866,13 +3866,13 @@  reload:
      * reloading the updated configuration. */
-    emc_cache_uninit(&pmd->flow_cache);
     if (!exiting) {
         goto reload;
+    emc_cache_uninit(&pmd->flow_cache);
     return NULL;