openbmc.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Vernon Mauery <vernon.mauery@linux.intel.com>
To: "Chris Chen (TPI)" <Chris.Chen3@flex.com>
Cc: "openbmc@lists.ozlabs.org" <openbmc@lists.ozlabs.org>
Subject: Re: 回覆: [phosphor-host-ipmid] Questions about IPMI (OEM) command development
Date: Thu, 9 Sep 2021 13:15:16 -0700	[thread overview]
Message-ID: <20210909201516.GA6614@mauery.jf.intel.com> (raw)
In-Reply-To: <DM6PR08MB55145854126B411F1A9AFE29DCD29@DM6PR08MB5514.namprd08.prod.outlook.com>

On 06-Sep-2021 09:40 AM, Chris Chen (TPI) wrote:
>Hi all,
>
>I guess this mail was got overwhelmed by bunches of emails, so please let me resend it and hope someone could help me. Another, I add one more question marked #5 below.

Thanks for being persistent :)

>
>Hi all,
>
>I have studied "phosphor-host-ipmid" package for a couple of weeks and got understanding that it has implemented some mandatory and optional commands already. And I also knew that I'm able to leverage "intel-ipmi-oem" package to get more command handlers. But there're some questions raised in my mind, I hope someone could give me some suggestions.
>
>  1.  What's the normal development procedure in case I want to make our own OEM commands? I mean do you guys encourage me to create a new "xxx-ipmi-oem" package or to leverage "intel-ipmi-oem" and then add our own commands in it?

First some common language:
1) xxx-ipmi-oem is an IPMI provider library. It doesn't need to be 
called xxx-ipmi-oem, but that is just a convenient naming convention.
2) whitelist (prefer allowlist) is one kind of filter. Filters are 
registered like command handlers, with a priority. Filters can do more 
than just block or allow the commands coming in. The filter is passed 
the request and can do anything it wants before passing it on. Logging, 
mangling, blocking, etc.

It depends on a lot of things. Maybe yes, create a new repo? More 
discussion below.

>  2.  I for now added "intel-ipmi-oem" package only for using its "<Chassis>:<Set Front Panel Enables>" command because I figured out the same command in the "phosphor-host-ipmid" is not able to match the d-bus interface in the "x86-power-control". I'm not sure if I will need other commands in the "intel-ipmi-oem", but what if I don't need other commands, how to remove them? to use the whitelist mechanism?

There is not a method to remove them, but you can filter them as you 
suggested. Also, if you want to add a different implementation (from a 
different IPMI provider library) at a higher priority, only the higher 
priority implementation will be used.

>  3.  Is it okay to add more than 1 xxx-ipmi-ome packages? If yes, how to manage the whitelist between these 2 OEM packages?

You can have as many IPMI provider libraries on the BMC as needed.

The filtering mechanism does not discriminate between the provider, it 
is used at execution time when a command comes in. Every command is 
passed to each filter 

>  4.  Am I able to use "intel-ipmi-oem" on a platform that is using AMD CPU?

IANAL, but, yes. It is open source and the license does not make that 
restriction. It might look kind of weird though :)

If you like all the IPMI functions implemented by the intel-ipmi-oem, it 
is fine to use it as is. If there are things you want to change, there 
are different ways to go about it.

Here are a couple of scenarios with some options:
1) You like the behavior of an IPMI provider library, but want some 
changes. Talk with the owner and see if you can come to some consensus 
that works for everyone. This is the most opensource, 
community-building, good-will behavior of all. Submit a change and see 
if you can get it merged.

2) You like all the IPMI commands in an IPMI provider library except for 
one or two. If you want to own the work to keep a patch up to date, it 
is possible to just add a bbappend and a patch to modify the code prior 
to building. This is okay, but maybe not as ideal. It may end up with a 
smaller image size than adding a new provider library to overload the 
command implementation.

3) You like all the IPMI commands in an IPMI provider library except for 
one or two. You can create a new IPMI provider library for your 
organization that can filter out and/or provide overloads for any 
existing implementation of IPMI commands from any number of other IPMI 
providers.

4) You only like some bits of another IPMI provider. You may be best off 
to just copy those bits into a new IPMI provider library of your own, 
add your own other OEM commands and/or implementations and carry on.

Really, none of the 'solutions' are ideal, but we are trying to make 
trade-offs here that allow individual contributing organizations freedom 
to implement OEM commands as they wish without any one organization 
being a gatekeeper.

--Vernon

  parent reply	other threads:[~2021-09-09 20:16 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-02 10:34 Chris Chen (TPI)
2021-09-06  9:40 ` 回覆: " Chris Chen (TPI)
2021-09-06 10:03   ` Troy Lee
2021-09-07  0:25     ` 回覆: " Chris Chen (TPI)
2021-09-06 10:15   ` Andrei Kartashev
2021-09-07  0:35     ` 回覆: " Chris Chen (TPI)
2021-09-07  9:52       ` Chris Chen (TPI)
2021-09-07 11:45         ` Chris Chen (TPI)
2021-09-09 20:15   ` Vernon Mauery [this message]
2021-09-11  3:56     ` Chris Chen (TPI)
2021-09-15  2:35       ` Vernon Mauery
2021-09-17  0:13         ` Chris Chen (TPI)

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=20210909201516.GA6614@mauery.jf.intel.com \
    --to=vernon.mauery@linux.intel.com \
    --cc=Chris.Chen3@flex.com \
    --cc=openbmc@lists.ozlabs.org \
    --subject='Re: 回覆: [phosphor-host-ipmid] Questions about IPMI (OEM) command development' \
    /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

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