From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.ozlabs.org (lists.ozlabs.org [112.213.38.117]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id BF8D3C43219 for ; Mon, 24 Jan 2022 20:38:41 +0000 (UTC) Received: from boromir.ozlabs.org (localhost [IPv6:::1]) by lists.ozlabs.org (Postfix) with ESMTP id 4JjMJc0z65z3bPH for ; Tue, 25 Jan 2022 07:38:40 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=tanous-net.20210112.gappssmtp.com header.i=@tanous-net.20210112.gappssmtp.com header.a=rsa-sha256 header.s=20210112 header.b=s4YQoa2y; dkim-atps=neutral Authentication-Results: lists.ozlabs.org; spf=none (no SPF record) smtp.mailfrom=tanous.net (client-ip=2607:f8b0:4864:20::d31; helo=mail-io1-xd31.google.com; envelope-from=ed@tanous.net; receiver=) Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=tanous-net.20210112.gappssmtp.com header.i=@tanous-net.20210112.gappssmtp.com header.a=rsa-sha256 header.s=20210112 header.b=s4YQoa2y; dkim-atps=neutral Received: from mail-io1-xd31.google.com (mail-io1-xd31.google.com [IPv6:2607:f8b0:4864:20::d31]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4JjMHs3FJBz306f for ; Tue, 25 Jan 2022 07:38:00 +1100 (AEDT) Received: by mail-io1-xd31.google.com with SMTP id y84so4704831iof.0 for ; Mon, 24 Jan 2022 12:38:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tanous-net.20210112.gappssmtp.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=hFFORbmBbfTXsvRBFp5kmN/ITnUI2yMhOWkRAOuBgJE=; b=s4YQoa2ypb0s+zLTe1CNKhVHKLe4k5R4qil/wJxkUxonWB0T8L+Is+JrL9ub3VPrMk e4zKAkew7M2WMM2M5s8ycoKKsK0U556whhLUkIKe4xW5HHqKL4+KpH+B8fYshFuM8bYB hexBmTvDlfgjhpMn87jqtbRP88fW0xSnLidVlEcDowb3VTs0nJqAlkeut0AhYhBPL986 XzRaXqBxRo4o7r6UudRFYRGFh5nxb7f48M3IvLHe+CB74Ojk9PUfn6vOGIT0PZKZYNNp swpPJQDx7YRfchwwmshphUtqLOmZFYPwGrGdnWuV130BgnUXa8GaLtoJDK/TA8Gy0lll TMeQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=hFFORbmBbfTXsvRBFp5kmN/ITnUI2yMhOWkRAOuBgJE=; b=usMycjT+mBRIBsDdQegoxfbAoerQGoRoRDx2N/AnGYWRe49ZzRp4LopzBxxKg+sJhZ Q3lcikypio2UQsJNxoY/mfN8npkcuCeiQYx3B1mrTunipf1CmUbnLchxgBpv/XqGmBp0 AXYxSuO8fNkYWwO4r88SDZwL1eysptxnQdlAKQzEr1HPW3fC3RrX6YPqvKP9MVNXPvf9 pIxAPdrOFuEcmhPN30KiGYcb6p75FRthtFYqqtN9mlaogI55WQ4QT0F1MUyjSk0xPoht EYKgodKmwY4dDI4h1ZTQirzUqvwkUSj2UEKwrRO1Nb44+LcBNOigroDJxBikOq8E8pQh ER9Q== X-Gm-Message-State: AOAM532nv4v5MtsXLMh768NY8gkeN3wPfmkX8gcNNWXG6YLafNiOp2AH p8egbl4/bEuNQRC1+xObq23iq51+uEKzN9Saa1CSDw== X-Google-Smtp-Source: ABdhPJxESuyQnDxFcBBo9ae9HBgj/x4HbV1ukGyIpL4BiWuYHmuG7HiFZbjt1hoscJzyCn3xQnnFbGEa4tGvRO4pud0= X-Received: by 2002:a02:29cc:: with SMTP id p195mr7685943jap.134.1643056677431; Mon, 24 Jan 2022 12:37:57 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Ed Tanous Date: Mon, 24 Jan 2022 12:37:46 -0800 Message-ID: Subject: Re: Implement Ethernet Interface Properties To: =?UTF-8?B?U3BlbmNlciBLdSAo5Y+k5LiW55GcKQ==?= Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-BeenThere: openbmc@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development list for OpenBMC List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?UTF-8?B?TGl0enVuZyBDaGVuICjpmbPliKnnkK4p?= , Ed Tanous , =?UTF-8?B?RnJhbiBIc3UgKOW+kOiqjOismSk=?= , "openbmc@lists.ozlabs.org" , Nan Zhou Errors-To: openbmc-bounces+openbmc=archiver.kernel.org@lists.ozlabs.org Sender: "openbmc" On Thu, Jan 20, 2022 at 12:44 AM Spencer Ku (=E5=8F=A4=E4=B8=96=E7=91=9C) 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/= /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: >From their reply "We may need to open discussions further for how to model these sorts of metrics purely under EthernetInterface" I think you've misinterpreted the response. They asked for further discussion on how to model it, and that OEM would be the alternative if you weren't able to discuss. Given our rules around OEM schemas, please continue the discussion with the Redfish forum around this topic to determine the right way to model this in the standard without OEM. There is nothing unique about OpenBMC with regards to these telemetries, so it should be generic. This might be a good candidate for the newly formed "DiagnosticData" resource model, which is initially exposing basically this same telemetry, but for i2c lanes instead of network lanes. > https://redfishforum.com/thread/579/additional-information-ethernet-inter= face > > 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": [ > { > "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 i= t's of type ... > 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 You haven't modeled your schema properly in the above. This is one of the reasons we try to avoid OEM schemas, as they're difficult to get right without help from the standards body. Please continue to engage with them to get this in a standard interface. > > We are willing to see any suggestions and alternatives as well. Thanks! > > Sincerely, > Spencer Ku