> From: Jason Wang
> Sent: Monday, January 4, 2021 12:33 PM
>
> On 2021/1/4 上午11:31, Parav Pandit wrote:
> > To add one or more VDPA devices, define a management device which
> > allows adding or removing vdpa device. A management device defines set
> > of callbacks to manage vdpa devices.
> >
> From: Jason Wang
> Sent: Monday, January 4, 2021 12:35 PM
>
> On 2021/1/4 上午11:31, Parav Pandit wrote:
> > static int __init vdpasim_net_init(void)
> > {
> > int ret = 0;
> > @@ -176,6 +264,8 @@ static int __init vdpasim_net_init(void)
> >
> > if (default_device)
> >
On 2021/1/4 上午11:31, Parav Pandit wrote:
static int __init vdpasim_net_init(void)
{
int ret = 0;
@@ -176,6 +264,8 @@ static int __init vdpasim_net_init(void)
if (default_device)
ret = vdpasim_net_default_dev_register();
+ else
+ ret =
On 2021/1/4 上午11:31, Parav Pandit wrote:
To add one or more VDPA devices, define a management device which
allows adding or removing vdpa device. A management device defines
set of callbacks to manage vdpa devices.
To begin with, it defines add and remove callbacks through which a user
defined
On 2021/1/4 上午11:31, Parav Pandit wrote:
MAC address array is used only in vdpa_sim_net.c.
Hence, keep it static.
Signed-off-by: Parav Pandit
---
Changelog:
v1->v2:
- new patch
---
drivers/vdpa/vdpa_sim/vdpa_sim_net.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git
On 2021/1/3 下午8:37, Michael S. Tsirkin wrote:
On Thu, Dec 31, 2020 at 11:52:14AM +0800, Jason Wang wrote:
On 2020/12/4 下午12:03, Jason Wang wrote:
Hi all:
This series tries to implement a vDPA driver for virtio-pci device
which will bridge between vDPA bus and virtio-pci device.
This could
This patch introduce a vDPA driver for virtio-pci device. It bridges
the virtio-pci control command to the vDPA bus. This will be used for
features prototyping and testing.
Note that get/restore virtqueue state is not supported which needs
extension on the virtio specification.
Signed-off-by:
There's no guarantee that the device can disable a specific virtqueue
through set_vq_ready(). One example is the modern virtio-pci
device. So this patch removes the warning.
Signed-off-by: Jason Wang
---
drivers/virtio/virtio_vdpa.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff
This patch delay the queue number setting to vDPA device
registering. This allows us to probe the virtqueue numbers between
device allocation and registering.
Reviewed-by: Stefano Garzarella
Signed-off-by: Jason Wang
---
drivers/vdpa/ifcvf/ifcvf_main.c | 5 ++---
Signed-off-by: Jason Wang
---
drivers/virtio/Kconfig | 10 +-
drivers/virtio/Makefile| 1 +
drivers/virtio/virtio_pci_common.h | 27 +-
drivers/virtio/virtio_pci_modern.c | 617 -
drivers/virtio/virtio_pci_modern_dev.c | 599
To ease the split, map_capability() was renamed to
vp_modern_map_capability(). While at it, add the comments for the
arguments and switch to use virtio_pci_modern_device as the first
parameter.
Signed-off-by: Jason Wang
---
drivers/virtio/virtio_pci_modern.c | 46 +++---
This patch introduces help to get notification offset of modern device.
Signed-off-by: Jason Wang
---
drivers/virtio/virtio_pci_modern.c | 21 -
1 file changed, 16 insertions(+), 5 deletions(-)
diff --git a/drivers/virtio/virtio_pci_modern.c
This patch introduces helper for getting queue num of modern device.
Signed-off-by: Jason Wang
---
drivers/virtio/virtio_pci_modern.c | 13 -
1 file changed, 12 insertions(+), 1 deletion(-)
diff --git a/drivers/virtio/virtio_pci_modern.c
b/drivers/virtio/virtio_pci_modern.c
index
This patch introduces helper for setting/getting queue size for modern
device.
Signed-off-by: Jason Wang
---
drivers/virtio/virtio_pci_modern.c | 34 --
1 file changed, 32 insertions(+), 2 deletions(-)
diff --git a/drivers/virtio/virtio_pci_modern.c
This patch introduces a helper to set/get queue_enable for modern device.
Signed-off-by: Jason Wang
---
drivers/virtio/virtio_pci_modern.c | 37 +-
1 file changed, 31 insertions(+), 6 deletions(-)
diff --git a/drivers/virtio/virtio_pci_modern.c
This patch introduce a helper to set virtqueue address for modern address.
Signed-off-by: Jason Wang
---
drivers/virtio/virtio_pci_modern.c | 33 --
1 file changed, 27 insertions(+), 6 deletions(-)
diff --git a/drivers/virtio/virtio_pci_modern.c
This patch introduces a helper to set virtqueue MSI vector.
Signed-off-by: Jason Wang
---
drivers/virtio/virtio_pci_modern.c | 35 --
1 file changed, 23 insertions(+), 12 deletions(-)
diff --git a/drivers/virtio/virtio_pci_modern.c
This patch introduces vp_modern_generation() to get device generation.
Signed-off-by: Jason Wang
---
drivers/virtio/virtio_pci_modern.c | 17 ++---
1 file changed, 14 insertions(+), 3 deletions(-)
diff --git a/drivers/virtio/virtio_pci_modern.c
b/drivers/virtio/virtio_pci_modern.c
This patch introduces helpers for setting and getting features.
Signed-off-by: Jason Wang
---
drivers/virtio/virtio_pci_modern.c | 43 +++---
1 file changed, 33 insertions(+), 10 deletions(-)
diff --git a/drivers/virtio/virtio_pci_modern.c
This patch introduces helpers to allow set and get device status.
Signed-off-by: Jason Wang
---
drivers/virtio/virtio_pci_modern.c | 37 +++---
1 file changed, 29 insertions(+), 8 deletions(-)
diff --git a/drivers/virtio/virtio_pci_modern.c
This patch introduces vp_modern_config_vector() for setting config
vector.
Signed-off-by: Jason Wang
---
drivers/virtio/virtio_pci_modern.c | 16 ++--
1 file changed, 14 insertions(+), 2 deletions(-)
diff --git a/drivers/virtio/virtio_pci_modern.c
This patch introduces vp_modern_remove() doing device resources
cleanup to make it can be used.
Signed-off-by: Jason Wang
---
drivers/virtio/virtio_pci_modern.c | 14 --
1 file changed, 12 insertions(+), 2 deletions(-)
diff --git a/drivers/virtio/virtio_pci_modern.c
This patch factors out the modern device initialization logic into a
helper. Note that it still depends on the caller to enable pci device
which allows the caller to use e.g devres.
Signed-off-by: Jason Wang
---
drivers/virtio/virtio_pci_modern.c | 50 +-
1 file
This patch splits out the virtio-pci modern device only attributes
into another structure. While at it, a dedicated probe method for
modern only attributes is introduced. This may help for split the
logic into a dedicated module.
Signed-off-by: Jason Wang
---
drivers/virtio/virtio_pci_common.h
Hi all:
This series tries to implement a vDPA driver for virtio-pci device
which will bridge between vDPA bus and virtio-pci device.
This could be used for future feature prototyping and testing.
Please review
Changes since V2:
- tweak config prompt
- switch from 'cb' to 'config_cb' for
Instead of accessing iomem via struct virito_pci_device directly,
tweak to call the io accessors through the iomem structure. This will
ease the splitting of modern virtio device logic.
Signed-off-by: Jason Wang
---
drivers/virtio/virtio_pci_modern.c | 76 ++
1 file
Enable user to query vdpa device information.
$ vdpa dev add mgmtdev vdpasim_net name foo2
Show the newly created vdpa device by its name:
$ vdpa dev show foo2
foo2: type network mgmtdev vdpasim_net vendor_id 0 max_vqs 2 max_vq_size 256
$ vdpa dev show foo2 -jp
{
"dev": {
"foo2": {
Enable user to create vdpasim net simulate devices.
Show vdpa management device that supports creating, deleting vdpa devices.
$ vdpa mgmtdev show
vdpasim_net:
supported_classes
net
$ vdpa mgmtdev show -jp
{
"show": {
"vdpasim_net": {
"supported_classes": {
In a subsequent patch, when user initiated command creates a vdpa device,
the user chooses the name of the vdpa device.
To support it, extend the device allocation API to consider this name
specified by the caller driver.
Signed-off-by: Parav Pandit
Reviewed-by: Eli Cohen
Acked-by: Jason Wang
Add the ability to add and delete a vdpa device.
Examples:
Create a vdpa device of type network named "foo2" from
the management device vdpasim:
$ vdpa dev add mgmtdev vdpasim_net name foo2
Delete the vdpa device after its use:
$ vdpa dev del foo2
Signed-off-by: Parav Pandit
Reviewed-by: Eli
To add one or more VDPA devices, define a management device which
allows adding or removing vdpa device. A management device defines
set of callbacks to manage vdpa devices.
To begin with, it defines add and remove callbacks through which a user
defined vdpa device can be added or removed.
A
MAC address array is used only in vdpa_sim_net.c.
Hence, keep it static.
Signed-off-by: Parav Pandit
---
Changelog:
v1->v2:
- new patch
---
drivers/vdpa/vdpa_sim/vdpa_sim_net.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/vdpa/vdpa_sim/vdpa_sim_net.c
This patchset covers user requirements for managing existing vdpa devices,
using a tool and its internal design notes for kernel drivers.
Background and user requirements:
--
(1) Currently VDPA device is created by driver when driver is loaded.
However, user should
To support creating multiple vdpa devices and to allow user to
manage them, add a knob to disable a default vdpa net device.
Signed-off-by: Parav Pandit
---
Changelog:
v1->v2:
- new patch
---
drivers/vdpa/vdpa_sim/vdpa_sim_net.c | 41
1 file changed, 29
On 2020/12/4 下午11:20, Stefano Garzarella wrote:
+#define VP_VDPA_QUEUE_MAX 256
+#define VP_VDPA_DRIVER_NAME "vp_vdpa"
+
+struct vp_vring {
+ void __iomem *notify;
+ char msix_name[256];
Can we use a macro for the msix_name size, since we use 256 in
multiple places?
Yes, will switch
On 2020/12/5 上午1:10, Randy Dunlap wrote:
Hi Jason--
On 12/3/20 8:03 PM, Jason Wang wrote:
diff --git a/drivers/virtio/Kconfig b/drivers/virtio/Kconfig
index 7b41130d3f35..d1a6bd2a975f 100644
--- a/drivers/virtio/Kconfig
+++ b/drivers/virtio/Kconfig
@@ -12,6 +12,14 @@ config
On Thu, Dec 31, 2020 at 11:52:14AM +0800, Jason Wang wrote:
>
> On 2020/12/4 下午12:03, Jason Wang wrote:
> > Hi all:
> >
> > This series tries to implement a vDPA driver for virtio-pci device
> > which will bridge between vDPA bus and virtio-pci device.
> >
> > This could be used for future
37 matches
Mail list logo