All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
From: Srujana Challa <schalla@marvell.com>
To: Stefano Garzarella <sgarzare@redhat.com>
Cc: "virtualization@lists.linux.dev" <virtualization@lists.linux.dev>,
	"mst@redhat.com" <mst@redhat.com>,
	"jasowang@redhat.com" <jasowang@redhat.com>,
	"xuanzhuo@linux.alibaba.com" <xuanzhuo@linux.alibaba.com>,
	Vamsi Krishna Attunuru <vattunuru@marvell.com>,
	Shijith Thotton <sthotton@marvell.com>,
	Nithin Kumar Dabilpuram <ndabilpuram@marvell.com>,
	Jerin Jacob <jerinj@marvell.com>
Subject: RE: [EXTERNAL] Re: [PATCH] virtio: vdpa: vDPA driver for Marvell OCTEON DPU devices
Date: Wed, 10 Apr 2024 12:40:29 +0000	[thread overview]
Message-ID: <DS0PR18MB53689105898A0ACAEDD60322A0062@DS0PR18MB5368.namprd18.prod.outlook.com> (raw)
In-Reply-To: <zngyydrkdaeufu3d4r4mfjijxua4ivtxy6aalctvyge2xhv623@kzcgysxs2lbg>

> Subject: Re: [EXTERNAL] Re: [PATCH] virtio: vdpa: vDPA driver for Marvell
> OCTEON DPU devices
> 
> 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@marvell.com>
> >> >Signed-off-by: Vamsi Attunuru <vattunuru@marvell.com>
> >> >Signed-off-by: Shijith Thotton <sthotton@marvell.com>
> >> >Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
> >> >---
> >> > 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?
Our device's firmware needs to boot up on the card before loading
the vdpa driver.
> 
> >
> >>
> >> >+	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


  reply	other threads:[~2024-04-10 12:40 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-27 11:21 [PATCH] virtio: vdpa: vDPA driver for Marvell OCTEON DPU devices Srujana Challa
2024-03-29  4:28 ` Jason Wang
2024-03-29 12:34   ` [EXTERNAL] " Srujana Challa
2024-03-31 11:31     ` Michael S. Tsirkin
2024-04-07  3:24       ` Jason Wang
2024-04-07  3:34     ` Jason Wang
2024-04-10 10:15       ` Srujana Challa
2024-04-10 11:19         ` Michael S. Tsirkin
2024-04-10 12:34           ` Srujana Challa
2024-04-11  6:01             ` Jason Wang
2024-04-12  5:12               ` Srujana Challa
2024-04-12  6:41                 ` Jason Wang
2024-04-12  9:48                   ` Srujana Challa
2024-04-15  6:49                     ` Jason Wang
2024-04-15 12:42                       ` Srujana Challa
2024-04-16  3:17                         ` Jason Wang
2024-04-22 20:42                           ` Michael S. Tsirkin
2024-04-24 13:05                             ` Srujana Challa
2024-04-23  5:40                           ` Srujana Challa
2024-04-11  5:59         ` Jason Wang
2024-03-29 11:37 ` Stefano Garzarella
2024-03-29 13:02   ` [EXTERNAL] " Srujana Challa
2024-03-29 13:19     ` Stefano Garzarella
2024-04-10 12:40       ` Srujana Challa [this message]
2024-04-22 20:44 ` Michael S. Tsirkin
2024-04-24 19:08 ` [PATCH v2] " Srujana Challa
2024-04-25  1:57   ` Jason Wang
2024-04-25  9:36   ` Michael S. Tsirkin

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=DS0PR18MB53689105898A0ACAEDD60322A0062@DS0PR18MB5368.namprd18.prod.outlook.com \
    --to=schalla@marvell.com \
    --cc=jasowang@redhat.com \
    --cc=jerinj@marvell.com \
    --cc=mst@redhat.com \
    --cc=ndabilpuram@marvell.com \
    --cc=sgarzare@redhat.com \
    --cc=sthotton@marvell.com \
    --cc=vattunuru@marvell.com \
    --cc=virtualization@lists.linux.dev \
    --cc=xuanzhuo@linux.alibaba.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.