Received: by 2002:a05:6358:701b:b0:131:369:b2a3 with SMTP id 27csp4742152rwo; Tue, 25 Jul 2023 10:12:42 -0700 (PDT) X-Google-Smtp-Source: APBJJlFSPvLdwiiYfAFRww6bLKObd8nGOY41yMpgim374wmqTGT84oSoGOeBUtZLfFE/GOUfjN1w X-Received: by 2002:a05:6a20:3c7:b0:132:bdba:5518 with SMTP id 7-20020a056a2003c700b00132bdba5518mr12870728pzu.54.1690305161685; Tue, 25 Jul 2023 10:12:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690305161; cv=none; d=google.com; s=arc-20160816; b=iD5DqIJnwaTlPv5elZ1IE5ioie6V0+Oav3iZWqSbxVC51mBgUrAG2e3iWItAzpJfHm wsPOdpKvYCnpzwmg2YedWgirtgbFSCDv7bKEvxEDxpgHPMNwFreNSgwSgSIjOPgVXjon Qb89mobh7iki6n9PPY43A2Mr+ty/7rXO3mJGJpJOx3x3Yjl2WznBEt/BAVo7yH6d+hAc 2cURci1akS1qDpmIZjSbr/VsMqYHAKsg9COXJUB+/xtWFKdy3cnpFg6S7gAFPegFpX9y 9+ikFoxeZbwPlrLYUlH3bDG0YKGbDk9l2zCxIKWdWVXVm1PSXNQDRxOZLyn0/RNaGeyT xy3A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=OOMkXZxDoEwEPC3vDa3DkDu8lLJzXH9jkg166Q2Se88=; fh=RoUxf04DIgkVDlr8XDIL3d00HKVCQw0DSLik4KcqNWM=; b=k5MPJmuo65Rc6B1KZXiOC5hDn80At9ZKhIzZZk5y1oWt/NOp6TGwZBgdN5pFFFRweb 80eES1PEYCpp1lAKmdMoF9cu+1XybKHV/RglOEa70C6qxLFO0TQhXa/Ug/aIe9U8IBj2 kRU9Pst1oIzBiC3oUC1kTZqnkj4HTYMXfoHV8unmfVlS1ASRJeAFg97BJZdUYSJ2mjox OO9Bofap7fzqwXjjso0fuznKPI8JvmzfsHJdakn/T7iBVLJ5A00M03EfIewVbcf5wB6K O4o9lSFxXHc9YA+/snXoucJYxdRSBFK8ULjEA7kQXC7We/BaCAxb3+qZZfnUZKI6qX47 h3bQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id w4-20020a656944000000b0053ef08b29bbsi11342071pgq.564.2023.07.25.10.12.28; Tue, 25 Jul 2023 10:12:41 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230265AbjGYQax (ORCPT + 99 others); Tue, 25 Jul 2023 12:30:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59920 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230305AbjGYQav (ORCPT ); Tue, 25 Jul 2023 12:30:51 -0400 Received: from bmailout2.hostsharing.net (bmailout2.hostsharing.net [IPv6:2a01:37:3000::53df:4ef0:0]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 52217E77; Tue, 25 Jul 2023 09:30:48 -0700 (PDT) Received: from h08.hostsharing.net (h08.hostsharing.net [IPv6:2a01:37:1000::53df:5f1c:0]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "*.hostsharing.net", Issuer "RapidSSL Global TLS RSA4096 SHA256 2022 CA1" (verified OK)) by bmailout2.hostsharing.net (Postfix) with ESMTPS id 747A12800BBE0; Tue, 25 Jul 2023 18:30:46 +0200 (CEST) Received: by h08.hostsharing.net (Postfix, from userid 100393) id 475EE4F0C; Tue, 25 Jul 2023 18:30:46 +0200 (CEST) Date: Tue, 25 Jul 2023 18:30:46 +0200 From: Lukas Wunner To: Alistair Francis Cc: bhelgaas@google.com, linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, Alistair Francis Subject: Re: [PATCH] PCI/DOE: Expose the DOE protocols via sysfs Message-ID: <20230725163046.GA23990@wunner.de> References: <20230725035755.2621507-1-alistair.francis@wdc.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230725035755.2621507-1-alistair.francis@wdc.com> User-Agent: Mutt/1.10.1 (2018-07-13) X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE, SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 think I'd rather want everything in doe.c (#ifdef'ed to CONFIG_SYSFS) and only make dev_attr_doe_proto public. Thanks, Lukas