From: Jason Wang <jasowang@redhat.com>
To: Alvaro Karsz <alvaro.karsz@solid-run.com>,
virtualization@lists.linux-foundation.org,
linux-pci@vger.kernel.org
Cc: bhelgaas@google.com, "Michael S. Tsirkin" <mst@redhat.com>,
Jean Delvare <jdelvare@suse.com>,
Guenter Roeck <linux@roeck-us.net>
Subject: Re: [PATCH 3/3 v6] virtio: vdpa: new SolidNET DPU driver.
Date: Tue, 20 Dec 2022 14:50:26 +0800 [thread overview]
Message-ID: <96d85666-106b-a43e-6115-b9959b4e3e66@redhat.com> (raw)
In-Reply-To: <20221219083511.73205-4-alvaro.karsz@solid-run.com>
在 2022/12/19 16:35, Alvaro Karsz 写道:
> This commit includes:
> 1) The driver to manage the controlplane over vDPA bus.
> 2) A HW monitor device to read health values from the DPU.
>
> Signed-off-by: Alvaro Karsz <alvaro.karsz@solid-run.com>
> --
> v2:
> - Auto detect the BAR used for communication.
> - When waiting for the DPU to write a config, wait for 5secs
> before giving up on the device.
> - Return EOPNOTSUPP error code in vDPA set_vq_state callback if
> the vq state is not the same as the initial one.
> - Implement a vDPA reset callback.
> - Wait for an ACK when sending a message to the DPU.
> - Add endianness comments on 64bit read/write functions.
> - Remove the get_iova_range and free vDPA callbacks.
> - Usage of managed device functions to ioremap a region.
> - Call pci_set_drvdata and pci_set_master before
> vdpa_register_device.
> - Create DMA isolation between the vDPA devices by using the
> chip SR-IOV feature.
> Every vDPA device gets a PCIe VF with its own DMA device.
>
> v3:
> - Validate vDPA config length while receiving the DPU's config,
> not while trying to write the vDPA config to the DPU.
> - Request IRQs when vDPA status is set to
> VIRTIO_CONFIG_S_DRIVER_OK.
> - Remove snet_reset_dev() from the PCI remove function for a VF.
> v4:
> - Get SolidRun vendor ID from pci_ids
> v5:
> - Remove "select HWMON" from Kconfig.
> Usage of "depends on HWMON || HWMON=n" instead and usage of
> IS_ENABLED(CONFIG_HWMON) when calling to snet hwmon functions.
> snet_hwmon.c is compiled only if CONFIG_HWMON is defined.
> - Remove the #include <linux/hwmon-sysfs.h> from snet_hwmon.c.
> - Remove the unnecessary (long) casting from snet_hwmon_read_reg.
> - Remove the "_hwmon" ending from the hwmon name.
> - Usage of IS_ERR macro to check if devm_hwmon_device_register_with_info
> failed.
> - Replace schedule() with usleep_range() in the "hot loop" in
> psnet_detect_bar.
> - Remove the logging of memory allocation failures.
> - Add parenthesis to arguments in SNET_* macros.
> - Prefer sizeof(*variable) instead of sizeof(struct x) when allocating
> memory.
> v6:
> - SNET_WRN -> SNET_WARN.
> ---
> MAINTAINERS | 4 +
> drivers/vdpa/Kconfig | 10 +
> drivers/vdpa/Makefile | 1 +
> drivers/vdpa/solidrun/Makefile | 6 +
> drivers/vdpa/solidrun/snet_hwmon.c | 188 +++++
> drivers/vdpa/solidrun/snet_main.c | 1111 ++++++++++++++++++++++++++++
> drivers/vdpa/solidrun/snet_vdpa.h | 196 +++++
> 7 files changed, 1516 insertions(+)
> create mode 100644 drivers/vdpa/solidrun/Makefile
> create mode 100644 drivers/vdpa/solidrun/snet_hwmon.c
> create mode 100644 drivers/vdpa/solidrun/snet_main.c
> create mode 100644 drivers/vdpa/solidrun/snet_vdpa.h
>
> diff --git a/MAINTAINERS b/MAINTAINERS
> index a608f19da3a..7f4d9dcb760 100644
> --- a/MAINTAINERS
> +++ b/MAINTAINERS
> @@ -21955,6 +21955,10 @@ IFCVF VIRTIO DATA PATH ACCELERATOR
> R: Zhu Lingshan <lingshan.zhu@intel.com>
> F: drivers/vdpa/ifcvf/
>
> +SNET DPU VIRTIO DATA PATH ACCELERATOR
> +R: Alvaro Karsz <alvaro.karsz@solid-run.com>
> +F: drivers/vdpa/solidrun/
> +
> VIRTIO BALLOON
> M: "Michael S. Tsirkin" <mst@redhat.com>
> M: David Hildenbrand <david@redhat.com>
> diff --git a/drivers/vdpa/Kconfig b/drivers/vdpa/Kconfig
> index 50f45d03761..79625c7cc46 100644
> --- a/drivers/vdpa/Kconfig
> +++ b/drivers/vdpa/Kconfig
> @@ -86,4 +86,14 @@ config ALIBABA_ENI_VDPA
> VDPA driver for Alibaba ENI (Elastic Network Interface) which is built upon
> virtio 0.9.5 specification.
>
> + config SNET_VDPA
> + tristate "SolidRun's vDPA driver for SolidNET"
> + depends on PCI_MSI && PCI_IOV && (HWMON || HWMON=n)
So I think we actually don't need to depend on HWMON here?
hwmon.c is only complied when HWMON is enabled and we use IS_ENABLED to
exclude the hwmon specific does.
Other looks good to me.
Thanks
next prev parent reply other threads:[~2022-12-20 6:51 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-19 8:35 [RESEND PATCH 0/3] virtio: vdpa: new SolidNET DPU driver Alvaro Karsz
2022-12-19 8:35 ` [RESEND PATCH 1/3] Add SolidRun vendor id Alvaro Karsz
2022-12-29 19:55 ` Bjorn Helgaas
2022-12-29 21:06 ` Alvaro Karsz
2022-12-29 21:29 ` Bjorn Helgaas
2022-12-29 22:27 ` Michael S. Tsirkin
2022-12-19 8:35 ` [RESEND PATCH 2/3] New PCI quirk for SolidRun SNET DPU Alvaro Karsz
2022-12-29 19:55 ` Bjorn Helgaas
2022-12-19 8:35 ` [PATCH 3/3 v6] virtio: vdpa: new SolidNET DPU driver Alvaro Karsz
2022-12-19 10:43 ` Michael S. Tsirkin
2022-12-19 10:44 ` Michael S. Tsirkin
2022-12-19 10:49 ` Michael S. Tsirkin
2022-12-19 10:55 ` Alvaro Karsz
2022-12-19 11:03 ` Michael S. Tsirkin
2022-12-19 11:32 ` Alvaro Karsz
2022-12-19 16:40 ` Michael S. Tsirkin
2022-12-20 6:50 ` Jason Wang [this message]
2022-12-20 7:25 ` Alvaro Karsz
2022-12-20 8:54 ` Jason Wang
2022-12-20 16:32 ` Nathan Chancellor
2022-12-20 16:46 ` Alvaro Karsz
2022-12-20 20:49 ` Nathan Chancellor
2022-12-20 23:20 ` Michael S. Tsirkin
2022-12-20 21:48 ` Arnd Bergmann
2022-12-21 6:40 ` Michael S. Tsirkin
2022-12-21 7:05 ` Alvaro Karsz
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=96d85666-106b-a43e-6115-b9959b4e3e66@redhat.com \
--to=jasowang@redhat.com \
--cc=alvaro.karsz@solid-run.com \
--cc=bhelgaas@google.com \
--cc=jdelvare@suse.com \
--cc=linux-pci@vger.kernel.org \
--cc=linux@roeck-us.net \
--cc=mst@redhat.com \
--cc=virtualization@lists.linux-foundation.org \
/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).