From: Bjorn Helgaas <helgaas@kernel.org>
To: Filippo Sironi <sironi@amazon.de>
Cc: linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/2] pci: Expose offset, stride, and VF device ID via sysfs
Date: Mon, 25 Sep 2017 13:55:23 -0500 [thread overview]
Message-ID: <20170925185523.GF15970@bhelgaas-glaptop.roam.corp.google.com> (raw)
In-Reply-To: <1503927530-26076-2-git-send-email-sironi@amazon.de>
Hi Filippo,
On Mon, Aug 28, 2017 at 03:38:50PM +0200, Filippo Sironi wrote:
> +static ssize_t sriov_vf_did_show(struct device *dev,
> + struct device_attribute *attr,
> + char *buf)
> +{
> + struct pci_dev *pdev = to_pci_dev(dev);
> +
> + return sprintf(buf, "%x\n", pdev->sriov->vf_did);
> +}
What does the vf_did part look like in sysfs? Do we have a directory with
both "device" and "vf_did" in it? If so, why do we have both and do we
need both? Could we put the vf_did in the "device" file?
> static ssize_t sriov_drivers_autoprobe_show(struct device *dev,
> struct device_attribute *attr,
> char *buf)
> @@ -676,6 +703,9 @@ static struct device_attribute sriov_totalvfs_attr = __ATTR_RO(sriov_totalvfs);
> static struct device_attribute sriov_numvfs_attr =
> __ATTR(sriov_numvfs, (S_IRUGO|S_IWUSR|S_IWGRP),
> sriov_numvfs_show, sriov_numvfs_store);
> +static struct device_attribute sriov_offset_attr = __ATTR_RO(sriov_offset);
> +static struct device_attribute sriov_stride_attr = __ATTR_RO(sriov_stride);
> +static struct device_attribute sriov_vf_did_attr = __ATTR_RO(sriov_vf_did);
> static struct device_attribute sriov_drivers_autoprobe_attr =
> __ATTR(sriov_drivers_autoprobe, (S_IRUGO|S_IWUSR|S_IWGRP),
> sriov_drivers_autoprobe_show, sriov_drivers_autoprobe_store);
> @@ -1744,6 +1774,9 @@ static struct attribute_group pci_dev_hp_attr_group = {
> static struct attribute *sriov_dev_attrs[] = {
> &sriov_totalvfs_attr.attr,
> &sriov_numvfs_attr.attr,
> + &sriov_offset_attr.attr,
> + &sriov_stride_attr.attr,
> + &sriov_vf_did_attr.attr,
> &sriov_drivers_autoprobe_attr.attr,
> NULL,
> };
> --
> 2.7.4
>
next prev parent reply other threads:[~2017-09-25 18:55 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-28 13:38 [PATCH 1/2] pci: Cache the VF device ID in the SR-IOV structure Filippo Sironi
2017-08-28 13:38 ` [PATCH 2/2] pci: Expose offset, stride, and VF device ID via sysfs Filippo Sironi
2017-09-25 18:55 ` Bjorn Helgaas [this message]
2017-09-29 7:53 ` Sironi, Filippo
2017-10-03 19:31 ` Bjorn Helgaas
2017-10-03 19:48 ` Bjorn Helgaas
2017-10-04 17:32 ` Sironi, Filippo
2017-10-03 19:33 ` [PATCH 1/2] pci: Cache the VF device ID in the SR-IOV structure Bjorn Helgaas
2017-10-08 23:09 ` [PATCH v2] pci: Expose offset, stride, and VF device ID via sysfs Filippo Sironi
2017-10-08 23:09 ` Filippo Sironi
2017-10-11 0:15 ` Bjorn Helgaas
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=20170925185523.GF15970@bhelgaas-glaptop.roam.corp.google.com \
--to=helgaas@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=sironi@amazon.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
all inboxes | Powered by JetHome®