summaryrefslogtreecommitdiff
path: root/lib/ovs-numa.h
Commit message (Collapse)AuthorAgeFilesLines
* vswitchd: Add --dummy-numa command line option.Daniele Di Proietto2016-06-071-0/+1
| | | | | | | | | | | This option is used to initialize the ovs_numa module with a fake configuration and to avoid pthread_setaffinity_np() calls. It will be useful to test dpif-netdev with pmd threads. Since it is only used for testing it is not documented in the man pages. Signed-off-by: Daniele Di Proietto <diproiettod@vmware.com> Acked-by: Ilya Maximets <i.maximets@samsung.com>
* ovs-numa: Introduce function to set current thread affinity.Daniele Di Proietto2016-06-071-0/+1
| | | | | | | | | | | | | | | 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>
* ovs-numa: Remove non-linux stubs.Daniele Di Proietto2016-06-071-106/+1
| | | | | | | | | | | | | | | | | | | Instead of having static inline stubs for non linux platform we can use the implementations in ovs-numa.c. With one small change to ovs_numa_dump_cores_on_numa(), they will behave exactly like the stubs for the non-linux case, because 'found_numa_and_core' will be false and the socket and cpu hmaps will be empty. There are a few places where conditional compilation is required: the code that parses the linux specific sysfs entries and its dependencies. It requires opendir() and readdir() and doesn't make sense outside of linux anyway. This change is required to have a cross-platform ovs-numa dummy implementation for testing. Signed-off-by: Daniele Di Proietto <diproiettod@vmware.com> Acked-by: Ilya Maximets <i.maximets@samsung.com>
* list: Remove lib/list.h completely.Ben Warren2016-03-301-1/+1
| | | | | | | | All code is now in include/openvswitch/list.h. Signed-off-by: Ben Warren <ben@skyportsystems.com> Acked-by: Ryan Moats <rmoats@us.ibm.com> Signed-off-by: Ben Pfaff <blp@ovn.org>
* ovs-numa: Change 'core_id' to unsigned.Daniele Di Proietto2015-05-221-15/+15
| | | | | | | | | | DPDK lcore_id is unsigned. We need to support big values like LCORE_ID_ANY (=UINT32_MAX). Therefore I am changing the type everywhere in OVS. Signed-off-by: Daniele Di Proietto <diproiettod@vmware.com> Signed-off-by: Ethan Jackson <ethan@nicira.com> Acked-by: Ethan Jackson <ethan@nicira.com>
* ovs-numa.h: Add a missing OVS_UNUSEDYAMAMOTO Takashi2015-01-151-1/+1
| | | | | | | | | | | | | | | | | Suppress the following warning: > cc1: warnings being treated as errors > In file included from ../lib/dpif.h:394:0, > from ../lib/netdev.c:28: > ../lib/ovs-numa.h: In function 'ovs_numa_dump_cores_on_numa': > ../lib/ovs-numa.h:150:33: error: unused parameter 'numa_id' The problem was introduced by commit 9da2564e2bfa4ffc5a05552630ce2aca00a521c9. ("ovs-numa: Refine the module.") Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp> Acked-by: Ben Pfaff <blp@nicira.com>
* ovs-numa: Refine the module.Alex Wang2014-12-301-0/+41
| | | | | | | | | This commit refines the ovs-numa module by eliminating duplicated codes and exposing API for dumping the cores on numa node. Signed-off-by: Alex Wang <alexw@nicira.com> Acked-by: Pravin B Shelar <pshelar@nicira.com>
* ovs-numa: Add support for cpu-mask configuration.Alex Wang2014-09-191-0/+7
| | | | | | | | | | | | | | | This commit adds support in ovs-numa module for reading a user specified cpu mask, which configures the availability of the cores. The cpu mask has the format of a hex string similar to the EAL '-c COREMASK' option input or the 'taskset' mask input. The lowest order bit corresponds to the first CPU core. Bit value '1' means the corresponding core is available. An upcoming patch will allow user to configure the mask via OVSDB. Signed-off-by: Alex Wang <alexw@nicira.com> Acked-by: Pravin B Shelar <pshelar@nicira.com>
* ovs-numa: Add function for getting numa node id from core id.Alex Wang2014-09-051-0/+7
| | | | | Signed-off-by: Alex Wang <alexw@nicira.com> Acked-by: Pravin B Shelar <pshelar@nicira.com>
* ovs-numa: Replace name 'cpu_socket' with 'numa_node'.Alex Wang2014-09-051-14/+14
| | | | | | | | | | 'numa' and 'socket' are currently used interchangeably in ovs-numa. But they are not always equivalent as some platform can have multiple sockets on a numa node. To avoid confusion, this commit renames all the 'cpu_socket' to 'numa_node'. Signed-off-by: Alex Wang <alexw@nicira.com> Acked-by: Pravin B Shelar <pshelar@nicira.com>
* ovs-numa: Add ovs-numa.{c,h} for extracting and storing cpuAlex Wang2014-08-131-0/+111
socket and cpu core info. Signed-off-by: Alex Wang <alexw@nicira.com> Acked-by: Ben Pfaff <blp@nicira.com>