linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jonathan Cameron <Jonathan.Cameron@Huawei.com>
To: Lukas Wunner <lukas@wunner.de>
Cc: Alistair Francis <alistair23@gmail.com>, <bhelgaas@google.com>,
	<linux-pci@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
	"Alistair Francis" <alistair.francis@wdc.com>
Subject: Re: [PATCH] PCI/DOE: Expose the DOE protocols via sysfs
Date: Thu, 27 Jul 2023 09:38:57 +0100	[thread overview]
Message-ID: <20230727093857.000017aa@Huawei.com> (raw)
In-Reply-To: <20230725163046.GA23990@wunner.de>

On Tue, 25 Jul 2023 18:30:46 +0200
Lukas Wunner <lukas@wunner.de> wrote:

> On Tue, Jul 25, 2023 at 01:57:55PM +1000, Alistair Francis wrote:
> > The PCIe 6 specification added support for the Data Object Exchange (DOE).
> > When DOE is supported the Discovery Data Object Protocol must be
> > implemented. The protocol allows a requester to obtain information about
> > the other DOE protocols supported by the device.
> > 
> > The kernel is already querying the DOE protocols supported and cacheing
> > the values. This patch exposes the values via sysfs. This will allow
> > userspace to determine which DOE protocols are supported by the PCIe
> > device.  
> 
> Just dumping the list of supported protocols into dmesg might be simpler,
> unless you intend to add mechanisms to actually use certain DOE mailboxes
> from user space or expose the information in lspci.  Do have plans for
> either of that or what's the motivation to use sysfs?
> 

I can answer this one in rather than waiting for Alastair to see it
(given I was involved in shooting down the earlier proposal :(

At least partly motivated by providing the info for lspci which
I agree with being a useful addition for debug etc.
https://github.com/pciutils/pciutils/pull/152

I can see it would also be useful for things that will poke from
userspace because they aren't expected to run in production (and hence
hopefully don't care about potential races etc). CXL compliance
comes to mind - I don't think we ever want to carry kernel code for that.

Jonathan



> I think I'd rather want everything in doe.c (#ifdef'ed to CONFIG_SYSFS)
> and only make dev_attr_doe_proto public.
> 
> Thanks,
> 
> Lukas
> 


  reply	other threads:[~2023-07-27  8:59 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-25  3:57 [PATCH] PCI/DOE: Expose the DOE protocols via sysfs Alistair Francis
2023-07-25 15:00 ` Jonathan Cameron
2023-07-31 15:24   ` Alistair Francis
2023-07-25 16:30 ` Lukas Wunner
2023-07-27  8:38   ` Jonathan Cameron [this message]
2023-07-31 15:30     ` Alistair Francis
2023-07-31 17:52       ` Lukas Wunner
2023-08-01 14:03         ` Alistair Francis
2023-07-31 17:59     ` Lukas Wunner

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=20230727093857.000017aa@Huawei.com \
    --to=jonathan.cameron@huawei.com \
    --cc=alistair.francis@wdc.com \
    --cc=alistair23@gmail.com \
    --cc=bhelgaas@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=lukas@wunner.de \
    /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).