Official DENT upstream projects - dentproject/upstream Wiki

Official DENT upstream projects

Linux kernel ONIE nvmem driver

Status

  • Miquel Raynal started the effort on August 18, 2022
  • Updated status on September 23, 2022
  • Target completion date by December 31, 2022

Parties

  • Luka Perkov (PM)
  • Steven Noble (DENT TSC Chair)
  • Thomas Petazzoni (Vendor)
  • Miquel Raynal (Vendor)
  • Sridhar Rao (LF)

Goals

The DENT project is an open source network operating system utilizing the Linux Kernel, Switchdev, and other Linux based projects, hosted under the Linux Foundation.

As part of the specifications of its hardware requirements, ONIE requires the hardware platform to provide a non-volatile storage which contains vital product data assigned by the manufacturer. This non-volatile storage includes information such as the MAC address(es) allocated to the system, the serial number, the date of manufacturer, etc. The name of the EEPROM format specified here is TlvInfo, because the information contained in the non-volatile storage is found in TLVs, or Type Length and Value fields. The exact format of the information stored is specified in detail at https://opencomputeproject.github.io/onie/design-spec/hw_requirements.html.

In order to expose the information stored in this non-volatile storage in a standard way, a Linux kernel driver for the nvmem subsystem has been developed and attempted to be integrated in the official Linux kernel:

From the projects' perspective, the benefits of getting the code accepted in the upstream Linux kernel include:

  • Ensuring that it has reached the high quality standards required by the Linux community.
  • Providing long-term maintenance, as the code will be part of all future Linux kernel releases.
  • Making the code widely available: once in the official Linux kernel, all Linux distributions or embedded build systems will automatically benefit from the support for ONIE nvmem.
  • Encouraging other contributors to further improve the proposed implementation.
  • Promoting The DENT project as an active member of the Linux kernel ecosystem.

Status update - September 23, 2022

  • Hardware setup is done by Bootlin, comparing the stock image with custom changes can be done efficiently on the Replica switch (tn48m).
  • The Bootlin team is confident with the approach to take, there is indeed an ongoing series which brings support for NVMEM layouts, the NVMEM maintainer agreed that this approach would fit very well the purpose of the ONIE tlv table. Link to the series written by Michael Walle: https://lore.kernel.org/linux-arm-kernel/[email protected]/
  • Several topics regarding this implementation are being discussed on the mailing list, but nothing blocking so far.
  • There is a working software prototype working on top of the previously mentioned series. This is still WIP, the CRC feature is not yet working and the overall code needs to be cleaned up for upstream submission.
  • Aside of this proof of concept, the Marvell Ethernet driver has been updated to make use of the NVMEM cells exposed by the new driver and show the usefulness of this feature.
  • Possible blocking points:
    • The bindings (how the layout is described and pointed at) require extra changes in an external project. The binding maintainers agreed with the change already, but this may delay a bit the overall acceptance of Michael's series which is a prerequisite for the ONIE tlv parser to be merged.
    • Michael's series is seen as a good step forward but it took him 2 years to settle the frame. The NVMEM maintainer said he was happy with the current version. Bootlin will try to help speeding up the process.