2
0
mirror of https://github.com/openvswitch/ovs synced 2025-09-01 23:05:29 +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

@@ -5,11 +5,6 @@
struct dp_packet;
/* Reserves cpu core 0 for all non-pmd threads. Changing the value of this
* macro will allow pmd thread to be pinned on cpu core 0. This may not be
* ideal since the core may be non-isolated. */
#define NON_PMD_CORE_ID 0
#ifdef DPDK_NETDEV
#include <rte_config.h>
@@ -25,14 +20,17 @@ struct dp_packet;
#include <rte_launch.h>
#include <rte_malloc.h>
#define NON_PMD_CORE_ID LCORE_ID_ANY
int dpdk_init(int argc, char **argv);
void netdev_dpdk_register(void);
void free_dpdk_buf(struct dp_packet *);
int pmd_thread_setaffinity_cpu(unsigned cpu);
void thread_set_nonpmd(void);
#else
#define NON_PMD_CORE_ID UINT32_MAX
#include "util.h"
static inline int
@@ -62,11 +60,5 @@ pmd_thread_setaffinity_cpu(unsigned cpu OVS_UNUSED)
return 0;
}
static inline void
thread_set_nonpmd(void)
{
/* Nothing */
}
#endif /* DPDK_NETDEV */
#endif