Re: [EXTERNAL] Re: [PATCH] virtio: vdpa: vDPA driver for Marvell OCTEON DPU devices

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Mar 29, 2024 at 01:02:28PM +0000, Srujana Challa wrote:
Subject: [EXTERNAL] Re: [PATCH] virtio: vdpa: vDPA driver for Marvell OCTEON
DPU devices

Prioritize security for external emails: Confirm sender and content safety
before clicking links or opening attachments

----------------------------------------------------------------------
On Wed, Mar 27, 2024 at 04:51:36PM +0530, Srujana Challa wrote:
>This commit introduces a new vDPA driver specifically designed for
>managing the virtio control plane over the vDPA bus for OCTEON DPU
>devices. The driver consists of two layers:
>
>1. Octep HW Layer (Octeon Endpoint): Responsible for handling hardware
>operations and configurations related to the DPU device.
>
>2. Octep Main Layer: Compliant with the vDPA bus framework, this layer
>implements device operations for the vDPA bus. It handles device
>probing, bus attachment, vring operations, and other relevant tasks.
>
>Signed-off-by: Srujana Challa <schalla@xxxxxxxxxxx>
>Signed-off-by: Vamsi Attunuru <vattunuru@xxxxxxxxxxx>
>Signed-off-by: Shijith Thotton <sthotton@xxxxxxxxxxx>
>Signed-off-by: Nithin Dabilpuram <ndabilpuram@xxxxxxxxxxx>
>---
> MAINTAINERS                              |   5 +
> drivers/vdpa/Kconfig                     |   9 +
> drivers/vdpa/Makefile                    |   1 +
> drivers/vdpa/octeon_ep/Makefile          |   4 +
> drivers/vdpa/octeon_ep/octep_vdpa.h      |  93 +++
> drivers/vdpa/octeon_ep/octep_vdpa_hw.c   | 457 ++++++++++++
> drivers/vdpa/octeon_ep/octep_vdpa_main.c | 903
+++++++++++++++++++++++
> 7 files changed, 1472 insertions(+)
> create mode 100644 drivers/vdpa/octeon_ep/Makefile  create mode
100644
>drivers/vdpa/octeon_ep/octep_vdpa.h
> create mode 100644 drivers/vdpa/octeon_ep/octep_vdpa_hw.c
> create mode 100644 drivers/vdpa/octeon_ep/octep_vdpa_main.c

[...]

>diff --git a/drivers/vdpa/Kconfig b/drivers/vdpa/Kconfig index
>656c1cb541de..775149fad476 100644
>--- a/drivers/vdpa/Kconfig
>+++ b/drivers/vdpa/Kconfig
>@@ -126,4 +126,13 @@ config PDS_VDPA
> 	  With this driver, the VirtIO dataplane can be
> 	  offloaded to an AMD/Pensando DSC device.
>
>+config OCTEONEP_VDPA
>+	tristate "vDPA driver for Octeon DPU devices"
>+	depends on m

Just for curiosity, why restrict it to module-only?

There is an etherent driver for the same class of devices. So,
we made this vDPA driver as module.

Sorry, I didn`t get it.

What would be the problem if we don`t put `depends on m` here?



>+	depends on PCI_MSI
>+	help
>+	  vDPA driver for Marvell's Octeon DPU devices.
>+	  With this driver, the VirtIO dataplane can be
>+	  offloaded to a Octeon DPU device.
>+
> endif # VDPA

[...]

>+
>+void octep_notify_queue(struct octep_hw *oct_hw, u16 qid) {
>+	iowrite16(qid, oct_hw->vqs[qid].notify_addr); }
>+
>+void octep_read_dev_config(struct octep_hw *oct_hw, u64 offset, void
>+*dst, int length) {
>+	u8 old_gen, new_gen, *p;
>+	int i;
>+
>+	WARN_ON(offset + length > oct_hw->config_size);
                ^
Should we return early in this case?
Yes, I will move this to caller of this function.

Otherwise you can do this here:

	if (WARN_ON(offset + length > oct_hw->config_size))
		return;

Thanks,
Stefano





[Index of Archives]     [KVM Development]     [Libvirt Development]     [Libvirt Users]     [CentOS Virtualization]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux