History log of /openbmc/phosphor-objmgr/src/associations.cpp (Results 1 – 25 of 25)
Revision Date Author Comments
# 883a8929 22-Jan-2025 Benjamin Fair <benjaminfair@google.com>

associations: fix leak in assocMaps.ifaces

New entries get added to ifaces whenever an object with associations is
detected, but the entries are never removed even if all the endpoints
are gone, lea

associations: fix leak in assocMaps.ifaces

New entries get added to ifaces whenever an object with associations is
detected, but the entries are never removed even if all the endpoints
are gone, leading to a memory leak.

Change-Id: Ide5439e4eaab7c70fb0331d59d59753905f45066
Signed-off-by: Benjamin Fair <benjaminfair@google.com>
Signed-off-by: Willy Tu <wltu@google.com>

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 ...


# 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 ...


# 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


# 5b4357da 12-Oct-2022 Kallas, Pawel <pawel.kallas@intel.com>

add Associations endpoints change delay timer

When multiple associations that point to the same interface are
created, each change (adding or removing one) leads to updating
"endpoints" property on

add Associations endpoints change delay timer

When multiple associations that point to the same interface are
created, each change (adding or removing one) leads to updating
"endpoints" property on dbus. This property update is time consuming
with many endpoints already present, because each update needs to send
the whole list of current elements plus/minus one. With a lot of
changes in short time it can cause the service to be unresponsive.
This change adds timer to delay updating dbus property. This way many
associations updates can be aggregated into single dbus property
update.

Tested: Ran on hardware with dbus sensor tester. 4000 created sensors
with interfaces are processed within 10 seconds. Time before the change
was above 2 minutes.

Signed-off-by: Kallas, Pawel <pawel.kallas@intel.com>
Change-Id: I1083c027ab12238249cffc67fb29a8ffef6baf83

show more ...


# 86d2880e 11-Jul-2022 Brad Bishop <bradleyb@fuzziesquirrel.com>

treewide: prefer std::starts_with to boost

Replace boost versions of starts_with and ends_with with the std
versions provided with c++20.

Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
Ch

treewide: prefer std::starts_with to boost

Replace boost versions of starts_with and ends_with with the std
versions provided with c++20.

Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
Change-Id: I97218c607ff04aedad490b3af428071b0fa75615

show more ...


# cc8070ba 22-Jul-2022 Patrick Williams <patrick@stwcx.xyz>

sdbusplus: use shorter type aliases

The sdbusplus headers provide shortened aliases for many types.
Switch to using them to provide better code clarity and shorter
lines. Possible replacements are

sdbusplus: use shorter type aliases

The sdbusplus headers provide shortened aliases for many types.
Switch to using them to provide better code clarity and shorter
lines. Possible replacements are for:
* bus_t
* exception_t
* manager_t
* match_t
* message_t
* object_t
* slot_t

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

show more ...


# 1f62380a 31-May-2022 Brad Bishop <bradleyb@fuzziesquirrel.com>

lint: fix trivial clang tidy errors

Change-Id: Ie5395004a451d6168249f56f75c5e6ae31dca4af
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>


# a664690b 02-Jun-2022 Brad Bishop <bradleyb@fuzziesquirrel.com>

associations: drop unused server parameter

Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
Change-Id: Ic6d406b09f2552dcf0d6bf9ba284b37690f1563e


# a098a37a 05-May-2022 Brad Bishop <bradleyb@fuzziesquirrel.com>

style: comply with OpenBMC style guidelines

Change-Id: I72f86c59a0502777c861de901907c0a556c4c6c5
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>


# 2352088e 26-May-2022 Brad Bishop <bradleyb@fuzziesquirrel.com>

clang-format: update to OpenBMC latest

Ignore libmapper, because it is written in C and the CPP style
guidelines are not appropriate.

Ignore subprojects; they can validate their formatting themselv

clang-format: update to OpenBMC latest

Ignore libmapper, because it is written in C and the CPP style
guidelines are not appropriate.

Ignore subprojects; they can validate their formatting themselves.

Change-Id: Id88dcc49f4176c6443e7f53ca193ca8f3e83a51f
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>

show more ...


# 2d41d6ab 03-Aug-2021 Brad Bishop <bradleyb@fuzziesquirrel.com>

build: fix unused-parameter warnings

A couple changes to enable the use of -Wunused-parameter.

libmapper is built with the c compiler, which does not support omitting
the parameter name in the func

build: fix unused-parameter warnings

A couple changes to enable the use of -Wunused-parameter.

libmapper is built with the c compiler, which does not support omitting
the parameter name in the function definition, so use the de-facto
workaround and define an UNUSED() cpp macro.

Change-Id: I1c0d79d33097417fc3689351c4787e591fc23e9c
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>

show more ...


# b89c6614 22-Jul-2021 Lei YU <yulei.sh@bytedance.com>

associations: Handle SdBusError exception

In checkIfPendingAssociation() it could create new interface on DBus
objects. The interface::interface() could throw if it fails, and mapperx
would crash du

associations: Handle SdBusError exception

In checkIfPendingAssociation() it could create new interface on DBus
objects. The interface::interface() could throw if it fails, and mapperx
would crash due to the exception:

phosphor-mapper[428]: terminate called after throwing an instance of 'sdbusplus::exception::SdBusError'
phosphor-mapper[428]: what(): sd_bus_add_object_vtable: org.freedesktop.DBus.Error.InvalidArgs: Invalid argument

Workaround this issue by adding try-catch and skip the interface to
prevent mapperx from crash.

Fixes openbmc/phosphor-objmgr#21

Signed-off-by: Lei YU <yulei.sh@bytedance.com>
Change-Id: Ibe3e887dcd95c01e1270bf218fd47572852e1e54

show more ...


# 9c3d2859 08-Apr-2019 Matt Spinler <spinler@us.ibm.com>

Handle losing association endpoints

If the endpoint path of an association (not the path that has the
org.openbmc.Associations interface) goes off of D-Bus, then remove the 2
association objects and

Handle losing association endpoints

If the endpoint path of an association (not the path that has the
org.openbmc.Associations interface) goes off of D-Bus, then remove the 2
association objects and move this association to the list of pending
ones. That way if it ever comes back, the association objects will be
re-added.

This commit adds a moveAssociationToPending function in the code paths
where the mapper sees D-Bus paths going away. That function will find
all associations that involve that path, and then remove the actual
association paths and add them to the list of pending ones.

Signed-off-by: Matt Spinler <spinler@us.ibm.com>
Change-Id: I14d5ddf8f65be866c2cedd5f467d65adf8e3af95

show more ...


# 7f8fd1fa 08-Apr-2019 Matt Spinler <spinler@us.ibm.com>

Add function to find assocs based on endpoint

The helper function findAssociations can find all
associations based on an endpoint path and return
enough information to recreate those associations
la

Add function to find assocs based on endpoint

The helper function findAssociations can find all
associations based on an endpoint path and return
enough information to recreate those associations
later.

For example, searching for something like "endpointA"

could return:
owner: "ownerA"
Association{"typeA", "typeB", "endpointB"}

Which implies the association:
endpointA/typeA -> endpointB/typeB

Signed-off-by: Matt Spinler <spinler@us.ibm.com>
Change-Id: I0fbcf5397435f10b3072dd2640b342ee47d52f9b

show more ...


# 11401e2e 08-Apr-2019 Matt Spinler <spinler@us.ibm.com>

Check for pending associations

When the mapper is adding a new D-Bus path to its path map,
either via an introspect or in the interfacesAdded handler,
check if that new path has an outstanding pendi

Check for pending associations

When the mapper is adding a new D-Bus path to its path map,
either via an introspect or in the interfacesAdded handler,
check if that new path has an outstanding pending association.

If it does, then create the 2 real association paths and
remove that entry from the pending associations maps.

Signed-off-by: Matt Spinler <spinler@us.ibm.com>
Change-Id: I2da8109b5cba8596eb0c14a6af0d377472ca4145

show more ...


# cb9bcdb1 08-Apr-2019 Matt Spinler <spinler@us.ibm.com>

Remove an endpoint from the pending assocs

If there is a pending association, but the object that
owns that association goes off the bus, then there is
no need to wait for the endpoint to show up an

Remove an endpoint from the pending assocs

If there is a pending association, but the object that
owns that association goes off the bus, then there is
no need to wait for the endpoint to show up anymore so
remove it from the pending associations list.

Signed-off-by: Matt Spinler <spinler@us.ibm.com>
Change-Id: I96af6ffd62f857015522c041dfbdbcd2132d8374

show more ...


# e0b0e3a2 08-Apr-2019 Matt Spinler <spinler@us.ibm.com>

Check for missing endpoints when adding assocs

An association links 2 D-Bus object paths together, one
which is the path that has the original associations
property, and another endpoint path. It's

Check for missing endpoints when adding assocs

An association links 2 D-Bus object paths together, one
which is the path that has the original associations
property, and another endpoint path. It's possible that
that endpoint path doesn't exist on D-Bus when that
associations property is created.

This commit, along with upcoming ones, adds support to not
create the actual association object paths until that
endpoint path shows up on D-Bus. In addition, if that
endpoint path were to get removed from D-Bus in the future,
then the association paths should be removed until that
path is back again.

This particular commit introduces the PendingAssociations map
to track these cases, and adds support in the associationChanged
path to add associations to this map if the endpoint path isn't
on D-Bus instead of just blindly creating the association objects.

Signed-off-by: Matt Spinler <spinler@us.ibm.com>
Change-Id: I1f4bf0e02bf7a350d9e3f18c3591737289a51a39

show more ...


# e2359fb7 05-Apr-2019 Matt Spinler <spinler@us.ibm.com>

Gather association maps into a single structure

The AssociationOwners and AssociationIntefaces maps are passed around
separately in the mapper, but usually they are always used together.

Gather the

Gather association maps into a single structure

The AssociationOwners and AssociationIntefaces maps are passed around
separately in the mapper, but usually they are always used together.

Gather them into a structure to make it easier to write code to use
them, especially because soon there will be another entry in it.

Signed-off-by: Matt Spinler <spinler@us.ibm.com>
Change-Id: Ibd5b622c7c1240ff8e23846368cbfd56e5bba24d

show more ...


# 0a560a5c 22-Mar-2019 Andrew Geissler <geissonator@yahoo.com>

unit-test: Fix bug when endpoint empty

Could debate the proper handling of this situations but this commit at
least makes it consistent for the forward and reverse path

Change-Id: If0a8a16473c150f4

unit-test: Fix bug when endpoint empty

Could debate the proper handling of this situations but this commit at
least makes it consistent for the forward and reverse path

Change-Id: If0a8a16473c150f4d4361f9ca9aad9f06c391157
Signed-off-by: Andrew Geissler <geissonator@yahoo.com>

show more ...


# 4511b33f 21-Feb-2019 Andrew Geissler <geissonator@yahoo.com>

unit-test: Move associationChanged()

Make it easier to unit test and continue reduction of main.cpp

Change-Id: Ic549e096343e7a2fb11985f1c48879ed4486e40b
Signed-off-by: Andrew Geissler <geissonator@

unit-test: Move associationChanged()

Make it easier to unit test and continue reduction of main.cpp

Change-Id: Ic549e096343e7a2fb11985f1c48879ed4486e40b
Signed-off-by: Andrew Geissler <geissonator@yahoo.com>

show more ...


# 7f1c44dc 21-Feb-2019 Andrew Geissler <geissonator@yahoo.com>

unit-test: Move checkAssociationEndpointRemoves

Make it easier to unit test and continue reduction of main.cpp

Change-Id: Id4f4c4fc1e3928f1b600555c6dbe05f651fffce5
Signed-off-by: Andrew Geissler <g

unit-test: Move checkAssociationEndpointRemoves

Make it easier to unit test and continue reduction of main.cpp

Change-Id: Id4f4c4fc1e3928f1b600555c6dbe05f651fffce5
Signed-off-by: Andrew Geissler <geissonator@yahoo.com>

show more ...


# 5629ae8d 21-Feb-2019 Andrew Geissler <geissonator@yahoo.com>

unit-test: Utilize common code for endpoint remove

Testing: Previous test cases get us 100% coverage here

Change-Id: I3b96872bf25ce7ddcc96422f1d453f153f9dd39c
Signed-off-by: Andrew Geissler <geisso

unit-test: Utilize common code for endpoint remove

Testing: Previous test cases get us 100% coverage here

Change-Id: I3b96872bf25ce7ddcc96422f1d453f153f9dd39c
Signed-off-by: Andrew Geissler <geissonator@yahoo.com>

show more ...


# ff5ce924 21-Feb-2019 Andrew Geissler <geissonator@yahoo.com>

unit-test: Move removeAssociationEndpoints()

Make it easier to unit test and continue reduction of main.cpp

Change-Id: I2c0eac5c301687acab14add627586170020e4fe4
Signed-off-by: Andrew Geissler <geis

unit-test: Move removeAssociationEndpoints()

Make it easier to unit test and continue reduction of main.cpp

Change-Id: I2c0eac5c301687acab14add627586170020e4fe4
Signed-off-by: Andrew Geissler <geissonator@yahoo.com>

show more ...


# a80a3af0 04-Feb-2019 Andrew Geissler <geissonator@yahoo.com>

unit-test: Create initial associations file

Make interface more unit testable by moving to separate
file and documenting it.

Change-Id: Ia27f33d706c62a0011790ec94185dd6be3922f21
Signed-off-by: Andr

unit-test: Create initial associations file

Make interface more unit testable by moving to separate
file and documenting it.

Change-Id: Ia27f33d706c62a0011790ec94185dd6be3922f21
Signed-off-by: Andrew Geissler <geissonator@yahoo.com>

show more ...