summaryrefslogtreecommitdiff
path: root/lib/dpif-netdev.c
diff options
context:
space:
mode:
authorDaniele Di Proietto <diproiettod@vmware.com>2016-06-06 17:05:49 -0700
committerDaniele Di Proietto <diproiettod@vmware.com>2016-06-07 11:15:01 -0700
commit6930c7e01c3f4ee8f4a9360d293d065f35588bf0 (patch)
tree1b98ea52b1686ee452a75acc59c43a85b41fc109 /lib/dpif-netdev.c
parent93ce57623f67547d4873889c77ec5250728b304f (diff)
downloadopenvswitch-6930c7e01c3f4ee8f4a9360d293d065f35588bf0.tar.gz
ovs-numa: Introduce function to set current thread affinity.
This commit moves the code that sets the pmd threads affinity from netdev-dpdk to ovs-numa. There's one small part left in netdev-dpdk, to set the lcore_id. Now dpif-netdev will call both modules (ovs-numa and netdev-dpdk) when starting a pmd thread. This change will allow having a dummy implementation of the set affinity call, for testing purposes. Signed-off-by: Daniele Di Proietto <diproiettod@vmware.com> Acked-by: Ilya Maximets <i.maximets@samsung.com>
Diffstat (limited to 'lib/dpif-netdev.c')
-rw-r--r--lib/dpif-netdev.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/dpif-netdev.c b/lib/dpif-netdev.c
index 61a939aca..fcfd22ec8 100644
--- a/lib/dpif-netdev.c
+++ b/lib/dpif-netdev.c
@@ -2839,7 +2839,8 @@ pmd_thread_main(void *f_)
/* Stores the pmd thread's 'pmd' to 'per_pmd_key'. */
ovsthread_setspecific(pmd->dp->per_pmd_key, pmd);
- pmd_thread_setaffinity_cpu(pmd->core_id);
+ ovs_numa_thread_setaffinity_core(pmd->core_id);
+ dpdk_set_lcore_id(pmd->core_id);
poll_cnt = pmd_load_queues_and_ports(pmd, &poll_list);
reload:
emc_cache_init(&pmd->flow_cache);