All of lore.kernel.org
 help / color / mirror / Atom feed
* FRU Device type one byte or Two byte Validation
@ 2021-11-24  9:18 Kumar Thangavel
  2021-11-24 20:40 ` Ed Tanous
  2021-12-17 13:15 ` Patrick Williams
  0 siblings, 2 replies; 6+ messages in thread
From: Kumar Thangavel @ 2021-11-24  9:18 UTC (permalink / raw)
  To: OpenBMC Maillist
  Cc: Jae Hyun Yoo, vernon.mauery, Ed Tanous, Amithash Prasad, velumanit

[-- Attachment #1: Type: text/plain, Size: 587 bytes --]

Hi All,

       We would like to validate our NIC FRU device type as 8 bit (one
byte) or 16 bit(two byte).

       This device type validation for our FRU is platform specific logic.
This was implemented in the machine layer.

       We wanted to interlink this logic with entity-manager code to get
the device type.

       Could you please provide the suggestions on get the device type in
entity-manager.

       Please refer below link for existing devicebit validation in
entity-manager.

https://github.com/openbmc/entity-manager/blob/master/src/FruDevice.cpp#L430

Thanks,
Kumar.

[-- Attachment #2: Type: text/html, Size: 906 bytes --]

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

* Re: FRU Device type one byte or Two byte Validation
  2021-11-24  9:18 FRU Device type one byte or Two byte Validation Kumar Thangavel
@ 2021-11-24 20:40 ` Ed Tanous
  2021-11-25  9:08   ` Kumar Thangavel
  2021-12-17 13:15 ` Patrick Williams
  1 sibling, 1 reply; 6+ messages in thread
From: Ed Tanous @ 2021-11-24 20:40 UTC (permalink / raw)
  To: Kumar Thangavel
  Cc: Jae Hyun Yoo, vernon.mauery, OpenBMC Maillist, Ed Tanous,
	Amithash Prasad, velumanit

On Wed, Nov 24, 2021 at 1:17 AM Kumar Thangavel
<kumarthangavel.hcl@gmail.com> wrote:
>
> Hi All,
>
>        We would like to validate our NIC FRU device type as 8 bit (one byte) or 16 bit(two byte).
>
>        This device type validation for our FRU is platform specific logic.

Please include more details about what this logic is.  In the
entity-manager design, anything that's truly platform specific needs
to go into the entity-manager configuration, as all other components
are common.

>  This was implemented in the machine layer.

Can you point to it?

>
>        We wanted to interlink this logic with entity-manager code to get the device type.
>
>        Could you please provide the suggestions on get the device type in entity-manager.

Entity-manager provides the exposes records on dbus, for which
reactors can pick them up and use them.

>
>        Please refer below link for existing devicebit validation in entity-manager.
>        https://github.com/openbmc/entity-manager/blob/master/src/FruDevice.cpp#L430

I'm not quite following what this has to do with your above, given
that this isn't intended to be platform specific.

>
> Thanks,
> Kumar.

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

* Re: FRU Device type one byte or Two byte Validation
  2021-11-24 20:40 ` Ed Tanous
@ 2021-11-25  9:08   ` Kumar Thangavel
  2021-11-29 17:39     ` Ed Tanous
  0 siblings, 1 reply; 6+ messages in thread
From: Kumar Thangavel @ 2021-11-25  9:08 UTC (permalink / raw)
  To: Ed Tanous
  Cc: Jae Hyun Yoo, vernon.mauery, OpenBMC Maillist, Ed Tanous,
	Amithash Prasad, velumanit

[-- Attachment #1: Type: text/plain, Size: 2495 bytes --]

Hi Ed,

    Please find my response below.
    Please search this mail thread "EEPROM Validation issue in Fru Device "
for more information.

Thanks,
Kumar.


On Thu, Nov 25, 2021 at 2:10 AM Ed Tanous <edtanous@google.com> wrote:

> On Wed, Nov 24, 2021 at 1:17 AM Kumar Thangavel
> <kumarthangavel.hcl@gmail.com> wrote:
> >
> > Hi All,
> >
> >        We would like to validate our NIC FRU device type as 8 bit (one
> byte) or 16 bit(two byte).
> >
> >        This device type validation for our FRU is platform specific
> logic.
>
> Please include more details about what this logic is.  In the
> entity-manager design, anything that's truly platform specific needs
> to go into the entity-manager configuration, as all other components
> are common.
>
> The existing logic to get the device type is 8bit or 16bit is not working
exactly for our platform.
Also, writing some bytes and getting device type in eeprom is not safe and
not suggested.
So, we implemented the platform specific logic to get the eeprom device
type in the machine layer.

https://github.com/openbmc/entity-manager/blob/master/src/FruDevice.cpp#L430

> >  This was implemented in the machine layer.
>
> Can you point to it?
>
> The logic is, get the NIC card vendor info from ncsi-netlink command and
based on NIC vendor,
set the eeprom device type as 8bit or 16 bit.

We wanted to interlink this logic in entity-manager.

>
> >        We wanted to interlink this logic with entity-manager code to get
> the device type.
> >
> >        Could you please provide the suggestions on get the device type
> in entity-manager.
>
> Entity-manager provides the exposes records on dbus, for which
> reactors can pick them up and use them.
>

Is there any way to get the dynamic values (device type - 8bit/16bit ) from
the machine layer
to the entity-manager ?

>
> >
> >        Please refer below link for existing devicebit validation in
> entity-manager.
> >
> https://github.com/openbmc/entity-manager/blob/master/src/FruDevice.cpp#L430
>
> I'm not quite following what this has to do with your above, given
> that this isn't intended to be platform specific.
>
>
This existing logic to get the device type 8/16 bit may not work for all
the devices.
We need to find common logic for all the devices without any breakage. But
it is very tricky.

Alternatively, platform specific logic can be an option and interlink with
EM at run time.
We are trying this and requesting suggestions from MAINTAINERS.

>
> > Thanks,
> > Kumar.
>

[-- Attachment #2: Type: text/html, Size: 4124 bytes --]

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

* Re: FRU Device type one byte or Two byte Validation
  2021-11-25  9:08   ` Kumar Thangavel
@ 2021-11-29 17:39     ` Ed Tanous
  2021-11-29 18:36       ` Andrei Kartashev
  0 siblings, 1 reply; 6+ messages in thread
From: Ed Tanous @ 2021-11-29 17:39 UTC (permalink / raw)
  To: Kumar Thangavel
  Cc: Jae Hyun Yoo, vernon.mauery, OpenBMC Maillist, Ed Tanous,
	Amithash Prasad, velumanit

On Thu, Nov 25, 2021 at 1:06 AM Kumar Thangavel
<kumarthangavel.hcl@gmail.com> wrote:
>
> Hi Ed,
>
>     Please find my response below.
>     Please search this mail thread "EEPROM Validation issue in Fru Device " for more information.
>
> Thanks,
> Kumar.
>
>
> On Thu, Nov 25, 2021 at 2:10 AM Ed Tanous <edtanous@google.com> wrote:
>>
>> On Wed, Nov 24, 2021 at 1:17 AM Kumar Thangavel
>> <kumarthangavel.hcl@gmail.com> wrote:
>> >
>> > Hi All,
>> >
>> >        We would like to validate our NIC FRU device type as 8 bit (one byte) or 16 bit(two byte).
>> >
>> >        This device type validation for our FRU is platform specific logic.
>>
>> Please include more details about what this logic is.  In the
>> entity-manager design, anything that's truly platform specific needs
>> to go into the entity-manager configuration, as all other components
>> are common.
>>
> The existing logic to get the device type is 8bit or 16bit is not working exactly for our platform.
> Also, writing some bytes and getting device type in eeprom is not safe and not suggested.
> So, we implemented the platform specific logic to get the eeprom device type in the machine layer.
>
> https://github.com/openbmc/entity-manager/blob/master/src/FruDevice.cpp#L430
>>
>> >  This was implemented in the machine layer.
>>
>> Can you point to it?
>>
> The logic is, get the NIC card vendor info from ncsi-netlink command and based on NIC vendor,
> set the eeprom device type as 8bit or 16 bit.
>
> We wanted to interlink this logic in entity-manager.

If the NIC card can be identified over NCSI, you would create an
application that makes the card model information available on dbus,
rewrite your Probe statement to match on the NCSI property, then put
something like "Size" in the FRU exposes record, which FruDevice could
then pick up from dbus and use to parse the FRU properly.


>
>> >
>> >        We wanted to interlink this logic with entity-manager code to get the device type.
>> >
>> >        Could you please provide the suggestions on get the device type in entity-manager.
>>
>> Entity-manager provides the exposes records on dbus, for which
>> reactors can pick them up and use them.
>
>
> Is there any way to get the dynamic values (device type - 8bit/16bit ) from the machine layer
> to the entity-manager ?

EM config files.

>>
>>
>> >
>> >        Please refer below link for existing devicebit validation in entity-manager.
>> >        https://github.com/openbmc/entity-manager/blob/master/src/FruDevice.cpp#L430
>>
>> I'm not quite following what this has to do with your above, given
>> that this isn't intended to be platform specific.
>>
>
> This existing logic to get the device type 8/16 bit may not work for all the devices.
> We need to find common logic for all the devices without any breakage. But it is very tricky.
>
> Alternatively, platform specific logic can be an option and interlink with EM at run time.
> We are trying this and requesting suggestions from MAINTAINERS.

As a general rule, anything that's truly platform specific (ie, would
cause conflicts if run on other systems) should be specified in the EM
config files.  That's what they're there for.

>
>> >
>> > Thanks,
>> > Kumar.

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

* Re: FRU Device type one byte or Two byte Validation
  2021-11-29 17:39     ` Ed Tanous
@ 2021-11-29 18:36       ` Andrei Kartashev
  0 siblings, 0 replies; 6+ messages in thread
From: Andrei Kartashev @ 2021-11-29 18:36 UTC (permalink / raw)
  To: openbmc

> 
> > 
> > > > 
> > > >        We wanted to interlink this logic with entity-manager code
> > > > to get the device type.
> > > > 
> > > >        Could you please provide the suggestions on get the device
> > > > type in entity-manager.
> > > 
> > > Entity-manager provides the exposes records on dbus, for which
> > > reactors can pick them up and use them.
> > 
> > 
> > Is there any way to get the dynamic values (device type - 8bit/16bit
> > ) from the machine layer
> > to the entity-manager ?
> 

Just an idea came to mind:
This likely would not help in this case, but for situations when we
know in advance that on particular I2C bus/address there can be only
8bit or 16bit FRU EEPROM, we can avoid autodetection by having
configuration json file for the FruDevice.
There already was an attempt to introduce config file for FruDevice
here:
https://gerrit.openbmc-project.xyz/c/openbmc/entity-manager/+/40039
And FruDevice already has blacklist json, so we can make more generic
config to have all this configurations.

-- 
Best regards,
Andrei Kartashev



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

* Re: FRU Device type one byte or Two byte Validation
  2021-11-24  9:18 FRU Device type one byte or Two byte Validation Kumar Thangavel
  2021-11-24 20:40 ` Ed Tanous
@ 2021-12-17 13:15 ` Patrick Williams
  1 sibling, 0 replies; 6+ messages in thread
From: Patrick Williams @ 2021-12-17 13:15 UTC (permalink / raw)
  To: Kumar Thangavel
  Cc: Jae Hyun Yoo, vernon.mauery, OpenBMC Maillist, Ed Tanous,
	Amithash Prasad, velumanit

[-- Attachment #1: Type: text/plain, Size: 340 bytes --]

On Wed, Nov 24, 2021 at 02:48:30PM +0530, Kumar Thangavel wrote:
>        We would like to validate our NIC FRU device type as 8 bit (one
> byte) or 16 bit(two byte).

For anyone interested, there appears to be a proposed design on this issue at:
    https://gerrit.openbmc-project.xyz/c/openbmc/docs/+/49477

-- 
Patrick Williams

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

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

end of thread, other threads:[~2021-12-17 13:15 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-24  9:18 FRU Device type one byte or Two byte Validation Kumar Thangavel
2021-11-24 20:40 ` Ed Tanous
2021-11-25  9:08   ` Kumar Thangavel
2021-11-29 17:39     ` Ed Tanous
2021-11-29 18:36       ` Andrei Kartashev
2021-12-17 13:15 ` Patrick Williams

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.