History log of /openbmc/sdbusplus/include/ (Results 101 – 125 of 271)
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
a412ca8f19-Apr-2023 Ed Tanous <edtanous@google.com>

Remove duplicate std::move

In the effort to remove copies, we removed one that was neccesary, given
that this variable is std::moved twice. This generally doesn't seem to
cause an issue in upstream

Remove duplicate std::move

In the effort to remove copies, we removed one that was neccesary, given
that this variable is std::moved twice. This generally doesn't seem to
cause an issue in upstream code, given that most upstream handlers are
trivial, but there have been reports of this failing for more complex
handlers, passing non-trivial types. This should correct it by moving
back to a copy.

Change-Id: I1342daf6a41b54b850f279aec696edbf0fd1e229
Signed-off-by: Ed Tanous <edtanous@google.com>

show more ...

f6cc836d19-Apr-2023 Ed Tanous <edtanous@google.com>

Remove pointers vector

sd-bus includes a vtable option SD_BUS_VTABLE_ABSOLUTE_OFFSET[1] which
allows the vector of pointers to be removed entirely. This saves some
memory on interfaces, and allows

Remove pointers vector

sd-bus includes a vtable option SD_BUS_VTABLE_ABSOLUTE_OFFSET[1] which
allows the vector of pointers to be removed entirely. This saves some
memory on interfaces, and allows a one element dereference instead of
two.

Tested: Asio examples work as expected.

[1] https://www.freedesktop.org/software/systemd/man/sd_bus_add_object.html#SD_BUS_VTABLE_ABSOLUTE_OFFSET

Change-Id: I9f3c1463f5efdb11537444d156247c09f97a043e
Signed-off-by: Ed Tanous <edtanous@google.com>

show more ...

946c940429-Mar-2023 Michal Orzel <michalx.orzel@intel.com>

Request name with default non-zero flags

Adds default flags to be used when calling sd_bus_request_name:
SD_BUS_NAME_ALLOW_REPLACEMENT and SD_BUS_NAME_REPLACE_EXISTING. This
fixes sporadical issue o

Request name with default non-zero flags

Adds default flags to be used when calling sd_bus_request_name:
SD_BUS_NAME_ALLOW_REPLACEMENT and SD_BUS_NAME_REPLACE_EXISTING. This
fixes sporadical issue observed in one of our services, where, after its
restart with systemctl command, exception was thrown when calling
request_name(), with code "FileExists".

Tested:
Confirmed that exception no longer appears after service restart.

Change-Id: Iff4b96cd2ee36960daec2d9b2eb42abcf3b88159
Signed-off-by: Michal Orzel <michalx.orzel@intel.com>

show more ...

e61c679b29-Mar-2023 Patrick Williams <patrick@stwcx.xyz>

stdexec: update to latest commit

Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: I1fa908582820eb1d8d64dcb4568dd52f80936ec1

8356d65405-Apr-2023 Patrick Williams <patrick@stwcx.xyz>

scope: pass around the scheduler

The latest stdexec requires task's which co-await to be able to
get the scheduler of the receiver. This in turn requires our
scope implementation to have the schedu

scope: pass around the scheduler

The latest stdexec requires task's which co-await to be able to
get the scheduler of the receiver. This in turn requires our
scope implementation to have the scheduler it was originally
created under (which is the run_loop). Modify context/scope so that
the `run_loop&` is given to the scope constructor and add the
appropriate tag_invoke to get the scheduler from the scope.

Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: Ie49ffd66feb80922e7a42b7922d67bf38006551e

show more ...

5c50fc6605-Apr-2023 Patrick Williams <patrick@stwcx.xyz>

event: prevent potential deadlock

In the `obtain_lock<true>()` path there is a race in which another
thread can run after the `run_condition.signal()` call before the
mutex lock call is executed. T

event: prevent potential deadlock

In the `obtain_lock<true>()` path there is a race in which another
thread can run after the `run_condition.signal()` call before the
mutex lock call is executed. This other thread could run a significant
amount of code, including coming around to be back in the `run_one`
path.

To prevent this behavior, add a stage to the lock so that there is an
ordering such that the signalling thread is ensured to get the primary
lock before the signalled thread.

Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: Ia464a95ed55246a67ed87601275a6e1fa8b16ba3

show more ...

6ba4431005-Apr-2023 Patrick Williams <patrick@stwcx.xyz>

async: add additional completion signatures

Some completion signals were missing for various senders and the
code fails to compile with later stdexec as a result. Add them in.

Signed-off-by: Patri

async: add additional completion signatures

Some completion signals were missing for various senders and the
code fails to compile with later stdexec as a result. Add them in.

Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: I92fe5508e2403119ddb6f18bccce0d1c625ffe27

show more ...

819ca0ba03-Apr-2023 Ed Tanous <edtanous@google.com>

Make dbus_interface uncopyable and unmovable

The dbus_interface class is meant to be unique, constructed once, and
never copied, given the internal pointers that are taken within itself.
Make that r

Make dbus_interface uncopyable and unmovable

The dbus_interface class is meant to be unique, constructed once, and
never copied, given the internal pointers that are taken within itself.
Make that requirement explicit.

Change-Id: Iab7e6f66999a63b50081012968c8c199453be34b
Signed-off-by: Ed Tanous <edtanous@google.com>

show more ...

3c2cea2303-Apr-2023 Ed Tanous <edtanous@google.com>

Fix behavior of const_ properties

In c9eb7e3bdc5e4ff59f38c0184d17ce3a02e680d2, a regression was introduced
that would prevent the registration of properties using the
sdbusplus::vtable::property_::c

Fix behavior of const_ properties

In c9eb7e3bdc5e4ff59f38c0184d17ce3a02e680d2, a regression was introduced
that would prevent the registration of properties using the
sdbusplus::vtable::property_::const_ flag, which defines a parameter as
not being modifiable. Unfortunately, sd_bus has a check to determine
that if the non-modifiable flag was set, it would ensure that the
SD_BUS_PROPERTY method was being used without a setter. Even if the
setter is passed in as nullptr, sd-bus still throws an error unless the
correct overload is used.

This commit makes two adjustments. First, rather than directing
sdbsplus::asio::object_server::property_r() to a nop method, it sets the
method to nullptr. Then at vtable registration time, that function
objects filledness is used to determine which overload of property_o
should be called.

There is one usage of const_ within the codebase, and it is within the
telemetry daemon.

Tested: Telemetry daemon now launches its DBus objects without issue in
qemu, the environment where this issue was found.

Change-Id: I13944695ccd50371fe266048538bc5cceeaf18fd
Signed-off-by: Ed Tanous <edtanous@google.com>

show more ...

6db7a6d029-Mar-2023 Jason M. Bills <jason.m.bills@intel.com>

Fix build error on register_signal()

After a recent change, a build error started occurring on
register_signal() as it attempts to construct a signal with a string and
an array, but the constructor

Fix build error on register_signal()

After a recent change, a build error started occurring on
register_signal() as it attempts to construct a signal with a string and
an array, but the constructor takes a string and char*.

This adds back the '.data()' to the array, so it can be passed to the
constructor and makes the constructor public to fix the build.

Tested:
Confirmed that a component that calls register_signal() builds
successfully.

Change-Id: I5a3ca58ef705854c5392ae13e0684d8a30580075
Signed-off-by: Jason M. Bills <jason.m.bills@intel.com>

show more ...

ab52e72130-Mar-2023 Jitendra Tripathy <jitendra.kumarx.tripathy@intel.com>

Fix for failure of sending signal

Redfish events are not generated even though sensor
crossed threshold value.

So changed the check for is_initialized() in the
new_signal.

Tested:
Verified and abl

Fix for failure of sending signal

Redfish events are not generated even though sensor
crossed threshold value.

So changed the check for is_initialized() in the
new_signal.

Tested:
Verified and able to see RedFish event logs,
when sensor crossed threshold values.

Change-Id: I25b0340de4538b35db9be7a257fa856f2a6f2bb8
Signed-off-by: Jitendra Tripathy <jitendra.kumarx.tripathy@intel.com>

show more ...

13b2cadd21-Mar-2023 Ed Tanous <edtanous@google.com>

Add back explicit constructors

Clang doesn't yet support the c++20 feature of Parenthesized
initialization of aggregates (P0960R3)

Until it's supported, we'll need explicit constructors.

[1] https

Add back explicit constructors

Clang doesn't yet support the c++20 feature of Parenthesized
initialization of aggregates (P0960R3)

Until it's supported, we'll need explicit constructors.

[1] https://clang.llvm.org/cxx_status.html

Change-Id: I0b8981c44a9c61b14167b7188e31a1065406e898
Signed-off-by: Ed Tanous <edtanous@google.com>

show more ...

8fb0207607-Mar-2023 Ed Tanous <edtanous@google.com>

Use offset to avoid lookups

In systemd vtable entries, each of property and method callbacks have a
version of the callback that takes an "offset" parameter. This allows
passing a userdata pointer

Use offset to avoid lookups

In systemd vtable entries, each of property and method callbacks have a
version of the callback that takes an "offset" parameter. This allows
passing a userdata pointer at an offset from the original userdata
pointer. This allows us to optimize, and not have a O(n) lookup on our
vectors, and allows us to directly dereference the correct callback,
without needing to mess around with trying to find the callback we're
looking for.

Change-Id: I8a490aedbe475f6eab6112bb696c589d597eb71b
Signed-off-by: Ed Tanous <edtanous@google.com>

show more ...

c9eb7e3b06-Mar-2023 Ed Tanous <edtanous@google.com>

Optimize object_server

There are quite a few optimizations that can be made to object_server to
reduce memory usage, and improve simplicity. First, the virtualized
classes have been removed in exch

Optimize object_server

There are quite a few optimizations that can be made to object_server to
reduce memory usage, and improve simplicity. First, the virtualized
classes have been removed in exchange for std::function based type
erasure.

All the underlying structures have been moved to std::vector, to improve
memory packing and locality. To accomplish this, the vtable
construction is moved into the initialize function, such that when
initialize is called, the dbus_interface object knows there will be no
more changes, and can therefore take pointers to elements within the
vector for the vtable.

The independent storage of string names has been removed in lieu of
dedicated structures, signal, method_callback, and property_callback,
which each represent one of the primitive types, and each of which have
a "name" string that can be used, whereas previously name required
duplication across each of the unordered_maps.

Change-Id: I0236f1b85c53f1b5d05931ea100c04de6e571665
Signed-off-by: Ed Tanous <edtanous@google.com>

show more ...

fd995def17-Mar-2023 Ed Tanous <edtanous@google.com>

Break out lambdas into helpers

While these are pretty simple lambdas, keeping them inline removes the
possibility for deduplication, and makes debugging harder.

Change-Id: Ia6f3398023a89216776a8be4

Break out lambdas into helpers

While these are pretty simple lambdas, keeping them inline removes the
possibility for deduplication, and makes debugging harder.

Change-Id: Ia6f3398023a89216776a8be4e04406aa69c5e84b
Signed-off-by: Ed Tanous <edtanous@google.com>

show more ...

1d3a039020-Mar-2023 Ed Tanous <edtanous@google.com>

Remove message copy

This was previously making an unneeded copy to try to work around some
undefined behavior bugs. It is no longer needed.

Change-Id: Ic2427d37161087880e6fdcf6e1b9aa4210f15d1e
Sig

Remove message copy

This was previously making an unneeded copy to try to work around some
undefined behavior bugs. It is no longer needed.

Change-Id: Ic2427d37161087880e6fdcf6e1b9aa4210f15d1e
Signed-off-by: Ed Tanous <edtanous@google.com>

show more ...

6993aa4d17-Mar-2023 Ed Tanous <edtanous@google.com>

Break out post-spawn lambda into method

This lambda really is too long to be inline. Break it out into a method
for clarity.

Change-Id: I561850156d8582ebc2b68657949a4f4f5bf7a4d6
Signed-off-by: Ed

Break out post-spawn lambda into method

This lambda really is too long to be inline. Break it out into a method
for clarity.

Change-Id: I561850156d8582ebc2b68657949a4f4f5bf7a4d6
Signed-off-by: Ed Tanous <edtanous@google.com>

show more ...

da48d20708-Mar-2023 Ed Tanous <edtanous@google.com>

Fix vtable entires for offset callbacks

property_o didn't pass through the callbacks as sd-bus expected, so
they can't be used for read-write properties. Add the expected methods.

Change-Id: Iad75

Fix vtable entires for offset callbacks

property_o didn't pass through the callbacks as sd-bus expected, so
they can't be used for read-write properties. Add the expected methods.

Change-Id: Iad7592c99a60c22c10e274517ebfcbf8cf293a42
Signed-off-by: Ed Tanous <edtanous@google.com>

show more ...

0564face08-Mar-2023 Ed Tanous <edtanous@google.com>

Delete callbackYields

This is a duplicate of FirstArgIsYield, and doesn't add much value.
Simplify.

Change-Id: Icaf1a922b5e5063d5b674ff594dbd5ee10fce500
Signed-off-by: Ed Tanous <edtanous@google.co

Delete callbackYields

This is a duplicate of FirstArgIsYield, and doesn't add much value.
Simplify.

Change-Id: Icaf1a922b5e5063d5b674ff594dbd5ee10fce500
Signed-off-by: Ed Tanous <edtanous@google.com>

show more ...

c461441e08-Mar-2023 Ed Tanous <edtanous@google.com>

Break out callFunction

This function is duplicated between both classes, break it out into its
own function to deduplicate the code.

Change-Id: I24dea73a79af6224d80a607b090eb1fffbe92fd6
Signed-off-

Break out callFunction

This function is duplicated between both classes, break it out into its
own function to deduplicate the code.

Change-Id: I24dea73a79af6224d80a607b090eb1fffbe92fd6
Signed-off-by: Ed Tanous <edtanous@google.com>

show more ...

df6133b408-Mar-2023 Ed Tanous <edtanous@google.com>

Remove size_t from SetPropertyReturnValue

This enum is only ever used as an enum. Let the compiler decide what
underlying type to use.

Change-Id: Ieda7835ab346c46d8a1153a8e8eb65e45ae1648c
Signed-o

Remove size_t from SetPropertyReturnValue

This enum is only ever used as an enum. Let the compiler decide what
underlying type to use.

Change-Id: Ieda7835ab346c46d8a1153a8e8eb65e45ae1648c
Signed-off-by: Ed Tanous <edtanous@google.com>

show more ...

3448edea08-Mar-2023 Ed Tanous <edtanous@google.com>

Remove initialized_ member

the std::optional on interface represents the same information about
whether or not this interface have been initialized.

Change-Id: I365ac35a76f3fd710bddac3d55b514f3fde2

Remove initialized_ member

the std::optional on interface represents the same information about
whether or not this interface have been initialized.

Change-Id: I365ac35a76f3fd710bddac3d55b514f3fde2f255
Signed-off-by: Ed Tanous <edtanous@google.com>

show more ...

936cb89e01-Mar-2023 Ed Tanous <edtanous@google.com>

Change deprecated asio function

The io_context.post method has been deprecated for some time. Move to
the new model, using boost::asio::post.

Signed-off-by: Ed Tanous <edtanous@google.com>
Change-

Change deprecated asio function

The io_context.post method has been deprecated for some time. Move to
the new model, using boost::asio::post.

Signed-off-by: Ed Tanous <edtanous@google.com>
Change-Id: I946a32e0404809b85c72767aafd783053bf8ee5f

show more ...

56252bbe13-Feb-2023 Patrick Williams <patrick@stwcx.xyz>

stdexec: update to latest commit

Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: Idaa873100bd02f06455b0eb5a00ca62f93b08acc

abbdd6aa20-Jan-2023 Patrick Williams <patrick@stwcx.xyz>

stdexec: update to latest commit

The result of execution::when_all seems to have changed, so I needed
to make a slight change to `sleep_for` to return a task instead of a
Sender.

Signed-off-by: Pat

stdexec: update to latest commit

The result of execution::when_all seems to have changed, so I needed
to make a slight change to `sleep_for` to return a task instead of a
Sender.

Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: Ib47c631f8e970838a79ffb44e2a1db4c86a831c4

show more ...

1234567891011