From: Miquel Raynal <miquel.raynal@bootlin.com>
To: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Cc: Robert Marko <robert.marko@sartura.hr>,
Thomas Petazzoni <thomas.petazzoni@bootlin.com>,
linux-kernel@vger.kernel.org
Subject: Re: Exposing nvmem cells to userspace?
Date: Fri, 23 Sep 2022 10:33:33 +0200 [thread overview]
Message-ID: <20220923103333.78c7a19b@xps-13> (raw)
In-Reply-To: <d1d07787-129d-e363-12d4-17f7858ab255@linaro.org>
Hi Srinivas,
srinivas.kandagatla@linaro.org wrote on Thu, 22 Sep 2022 22:33:52 +0100:
> On 22/09/2022 11:23, Miquel Raynal wrote:
> > Hello Srinivas,
> >
> > I am currently looking at the Open Compute Project ONIE Tlv tables in
> > modern networking hardware. Thanks to the specification being available
> > for many years and rather easy to implement, those tables are already
> > present in many switches. Manufacturers just have to provide a small
> > storage medium exposing factory-related information (manufacturer, date,
> > serial#, mac addresses, etc) in Type-Length-Value fields, as well
> > as their own extensions if they want. These tables are common, but
> > there is currently no shared decoding logic, each provider maintaining
> > its own internally.
> >
> > I am currently looking for upstreaming an nvmem layout driver for
> > exposing the standard nvmem cells. This way, Ethernet drivers might eg.
> > take the base MAC address from there. But I feel like there is
> > something missing, because the vendor name, the device version, the
> > serial number or any other information available in these tables might
> > also very well be used by the userspace rather than the kernel drivers
> > only.
>
> Could you explain the userspace side use-case?
Right now I don't have any TBH. But in general, having access to a
serial number, a manufacturing date, a hardware batch or whatever other
per-device factory information is always useful.
> > Thus, I was wondering if there was some ongoing work to make these
> > cells available to userspace (in /sys maybe?) or if this had already
> > been discussed somewhere. Otherwise, would you be open to such a
>
> we had this discussed this in many instances and this is some thing we would desire to have but we never got it moving forward.
Ok.
> > contribution? I guess it would also be a useful debug tool anyway (and
> > might very well be moved somewhere else than in /sys).
>
> getting sysfs working correctly in sync with userspace might be tricky in this particular case as we will be creating cells after the provider driver is created.
>
> debugfs on the other hand is more doable.
Ok, I might try something with debugfs then. I'll keep this in mind.
Thanks,
Miquèl
prev parent reply other threads:[~2022-09-23 8:33 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-22 10:23 Exposing nvmem cells to userspace? Miquel Raynal
2022-09-22 21:33 ` Srinivas Kandagatla
2022-09-23 8:33 ` Miquel Raynal [this message]
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=20220923103333.78c7a19b@xps-13 \
--to=miquel.raynal@bootlin.com \
--cc=linux-kernel@vger.kernel.org \
--cc=robert.marko@sartura.hr \
--cc=srinivas.kandagatla@linaro.org \
--cc=thomas.petazzoni@bootlin.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox