da8574d5 | 03-Mar-2025 |
Ed Tanous <ed@tanous.net> |
Make code compile on clang
We use c++26 featuresin stdexec (something in unpack fold expressions) that clang warns about because this is only enabled for c++23.
Ignore the warning for now. Can be
Make code compile on clang
We use c++26 featuresin stdexec (something in unpack fold expressions) that clang warns about because this is only enabled for c++23.
Ignore the warning for now. Can be removed when we're on c++26
Change-Id: I10b7c216c63d97b865741025873d32666e6a7440 Signed-off-by: Ed Tanous <ed@tanous.net>
show more ...
|
668c56b0 | 23-Feb-2025 |
Ed Tanous <etanous@nvidia.com> |
Break out unpack function
This really shouldn't be a lambda. It's too complex for what it is. Break it into a templated method.
Ideally this wouldn't be a lambda at all, and could use something li
Break out unpack function
This really shouldn't be a lambda. It's too complex for what it is. Break it into a templated method.
Ideally this wouldn't be a lambda at all, and could use something like std::bind_front, but I couldn't quite get the templates to align, so that will be for another patch.
Change-Id: Icda0272845f99eb8b0dbfd159e8066709393c8be Signed-off-by: Ed Tanous <etanous@nvidia.com>
show more ...
|
50fe983a | 23-Feb-2025 |
Ed Tanous <ed@tanous.net> |
break out boost coroutines async_send
async_send is a method that was attempted to be shared between coroutine and non-coroutine cases. Unfortunately to have this code sharing requires a very expen
break out boost coroutines async_send
async_send is a method that was attempted to be shared between coroutine and non-coroutine cases. Unfortunately to have this code sharing requires a very expensive template, boost::asio::initiate. While this template is great for generalizing, it results in a template instantiation per call site, which doesn't scale well at build time in things like bmcweb, where we have 400+ async_method_call sites.
This commit breaks out async_send into async_send and async_send_yield, which allows using concrete callback and return types, thus avoiding the multiple template instantiations.
Tested: ClangBuildAnalyzer shows that this template is no longer one of the longest to instantiate.
Change-Id: Ic8f226e5be71f05c5f5dcb73eb51e6094dc704eb Signed-off-by: Ed Tanous <etanous@nvidia.com>
show more ...
|
eefdbf53 | 23-Feb-2025 |
Ed Tanous <ed@tanous.net> |
Make property overloads accept by const ref
In asio enabled daemons it's generally good practice to capture error_code by const reference, such that if an inherited class is presented on the interfa
Make property overloads accept by const ref
In asio enabled daemons it's generally good practice to capture error_code by const reference, such that if an inherited class is presented on the interface, no copy needs to be made, and more importantly the copy code isn't generated in the binary.
This doesn't effect any use. I believe bmcweb is the only user of these, and this reduces the template instantiation time by a minor amount to keep this consistent.
Change-Id: I53c7d42844400a846ef2832aaf5dbd0cc651a85f Signed-off-by: Ed Tanous <etanous@nvidia.com>
show more ...
|
5a6a9141 | 23-Feb-2025 |
Ed Tanous <etanous@nvidia.com> |
Perfect forwarding on async_method_call
In this code, there was clearly an attempt to implement perfect forwarding, given that this is just an intermediate function.
Implement perfect forwarding.
Perfect forwarding on async_method_call
In this code, there was clearly an attempt to implement perfect forwarding, given that this is just an intermediate function.
Implement perfect forwarding.
Change-Id: I62abfa2d85aad73dcb45eaf0cbf81a26cabdcb03 Signed-off-by: Ed Tanous <etanous@nvidia.com>
show more ...
|
3ab4e58d | 26-Feb-2025 |
Igor Kanyuka <ifelmail@gmail.com> |
Add generation description for Registries
The script generates Registries, and it does not add descriptions. In spite it's not required, it's a good idea to have a description of what the registry i
Add generation description for Registries
The script generates Registries, and it does not add descriptions. In spite it's not required, it's a good idea to have a description of what the registry is. Generate the field from the registry name.
Testing: Put the modified script in phosphor-dbus-interfaces, built the project and then generated registries in bmcweb from generated Jsons. They got description fields populated: ``` $ git diff diff --git a/redfish-core/include/registries/openbmc_logging_message_registry.hpp b/redfish-core/include/registries/openbmc_logging_message_registry.hpp index 0333b4fd..b8f6f772 100644
Change-Id: I81c919fe1947949cbf69c5cb4481131fc8e0ee6f
--- a/redfish-core/include/registries/openbmc_logging_message_registry.hpp +++ b/redfish-core/include/registries/openbmc_logging_message_registry.hpp @@ -27,7 +27,7 @@ const Header header = { 1, "OpenBMC Message Registry for xyz.openbmc_project.Logging", "en", - "", + "OpenBMC Message Registry for xyz.openbmc_project.Logging", "OpenBMC_Logging", "OpenBMC", }; diff --git a/redfish-core/include/registries/openbmc_state_cable_message_registry.hpp b/redfish-core/include/registries/openbmc_state_cable_message_registry.hpp index 30f96254..2dee3e63 100644 --- a/redfish-core/include/registries/openbmc_state_cable_message_registry.hpp +++ b/redfish-core/include/registries/openbmc_state_cable_message_registry.hpp @@ -27,7 +27,7 @@ const Header header = { 0, "OpenBMC Message Registry for xyz.openbmc_project.State.Cable", "en", - "", + "OpenBMC Message Registry for xyz.openbmc_project.State.Cable", "OpenBMC_StateCable", "OpenBMC", }; diff --git a/redfish-core/include/registries/openbmc_state_leak_detector_group_message_registry.hpp b/redfish-core/include/registries/openbmc_state_leak_detector_group_message_registry.hpp index 4bf1e251..32d3498b 100644 --- a/redfish-core/include/registries/openbmc_state_leak_detector_group_message_registry.hpp +++ b/redfish-core/include/registries/openbmc_state_leak_detector_group_message_registry.hpp @@ -27,7 +27,7 @@ const Header header = { 0, "OpenBMC Message Registry for xyz.openbmc_project.State.Leak.DetectorGroup", "en", - "", + "OpenBMC Message Registry for xyz.openbmc_project.State.Leak.DetectorGroup", "OpenBMC_StateLeakDetectorGroup", "OpenBMC", }; ```
Change-Id: I8ed7b1117ba32bc545758175ccababf55527d363 Signed-off-by: Igor Kanyuka <ifelmail@gmail.com>
show more ...
|
e0290827 | 24-Feb-2025 |
Vernon Mauery <vernon.mauery@gmail.com> |
Update Vernon Mauery email
Change-Id: I99564c5959dd0ad4f8a01e525bee79b5310aabf8 Signed-off-by: Vernon Mauery <vernon.mauery@gmail.com> |
9e5ffe19 | 19-Feb-2025 |
Igor Kanyuka <ifelmail@gmail.com> |
Add default value for message Resolution
According to the spec [1] the Resolution is required, but in the generator code it's added only if it's defined in the source. Use default value "None." if i
Add default value for message Resolution
According to the spec [1] the Resolution is required, but in the generator code it's added only if it's defined in the source. Use default value "None." if it's not defined.
[1] https://redfish.dmtf.org/schemas/v1/MessageRegistry.v1_6_3.json
Change-Id: I91ac6504c69bc2c0f0018a6e39a67563079fc983 Signed-off-by: Igor Kanyuka <ifelmail@gmail.com>
show more ...
|
4415a72d | 19-Feb-2025 |
Igor Kanyuka <ifelmail@gmail.com> |
Fix key name for MessageRegistry
Message registry stores messages in the Messages property. The generator uses the Message property instead. Fix this.
See the spec [1]
And other registries [2] and
Fix key name for MessageRegistry
Message registry stores messages in the Messages property. The generator uses the Message property instead. Fix this.
See the spec [1]
And other registries [2] and [3].
[1] https://redfish.dmtf.org/schemas/v1/MessageRegistry.v1_6_3.json [2] https://raw.githubusercontent.com/openbmc/bmcweb/refs/heads/master/redfish-core/include/registries/openbmc.json [2] https://redfish.dmtf.org/registries/Environmental.1.1.0.json
Change-Id: I3f8073f1b5c8085059d0335cc7ff3625cd26f756 Signed-off-by: Igor Kanyuka <ifelmail@gmail.com>
show more ...
|
dd6efd17 | 01-Feb-2025 |
Patrick Williams <patrick@stwcx.xyz> |
meson: reformat with meson formatter
Apply the `meson format` results.
Change-Id: I024144165b08c727dd9621842f1a497830247155 Signed-off-by: Patrick Williams <patrick@stwcx.xyz> |
62691573 | 01-Feb-2025 |
Patrick Williams <patrick@stwcx.xyz> |
clang-format: update latest spec and reformat
Copy the latest format file from the docs repository and apply.
Change-Id: I8000f29e7e567f47b61325ebd6241d4d70d624b5 Signed-off-by: Patrick Williams <p
clang-format: update latest spec and reformat
Copy the latest format file from the docs repository and apply.
Change-Id: I8000f29e7e567f47b61325ebd6241d4d70d624b5 Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
show more ...
|
087be967 | 31-Jan-2025 |
Patrick Williams <patrick@stwcx.xyz> |
regenerate-meson: enable meson formatting
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: I58730e17d8350470783c7fa45466ee9ac19b2c48 |
892a23a9 | 30-Jan-2025 |
Patrick Williams <patrick@stwcx.xyz> |
build: use allowed over enabled or not-disabled
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`)
build: use allowed over enabled or not-disabled
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`. Switch all uses of `not disabled` to `allowed`.
Change-Id: I56a4d75a17ba7afe2104d271a1a4337b8d370475 Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
show more ...
|
6bb7a8c9 | 23-Jan-2025 |
Patrick Williams <patrick@stwcx.xyz> |
sdbus++: remove `PropertiesVariant` for empty properties
A previous commit changed behavior to always add `PropertiesVariant` even when there were no properties (and to use `variant<monostate>`). Th
sdbus++: remove `PropertiesVariant` for empty properties
A previous commit changed behavior to always add `PropertiesVariant` even when there were no properties (and to use `variant<monostate>`). The missing `PropertiesVariant` was used by some other repositories to detect if an interface had properties or not. Adding an empty `PropertiesVariant` breaks this expectation.
Switch back to having no type defined when there are no properties. Also, move the new `properties_t` over to the common template for consistency with the `PropertiesVariant` definition and for potential use elsewhere.
Fixes: 8aea1d814330 ("sdbus++: generate `properties` method for client harness") Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: I75b36412fe42eb44d5a638c6a8ad7a3ee9b835e3
show more ...
|
8aea1d81 | 17-Jan-2025 |
Adin Scannell <adin@scannell.ca> |
sdbus++: generate `properties` method for client harness
This uses the existing proxy `get_all_properties` method and allows for more efficient fetching of all properties in one shot. A struct is ge
sdbus++: generate `properties` method for client harness
This uses the existing proxy `get_all_properties` method and allows for more efficient fetching of all properties in one shot. A struct is generated for each type, and each field is initialized with its default value (but is not guaranteed to be deserialized).
As errors are less detectable (e.g. perhaps an expected property did not come through?), I considered whether the values in the struct should all be `std::optional`. However, given how other methods are used, it feels like this would result in a crash and assertion failure rather than saving anyone time and effort. The wrong type is detected a suitable exception is thrown in those cases.
Change-Id: Iff7712bd17db39f1ee5699f867e9f17a54eea21b Signed-off-by: Adin Scannell <adin@scannell.ca>
show more ...
|
56dd6dd4 | 15-Jan-2025 |
Patrick Williams <patrick@stwcx.xyz> |
events: remove std::function for hook
Using std::function causes a potential constructor / destructor pair to be created. Since this pair is created in the library registering the event [hook], it
events: remove std::function for hook
Using std::function causes a potential constructor / destructor pair to be created. Since this pair is created in the library registering the event [hook], it is both overhead and a potential avenue of library load ordering issues. Switch to a simpler raw function pointer instead.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: I3948dc10a461384af07d7c0d7a675e2e046bc6ae
show more ...
|
5265a86b | 15-Jan-2025 |
Patrick Williams <patrick@stwcx.xyz> |
sdbus++: events: fix OEM format in Redfish registry
Fix the following: - OEM fields should be identified with "Oem" in Redfish. - The top-level "Oem" section should be an object and not array
sdbus++: events: fix OEM format in Redfish registry
Fix the following: - OEM fields should be identified with "Oem" in Redfish. - The top-level "Oem" section should be an object and not array of objects.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: Ic63e6e728b5d58d7e6f0fb51f1c018cda2c3e613
show more ...
|
74eea519 | 03-Jan-2025 |
Patrick Williams <patrick@stwcx.xyz> |
sdbus++-gen-meson: leverage `install_dir` for custom targets
Meson has had a `install_dir` directive on `custom_target` which allows specifying per-output where the file should be installed. Leverag
sdbus++-gen-meson: leverage `install_dir` for custom targets
Meson has had a `install_dir` directive on `custom_target` which allows specifying per-output where the file should be installed. Leveraging this greatly simplifies the meson in consumers (such as phosphor-dbus-interfaces) and makes the install less error-prone.
The previous method for installing was to use a `install_subdir` call with large exclude lists (so that markdown did not end up in the include tree). The result of this was that many empty directories were created in the include, markdown, and registry install paths.
Using this method reduces by 25% the meson content in phosphor-dbus-interfaces.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: I2b03116f517caa75de902ac7e44e6923d6652cad
show more ...
|
31607399 | 02-Jan-2025 |
Patrick Williams <patrick@stwcx.xyz> |
sdbus++: events: add meson support for registry generation
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: Ia8b95c291256726fdb729bcf886fa7f664ead4a5 |
e598c595 | 02-Jan-2025 |
Patrick Williams <patrick@stwcx.xyz> |
sdbus++: events: generate Redfish registry
Create an initial Redfish Message Registry from an events.yaml file. This includes a few OEM properties under "OpenBMC_Mapping" in order to give hints to
sdbus++: events: generate Redfish registry
Create an initial Redfish Message Registry from an events.yaml file. This includes a few OEM properties under "OpenBMC_Mapping" in order to give hints to bmcweb on how to do: - Map OpenBMC Events to Redfish Events. - Map AdditionalData fields to MessageArgs.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: I7260c2344a8509bbcad7a6653ccf2b3578427e45
show more ...
|
36137e09 | 18-Dec-2024 |
Patrick Williams <patrick@stwcx.xyz> |
clang-format: re-format for clang-19
clang-format-19 isn't compatible with the clang-format-18 output, so we need to reformat the code with the latest version. A few parameters in clang-tidy have b
clang-format: re-format for clang-19
clang-format-19 isn't compatible with the clang-format-18 output, so we need to reformat the code with the latest version. A few parameters in clang-tidy have been deprecated, so adjust the style file accordingly.
See Ie2f6eb3b043f2d655c9df806815afd7971fd0947 for updated style. See I88192b41ab7a95599a90915013579608af7bc56f for clang-19 enablement.
Change-Id: I65cb0501917fee37f007ed97ce973e0dd07170fa Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
show more ...
|
f083bc1a | 16-Dec-2024 |
Patrick Williams <patrick@stwcx.xyz> |
stdexec: update to latest commit
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: I93e33afb0ca87f425074e86f87e6cde320f20dbc |
869230c6 | 12-Dec-2024 |
Patrick Williams <patrick@stwcx.xyz> |
async: fdio: remove unused member
clang warns about an unused private field ('fd') because it is a capture-only member. There isn't any reason to keep the fd around once the underlying sd_event has
async: fdio: remove unused member
clang warns about an unused private field ('fd') because it is a capture-only member. There isn't any reason to keep the fd around once the underlying sd_event has been created, so remove it as a member.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: I176b2c4b53bbd7e4bb4bc9a9594f5816ee1bda2e
show more ...
|
4638a2e9 | 06-Dec-2024 |
Jayanth Othayoth <ojayanth@gmail.com> |
clang-tidy: Fix exception specification mismatch
The following error was reported during clang-tidy enablement due to the exception specification of the overriding function being more lax than the b
clang-tidy: Fix exception specification mismatch
The following error was reported during clang-tidy enablement due to the exception specification of the overriding function being more lax than the base version. This fix ensures that the exception specification matches the base class destructor in gtest::Test.
''' ./test/async/fdio.cpp:30:5: error: exception specification of overriding function is more lax than base version 30 | ~FdioTest() override /usr/local/include/gtest/gtest.h:247:11: note: overridden virtual function is here 247 | virtual ~Test(); '''
Tested: Verified build and unit testing.
Change-Id: I5c016fed60afddb8ceda6f8c0d5f97d660a015f7 Signed-off-by: Jayanth Othayoth <ojayanth@gmail.com>
show more ...
|
d792b8cd | 06-Dec-2024 |
Jayanth Othayoth <ojayanth@gmail.com> |
clang-tidy: Fix implicit copy constructor errors
The following errors were reported during clang-tidy enablement due to the implicit copy constructor. These errors are suppressed using pragma diagno
clang-tidy: Fix implicit copy constructor errors
The following errors were reported during clang-tidy enablement due to the implicit copy constructor. These errors are suppressed using pragma diagnostic ignore checks.
''' ../include/sdbusplus/async/stdexec/../stdexec/__detail/__env.hpp:463:11: error: definition of implicit copy constructor for 'prop<stdexec::__queries::get_stop_token_t ../include/sdbusplus/async/stdexec/../stdexec/__detail/__env.hpp:501:10: error: definition of implicit copy constructor for 'env<>' is deprecated because it has a user-declared copy assignment operator [-Werror ../include/sdbusplus/async/stdexec/../stdexec/__detail/__env.hpp:544:10: error: definition of implicit copy constructor for 'env<stdexec::__env::prop<stdexec::__queries::get_stop_token_t ../include/sdbusplus/async/stdexec/../stdexec/__detail/__env.hpp:609:14: error: definition of implicit copy constructor for '__t' is deprecated because it has\ a user-declared copy assignment operator [-Werror '''
Tested: Verified build and unit testing.
Change-Id: I0b74cdbd5b5c58ba3c01866ffb0509e070861db9 Signed-off-by: Jayanth Othayoth <ojayanth@gmail.com>
show more ...
|