History log of /openbmc/phosphor-objmgr/src/processing.cpp (Results 1 – 25 of 27)
Revision Date Author Comments
# 7cc8d00a 23-Sep-2024 Lei YU <yulei.sh@bytedance.com>

Remove default interfaces

When association is used, mapper will create DBus objects on the leaf
of the associated objects, and will "assign" the "default interfaces" to
the parent objects:
* org.fre

Remove default interfaces

When association is used, mapper will create DBus objects on the leaf
of the associated objects, and will "assign" the "default interfaces" to
the parent objects:
* org.freedesktop.DBus.Introspectable
* org.freedesktop.DBus.Peer
* org.freedesktop.DBus.Properties

For example, software manager will create BMC version object and create
association, and we could see below DBus objects created by mapper:
```
/xyz/openbmc_project/software/64876e4e/inventory
/xyz/openbmc_project/software/64876e4e/software_version
```

And we could mapper's `GetObject` method will return the default
interfaces on the parent object:

```json
# busctl --json=pretty call xyz.openbmc_project.ObjectMapper /xyz/openbmc_project/object_mapper xyz.openbmc_project.ObjectMapper GetObject sas /xyz/openbmc_project/software/64876e4e 0
{
"type" : "a{sas}",
"data" : [
{
"xyz.openbmc_project.ObjectMapper" : [
"org.freedesktop.DBus.Introspectable",
"org.freedesktop.DBus.Peer",
"org.freedesktop.DBus.Properties"
],
"xyz.openbmc_project.Software.BMC.Updater" : [
"org.freedesktop.DBus.Introspectable",
"org.freedesktop.DBus.Peer",
"org.freedesktop.DBus.Properties",
"xyz.openbmc_project.Association.Definitions",
"xyz.openbmc_project.Common.FilePath",
"xyz.openbmc_project.Inventory.Decorator.Compatible",
"xyz.openbmc_project.Software.Activation",
"xyz.openbmc_project.Software.ExtendedVersion",
"xyz.openbmc_project.Software.RedundancyPriority",
"xyz.openbmc_project.Software.Version"
]
}
]
}
```

This patch removes registering the default interfaces (peer, properties,
Introspectable) when done as part of an ObjectManager event, because
they're generally not received as part of an InterfacesAdded call. These
don't generally get searched on, and don't make a ton of sense to have
the mapper implicitly add, but were done to make the introspect and
objectmapper results match.

However, the default interfaces returned by introspect on the parents
could not be called, e.g.

```
# The leaf object is OK:
busctl call xyz.openbmc_project.ObjectMapper /xyz/openbmc_project/software/64876e4e/inventory org.freedesktop.DBus.Properties GetAll s org.freedesktop.DBus.Properties
a{sv} 0

# The parent object fails to call:
busctl call xyz.openbmc_project.ObjectMapper /xyz/openbmc_project/software/64876e4e org.freedesktop.DBus.Properties GetAll s org.freedesktop.DBus.Properties
Call failed: Unknown object '/xyz/openbmc_project/software/64876e4e'.
```

This probably means that the default interfaces returned by introspect
could not really be used, and thus we could remove then in mapper here.

Tested: With this patch, the parent object does not show default
interfaces:
```json
# busctl --json=pretty call xyz.openbmc_project.ObjectMapper /xyz/openbmc_project/object_mapper xyz.openbmc_project.ObjectMapper GetObject sas /xyz/openbmc_project/software/64876e4e 0
{
"type" : "a{sas}",
"data" : [
{
"xyz.openbmc_project.ObjectMapper" : [],
"xyz.openbmc_project.Software.BMC.Updater" : [
"org.freedesktop.DBus.Introspectable",
"org.freedesktop.DBus.Peer",
"org.freedesktop.DBus.Properties",
"xyz.openbmc_project.Association.Definitions",
"xyz.openbmc_project.Common.FilePath",
"xyz.openbmc_project.Inventory.Decorator.Compatible",
"xyz.openbmc_project.Software.Activation",
"xyz.openbmc_project.Software.ExtendedVersion",
"xyz.openbmc_project.Software.RedundancyPriority",
"xyz.openbmc_project.Software.Version"
]
}
]
}
```

Note: if this gets merged, bmcweb's related code in
openbmc_dbus_rest.hpp shall be updated to handle this case.

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

show more ...


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


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


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

mapper: remove configurable service allowlists

Remove the ability to specify an allow list at runtime. Instead,
introspect any DBus service except those that start with
org.freedesktop. This remov

mapper: remove configurable service allowlists

Remove the ability to specify an allow list at runtime. Instead,
introspect any DBus service except those that start with
org.freedesktop. This removes the need for argument parsing code and
complex bitbake metadata.

Skip org.freedesktop because applications (OpenBMC or otherwise) should
access org.freedesktop services directly and not indirectly via the
OpenBMC mapper.

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

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


# 964681ca 08-Jul-2022 Ed Tanous <edtanous@google.com>

Modernize mapper core types

There's a number of best practices that have evolved in our use of
flat_maps and flat_sets since this code was originally written.

First, add std::less<> to the Compare

Modernize mapper core types

There's a number of best practices that have evolved in our use of
flat_maps and flat_sets since this code was originally written.

First, add std::less<> to the Compare template argument. The default
for this is std::less<Key> which limits find() calls (and any lookup for
that matter) to only supporting std::string. Using std::less<> allows
lookup by std::string_view, which can prevent some copies in some cases.

Next, add std::vector<...> to the types under the AllocatorOrContainer
template arg. Per our coding standard, this overrides the default of
using boost::vector, and replaces it with std::vector, which, although
it has a very similar interface, tends to optimize better, and be better
supported overall.

The rest of this patch updates a couple places where the various types
were specifically hardcoded, so it moves to using the various using
declarations.

Tested: Unit tests; Next patch tests this more fully.

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

show more ...


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

mapper: remove service deny list feature

This feature has existed for years, but remains unused. Drop the dead
code.

Change-Id: I1b0b6f7fee0da30a3e36e1d151e70e1039fe2c7b
Signed-off-by: Brad Bishop

mapper: remove service deny list feature

This feature has existed for years, but remains unused. Drop the dead
code.

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

show more ...


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


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

naming: be inclusive

Adhere to the project inclusive naming guidelines and also adhere to the
OpenBMC style guidelines.

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

naming: be inclusive

Adhere to the project inclusive naming guidelines and also adhere to the
OpenBMC style guidelines.

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

show more ...


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


# a02cd54c 12-Oct-2021 Brad Bishop <bradleyb@fuzziesquirrel.com>

meson.build: drop config.h

These DBus things (service, interface, path) are not intended to be
configurable in any way. Try to discourage them from being changed by
removing them from meson.build j

meson.build: drop config.h

These DBus things (service, interface, path) are not intended to be
configurable in any way. Try to discourage them from being changed by
removing them from meson.build just in case that suggests that perhaps
they are meant to be overriden.

As the DBus names are the only content in config.h, config.h can be
removed completely.

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

show more ...


# 2bb2d6ba 13-May-2020 Patrick Williams <patrick@stwcx.xyz>

sdbusplus: replace message::variant with std::variant

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


# b05bc12c 13-May-2020 Patrick Williams <patrick@stwcx.xyz>

sdbusplus: remove deprecated variant_ns

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


# d0cf9428 17-Sep-2019 John Wang <wangzqbj@inspur.com>

Drop support for old association interface

A new association interface is defined in phosphor-dbus-interfaces
It would be nice to move the local version of the interface
to the new one.

The behavio

Drop support for old association interface

A new association interface is defined in phosphor-dbus-interfaces
It would be nice to move the local version of the interface
to the new one.

The behavior of how association work is described here:
https://github.com/openbmc/docs/blob/master/object-mapper.md#associations

I did some searching and confirmed that all the old interfaces
(except the openbmc/pyphosphor, but we have removed support for python)
should have been removed, so drop the support for the old interface here.

Partially resolves openbmc/openbmc#3584

In addition, when I commited this change, ci reported code format error:

@libmapper/mapper.h
-int mapper_wait_async(sd_bus*, sd_event*, char* [], void (*)(int, void*), void*,
+int mapper_wait_async(sd_bus*, sd_event*, char*[], void (*)(int, void*), void*,

Fixed that.

Signed-off-by: John Wang <wangzqbj@inspur.com>
Change-Id: I0c2d0458a3f55f4671b91f6492e7218ecc3df4aa

show more ...


# 5eddf440 10-Apr-2019 Matt Spinler <spinler@us.ibm.com>

Use config.h constants

The mapper related D-Bus names are already defined in config.h,
so start using them in mapperx.

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

Use config.h constants

The mapper related D-Bus names are already defined in config.h,
so start using them in mapperx.

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

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


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


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


# 8f876a5a 15-Apr-2019 Matt Spinler <spinler@us.ibm.com>

Support the new association defs interface

An xyz.openbmc_project version of the org.openbmc_project.Associations
interface was just created:
xyz.openbmc_project.Association.Definitions

Support the new association defs interface

An xyz.openbmc_project version of the org.openbmc_project.Associations
interface was just created:
xyz.openbmc_project.Association.Definitions
property: Associations

Support this interface as well as the original org.openbmc one.

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

show more ...


# 70461896 27-Feb-2019 Andrew Geissler <geissonator@yahoo.com>

unit-test: Move processing of interfaces added

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

Change-Id: Id360255e1546eda026e5e6ef9f15d29dcc82caaa
Signed-off-by: Andrew Geissler <ge

unit-test: Move processing of interfaces added

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

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

show more ...


# 2067926a 11-Feb-2019 Andrew Geissler <geissonator@yahoo.com>

unit-test: Test deleting entry on name change

Breaking off into a separate function enables easier unit testing of the
specific function

Testing: 97% coverage of processing.cpp

Change-Id: I08f2296

unit-test: Test deleting entry on name change

Breaking off into a separate function enables easier unit testing of the
specific function

Testing: 97% coverage of processing.cpp

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

show more ...


12