All of lore.kernel.org
 help / color / mirror / Atom feed
From: i.kononenko <i.kononenko@yadro.com>
To: "Spencer Ku (古世瑜)" <Spencer.Ku@quantatw.com>,
	"Ed Tanous" <edtanous@google.com>
Cc: "openbmc@lists.ozlabs.org" <openbmc@lists.ozlabs.org>,
	"Fran Hsu (徐誌謙)" <Fran.Hsu@quantatw.com>,
	"Litzung Chen (陳利琮)" <Litzung.Chen@quantatw.com>,
	"Nan Zhou" <nanzhou@google.com>
Subject: Re: Implement Ethernet Interface Properties
Date: Thu, 20 Jan 2022 12:07:56 +0300	[thread overview]
Message-ID: <8076733c-ae3d-c239-d7ed-12d6612854c8@yadro.com> (raw)
In-Reply-To: <HK0PR04MB3299DA39BBF0596CA83BC41EE45A9@HK0PR04MB3299.apcprd04.prod.outlook.com>

Hi Spencer!

On 20.01.2022 11:42, Spencer Ku (古世瑜) wrote:
> Hi All,
> 
> We finally decide to implement six properties to Ethernet interface: 
> RxPackets, TxPackets, RxBytes, TxBytes, RxDropped, and TxDropped.
> 
> Those information come from Ethernet statistics and we can read the file 
> to get the property value directly. (under /sys/class/net/<Ethernet name>/statistics)
> 
> For the suitable property in EthernetInterface model, we got the feedback 
> form Redfish forum and they said OEM properties would be the only other 
> option at this time. For more discussion detail:
> https://redfishforum.com/thread/579/additional-information-ethernet-interface
> 

I'd suggest referring to the [1] **9.7. Resource extensibility** to examine the proper 
way of OEM-properties definition.


> The following output is the result of my currently OEM implement:
> https://${bmc}/redfish/v1/Managers/bmc/EhernetInterfaces/eth0
> {
>   "@odata.id": "/redfish/v1/Managers/bmc/EthernetInterfaces/eth0",
>   ...
>   "Oem": {
>     "Statistics": [

Looks like "@odata.type" required field is missed. The **9.7.4. OEM property examples** 
contains the example of the right way to define OEM-properties.

>       {
>         "RxBytes": 48244026,
>         "RxDropped": 222856,
>         "RxPackets": 484315,
>         "TxBytes": 825845,
>         "TxDropped": 0,
>         "TxPackets": 5472
>       }
>     ]
>   },
>   "SpeedMbps": 100,
>   ...
> }
> 
> But it cannot pass the Redfish validator, and here is the error messages:
> ERROR - This complex object RxBytes should be a dictionary or None, but it's of type ...

Does it require to have the integer values? I guess each mentioned field might contain string values. 

> ERROR - RxBytes: Could not finish check on this property ('int' object is not iterable)
> 
> Is there anything I didn't notice? Or has there any spec or example that I can follow to implement? 
> 
> I had already push the implementation to gerrit and mark as WIP. Here is the link:
> https://gerrit.openbmc-project.xyz/c/openbmc/bmcweb/+/50522
> 
> We are willing to see any suggestions and alternatives as well. Thanks!
> 
> Sincerely,
> Spencer Ku
> 

Links:
[1] DSP0266 Redfish Specification: 
    https://www.dmtf.org/sites/default/files/standards/documents/DSP0266_1.8.0.pdf

-- 
Best regards,

Igor Kononenko

  reply	other threads:[~2022-01-20  9:08 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-01  9:58 Implement Ethernet Interface Properties Spencer Ku (古世瑜)
2021-12-01 18:24 ` Ed Tanous
2021-12-02  8:45   ` Spencer Ku (古世瑜)
2022-01-20  8:42     ` Spencer Ku (古世瑜)
2022-01-20  9:07       ` i.kononenko [this message]
2022-01-24  2:22         ` Spencer Ku (古世瑜)
2022-01-24 20:37       ` Ed Tanous
2022-01-25  8:00         ` Spencer Ku (古世瑜)
2021-12-01 22:49 ` Patrick Williams
2021-12-02  9:22   ` Spencer Ku (古世瑜)

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=8076733c-ae3d-c239-d7ed-12d6612854c8@yadro.com \
    --to=i.kononenko@yadro.com \
    --cc=Fran.Hsu@quantatw.com \
    --cc=Litzung.Chen@quantatw.com \
    --cc=Spencer.Ku@quantatw.com \
    --cc=edtanous@google.com \
    --cc=nanzhou@google.com \
    --cc=openbmc@lists.ozlabs.org \
    /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 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.