ea0e5d27 | 11-Nov-2024 |
Ed Tanous <etanous@nvidia.com> |
Fix compile error on boost 1.86
Boost 1.86 shows a compiler error which is holding up the rebase here. The mapper extends std::vector, because it results in smaller binary sizes compared to boost::v
Fix compile error on boost 1.86
Boost 1.86 shows a compiler error which is holding up the rebase here. The mapper extends std::vector, because it results in smaller binary sizes compared to boost::vector. It's not clear if this is the problem, or if there's something else amiss within container. Triaging the real root cause isn't important to this use case.
There are a few reported bugs and changes that might be related[1][2].
It's not clear which one would've broken try_emplace in this case, nor is it worth the effort to resolve.
This patchset replaces try_emplace calls with emplace calls. In theory these are slightly less efficient, but considering that map construction is a cold path, it's not terribly important that it be efficient.
[1] https://github.com/boostorg/container/issues/292 [2] https://github.com/boostorg/container/issues/280
Change-Id: I30d176022d2cec45430a50dc02c84666541fb4d7 Signed-off-by: Ed Tanous <etanous@nvidia.com>
show more ...
|
cf72403d | 29-Oct-2024 |
George Liu <liuxiwei@ieisystem.com> |
libmapper: format code using c++ clang-format
Remove libmapper/.clang-fromat and format code using c++ clang-format
Signed-off-by: George Liu <liuxiwei@ieisystem.com> Change-Id: I62781743b03fa1e806
libmapper: format code using c++ clang-format
Remove libmapper/.clang-fromat and format code using c++ clang-format
Signed-off-by: George Liu <liuxiwei@ieisystem.com> Change-Id: I62781743b03fa1e806f51f4844c93aaf4cdfac4f
show more ...
|
7a93d516 | 13-Sep-2024 |
Myung Bae <myungbae@us.ibm.com> |
Return empty paths if no SubTreePathsById is found
`getAssociatedSubTreePaths()` returns the empty paths if there are no associated subtrees, and bmcweb uses it to differentiate from the error.
How
Return empty paths if no SubTreePathsById is found
`getAssociatedSubTreePaths()` returns the empty paths if there are no associated subtrees, and bmcweb uses it to differentiate from the error.
However, `getAssociatedSubTreePathsById()` (which is introduced by [1]) returns NotFound error for the case. It would be more appropriate to match its behavior with `getAssociatedSubTreePaths()`.
Tested: - unit-test is succeeded for good and bad cases
[1] https://gerrit.openbmc.org/c/openbmc/phosphor-objmgr/+/70699
Change-Id: I84680b1b39ba8ade94ea6fdb7dae280505e5c050 Signed-off-by: Myung Bae <myungbae@us.ibm.com>
show more ...
|
c363323e | 09-Apr-2024 |
Lakshmi Yadlapati <lakshmiy@us.ibm.com> |
mapper: Add GetAssociatedSubTreePathsById and GetAssociatedSubTreeById
dbus-interface change in: https://gerrit.openbmc.org/c/openbmc/phosphor-dbus-interfaces/+/69999
This commit implements two new
mapper: Add GetAssociatedSubTreePathsById and GetAssociatedSubTreeById
dbus-interface change in: https://gerrit.openbmc.org/c/openbmc/phosphor-dbus-interfaces/+/69999
This commit implements two new methods: GetAssociatedSubTreePathsById and GetAssociatedSubTreeById. These methods retrieve the paths of associated endpoints corresponding to the provided identifier, filtering based on their association with specified endpoint interfaces.
GetAssociatedSubTreePathsById returns the D-Bus paths of associated endpoints, while GetAssociatedSubTreeById retrieves a dictionary of D-Bus paths of associated endpoints mapped to corresponding services associated with the provided identifier.
Tested: ''' busctl call -j "xyz.openbmc_project.ObjectMapper" "/xyz/openbmc_project/object_mapper" \ "xyz.openbmc_project.ObjectMapper" "GetAssociatedSubTreePathsById" ssassas \ "chassis" \ "/xyz/openbmc_project/inventory" \ 1 "xyz.openbmc_project.Inventory.Item.Chassis" \ "powered_by" \ 1 "xyz.openbmc_project.Inventory.Item.PowerSupply" { "type" : "as", "data" : [ [ "/xyz/openbmc_project/inventory/system/chassis/motherboard/powersupply0", "/xyz/openbmc_project/inventory/system/chassis/motherboard/powersupply1", "/xyz/openbmc_project/inventory/system/chassis/motherboard/powersupply2", "/xyz/openbmc_project/inventory/system/chassis/motherboard/powersupply3" ] ] } '''
Another example.
``` busctl call -j xyz.openbmc_project.ObjectMapper /xyz/openbmc_project/object_mapper \ xyz.openbmc_project.ObjectMapper GetAssociatedSubTreePathsById ssassas \ disk_backplane0 \ /xyz/openbmc_project/inventory \ 1 xyz.openbmc_project.Inventory.Item.FabricAdapter \ connecting \ 1 xyz.openbmc_project.Inventory.Connector.Port { "type" : "as", "data" : [ [ "/xyz/openbmc_project/inventory/system/chassis/motherboard/disk_backplane0/dp0_connector0", "/xyz/openbmc_project/inventory/system/chassis/motherboard/disk_backplane0/dp0_connector1", "/xyz/openbmc_project/inventory/system/chassis/motherboard/disk_backplane0/dp0_connector2", "/xyz/openbmc_project/inventory/system/chassis/motherboard/disk_backplane0/dp0_connector3", "/xyz/openbmc_project/inventory/system/chassis/motherboard/disk_backplane0/dp0_connector4", "/xyz/openbmc_project/inventory/system/chassis/motherboard/disk_backplane0/dp0_connector5" ] ] } ```
Change-Id: Id55a9b41fe70f7204543d92b5396888f6914a1d4 Signed-off-by: Lakshmi Yadlapati <lakshmiy@us.ibm.com> Signed-off-by: Myung Bae <myungbae@us.ibm.com>
show more ...
|
8168cafb | 03-Sep-2024 |
Patrick Williams <patrick@stwcx.xyz> |
meson: switch code dependency to libsystemd
For a while now systemd has packaged a separate `libsystemd`. For meson dependency, `systemd` should be used when looking for systemd service file paths
meson: switch code dependency to libsystemd
For a while now systemd has packaged a separate `libsystemd`. For meson dependency, `systemd` should be used when looking for systemd service file paths and `libsystemd` should be used for `sd_*` functions.
Update the dependency accordingly.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: Iff3e5cc93a503e7391e4eea9624b04069135a42a
show more ...
|
8c25006c | 23-Aug-2024 |
Patrick Williams <patrick@stwcx.xyz> |
handler: fix undefined behavior
Saving a reference to a temporary returned from a function call is undefined behavior and subverts RVO. Remove the `&` so these become local variables.
Signed-off-b
handler: fix undefined behavior
Saving a reference to a temporary returned from a function call is undefined behavior and subverts RVO. Remove the `&` so these become local variables.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: I8e7da30fddef808dfe7ee323d7f91a7c2a2cdeb6
show more ...
|
9052ebd3 | 16-Aug-2024 |
Patrick Williams <patrick@stwcx.xyz> |
clang-format: re-format for clang-18
clang-format-18 isn't compatible with the clang-format-17 output, so we need to reformat the code with the latest version. The way clang-18 handles lambda forma
clang-format: re-format for clang-18
clang-format-18 isn't compatible with the clang-format-17 output, so we need to reformat the code with the latest version. The way clang-18 handles lambda formatting also changed, so we have made changes to the organization default style format to better handle lambda formatting.
See I5e08687e696dd240402a2780158664b7113def0e for updated style. See Iea0776aaa7edd483fa395e23de25ebf5a6288f71 for clang-18 enablement.
Change-Id: Ic68b91e23738cafe198c50f40e46d4163bda02b6 Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
show more ...
|
fb853663 | 03-May-2024 |
Andrew Jeffery <andrew@codeconstruct.com.au> |
meson: Declare a find_program() override for mapperx
If phosphor-objmgr is used as a subproject, allow discovery of its mapperx program for use in the parent project.
Change-Id: I1cb448500cab015b8b
meson: Declare a find_program() override for mapperx
If phosphor-objmgr is used as a subproject, allow discovery of its mapperx program for use in the parent project.
Change-Id: I1cb448500cab015b8b309979ab26f7e51f03e8ea Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au>
show more ...
|
883d91d7 | 03-Apr-2024 |
Konstantin Aladyshev <aladyshev22@gmail.com> |
meson: Disable tests build for tinyxml2 dependency
Currently local meson build breaks on tinyxml2 since the code from this package produces a warning and all warnings are treated as errors: """ ../s
meson: Disable tests build for tinyxml2 dependency
Currently local meson build breaks on tinyxml2 since the code from this package produces a warning and all warnings are treated as errors: """ ../subprojects/tinyxml2-9.0.0/xmltest.cpp:711:38: error: ignoring return value of ‘char* fgets(char*, int, FILE*)’ declared with attribute ‘warn_unused_result’ [-Werror=unused-result] """ The warning above comes from the compilation of the tinyxml2 unit tests. Since we don't really need them, disable 'tests' option for tinyxml2 dependency to fix the meson build.
Tested: Locally executed "meson setup build && cd build && meson compile" now finishes successfully.
Change-Id: Ib35fef4e515df22c7b82a6f379689d4672059099 Signed-off-by: Konstantin Aladyshev <aladyshev22@gmail.com>
show more ...
|
3e2eb6af | 29-Mar-2024 |
Konstantin Aladyshev <aladyshev22@gmail.com> |
build: Add wrap file for tinyxml2
Currently local build on the system without tinyxml2 can fail with the following message: """ meson.build:107:8: ERROR: Dependency "tinyxml2" not found, tried pkgco
build: Add wrap file for tinyxml2
Currently local build on the system without tinyxml2 can fail with the following message: """ meson.build:107:8: ERROR: Dependency "tinyxml2" not found, tried pkgconfig and cmake """ Provide "tinyxml2.wrap" file to fix the issue. The "tinyxml2.wrap" file is copied from the bmcweb repository.
Change-Id: I652cae42192affd6513d1e148e4b4a177e00999d Signed-off-by: Konstantin Aladyshev <aladyshev22@gmail.com>
show more ...
|
ec87407c | 29-Nov-2023 |
Patrick Williams <patrick@stwcx.xyz> |
build: use allowed over enabled
Meson feature options are typically in a tri-state of enabled, disabled, or auto. The enabled and disabled functions on an option (from `get_option`) no longer retur
build: use allowed over enabled
Meson feature options are typically in a tri-state of enabled, disabled, or auto. The enabled and disabled functions on an option (from `get_option`) no longer return true for auto features. Instead, the expectation is to use `allowed()` which is true for both enabled and auto.
Switch all uses of `enabled` to `allowed`.
Change-Id: I2ce48ae6fe133c0b355672b5bb7d7c27bc6b3702 Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
show more ...
|
47b68cbc | 20-Oct-2023 |
Patrick Williams <patrick@stwcx.xyz> |
clang-format: copy latest and re-format
clang-format-17 has some backwards incompatible changes that require additional settings for best compatibility and re-running the formatter. Copy the latest
clang-format: copy latest and re-format
clang-format-17 has some backwards incompatible changes that require additional settings for best compatibility and re-running the formatter. Copy the latest .clang-format from the docs repository and reformat the repository.
Change-Id: Ibc0976e16acb6163431698832a461e9fc7335448 Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
show more ...
|
ef885e46 | 15-Aug-2023 |
George Liu <liuxiwei@inspur.com> |
meson_options.txt: Support for reading options from meson.options
Support has been added for reading options from meson.options instead of meson_options.txt[1]. These are equivalent, but not using t
meson_options.txt: Support for reading options from meson.options
Support has been added for reading options from meson.options instead of meson_options.txt[1]. These are equivalent, but not using the .txt extension for a build file has a few advantages, chief among them many tools and text editors expect a file with the .txt extension to be plain text files, not build scripts.
[1] https://mesonbuild.com/Release-notes-for-1-1-0.html#support-for-reading-options-from-mesonoptions
Signed-off-by: George Liu <liuxiwei@inspur.com> Change-Id: I0714938f7ffd30c97c2f10bb45796103d29f4d12
show more ...
|
26ed9805 | 12-Jul-2023 |
Patrick Williams <patrick@stwcx.xyz> |
build: upgrade to C++23
Meson 1.1.1 and GCC-13 both support C++23 and a sufficient portion of the standard has been implemented. Upgrade the build to leverage it.
Change-Id: Ifabec573b184316716aa6
build: upgrade to C++23
Meson 1.1.1 and GCC-13 both support C++23 and a sufficient portion of the standard has been implemented. Upgrade the build to leverage it.
Change-Id: Ifabec573b184316716aa692598caba26fb5857b3 Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
show more ...
|
1a19e6aa | 10-May-2023 |
Patrick Williams <patrick@stwcx.xyz> |
clang-format: copy latest and re-format
clang-format-16 has some backwards incompatible changes that require additional settings for best compatibility and re-running the formatter. Copy the latest
clang-format: copy latest and re-format
clang-format-16 has some backwards incompatible changes that require additional settings for best compatibility and re-running the formatter. Copy the latest .clang-format from the docs repository and reformat the repository.
Change-Id: I9252bdd2509e5a9cff31fce9be31291f63b3a5cc Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
show more ...
|
40302742 | 12-Apr-2023 |
Patrick Williams <patrick@stwcx.xyz> |
meson: remove deprecated get_pkgconfig_variable
Since meson 0.56, the `get_pkgconfig_variable` has been deprecated. In meson 0.58 the `get_variable` was enhanced to no longer require the `pkgconfig
meson: remove deprecated get_pkgconfig_variable
Since meson 0.56, the `get_pkgconfig_variable` has been deprecated. In meson 0.58 the `get_variable` was enhanced to no longer require the `pkgconfig` keyword argument. Ensure meson 0.58 is required and update the usage of all `get_pkgconfig_variable` and `get_variable` to be the modern variant.
Change-Id: Idff7506a1f897993ba350fdc31ce5103c8a9e998 Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
show more ...
|
bd441717 | 15-Feb-2023 |
Patrick Williams <patrick@stwcx.xyz> |
mapper-wait: add service dependency
Even though ObjectMapper is dbus-activated, it takes long enough to start up that the dbus client operation times out. This causes a whole bunch of failed servic
mapper-wait: add service dependency
Even though ObjectMapper is dbus-activated, it takes long enough to start up that the dbus client operation times out. This causes a whole bunch of failed services on boot of the BMC. Add an explicit dependency back on the service in order to give the service time to start up.
Tested: Applied on Bletchley and see no restarts of the various mapper-wait invocations now.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: I473a8f251906a8267e2c44600b6802adfea1fd0e
show more ...
|
670edd12 | 15-Feb-2023 |
Patrick Williams <patrick@stwcx.xyz> |
clang-format: update with latest
Copy the latest clang-format and apply to the repository.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: I10a3fe64d4ca77601e6855daf46954579312c7df |
a99e109c | 03-Feb-2023 |
Brad Bishop <bradleyb@fuzziesquirrel.com> |
lint: update .clant-format and run
Change-Id: If9cfc42ca96517a4df2c59c130c2e22a2a443467 Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com> |
42e5aee2 | 03-Feb-2023 |
Brad Bishop <bradleyb@fuzziesquirrel.com> |
unit-fail-monitor: add meson option to disable
Add an option to disable this feature.
Change-Id: Ifc953ad4bec492f7c6ca8190e4c6a0820b12630a Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com> |
2ec9157f | 03-Jun-2022 |
Brad Bishop <bradleyb@fuzziesquirrel.com> |
mapper: install systemd unit, dbus conf files
The same systemd and dbus unit/configuration files can work for everyone now, so ship them. Enable dbus activation, add unit file templates, and move m
mapper: install systemd unit, dbus conf files
The same systemd and dbus unit/configuration files can work for everyone now, so ship them. Enable dbus activation, add unit file templates, and move mapperx to libexec where it belongs.
Change-Id: Ieb021889605767ffdb9d72faad5f5b856312b935 Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
show more ...
|
58881d0b | 02-Oct-2022 |
Willy Tu <wltu@google.com> |
mapper: Add Associated subtree method definition
dbus-interface change in: https://gerrit.openbmc.org/c/openbmc/phosphor-dbus-interfaces/+/57821
Create new mapper function to make subtree call and
mapper: Add Associated subtree method definition
dbus-interface change in: https://gerrit.openbmc.org/c/openbmc/phosphor-dbus-interfaces/+/57821
Create new mapper function to make subtree call and association call at the same time. With the association definition, we will have more endpoints to fetch and verify that it is actually the resource that we are looking for. We need to verify that it has the expected interface to confirm that it is right device. In the current workflow this will take two dbus calls to the mapper to get the association and the subtree.
This change aims to reduce that down to one by combining the two operations. It will not significant performance increase for the daemons, but it can help reduce the load on the dbus-broker.service.
Tested: ``` Normal Call: busctl call "xyz.openbmc_project.ObjectMapper" \ "/xyz/openbmc_project/object_mapper" \ "xyz.openbmc_project.ObjectMapper" "GetSubTreePaths" sias \ "/xyz/openbmc_project/inventory" 0 1 \ "xyz.openbmc_project.Inventory.Item.Storage" as 4 "/xyz/openbmc_project/inventory/storage_0" "/xyz/openbmc_project/inventory/storage_1" "/xyz/openbmc_project/inventory/storage_4" "/xyz/openbmc_project/inventory/storage_3"
Associated Call: (Only 0 and 1 is associated to the chassis) busctl call "xyz.openbmc_project.ObjectMapper" \ "/xyz/openbmc_project/object_mapper" \ "xyz.openbmc_project.ObjectMapper" "GetAssociatedSubTreePaths" ssias \ "/xyz/openbmc_project/inventory/chassis_0/storage" \ "/xyz/openbmc_project/inventory" 0 1 "xyz.openbmc_project.Inventory.Item.Storage" as 2 "/xyz/openbmc_project/inventory/storage_0" "/xyz/openbmc_project/inventory/storage_1" ```
Change-Id: Ib532e660cf20b9efc83045fb1cbd9143d0c1841e Signed-off-by: Willy Tu <wltu@google.com>
show more ...
|
aba14d3d | 31-Jan-2023 |
Willy Tu <wltu@google.com> |
test: Add dbus handler unit tests
Created unit tests for all of the object mapper dbus handlers.
Refactor the handlers to handler.cpp to allow unit testing. Also updated to use std::set_intersectio
test: Add dbus handler unit tests
Created unit tests for all of the object mapper dbus handlers.
Refactor the handlers to handler.cpp to allow unit testing. Also updated to use std::set_intersection.
Change-Id: Ib87ab81f949d27f7dab55899d3e8d380e43bda04 Signed-off-by: Willy Tu <wltu@google.com>
show more ...
|
fffd34da | 08-Dec-2022 |
Patrick Williams <patrick@stwcx.xyz> |
prettier: re-format
Prettier is enabled in openbmc-build-scripts on Markdown, JSON, and YAML files to have consistent formatting for these file types. Re-run the formatter on the whole repository.
prettier: re-format
Prettier is enabled in openbmc-build-scripts on Markdown, JSON, and YAML files to have consistent formatting for these file types. Re-run the formatter on the whole repository.
Change-Id: I604f9ce2677792518c9b124939bff0ac713cef34 Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
show more ...
|
60ffc244 | 02-Dec-2022 |
William A. Kennington III <wak@google.com> |
mapperx: Use lambdas and move
This reduces the number of type-erased copies we have to store and makes the type work with interface changes to the underlying stored callback type.
Change-Id: Ieccd0
mapperx: Use lambdas and move
This reduces the number of type-erased copies we have to store and makes the type work with interface changes to the underlying stored callback type.
Change-Id: Ieccd0e7f182177e47e8d8d4ef836521109f1a2e7 Signed-off-by: William A. Kennington III <wak@google.com>
show more ...
|