#
719834a6 |
| 20-Sep-2024 |
Mattias Rönnblom <mattias.ronnblom@ericsson.com> |
use C linkage where appropriate in headers
Assure that 'extern "C" { /../ }' do not cover files included from a particular header file, and address minor issues resulting from this change of order.
use C linkage where appropriate in headers
Assure that 'extern "C" { /../ }' do not cover files included from a particular header file, and address minor issues resulting from this change of order.
Dealing with C++ should delegate to the individual include file level, rather than being imposed by the user of that file. For example, forcing C linkage prevents __Generic macros being replaced with overloaded static inline functions in C++ translation units.
Eliminate 'extern "C"' from files which do not declare any symbols (e.g., only macros or struct types).
On the other hand, the headers check is too naive in assuming that all headers must contain a 'extern "C"'. Such a check was added in commit 1ee492bdc4ff ("buildtools/chkincs: check missing C++ guards"). Since this current change results in many headers not containing such a token, remove the check for 'extern "C"' until we have a better implementation.
Signed-off-by: Mattias Rönnblom <mattias.ronnblom@ericsson.com> Acked-by: Morten Brørup <mb@smartsharesystems.com> Signed-off-by: David Marchand <david.marchand@redhat.com>
show more ...
|
#
92e68d9c |
| 14-May-2024 |
Tyler Retzlaff <roretzla@linux.microsoft.com> |
examples: use stdatomic API
Replace the use of gcc builtin __atomic_xxx intrinsics with corresponding rte_atomic_xxx optional rte stdatomic API.
Signed-off-by: Tyler Retzlaff <roretzla@linux.micros
examples: use stdatomic API
Replace the use of gcc builtin __atomic_xxx intrinsics with corresponding rte_atomic_xxx optional rte stdatomic API.
Signed-off-by: Tyler Retzlaff <roretzla@linux.microsoft.com> Acked-by: Stephen Hemminger <stephen@networkplumber.org>
show more ...
|
#
69a3c631 |
| 13-Oct-2021 |
Joyce Kong <joyce.kong@arm.com> |
examples: remove unneeded atomic header include
Remove the unnecessary header file rte_atomic.h included in example module.
Signed-off-by: Joyce Kong <joyce.kong@arm.com> Signed-off-by: Dharmik Tha
examples: remove unneeded atomic header include
Remove the unnecessary header file rte_atomic.h included in example module.
Signed-off-by: Joyce Kong <joyce.kong@arm.com> Signed-off-by: Dharmik Thakkar <dharmik.thakkar@arm.com> Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
show more ...
|
#
666272d2 |
| 20-May-2020 |
Thomas Monjalon <thomas@monjalon.net> |
examples/vm_power: drop Unix path limit redefinition
The Unix socket path may be as long as UNIX_PATH_MAX. This constant is supposed to be defined in sys/un.h. On Linux, it appears to be in linux/un
examples/vm_power: drop Unix path limit redefinition
The Unix socket path may be as long as UNIX_PATH_MAX. This constant is supposed to be defined in sys/un.h. On Linux, it appears to be in linux/un.h.
This constant was re-defined locally, based on a variable declaration. It is breaking compilation with -fno-common (default in GCC 10) We could avoid the variable declaration by using NULL struct, but it looks simpler not redefining this system constant.
As the power library and its examples are restricted to Linux only, the Linux header file is directly included.
Fixes: 0d74597c1b4f ("examples/vm_power: fix max length of unix socket path") Cc: stable@dpdk.org
Signed-off-by: Thomas Monjalon <thomas@monjalon.net> Acked-by: David Marchand <david.marchand@redhat.com> Acked-by: Kevin Traynor <ktraynor@redhat.com>
show more ...
|
#
96d3d532 |
| 20-May-2020 |
Thomas Monjalon <thomas@monjalon.net> |
examples/vm_power: fix build with -fno-common
The variables of the same name are merged together if compiled with -fcommon. It used to be the default. This default behaviour allows to declare a vari
examples/vm_power: fix build with -fno-common
The variables of the same name are merged together if compiled with -fcommon. It used to be the default. This default behaviour allows to declare a variable in a header file and share the variable in every .o binaries thanks to merge at link-time.
If compiling with -fno-common (default in GCC 10), the variable must be shared as extern to avoid multiple re-definitions.
Fixes: dff22404aaad ("examples/vm_power_mgr: add VCPU to PCPU mapping") Cc: stable@dpdk.org
Signed-off-by: Thomas Monjalon <thomas@monjalon.net> Acked-by: David Marchand <david.marchand@redhat.com> Acked-by: Kevin Traynor <ktraynor@redhat.com>
show more ...
|
#
1deb502e |
| 27-Sep-2019 |
Marcin Hajkowski <marcinx.hajkowski@intel.com> |
examples/vm_power: add mechanism to disable queries
Add new command which gives possibility to enable/disable queries form VM guest.
Signed-off-by: Marcin Hajkowski <marcinx.hajkowski@intel.com> Te
examples/vm_power: add mechanism to disable queries
Add new command which gives possibility to enable/disable queries form VM guest.
Signed-off-by: Marcin Hajkowski <marcinx.hajkowski@intel.com> Tested-by: David Hunt <david.hunt@intel.com> Acked-by: Lee Daly <lee.daly@intel.com>
show more ...
|
#
221e7026 |
| 09-Jul-2019 |
Marcin Hajkowski <marcinx.hajkowski@intel.com> |
examples/power: add FIFO per core for JSON interface
This patch implements a separate FIFO for each cpu core to improve the previous functionality where anyone with access to the FIFO could affect a
examples/power: add FIFO per core for JSON interface
This patch implements a separate FIFO for each cpu core to improve the previous functionality where anyone with access to the FIFO could affect any core on the system. By using appropriate permissions, FIFO interfaces can be configured to only affect the particular cores.
Because each FIFO is per core, the following fields have been removed from the command JSON format: core_list, resource_id, name.
Signed-off-by: Lukasz Krakowiak <lukaszx.krakowiak@intel.com> Signed-off-by: Lukasz Gosiewski <lukaszx.gosiewski@intel.com> Signed-off-by: Marcin Hajkowski <marcinx.hajkowski@intel.com> Tested-by: David Hunt <david.hunt@intel.com> Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
show more ...
|
#
751227a0 |
| 09-Apr-2019 |
David Hunt <david.hunt@intel.com> |
power: fix buffer overruns
A previous change removed the limit of 64 cores by moving away from 64-bit masks to char arrays. However this left a buffer overrun issue, where the max channels was defin
power: fix buffer overruns
A previous change removed the limit of 64 cores by moving away from 64-bit masks to char arrays. However this left a buffer overrun issue, where the max channels was defined as 64, and max cores was defined as 256. These should all be consistently set to RTE_MAX_LCORE.
The #defines being removed are CHANNEL_CMDS_MAX_CPUS, CHANNEL_CMDS_MAX_CHANNELS, POWER_MGR_MAX_CPUS, and CHANNEL_CMDS_MAX_VM_CHANNELS, and are being replaced with RTE_MAX_LCORE for consistency and simplicity.
Coverity issue: 337672, 337673, 337678 Fixes: fd73630e95c1 ("examples/power: change 64-bit masks to arrays") Cc: stable@dpdk.org
Signed-off-by: David Hunt <david.hunt@intel.com> Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
show more ...
|
#
1aaa1b2b |
| 14-Dec-2018 |
David Hunt <david.hunt@intel.com> |
examples/power: increase max cores to 256
Increase the number of addressable cores from 64 to 256. Also remove the warning that incresing this number beyond 64 will cause problems (because of the pr
examples/power: increase max cores to 256
Increase the number of addressable cores from 64 to 256. Also remove the warning that incresing this number beyond 64 will cause problems (because of the previous use of uint64_t masks). Now this number can be increased significantly without causing problems.
Signed-off-by: David Hunt <david.hunt@intel.com> Reviewed-by: Anatoly Burakov <anatoly.burakov@intel.com>
show more ...
|
#
5776b7a3 |
| 14-Dec-2018 |
David Hunt <david.hunt@intel.com> |
examples/power: allow VM to use lcores over 63
Extending the functionality to allow vms to power manage cores beyond 63.
Signed-off-by: David Hunt <david.hunt@intel.com> Reviewed-by: Anatoly Burako
examples/power: allow VM to use lcores over 63
Extending the functionality to allow vms to power manage cores beyond 63.
Signed-off-by: David Hunt <david.hunt@intel.com> Reviewed-by: Anatoly Burakov <anatoly.burakov@intel.com>
show more ...
|
#
fd73630e |
| 14-Dec-2018 |
David Hunt <david.hunt@intel.com> |
examples/power: change 64-bit masks to arrays
vm_power_manager currently makes use of uint64_t masks to keep track of cores in use, limiting use of the app to only being able to manage the first 64
examples/power: change 64-bit masks to arrays
vm_power_manager currently makes use of uint64_t masks to keep track of cores in use, limiting use of the app to only being able to manage the first 64 cores in a multi-core system. Many modern systems have core counts greater than 64, so this limitation needs to be removed.
This patch converts the relevant 64-bit masks to character arrays.
Signed-off-by: David Hunt <david.hunt@intel.com> Reviewed-by: Anatoly Burakov <anatoly.burakov@intel.com>
show more ...
|
#
90a774c4 |
| 17-Oct-2018 |
David Hunt <david.hunt@intel.com> |
examples/power: increase allowed number of clients
Now that we're handling host policies, containers and virtual machines, we'll rename MAX_VMS to MAX_CLIENTS, and increase from 4 to 64
Signed-off-
examples/power: increase allowed number of clients
Now that we're handling host policies, containers and virtual machines, we'll rename MAX_VMS to MAX_CLIENTS, and increase from 4 to 64
Signed-off-by: David Hunt <david.hunt@intel.com> Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
show more ...
|
#
3618326f |
| 17-Oct-2018 |
David Hunt <david.hunt@intel.com> |
examples/power: add host channel to power manager
This patch adds a fifo channel to the vm_power_manager app through which we can send commands and polices. Intended for sending JSON strings. The fi
examples/power: add host channel to power manager
This patch adds a fifo channel to the vm_power_manager app through which we can send commands and polices. Intended for sending JSON strings. The fifo is at /tmp/powermonitor/fifo
Signed-off-by: David Hunt <david.hunt@intel.com> Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
show more ...
|
#
3998e2a0 |
| 19-Dec-2017 |
Bruce Richardson <bruce.richardson@intel.com> |
examples: use SPDX tag for Intel copyright files
Replace the BSD license header with the SPDX tag for files with only an Intel copyright on them.
Signed-off-by: Bruce Richardson <bruce.richardson@i
examples: use SPDX tag for Intel copyright files
Replace the BSD license header with the SPDX tag for files with only an Intel copyright on them.
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
show more ...
|
#
dff22404 |
| 11-Oct-2017 |
David Hunt <david.hunt@intel.com> |
examples/vm_power_mgr: add VCPU to PCPU mapping
Signed-off-by: Nemanja Marjanovic <nemanja.marjanovic@intel.com> Signed-off-by: Rory Sexton <rory.sexton@intel.com> Signed-off-by: David Hunt <david.h
examples/vm_power_mgr: add VCPU to PCPU mapping
Signed-off-by: Nemanja Marjanovic <nemanja.marjanovic@intel.com> Signed-off-by: Rory Sexton <rory.sexton@intel.com> Signed-off-by: David Hunt <david.hunt@intel.com> Reviewed-by: Santosh Shukla <santosh.shukla@caviumnetworks.com> Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
show more ...
|
#
fcccf6f1 |
| 04-Jul-2016 |
Marvin Liu <yong.liu@intel.com> |
examples/vm_power_manager: remove dependency on internal header
Macro CHANNEL_CMDS_MAX_CPUS stand for the maximum number of cores controlled by virtual channels. This macro only be used in the examp
examples/vm_power_manager: remove dependency on internal header
Macro CHANNEL_CMDS_MAX_CPUS stand for the maximum number of cores controlled by virtual channels. This macro only be used in the example, so remove it from library to example header file.
Signed-off-by: Marvin Liu <yong.liu@intel.com>
show more ...
|
#
0d74597c |
| 16-Dec-2014 |
Bruce Richardson <bruce.richardson@intel.com> |
examples/vm_power: fix max length of unix socket path
The length of the path to a unix socket is not PATH_MAX but instead is UNIX_PATH_MAX which is generally just over 100 bytes in size. It's not ac
examples/vm_power: fix max length of unix socket path
The length of the path to a unix socket is not PATH_MAX but instead is UNIX_PATH_MAX which is generally just over 100 bytes in size. It's not actually defined in sys/un.h on linux - despite the man page referencing it, so calculate the size in the case where it's not defined.
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
show more ...
|
#
e8ae9b66 |
| 25-Nov-2014 |
Alan Carew <alan.carew@intel.com> |
examples/vm_power: channel manager and monitor in host
The manager is responsible for adding communications channels to the Monitor thread, tracking and reporting VM state and employs the libvirt AP
examples/vm_power: channel manager and monitor in host
The manager is responsible for adding communications channels to the Monitor thread, tracking and reporting VM state and employs the libvirt API for synchronization with the KVM Hypervisor. The manager interacts with the Hypervisor to discover the mapping of virtual CPUS(vCPUs) to the host physical CPUS(pCPUs) and to inspect the VM running state.
The manager provides the following functionality to the CLI: 1) Connect to a libvirtd instance, default: qemu:///system 2) Add a VM to an internal list, each VM is identified by a "name" which must correspond a valid libvirt Domain Name. 3) Add communication channels associated with a VM to the epoll based Monitor thread. The channels must exist and be in the form of: /tmp/powermonitor/<vm_name>.<channel_number>. Each channel is a Virtio-Serial endpoint configured as an AF_UNIX file socket and opened in non-blocking mode. Each VM can have a maximum of 64 channels associated with it. 4) Disable or re-enable VM communication channels, channels once added to the Monitor thread remain in that threads control, however acting on channel requests can be disabled and renabled via CLI.
The monitor is an epoll based infinite loop running in a separate thread that waits on channel events from VMs and calls the corresponding functions. Channel definitions from the manager are registered via the epoll event opaque pointer when calling epoll_ctl(EPOLL_CTL_ADD), this allows for obtaining the channels file descriptor for reading EPOLLIN events and mapping the vCPU to pCPU(s) associated with a request from a particular VM.
Signed-off-by: Alan Carew <alan.carew@intel.com> Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
show more ...
|