All of lore.kernel.org
 help / color / mirror / Atom feed
* Multi-host support in ipmbbridged and phosphor-host-ipmid
@ 2020-07-03 17:22 Velumani T-ERS,HCLTech
  2020-07-06 20:14 ` Andrew Geissler
  2020-07-06 21:19 ` Vernon Mauery
  0 siblings, 2 replies; 6+ messages in thread
From: Velumani T-ERS,HCLTech @ 2020-07-03 17:22 UTC (permalink / raw)
  To: openbmc
  Cc: Kumar Thangavel, Sai Dasari, Vijay Khemka, Patrick Williams,
	Vernon Mauery, Tom Joseph, Adriana Kobylak, Deepak Kodihalli,
	Ratan Gupta, Ed Tanous, Vernon Mauery, Dawid Frycki


[-- Attachment #1.1: Type: text/plain, Size: 1420 bytes --]

Hi All,

We have a multi-host system and wanted to add support in openbmc to handle all ipmi commands. We have come up with the design approach that could help us in handling ipmi command with multihost system. Please find the attached design proposal and provide feedback/suggestions.

Regards,
Velu

::DISCLAIMER::
________________________________
The contents of this e-mail and any attachment(s) are confidential and intended for the named recipient(s) only. E-mail transmission is not guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or may contain viruses in transmission. The e mail and its contents (with or without referred errors) shall therefore not attach any liability on the originator or HCL or its affiliates. Views or opinions, if any, presented in this email are solely those of the author and may not necessarily reflect the views or opinions of HCL or its affiliates. Any form of reproduction, dissemination, copying, disclosure, modification, distribution and / or publication of this message without the prior written consent of authorized representative of HCL is strictly prohibited. If you have received this email in error please delete it and notify the sender immediately. Before opening any email and/or attachments, please check them for viruses and other defects.
________________________________

[-- Attachment #1.2: Type: text/html, Size: 3314 bytes --]

[-- Attachment #2: multi-host-inband-ipmi-design-v1-0.txt --]
[-- Type: text/plain, Size: 4963 bytes --]



# Multi-host IPMI design
------------------------

Authors:
  Velumani T, [velumanit@hcl](mailto:velumanit@hcl.com)
  Kumar T, [thangavel.k@hcl.com](mailto:thangavel.k@hcl.com)

Primary assignee:
  
Other contributors:

Created:
  2020-06-26

1. Issue Descriptionption:
--------------------
The current version of openbmc does not support multi-host implementation in ipmi 
commands handling. We have a multi-host system and proposing the design to 
support multi-host.

As detailed below the hosts are connected in the ipmb interface, all host 
related communication is based on ipmb. The openbmc uses ipmbbridged to manage 
ipmb busses and the ipmb messages are routed to ipmid.

Issue 1: ipmbridged does not support more than 2 channels
Issue 2: ipmid does not have the information on which ipmb channel the request 
has come from. The ipmid handlers should have the host details to fetch the 
host specific responses.

2. IPMI and IPMB System architecture:
--------------------------------------
       +-----------+       +------------+      +--------+
       |           |       |            | ipmb1|        |
       |           |       |            |------| Host-1 |
       |           |       |            |      |        |
       |           |       |            |      +--------+
       |           |       |            |
       |           |       |            |                   
       |           | dbus  |            |      +--------+   
       | ipmid     |-------| Ipmbbridged| ipmb2|        |   
       |           |       |            |------| Host-2 |   
       |           |       |            |      |        |   
       |           |       |            |      +--------+   
       |           |       |            |
       |           |       |            |                   
       |           |       |            |      +--------+   
       |           |       |            | ipmb |        |   
       |           |       |            |------| Host-N |   
       |           |       |            |      |        |   
       +-----------+       +------------+      +--------+   
	   
Hosts are connected with ipmb interface, the hosts can be 1 to N. The ipmb 
request coming from the hosts are routed to ipmid by the ipmbbridged.
The ipmd requests are routed from ipmid or any service by d-bus interface and
the ipmbbridged routes to ipmb interface.

3. Proposed Design:
--------------------
To address issue1 and issue2, we propose the following design changes in 
ipmbbridged and ipmid.

3.1 Changes in ipmbbridged:
---------------------------
The current ipmbbridged supports only 2 channels and this needs to be 
enhanced to more channels.
ipmbbridged to send the channel details from where the request is received

3.1.1 Change1 : support more than 2 channels
---------------------------------------------
To support more than 2 channels, we propose to add additional channels named 
"host1", "host2" ..."hostn"

This can be decided by the config file "ipmb-channels.json", The change will 
look like below

{
  "channels": [
    {
      "type": "me",
      "slave-path": "/dev/ipmb-1",
      "bmc-addr": 32,
      "remote-addr": 44
    },
    {
      "type": "ipmb",
      "slave-path": "/dev/ipmb-2",
      "bmc-addr": 32,
      "remote-addr": 96
    }
	{
      "type": "host1",
      "slave-path": "/dev/ipmb-3",
      "bmc-addr": 32,
      "remote-addr": 64
    }
	{
      "type": "host2",
      "slave-path": "/dev/ipmb-4",
      "bmc-addr": 32,
      "remote-addr": 64
    }
	{
      "type": "host3",
      "slave-path": "/dev/ipmb-4",
      "bmc-addr": 32,
      "remote-addr": 64
    }
  ]
}

Reading the json file ipmbbridged to support host channels optionally.

3.1.2. Change 2: Sending Host detail as addional parameter
-----------------------------------------------------------
While routing the ipmb requests coming from the host channel, the ipmbbridged 
adds the ipmb bus details configured in the json file key "type". 
In the above example the ipmb request coming from "/dev/ipmb-4" the ipmb will 
send "host2" as optional parameter in the d-bus interface to ipmid.

3.2 Changes in ipmid:
---------------------
Receive the optional parameter sent by the ipmbbriged as host details, while 
receiving the parameter in the executionEntry method call the same will be 
passed to the command handlers in both common and oem handlers.
The command handlers can make use of the host information to fetch host 
specific data.

For example, host1 send a request to get boot order from bmc, bmc maintains 
data separately for each host. When this command comes to ipmid the commands 
handler gets the host in which the command received. The handler will fetch
host1 boot order details and respond from the command handler. This is 
applicable for both common and oem handlers.






^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Multi-host support in ipmbbridged and phosphor-host-ipmid
  2020-07-03 17:22 Multi-host support in ipmbbridged and phosphor-host-ipmid Velumani T-ERS,HCLTech
@ 2020-07-06 20:14 ` Andrew Geissler
  2020-07-08 11:03   ` Velumani T-ERS,HCLTech
  2020-07-06 21:19 ` Vernon Mauery
  1 sibling, 1 reply; 6+ messages in thread
From: Andrew Geissler @ 2020-07-06 20:14 UTC (permalink / raw)
  To: Velumani T-ERS,HCLTech
  Cc: openbmc, Dawid Frycki, Ed Tanous, Vernon Mauery, Adriana Kobylak,
	Patrick Williams, Kumar Thangavel, Vijay Khemka, Ratan Gupta



> On Jul 3, 2020, at 12:22 PM, Velumani T-ERS,HCLTech <velumanit@hcl.com> wrote:
> 
> Hi All,
>  
> We have a multi-host system and wanted to add support in openbmc to handle all ipmi commands. We have come up with the design approach that could help us in handling ipmi command with multihost system. Please find the attached design proposal and provide feedback/suggestions. 

Hi Velu,

Any reason we can’t just use the design template (https://github.com/openbmc/docs/blob/master/designs/design-template.md) and submit this up to gerrit? I tend to try and avoid opening any email attachments now a days.

Andrew

> Regards,
> Velu

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Multi-host support in ipmbbridged and phosphor-host-ipmid
  2020-07-03 17:22 Multi-host support in ipmbbridged and phosphor-host-ipmid Velumani T-ERS,HCLTech
  2020-07-06 20:14 ` Andrew Geissler
@ 2020-07-06 21:19 ` Vernon Mauery
  2020-07-08 11:20   ` Velumani T-ERS,HCLTech
  1 sibling, 1 reply; 6+ messages in thread
From: Vernon Mauery @ 2020-07-06 21:19 UTC (permalink / raw)
  To: Velumani T-ERS,HCLTech
  Cc: openbmc, Dawid Frycki, Ed Tanous, Adriana Kobylak,
	Patrick Williams, Kumar Thangavel, Vijay Khemka, Ratan Gupta

On 03-Jul-2020 05:22 PM, Velumani T-ERS,HCLTech wrote:
>Hi All,
>
>We have a multi-host system and wanted to add support in openbmc to handle all ipmi commands. We have come up with the design approach that could help us in handling ipmi command with multihost system. Please find the attached design proposal and provide feedback/suggestions.
>
>Regards,
>Velu
>
>::DISCLAIMER::
>________________________________
>The contents of this e-mail and any attachment(s) are confidential and intended for the named recipient(s) only. E-mail transmission is not guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or may contain viruses in transmission. The e mail and its contents (with or without referred errors) shall therefore not attach any liability on the originator or HCL or its affiliates. Views or opinions, if any, presented in this email are solely those of the author and may not necessarily reflect the views or opinions of HCL or its affiliates. Any form of reproduction, dissemination, copying, disclosure, modification, distribution and / or publication of this message without the prior written consent of authorized representative of HCL is strictly prohibited. If you have received this email in error please delete it and notify the sender immediately. Before opening any email and/or attachments, please check them for viruses and other defects.
>________________________________

>
>
># Multi-host IPMI design
>------------------------
>
>Authors:
>  Velumani T, [velumanit@hcl](mailto:velumanit@hcl.com)
>  Kumar T, [thangavel.k@hcl.com](mailto:thangavel.k@hcl.com)
>
>Primary assignee:
>
>Other contributors:
>
>Created:
>  2020-06-26
>
>1. Issue Descriptionption:
>--------------------
>The current version of openbmc does not support multi-host implementation in ipmi
>commands handling. We have a multi-host system and proposing the design to
>support multi-host.
>
>As detailed below the hosts are connected in the ipmb interface, all host
>related communication is based on ipmb. The openbmc uses ipmbbridged to manage
>ipmb busses and the ipmb messages are routed to ipmid.
>
>Issue 1: ipmbridged does not support more than 2 channels

ipmbbridged should support as many channels as are specified in the 
configuration file. A change like this would go in your bbappend in your 
platform layer.

>Issue 2: ipmid does not have the information on which ipmb channel the request
>has come from. The ipmid handlers should have the host details to fetch the
>host specific responses.

It has enough information to map it to an IPMI channel and to send it 
back to the requester.

>2. IPMI and IPMB System architecture:
>--------------------------------------
>       +-----------+       +------------+      +--------+
>       |           |       |            | ipmb1|        |
>       |           |       |            |------| Host-1 |
>       |           |       |            |      |        |
>       |           |       |            |      +--------+
>       |           |       |            |
>       |           |       |            |
>       |           | dbus  |            |      +--------+
>       | ipmid     |-------| Ipmbbridged| ipmb2|        |
>       |           |       |            |------| Host-2 |
>       |           |       |            |      |        |
>       |           |       |            |      +--------+
>       |           |       |            |
>       |           |       |            |
>       |           |       |            |      +--------+
>       |           |       |            | ipmb |        |
>       |           |       |            |------| Host-N |
>       |           |       |            |      |        |
>       +-----------+       +------------+      +--------+
>	
>Hosts are connected with ipmb interface, the hosts can be 1 to N. The ipmb
>request coming from the hosts are routed to ipmid by the ipmbbridged.
>The ipmd requests are routed from ipmid or any service by d-bus interface and
>the ipmbbridged routes to ipmb interface.
>
>3. Proposed Design:
>--------------------
>To address issue1 and issue2, we propose the following design changes in
>ipmbbridged and ipmid.
>
>3.1 Changes in ipmbbridged:
>---------------------------
>The current ipmbbridged supports only 2 channels and this needs to be
>enhanced to more channels.
>ipmbbridged to send the channel details from where the request is received
>
>3.1.1 Change1 : support more than 2 channels
>---------------------------------------------
>To support more than 2 channels, we propose to add additional channels named
>"host1", "host2" ..."hostn"
>
>This can be decided by the config file "ipmb-channels.json", The change will
>look like below
>
>{
>  "channels": [
>    {
>      "type": "me",
>      "slave-path": "/dev/ipmb-1",
>      "bmc-addr": 32,
>      "remote-addr": 44
>    },
>    {
>      "type": "ipmb",
>      "slave-path": "/dev/ipmb-2",
>      "bmc-addr": 32,
>      "remote-addr": 96
>    }
>	{
>      "type": "host1",

I don't understand why you need to have a new type here. Each of these 
channels are IPMB channels (according to the IPMI specification) 

You do need somewhere to mark the ID of the host, but I feel that would 
be better suited as a new entry
       "host": 1,

>      "slave-path": "/dev/ipmb-3",
>      "bmc-addr": 32,
>      "remote-addr": 64
>    }
>	{
>      "type": "host2",
>      "slave-path": "/dev/ipmb-4",
>      "bmc-addr": 32,
>      "remote-addr": 64
>    }
>	{
>      "type": "host3",
>      "slave-path": "/dev/ipmb-4",
>      "bmc-addr": 32,
>      "remote-addr": 64
>    }
>  ]
>}
>
>Reading the json file ipmbbridged to support host channels optionally.
>
>3.1.2. Change 2: Sending Host detail as addional parameter
>-----------------------------------------------------------
>While routing the ipmb requests coming from the host channel, the ipmbbridged
>adds the ipmb bus details configured in the json file key "type".
>In the above example the ipmb request coming from "/dev/ipmb-4" the ipmb will
>send "host2" as optional parameter in the d-bus interface to ipmid.

Better would be a host:2 entry

>3.2 Changes in ipmid:
>---------------------
>Receive the optional parameter sent by the ipmbbriged as host details, while
>receiving the parameter in the executionEntry method call the same will be
>passed to the command handlers in both common and oem handlers.
>The command handlers can make use of the host information to fetch host
>specific data.

I would suggest that this is a new item in the ipmi::Context class. It 
should default to 0 (first host), and can be set by by a bridge 
(ipmbbridged, kcsbridged, etc.).

>For example, host1 send a request to get boot order from bmc, bmc maintains
>data separately for each host. When this command comes to ipmid the commands
>handler gets the host in which the command received. The handler will fetch
>host1 boot order details and respond from the command handler. This is
>applicable for both common and oem handlers.

It would be up to the handler to behave correctly by checking the 
ipmi::Context.

--Vernon

^ permalink raw reply	[flat|nested] 6+ messages in thread

* RE: Multi-host support in ipmbbridged and phosphor-host-ipmid
  2020-07-06 20:14 ` Andrew Geissler
@ 2020-07-08 11:03   ` Velumani T-ERS,HCLTech
  0 siblings, 0 replies; 6+ messages in thread
From: Velumani T-ERS,HCLTech @ 2020-07-08 11:03 UTC (permalink / raw)
  To: Andrew Geissler
  Cc: openbmc, Dawid Frycki, Ed Tanous, Vernon Mauery, Adriana Kobylak,
	Patrick Williams, Kumar Thangavel, Vijay Khemka, Ratan Gupta

Hi Andrew,

Thanks for your comment. I have moved the design document to gerrit. Please find the gerrit link

https://gerrit.openbmc-project.xyz/c/openbmc/docs/+/34464

Regards,
Velu


-----Original Message-----
From: Andrew Geissler <geissonator@gmail.com>
Sent: Tuesday, July 7, 2020 1:44 AM
To: Velumani T-ERS,HCLTech <velumanit@hcl.com>
Cc: openbmc@lists.ozlabs.org; Dawid Frycki <dawid.frycki@intel.com>; Ed Tanous <ed.tanous@intel.com>; Vernon Mauery <vernon.mauery@linux.intel.com>; Adriana Kobylak <anoo@us.ibm.com>; Patrick Williams <patrickw3@fb.com>; Kumar Thangavel <thangavel.k@hcl.com>; Vijay Khemka <vijaykhemka@fb.com>; Ratan Gupta <ratagupt@linux.vnet.ibm.com>
Subject: Re: Multi-host support in ipmbbridged and phosphor-host-ipmid

[CAUTION: This Email is from outside the Organization. Unless you trust the sender, Don’t click links or open attachments as it may be a Phishing email, which can steal your Information and compromise your Computer.]

> On Jul 3, 2020, at 12:22 PM, Velumani T-ERS,HCLTech <velumanit@hcl.com> wrote:
>
> Hi All,
>
> We have a multi-host system and wanted to add support in openbmc to handle all ipmi commands. We have come up with the design approach that could help us in handling ipmi command with multihost system. Please find the attached design proposal and provide feedback/suggestions.

Hi Velu,

Any reason we can’t just use the design template (https://apc01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fopenbmc%2Fdocs%2Fblob%2Fmaster%2Fdesigns%2Fdesign-template.md&amp;data=02%7C01%7Cvelumanit%40hcl.com%7C9caff59ec515430ee09908d821e92a5c%7C189de737c93a4f5a8b686f4ca9941912%7C0%7C0%7C637296632627476431&amp;sdata=4CG6pZl1orcOTkmwHkwMiOjDyTs3GkGtdZ1BMvXA%2FSc%3D&amp;reserved=0) and submit this up to gerrit? I tend to try and avoid opening any email attachments now a days.

Andrew

> Regards,
> Velu

::DISCLAIMER::
________________________________
The contents of this e-mail and any attachment(s) are confidential and intended for the named recipient(s) only. E-mail transmission is not guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or may contain viruses in transmission. The e mail and its contents (with or without referred errors) shall therefore not attach any liability on the originator or HCL or its affiliates. Views or opinions, if any, presented in this email are solely those of the author and may not necessarily reflect the views or opinions of HCL or its affiliates. Any form of reproduction, dissemination, copying, disclosure, modification, distribution and / or publication of this message without the prior written consent of authorized representative of HCL is strictly prohibited. If you have received this email in error please delete it and notify the sender immediately. Before opening any email and/or attachments, please check them for viruses and other defects.
________________________________

^ permalink raw reply	[flat|nested] 6+ messages in thread

* RE: Multi-host support in ipmbbridged and phosphor-host-ipmid
  2020-07-06 21:19 ` Vernon Mauery
@ 2020-07-08 11:20   ` Velumani T-ERS,HCLTech
  2020-07-13 16:54     ` Velumani T-ERS,HCLTech
  0 siblings, 1 reply; 6+ messages in thread
From: Velumani T-ERS,HCLTech @ 2020-07-08 11:20 UTC (permalink / raw)
  To: Vernon Mauery
  Cc: openbmc, Dawid Frycki, Ed Tanous, Adriana Kobylak,
	Patrick Williams, Kumar Thangavel, Vijay Khemka, Ratan Gupta

Hi Vernon,

Thanks for your comments. Please find my response inline. As suggested by Andrew I have moved the design doc to gerrit. We will use the same going forward. Kindly provide your comments in gerrit.

Gerrit link: https://gerrit.openbmc-project.xyz/c/openbmc/docs/+/34464

Regards,
Velu

-----Original Message-----
From: Vernon Mauery <vernon.mauery@linux.intel.com> 
Sent: Tuesday, July 7, 2020 2:50 AM
To: Velumani T-ERS,HCLTech <velumanit@hcl.com>
Cc: openbmc@lists.ozlabs.org; Dawid Frycki <dawid.frycki@intel.com>; Ed Tanous <ed.tanous@intel.com>; Adriana Kobylak <anoo@us.ibm.com>; Patrick Williams <patrickw3@fb.com>; Kumar Thangavel <thangavel.k@hcl.com>; Vijay Khemka <vijaykhemka@fb.com>; Ratan Gupta <ratagupt@linux.vnet.ibm.com>
Subject: Re: Multi-host support in ipmbbridged and phosphor-host-ipmid

[CAUTION: This Email is from outside the Organization. Unless you trust the sender, Don’t click links or open attachments as it may be a Phishing email, which can steal your Information and compromise your Computer.]

On 03-Jul-2020 05:22 PM, Velumani T-ERS,HCLTech wrote:
>Hi All,
>
>We have a multi-host system and wanted to add support in openbmc to handle all ipmi commands. We have come up with the design approach that could help us in handling ipmi command with multihost system. Please find the attached design proposal and provide feedback/suggestions.
>
>Regards,
>Velu
>
>::DISCLAIMER::
>________________________________
>The contents of this e-mail and any attachment(s) are confidential and intended for the named recipient(s) only. E-mail transmission is not guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or may contain viruses in transmission. The e mail and its contents (with or without referred errors) shall therefore not attach any liability on the originator or HCL or its affiliates. Views or opinions, if any, presented in this email are solely those of the author and may not necessarily reflect the views or opinions of HCL or its affiliates. Any form of reproduction, dissemination, copying, disclosure, modification, distribution and / or publication of this message without the prior written consent of authorized representative of HCL is strictly prohibited. If you have received this email in error please delete it and notify the sender immediately. Before opening any email and/or attachments, please check them for viruses and other defects.
>________________________________

>
>
># Multi-host IPMI design
>------------------------
>
>Authors:
>  Velumani T, [velumanit@hcl](mailto:velumanit@hcl.com)
>  Kumar T, [thangavel.k@hcl.com](mailto:thangavel.k@hcl.com)
>
>Primary assignee:
>
>Other contributors:
>
>Created:
>  2020-06-26
>
>1. Issue Descriptionption:
>--------------------
>The current version of openbmc does not support multi-host 
>implementation in ipmi commands handling. We have a multi-host system 
>and proposing the design to support multi-host.
>
>As detailed below the hosts are connected in the ipmb interface, all 
>host related communication is based on ipmb. The openbmc uses 
>ipmbbridged to manage ipmb busses and the ipmb messages are routed to ipmid.
>
>Issue 1: ipmbridged does not support more than 2 channels

ipmbbridged should support as many channels as are specified in the configuration file. A change like this would go in your bbappend in your platform layer.

[Velu] Yes. We will use the config file for adding the more channel. Currently this is not working and debugging the same. But we have updated the design document with your comments.

>Issue 2: ipmid does not have the information on which ipmb channel the 
>request has come from. The ipmid handlers should have the host details 
>to fetch the host specific responses.

It has enough information to map it to an IPMI channel and to send it back to the requester.
[Velu] Yes, we plan to use the parameter "options"


>2. IPMI and IPMB System architecture:
>--------------------------------------
>       +-----------+       +------------+      +--------+
>       |           |       |            | ipmb1|        |
>       |           |       |            |------| Host-1 |
>       |           |       |            |      |        |
>       |           |       |            |      +--------+
>       |           |       |            |
>       |           |       |            |
>       |           | dbus  |            |      +--------+
>       | ipmid     |-------| Ipmbbridged| ipmb2|        |
>       |           |       |            |------| Host-2 |
>       |           |       |            |      |        |
>       |           |       |            |      +--------+
>       |           |       |            |
>       |           |       |            |
>       |           |       |            |      +--------+
>       |           |       |            | ipmb |        |
>       |           |       |            |------| Host-N |
>       |           |       |            |      |        |
>       +-----------+       +------------+      +--------+
>
>Hosts are connected with ipmb interface, the hosts can be 1 to N. The 
>ipmb request coming from the hosts are routed to ipmid by the ipmbbridged.
>The ipmd requests are routed from ipmid or any service by d-bus 
>interface and the ipmbbridged routes to ipmb interface.
>
>3. Proposed Design:
>--------------------
>To address issue1 and issue2, we propose the following design changes 
>in ipmbbridged and ipmid.
>
>3.1 Changes in ipmbbridged:
>---------------------------
>The current ipmbbridged supports only 2 channels and this needs to be 
>enhanced to more channels.
>ipmbbridged to send the channel details from where the request is 
>received
>
>3.1.1 Change1 : support more than 2 channels
>---------------------------------------------
>To support more than 2 channels, we propose to add additional channels 
>named "host1", "host2" ..."hostn"
>
>This can be decided by the config file "ipmb-channels.json", The change 
>will look like below
>
>{
>  "channels": [
>    {
>      "type": "me",
>      "slave-path": "/dev/ipmb-1",
>      "bmc-addr": 32,
>      "remote-addr": 44
>    },
>    {
>      "type": "ipmb",
>      "slave-path": "/dev/ipmb-2",
>      "bmc-addr": 32,
>      "remote-addr": 96
>    }
>       {
>      "type": "host1",

I don't understand why you need to have a new type here. Each of these channels are IPMB channels (according to the IPMI specification)

You do need somewhere to mark the ID of the host, but I feel that would be better suited as a new entry
       "host": 1,
[Velu] Agreed, we will use a new entry as suggested. Updated the design document.

>      "slave-path": "/dev/ipmb-3",
>      "bmc-addr": 32,
>      "remote-addr": 64
>    }
>       {
>      "type": "host2",
>      "slave-path": "/dev/ipmb-4",
>      "bmc-addr": 32,
>      "remote-addr": 64
>    }
>       {
>      "type": "host3",
>      "slave-path": "/dev/ipmb-4",
>      "bmc-addr": 32,
>      "remote-addr": 64
>    }
>  ]
>}
>
>Reading the json file ipmbbridged to support host channels optionally.
>
>3.1.2. Change 2: Sending Host detail as addional parameter
>-----------------------------------------------------------
>While routing the ipmb requests coming from the host channel, the 
>ipmbbridged adds the ipmb bus details configured in the json file key "type".
>In the above example the ipmb request coming from "/dev/ipmb-4" the 
>ipmb will send "host2" as optional parameter in the d-bus interface to ipmid.

Better would be a host:2 entry

>3.2 Changes in ipmid:
>---------------------
>Receive the optional parameter sent by the ipmbbriged as host details, 
>while receiving the parameter in the executionEntry method call the 
>same will be passed to the command handlers in both common and oem handlers.
>The command handlers can make use of the host information to fetch host 
>specific data.

I would suggest that this is a new item in the ipmi::Context class. It should default to 0 (first host), and can be set by by a bridge (ipmbbridged, kcsbridged, etc.).

[Velu] OK. We will use ipmi::Context class.

>For example, host1 send a request to get boot order from bmc, bmc 
>maintains data separately for each host. When this command comes to 
>ipmid the commands handler gets the host in which the command received. 
>The handler will fetch
>host1 boot order details and respond from the command handler. This is 
>applicable for both common and oem handlers.

It would be up to the handler to behave correctly by checking the ipmi::Context.
[Velu] OK.
--Vernon

^ permalink raw reply	[flat|nested] 6+ messages in thread

* RE: Multi-host support in ipmbbridged and phosphor-host-ipmid
  2020-07-08 11:20   ` Velumani T-ERS,HCLTech
@ 2020-07-13 16:54     ` Velumani T-ERS,HCLTech
  0 siblings, 0 replies; 6+ messages in thread
From: Velumani T-ERS,HCLTech @ 2020-07-13 16:54 UTC (permalink / raw)
  To: openbmc, Vernon Mauery
  Cc: Dawid Frycki, Ed Tanous, Adriana Kobylak, Patrick Williams,
	Kumar Thangavel, Vijay Khemka, Ratan Gupta

Hi Vernon,

Regarding  Issue 1: ipmbridged does not work for more than 2 channels , We have updated the changes to work for more than 2 channels. Please find the code in below path
https://gerrit.openbmc-project.xyz/c/openbmc/ipmbbridge/+/34579

You can check the recipe ipmb-channels.json changes in the path below
https://gerrit.openbmc-project.xyz/c/openbmc/meta-facebook/+/34581

Also we have uploaded the multi-host design document in gerrit in the path below. Please provide your comments if any.
https://gerrit.openbmc-project.xyz/c/openbmc/docs/+/34464

Regards,
Velu

-----Original Message-----
From: Velumani T-ERS,HCLTech 
Sent: Wednesday, July 8, 2020 4:51 PM
To: Vernon Mauery <vernon.mauery@linux.intel.com>
Cc: openbmc@lists.ozlabs.org; Dawid Frycki <dawid.frycki@intel.com>; Ed Tanous <ed.tanous@intel.com>; Adriana Kobylak <anoo@us.ibm.com>; Patrick Williams <patrickw3@fb.com>; Kumar Thangavel <thangavel.k@hcl.com>; Vijay Khemka <vijaykhemka@fb.com>; Ratan Gupta <ratagupt@linux.vnet.ibm.com>
Subject: RE: Multi-host support in ipmbbridged and phosphor-host-ipmid

Hi Vernon,

Thanks for your comments. Please find my response inline. As suggested by Andrew I have moved the design doc to gerrit. We will use the same going forward. Kindly provide your comments in gerrit.

Gerrit link: https://gerrit.openbmc-project.xyz/c/openbmc/docs/+/34464

Regards,
Velu

-----Original Message-----
From: Vernon Mauery <vernon.mauery@linux.intel.com>
Sent: Tuesday, July 7, 2020 2:50 AM
To: Velumani T-ERS,HCLTech <velumanit@hcl.com>
Cc: openbmc@lists.ozlabs.org; Dawid Frycki <dawid.frycki@intel.com>; Ed Tanous <ed.tanous@intel.com>; Adriana Kobylak <anoo@us.ibm.com>; Patrick Williams <patrickw3@fb.com>; Kumar Thangavel <thangavel.k@hcl.com>; Vijay Khemka <vijaykhemka@fb.com>; Ratan Gupta <ratagupt@linux.vnet.ibm.com>
Subject: Re: Multi-host support in ipmbbridged and phosphor-host-ipmid

[CAUTION: This Email is from outside the Organization. Unless you trust the sender, Don’t click links or open attachments as it may be a Phishing email, which can steal your Information and compromise your Computer.]

On 03-Jul-2020 05:22 PM, Velumani T-ERS,HCLTech wrote:
>Hi All,
>
>We have a multi-host system and wanted to add support in openbmc to handle all ipmi commands. We have come up with the design approach that could help us in handling ipmi command with multihost system. Please find the attached design proposal and provide feedback/suggestions.
>
>Regards,
>Velu
>
>::DISCLAIMER::
>________________________________
>The contents of this e-mail and any attachment(s) are confidential and intended for the named recipient(s) only. E-mail transmission is not guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or may contain viruses in transmission. The e mail and its contents (with or without referred errors) shall therefore not attach any liability on the originator or HCL or its affiliates. Views or opinions, if any, presented in this email are solely those of the author and may not necessarily reflect the views or opinions of HCL or its affiliates. Any form of reproduction, dissemination, copying, disclosure, modification, distribution and / or publication of this message without the prior written consent of authorized representative of HCL is strictly prohibited. If you have received this email in error please delete it and notify the sender immediately. Before opening any email and/or attachments, please check them for viruses and other defects.
>________________________________

>
>
># Multi-host IPMI design
>------------------------
>
>Authors:
>  Velumani T, [velumanit@hcl](mailto:velumanit@hcl.com)
>  Kumar T, [thangavel.k@hcl.com](mailto:thangavel.k@hcl.com)
>
>Primary assignee:
>
>Other contributors:
>
>Created:
>  2020-06-26
>
>1. Issue Descriptionption:
>--------------------
>The current version of openbmc does not support multi-host 
>implementation in ipmi commands handling. We have a multi-host system 
>and proposing the design to support multi-host.
>
>As detailed below the hosts are connected in the ipmb interface, all 
>host related communication is based on ipmb. The openbmc uses 
>ipmbbridged to manage ipmb busses and the ipmb messages are routed to ipmid.
>
>Issue 1: ipmbridged does not support more than 2 channels

ipmbbridged should support as many channels as are specified in the configuration file. A change like this would go in your bbappend in your platform layer.

[Velu] Yes. We will use the config file for adding the more channel. Currently this is not working and debugging the same. But we have updated the design document with your comments.

>Issue 2: ipmid does not have the information on which ipmb channel the 
>request has come from. The ipmid handlers should have the host details 
>to fetch the host specific responses.

It has enough information to map it to an IPMI channel and to send it back to the requester.
[Velu] Yes, we plan to use the parameter "options"


>2. IPMI and IPMB System architecture:
>--------------------------------------
>       +-----------+       +------------+      +--------+
>       |           |       |            | ipmb1|        |
>       |           |       |            |------| Host-1 |
>       |           |       |            |      |        |
>       |           |       |            |      +--------+
>       |           |       |            |
>       |           |       |            |
>       |           | dbus  |            |      +--------+
>       | ipmid     |-------| Ipmbbridged| ipmb2|        |
>       |           |       |            |------| Host-2 |
>       |           |       |            |      |        |
>       |           |       |            |      +--------+
>       |           |       |            |
>       |           |       |            |
>       |           |       |            |      +--------+
>       |           |       |            | ipmb |        |
>       |           |       |            |------| Host-N |
>       |           |       |            |      |        |
>       +-----------+       +------------+      +--------+
>
>Hosts are connected with ipmb interface, the hosts can be 1 to N. The 
>ipmb request coming from the hosts are routed to ipmid by the ipmbbridged.
>The ipmd requests are routed from ipmid or any service by d-bus 
>interface and the ipmbbridged routes to ipmb interface.
>
>3. Proposed Design:
>--------------------
>To address issue1 and issue2, we propose the following design changes 
>in ipmbbridged and ipmid.
>
>3.1 Changes in ipmbbridged:
>---------------------------
>The current ipmbbridged supports only 2 channels and this needs to be 
>enhanced to more channels.
>ipmbbridged to send the channel details from where the request is 
>received
>
>3.1.1 Change1 : support more than 2 channels
>---------------------------------------------
>To support more than 2 channels, we propose to add additional channels 
>named "host1", "host2" ..."hostn"
>
>This can be decided by the config file "ipmb-channels.json", The change 
>will look like below
>
>{
>  "channels": [
>    {
>      "type": "me",
>      "slave-path": "/dev/ipmb-1",
>      "bmc-addr": 32,
>      "remote-addr": 44
>    },
>    {
>      "type": "ipmb",
>      "slave-path": "/dev/ipmb-2",
>      "bmc-addr": 32,
>      "remote-addr": 96
>    }
>       {
>      "type": "host1",

I don't understand why you need to have a new type here. Each of these channels are IPMB channels (according to the IPMI specification)

You do need somewhere to mark the ID of the host, but I feel that would be better suited as a new entry
       "host": 1,
[Velu] Agreed, we will use a new entry as suggested. Updated the design document.

>      "slave-path": "/dev/ipmb-3",
>      "bmc-addr": 32,
>      "remote-addr": 64
>    }
>       {
>      "type": "host2",
>      "slave-path": "/dev/ipmb-4",
>      "bmc-addr": 32,
>      "remote-addr": 64
>    }
>       {
>      "type": "host3",
>      "slave-path": "/dev/ipmb-4",
>      "bmc-addr": 32,
>      "remote-addr": 64
>    }
>  ]
>}
>
>Reading the json file ipmbbridged to support host channels optionally.
>
>3.1.2. Change 2: Sending Host detail as addional parameter
>-----------------------------------------------------------
>While routing the ipmb requests coming from the host channel, the 
>ipmbbridged adds the ipmb bus details configured in the json file key "type".
>In the above example the ipmb request coming from "/dev/ipmb-4" the 
>ipmb will send "host2" as optional parameter in the d-bus interface to ipmid.

Better would be a host:2 entry

>3.2 Changes in ipmid:
>---------------------
>Receive the optional parameter sent by the ipmbbriged as host details, 
>while receiving the parameter in the executionEntry method call the 
>same will be passed to the command handlers in both common and oem handlers.
>The command handlers can make use of the host information to fetch host 
>specific data.

I would suggest that this is a new item in the ipmi::Context class. It should default to 0 (first host), and can be set by by a bridge (ipmbbridged, kcsbridged, etc.).

[Velu] OK. We will use ipmi::Context class.

>For example, host1 send a request to get boot order from bmc, bmc 
>maintains data separately for each host. When this command comes to 
>ipmid the commands handler gets the host in which the command received.
>The handler will fetch
>host1 boot order details and respond from the command handler. This is 
>applicable for both common and oem handlers.

It would be up to the handler to behave correctly by checking the ipmi::Context.
[Velu] OK.
--Vernon

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2020-07-13 16:54 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-03 17:22 Multi-host support in ipmbbridged and phosphor-host-ipmid Velumani T-ERS,HCLTech
2020-07-06 20:14 ` Andrew Geissler
2020-07-08 11:03   ` Velumani T-ERS,HCLTech
2020-07-06 21:19 ` Vernon Mauery
2020-07-08 11:20   ` Velumani T-ERS,HCLTech
2020-07-13 16:54     ` Velumani T-ERS,HCLTech

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.