From: Alvaro Karsz <alvaro.karsz@solid-run.com>
To: linux-pci@vger.kernel.org, virtualization@lists.linux-foundation.org
Cc: mst@redhat.com, helgaas@kernel.org,
Alvaro Karsz <alvaro.karsz@solid-run.com>
Subject: [PATCH v9 0/3] virtio: vdpa: new SolidNET DPU driver
Date: Tue, 10 Jan 2023 18:56:35 +0200 [thread overview]
Message-ID: <20230110165638.123745-1-alvaro.karsz@solid-run.com> (raw)
This series adds a vDPA driver for SolidNET DPU.
Patch 1 adds SolidRun vendor ID to pci_ids.
Patch 2 adds a PCI quirk needed by the DPU.
Patch 3 has the driver source code.
Patch 1 is prerequisite for both patch 2 and patch 3.
v2:
- Semantics fixes in commit log - Patch 1.
- Move the vendor ID to the right place, sorted by vendor ID - Patch 1.
- Update patch subject to be more meaningful and similar to
previous quirks - Patch 2.
- Update the commit log to describe better what the patch does -
Patch 2.
- Auto detect the BAR used for communication - Patch 3.
- When waiting for the DPU to write a config, wait for 5secs
before giving up on the device - Patch 3.
- Return EOPNOTSUPP error code in vDPA set_vq_state callback if
the vq state is not the same as the initial one - Patch 3.
- Implement a vDPA reset callback - Patch 3.
- Wait for an ACK when sending a message to the DPU - Patch 3.
- Add endianness comments on 64bit read/write functions - Patch 3.
- Remove the get_iova_range and free vDPA callbacks - Patch 3.
- Usage of managed device functions to ioremap a region - Patch 3.
- Call pci_set_drvdata and pci_set_master before
vdpa_register_device - Patch 3.
- 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 - Patch 3.
v3:
- Validate vDPA config length while receiving the DPU's config,
not while trying to write the vDPA config to the DPU - Patch 3.
- Request IRQs when vDPA status is set to
VIRTIO_CONFIG_S_DRIVER_OK - Patch 3.
- Remove snet_reset_dev() from the PCI remove function for a VF - Patch 3.
v4:
- Get SolidRun vendor ID from pci_ids - Patch 3.
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 - Patch 3.
- Remove the #include <linux/hwmon-sysfs.h> from snet_hwmon.c - Patch 3.
- Remove the unnecessary (long) casting from snet_hwmon_read_reg -
Patch 3.
- Remove the "_hwmon" ending from the hwmon name - Patch 3.
- Usage of IS_ERR macro to check if devm_hwmon_device_register_with_info
failed - Patch 3.
- Replace schedule() with usleep_range() in the "hot loop" in
psnet_detect_bar - Patch 3.
- Remove the logging of memory allocation failures - Patch 3.
- Add parenthesis to arguments in SNET_* macros - Patch 3.
- Prefer sizeof(*variable) instead of sizeof(struct x) when allocating
memory - Patch 3.
v6:
- SNET_WRN -> SNET_WARN - Patch 3.
v7:
- Explain the dependency of SNET_VDPA on HWMON in Kconfig - Patch 3.
- Fix snprintf size argument in psnet_open_pf_bar and
snet_open_vf_bar - Patch 3.
- Fix kernel warning in snet_vdpa_remove_vf.
Call pci_free_irq_vectors after vdpa_unregister_device,
otherwise we'll get "remove_proc_entry: removing non-empty
directory 'irq/..', leaking at least '..'" warnings - Patch 3.
- Remove the psnet_create_hwmon function empty definition if
HWMON is not enabled, otherwise, we'll get "warning: no
previous prototype for 'psnet_create_hwmon'" when compiling
with W=1.
This was reported by kernel test robot <lkp@intel.com> - Patch 3.
v8:
- Fix the series versioning.
I updated the versions of every patch separately,
which seems to be wrong.
v9:
- Indent PCI id in pci_ids.h with tabs - Patch 1.
- Wrap patch comment log to fill 75 columns - Patch 1 + 2.
Alvaro Karsz (3):
PCI: Add SolidRun vendor ID
PCI: Avoid FLR for SolidRun SNET DPU rev 1
virtio: vdpa: new SolidNET DPU driver.
MAINTAINERS | 4 +
drivers/pci/quirks.c | 8 +
drivers/vdpa/Kconfig | 18 +
drivers/vdpa/Makefile | 1 +
drivers/vdpa/solidrun/Makefile | 6 +
drivers/vdpa/solidrun/snet_hwmon.c | 188 +++++
drivers/vdpa/solidrun/snet_main.c | 1110 ++++++++++++++++++++++++++++
drivers/vdpa/solidrun/snet_vdpa.h | 194 +++++
include/linux/pci_ids.h | 2 +
9 files changed, 1531 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
--
2.32.0
next reply other threads:[~2023-01-10 16:57 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-10 16:56 Alvaro Karsz [this message]
2023-01-10 16:56 ` [PATCH v9 1/3] PCI: Add SolidRun vendor ID Alvaro Karsz
2023-01-10 16:56 ` [PATCH v9 2/3] PCI: Avoid FLR for SolidRun SNET DPU rev 1 Alvaro Karsz
2023-01-10 16:56 ` [PATCH v9 3/3] virtio: vdpa: new SolidNET DPU driver Alvaro Karsz
2023-01-10 17:55 ` [PATCH v9 0/3] " Bjorn Helgaas
2023-01-10 20:27 ` 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=20230110165638.123745-1-alvaro.karsz@solid-run.com \
--to=alvaro.karsz@solid-run.com \
--cc=helgaas@kernel.org \
--cc=linux-pci@vger.kernel.org \
--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).