commit | 58881d0b563ad6ea9e3d1c3fcb84496f41205f01 | [log] [tgz] |
---|---|---|
author | Willy Tu <wltu@google.com> | Sun Oct 02 20:46:45 2022 +0000 |
committer | Willy Tu <wltu@google.com> | Fri Feb 03 09:13:19 2023 -0800 |
tree | 3d0ffa4baf856e0b444b03062148011dfbfdd2f0 | |
parent | aba14d3dcbd28df946efa96500ebb5a8926e1abf [diff] |
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>
This repository contains the mapper, which assists in finding things on D-Bus. There is documentation about it here.
Non-OpenBMC build dependencies are:
meson build && ninja -C build
meson build && ninja -C build test
rm -rf build