From: Gaurav Gandhi <gauravgandhi@google.com>
To: openbmc@lists.ozlabs.org
Cc: vernon.mauery@linux.intel.com, Ed Tanous <edtanous@google.com>,
rushtotom@gmail.com, Jason Ling <jasonling@google.com>
Subject: Re: Use ObjectMapper in Dcmihandler for PowerCap interface
Date: Wed, 9 Feb 2022 16:03:38 -0800 [thread overview]
Message-ID: <CACxmPJMfrWw=n4f=DxJA4Heh9UdDzrWjhBw2pNYxuZVUZ51cHw@mail.gmail.com> (raw)
In-Reply-To: <28950C51-9A48-47BB-BB6F-5E580F0A4516@stwcx.xyz>
[-- Attachment #1: Type: text/plain, Size: 1192 bytes --]
Hi Everyone,
Currently in dcmihandler object path
<https://github.com/openbmc/phosphor-host-ipmid/blob/4cc61e0e99c9014d2e8d8b25ec52b71c3c4e405b/dcmihandler.cpp#L25>
for PCAP_INTERFACE
<https://github.com/openbmc/phosphor-host-ipmid/blob/4cc61e0e99c9014d2e8d8b25ec52b71c3c4e405b/dcmihandler.cpp#L26>
is hardcoded to get settings service. It was discussed earlier in this
review
<https://gerrit.openbmc-project.xyz/c/openbmc/phosphor-dbus-interfaces/+/46157>
that
this needs to be more dynamic.
Currently I have 2 options to resolve this:
1. instead of getting a specific service
<https://github.com/openbmc/phosphor-host-ipmid/blob/4cc61e0e99c9014d2e8d8b25ec52b71c3c4e405b/dcmihandler.cpp#L74>
with
a hardcoded path, set/getPcap should call getAllDbusObjects
<https://github.com/openbmc/phosphor-host-ipmid/blob/4cc61e0e99c9014d2e8d8b25ec52b71c3c4e405b/libipmid/utils.cpp#L270>.
This will give an object tree and we have to iterate through all the
objects implementing the powercap interface. I am not sure if this is safe
to do so. Need input from the maintainers.
2. Another option is to add a compile time flag to select a path.
Please let me know what you think.
-
Thanks,
Gaurav
>
[-- Attachment #2: Type: text/html, Size: 1756 bytes --]
parent reply other threads:[~2022-02-11 2:17 UTC|newest]
Thread overview: expand[flat|nested] mbox.gz Atom feed
[parent not found: <28950C51-9A48-47BB-BB6F-5E580F0A4516@stwcx.xyz>]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CACxmPJMfrWw=n4f=DxJA4Heh9UdDzrWjhBw2pNYxuZVUZ51cHw@mail.gmail.com' \
--to=gauravgandhi@google.com \
--cc=edtanous@google.com \
--cc=jasonling@google.com \
--cc=openbmc@lists.ozlabs.org \
--cc=rushtotom@gmail.com \
--cc=vernon.mauery@linux.intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).