openbmc.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: "Andrew Jeffery" <andrew@aj.id.au>
To: "Heyi Guo" <guoheyi@linux.alibaba.com>,
	openbmc <openbmc@lists.ozlabs.org>
Cc: Zhikui Ren <zhikui.ren@intel.com>,
	Jae Hyun Yoo <jae.hyun.yoo@linux.intel.com>,
	"Winiarska, Iwona" <iwona.winiarska@intel.com>,
	Vernon Mauery <vernon.mauery@linux.intel.com>,
	Ed Tanous <ed@tanous.net>,
	"Thomaiyar,
	Richard Marian" <richard.marian.thomaiyar@linux.intel.com>,
	"sumanth.bhat@linux.intel.com" <sumanth.bhat@linux.intel.com>
Subject: Re: Question about NVMe MCTP in dbus-sensors
Date: Fri, 06 Aug 2021 15:12:39 +0930	[thread overview]
Message-ID: <863f7fca-7088-450e-a855-92261ba56b9d@www.fastmail.com> (raw)
In-Reply-To: <6fa87e93-863e-94a6-651f-8d6126557553@linux.alibaba.com>

Hello Heyi!

On Fri, 6 Aug 2021, at 14:47, Heyi Guo wrote:
> Hi,
> 
> We can see that NVMe sensors in dbus-sensors relies on MCTP to get 
> hardware information. It is using libmctp interfaces to initialize MCTP 
> and SMBus. 

To be clear, it's using a fork of libmctp that implements an SMBus 
binding via a fork of the kernel that exposes a I2C API that isn't 
upstream.

For the SMBus binding to be merged in upstream libmctp I'd like to see 
the necessary kernel interfaces merged into the upstream kernel tree, 
but I don't expect that's going to happen any time soon. More on why 
below.

As an aside you may be interested in this patch which allows nvmesensor 
to use the basic management command to fetch temperature data:

https://gerrit.openbmc-project.xyz/c/openbmc/dbus-sensors/+/43665

> However I don't find the code or component who is responsible 
> as a bus owner, to discover endpoints, manager EID and update routing 
> table. Isn't necessary for a central component to do such things?

It's not strictly necessary in that it's valid for systems to be 
completely defined in terms of static endpoints. Doing so isn't covered 
by the MCTP spec, and it's also pretty limiting, but it is enough in 
some circumstances.

> Will 
> there be access conflict if non-NVMe devices (MCTP capable) are also 
> connected to the same SMBus?

No.

> 
> We also found another implementation from Intel: 
> https://github.com/Intel-BMC/pmci. It implements mctpd to provide MCTP 
> message transfer interfaces on D-Bus, while PLDM, NVME-MI and others can 
> rely on the D-Bus interfaces instead of libmctp.

This is a direction Intel chose to go however it's not the direction 
that upstream OpenBMC will be using. The use of a pure userspace 
solution such as libmctp went far enough to expose the need for a 
kernel-based solution. We will shortly have that, thanks to the efforts 
of Jeremy and Matt at Code Construct:

https://lore.kernel.org/netdev/20210729022053.134453-1-jk@codeconstruct.com.au/

This series is now in net-next, and Matt and Jeremy have also been 
developing the in-kernel hardware binding support and necessary 
userspace components[1].

[1] https://github.com/CodeConstruct/mctp

You can read more about the application of the socket syscalls here:

https://lore.kernel.org/netdev/20210729022053.134453-16-jk@codeconstruct.com.au/

and here:

https://github.com/openbmc/docs/blob/master/designs/mctp/mctp-kernel.md

Once we have AF_MCTP in the OpenBMC kernel tree with some binding 
implementations we'll be switching the userspace applications over to 
use it.

Hope that helps!

Andrew

  parent reply	other threads:[~2021-08-06  5:43 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-06  5:17 Question about NVMe MCTP in dbus-sensors Heyi Guo
2021-08-06  5:40 ` Jeremy Kerr
2021-08-06  5:42 ` Andrew Jeffery [this message]
2021-08-06  6:35   ` Heyi Guo
2021-08-06  9:46     ` Jeremy Kerr
2021-08-08  7:10       ` Heyi Guo
2021-08-09  6:33   ` Heyi Guo
2021-08-09 23:45     ` Andrew Jeffery

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=863f7fca-7088-450e-a855-92261ba56b9d@www.fastmail.com \
    --to=andrew@aj.id.au \
    --cc=ed@tanous.net \
    --cc=guoheyi@linux.alibaba.com \
    --cc=iwona.winiarska@intel.com \
    --cc=jae.hyun.yoo@linux.intel.com \
    --cc=openbmc@lists.ozlabs.org \
    --cc=richard.marian.thomaiyar@linux.intel.com \
    --cc=sumanth.bhat@linux.intel.com \
    --cc=vernon.mauery@linux.intel.com \
    --cc=zhikui.ren@intel.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;
as well as URLs for NNTP newsgroup(s).