2
0
mirror of https://github.com/openvswitch/ovs synced 2025-08-30 22:05:19 +00:00

netdev-dpdk: Properly support non pmd threads.

We used to reserve DPDK lcore 0 for non pmd operations, making it
difficult to use core 0 for packet processing.
DPDK 2.0 properly support non EAL threads with lcore LCORE_ID_ANY.

Using non EAL threads for non pmd threads, we do not need to reserve
any core for non pmd operations

Signed-off-by: Daniele Di Proietto <diproiettod@vmware.com>
Signed-off-by: Ethan Jackson <ethan@nicira.com>
Acked-by: Ethan Jackson <ethan@nicira.com>
This commit is contained in:
Daniele Di Proietto
2015-05-22 17:14:20 +01:00
committed by Ethan Jackson
parent bd5131ba76
commit d5c199ea7f
6 changed files with 12 additions and 29 deletions

View File

@@ -1927,7 +1927,7 @@ dpdk_init(int argc, char **argv)
}
/* We are called from the main thread here */
thread_set_nonpmd();
RTE_PER_LCORE(_lcore_id) = NON_PMD_CORE_ID;
return result + 1 + base;
}
@@ -2012,14 +2012,6 @@ pmd_thread_setaffinity_cpu(unsigned cpu)
return 0;
}
void
thread_set_nonpmd(void)
{
/* We have to use NON_PMD_CORE_ID to allow non-pmd threads to perform
* certain DPDK operations, like rte_eth_dev_configure(). */
RTE_PER_LCORE(_lcore_id) = NON_PMD_CORE_ID;
}
static bool
thread_is_pmd(void)
{