2
0
mirror of https://github.com/openvswitch/ovs synced 2025-10-19 14:37:21 +00:00
Commit Graph

13 Commits

Author SHA1 Message Date
Daniele Di Proietto
bd5131ba76 ovs-numa: Change 'core_id' to unsigned.
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>
2015-05-22 11:28:19 -07:00
Jarno Rajahalme
5f03c98321 lib/list: Add LIST_FOR_EACH_POP.
Makes popping each member of the list a bit easier.

Signed-off-by: Jarno Rajahalme <jrajahalme@nicira.com>
Acked-by: Russell Bryant <rbryant@redhat.com>
Acked-by: Ben Pfaff <blp@nicira.com>
2015-04-06 14:02:28 -07:00
Alex Wang
9da2564e2b ovs-numa: Refine the module.
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>
2014-12-30 11:47:22 -08:00
Thomas Graf
e6211adce4 lib: Move vlog.h to <openvswitch/vlog.h>
A new function vlog_insert_module() is introduced to avoid using
list_insert() from the vlog.h header.

Signed-off-by: Thomas Graf <tgraf@noironetworks.com>
Acked-by: Ben Pfaff <blp@nicira.com>
2014-12-15 14:15:19 +01:00
Thomas Graf
ca6ba70092 list: Rename struct list to struct ovs_list
struct list is a common name and can't be used in public headers.

Signed-off-by: Thomas Graf <tgraf@noironetworks.com>
Acked-by: Ben Pfaff <blp@nicira.com>
2014-12-15 14:15:12 +01:00
Alex Wang
8db2f898d5 ovs-numa: Add support for cpu-mask configuration.
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>
2014-09-19 15:59:36 -07:00
Alex Wang
46a1403552 ovs-numa: Fix a missing initialization.
This commit updates the pointer to 'struct numa_node'
when initializing the 'struct cpu_core'.

Signed-off-by: Alex Wang <alexw@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
2014-09-08 13:07:07 -07:00
Alex Wang
3418575040 ovs-numa: Add module description.
Add a short description of the module and its assumption.

Signed-off-by: Alex Wang <alexw@nicira.com>
Acked-by: Pravin B Shelar <pshelar@nicira.com>
2014-09-05 15:25:19 -07:00
Alex Wang
6b1105fb20 ovs-numa: Add function for getting numa node id from core id.
Signed-off-by: Alex Wang <alexw@nicira.com>
Acked-by: Pravin B Shelar <pshelar@nicira.com>
2014-09-05 15:19:53 -07:00
Alex Wang
421aa227d0 ovs-numa: Relax the ovs_numa_*() input argument check.
Many of the ovs_numa_*() functions abort the program when the
input cpu socket or core id is invalid.  This commit relaxes
the input check and makes these functions return OVS_*_UNSPEC
when the check fails.

Signed-off-by: Alex Wang <alexw@nicira.com>
Acked-by: Pravin B Shelar <pshelar@nicira.com>
2014-09-05 15:19:53 -07:00
Alex Wang
012c0a040f ovs-numa: Replace name 'cpu_socket' with 'numa_node'.
'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>
2014-09-05 15:19:53 -07:00
Ben Pfaff
6dd0eefefb ovs-numa: Correct printf format specifiers.
list_size() yields a size_t, not uint64_t, and these types are different on
32-bit targets.

Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Alex Wang <alexw@nicira.com>
2014-08-13 14:26:37 -07:00
Alex Wang
7c5a3bbfac ovs-numa: Add ovs-numa.{c,h} for extracting and storing cpu
socket and cpu core info.

Signed-off-by: Alex Wang <alexw@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
2014-08-13 12:48:07 -07:00