All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v1 0/2] vduse: add support for networking devices
@ 2023-06-27 11:36 ` Maxime Coquelin
  0 siblings, 0 replies; 30+ messages in thread
From: Maxime Coquelin @ 2023-06-27 11:36 UTC (permalink / raw)
  To: xieyongji, jasowang, mst, david.marchand, lulu
  Cc: xuanzhuo, netdev, linux-kernel, virtualization, eperezma,
	Maxime Coquelin

This small series enables virtio-net device type in VDUSE.
With it, basic operation have been tested, both with
virtio-vdpa and vhost-vdpa using DPDK Vhost library series
adding VDUSE support using split rings layout (merged in
DPDK v23.07-rc1).

Control queue support (and so multiqueue) has also been
tested, but requires a Kernel series from Jason Wang
relaxing control queue polling [1] to function reliably.

[1]: https://lore.kernel.org/lkml/CACGkMEtgrxN3PPwsDo4oOsnsSLJfEmBEZ0WvjGRr3whU+QasUg@mail.gmail.com/T/

RFC -> v1 changes:
==================
- Fail device init if it does not support VERSION_1 (Jason)

Maxime Coquelin (2):
  vduse: validate block features only with block devices
  vduse: enable Virtio-net device type

 drivers/vdpa/vdpa_user/vduse_dev.c | 15 +++++++++++----
 1 file changed, 11 insertions(+), 4 deletions(-)

-- 
2.41.0

_______________________________________________
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization

^ permalink raw reply	[flat|nested] 30+ messages in thread

* [PATCH v1 0/2] vduse: add support for networking devices
@ 2023-06-27 11:36 ` Maxime Coquelin
  0 siblings, 0 replies; 30+ messages in thread
From: Maxime Coquelin @ 2023-06-27 11:36 UTC (permalink / raw)
  To: xieyongji, jasowang, mst, david.marchand, lulu
  Cc: linux-kernel, virtualization, netdev, xuanzhuo, eperezma,
	Maxime Coquelin

This small series enables virtio-net device type in VDUSE.
With it, basic operation have been tested, both with
virtio-vdpa and vhost-vdpa using DPDK Vhost library series
adding VDUSE support using split rings layout (merged in
DPDK v23.07-rc1).

Control queue support (and so multiqueue) has also been
tested, but requires a Kernel series from Jason Wang
relaxing control queue polling [1] to function reliably.

[1]: https://lore.kernel.org/lkml/CACGkMEtgrxN3PPwsDo4oOsnsSLJfEmBEZ0WvjGRr3whU+QasUg@mail.gmail.com/T/

RFC -> v1 changes:
==================
- Fail device init if it does not support VERSION_1 (Jason)

Maxime Coquelin (2):
  vduse: validate block features only with block devices
  vduse: enable Virtio-net device type

 drivers/vdpa/vdpa_user/vduse_dev.c | 15 +++++++++++----
 1 file changed, 11 insertions(+), 4 deletions(-)

-- 
2.41.0


^ permalink raw reply	[flat|nested] 30+ messages in thread

* [PATCH v1 1/2] vduse: validate block features only with block devices
  2023-06-27 11:36 ` Maxime Coquelin
@ 2023-06-27 11:36   ` Maxime Coquelin
  -1 siblings, 0 replies; 30+ messages in thread
From: Maxime Coquelin @ 2023-06-27 11:36 UTC (permalink / raw)
  To: xieyongji, jasowang, mst, david.marchand, lulu
  Cc: xuanzhuo, netdev, linux-kernel, virtualization, eperezma,
	Maxime Coquelin

This patch is preliminary work to enable network device
type support to VDUSE.

As VIRTIO_BLK_F_CONFIG_WCE shares the same value as
VIRTIO_NET_F_HOST_TSO4, we need to restrict its check
to Virtio-blk device type.

Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
---
 drivers/vdpa/vdpa_user/vduse_dev.c | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/drivers/vdpa/vdpa_user/vduse_dev.c b/drivers/vdpa/vdpa_user/vduse_dev.c
index 5f5c21674fdc..c1c2f4c711ae 100644
--- a/drivers/vdpa/vdpa_user/vduse_dev.c
+++ b/drivers/vdpa/vdpa_user/vduse_dev.c
@@ -1658,13 +1658,14 @@ static bool device_is_allowed(u32 device_id)
 	return false;
 }
 
-static bool features_is_valid(u64 features)
+static bool features_is_valid(struct vduse_dev_config *config)
 {
-	if (!(features & (1ULL << VIRTIO_F_ACCESS_PLATFORM)))
+	if (!(config->features & (1ULL << VIRTIO_F_ACCESS_PLATFORM)))
 		return false;
 
 	/* Now we only support read-only configuration space */
-	if (features & (1ULL << VIRTIO_BLK_F_CONFIG_WCE))
+	if ((config->device_id == VIRTIO_ID_BLOCK) &&
+			(config->features & (1ULL << VIRTIO_BLK_F_CONFIG_WCE)))
 		return false;
 
 	return true;
@@ -1691,7 +1692,7 @@ static bool vduse_validate_config(struct vduse_dev_config *config)
 	if (!device_is_allowed(config->device_id))
 		return false;
 
-	if (!features_is_valid(config->features))
+	if (!features_is_valid(config))
 		return false;
 
 	return true;
-- 
2.41.0

_______________________________________________
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization

^ permalink raw reply related	[flat|nested] 30+ messages in thread

* [PATCH v1 1/2] vduse: validate block features only with block devices
@ 2023-06-27 11:36   ` Maxime Coquelin
  0 siblings, 0 replies; 30+ messages in thread
From: Maxime Coquelin @ 2023-06-27 11:36 UTC (permalink / raw)
  To: xieyongji, jasowang, mst, david.marchand, lulu
  Cc: linux-kernel, virtualization, netdev, xuanzhuo, eperezma,
	Maxime Coquelin

This patch is preliminary work to enable network device
type support to VDUSE.

As VIRTIO_BLK_F_CONFIG_WCE shares the same value as
VIRTIO_NET_F_HOST_TSO4, we need to restrict its check
to Virtio-blk device type.

Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
---
 drivers/vdpa/vdpa_user/vduse_dev.c | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/drivers/vdpa/vdpa_user/vduse_dev.c b/drivers/vdpa/vdpa_user/vduse_dev.c
index 5f5c21674fdc..c1c2f4c711ae 100644
--- a/drivers/vdpa/vdpa_user/vduse_dev.c
+++ b/drivers/vdpa/vdpa_user/vduse_dev.c
@@ -1658,13 +1658,14 @@ static bool device_is_allowed(u32 device_id)
 	return false;
 }
 
-static bool features_is_valid(u64 features)
+static bool features_is_valid(struct vduse_dev_config *config)
 {
-	if (!(features & (1ULL << VIRTIO_F_ACCESS_PLATFORM)))
+	if (!(config->features & (1ULL << VIRTIO_F_ACCESS_PLATFORM)))
 		return false;
 
 	/* Now we only support read-only configuration space */
-	if (features & (1ULL << VIRTIO_BLK_F_CONFIG_WCE))
+	if ((config->device_id == VIRTIO_ID_BLOCK) &&
+			(config->features & (1ULL << VIRTIO_BLK_F_CONFIG_WCE)))
 		return false;
 
 	return true;
@@ -1691,7 +1692,7 @@ static bool vduse_validate_config(struct vduse_dev_config *config)
 	if (!device_is_allowed(config->device_id))
 		return false;
 
-	if (!features_is_valid(config->features))
+	if (!features_is_valid(config))
 		return false;
 
 	return true;
-- 
2.41.0


^ permalink raw reply related	[flat|nested] 30+ messages in thread

* [PATCH v1 2/2] vduse: enable Virtio-net device type
  2023-06-27 11:36 ` Maxime Coquelin
@ 2023-06-27 11:36   ` Maxime Coquelin
  -1 siblings, 0 replies; 30+ messages in thread
From: Maxime Coquelin @ 2023-06-27 11:36 UTC (permalink / raw)
  To: xieyongji, jasowang, mst, david.marchand, lulu
  Cc: xuanzhuo, netdev, linux-kernel, virtualization, eperezma,
	Maxime Coquelin

This patch adds Virtio-net device type to the supported
devices types. Initialization fails if the device does
not support VIRTIO_F_VERSION_1 feature, in order to
guarantee the configuration space is read-only.

Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
---
 drivers/vdpa/vdpa_user/vduse_dev.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/vdpa/vdpa_user/vduse_dev.c b/drivers/vdpa/vdpa_user/vduse_dev.c
index c1c2f4c711ae..89088fa27026 100644
--- a/drivers/vdpa/vdpa_user/vduse_dev.c
+++ b/drivers/vdpa/vdpa_user/vduse_dev.c
@@ -142,6 +142,7 @@ static struct workqueue_struct *vduse_irq_bound_wq;
 
 static u32 allowed_device_id[] = {
 	VIRTIO_ID_BLOCK,
+	VIRTIO_ID_NET,
 };
 
 static inline struct vduse_dev *vdpa_to_vduse(struct vdpa_device *vdpa)
@@ -1668,6 +1669,10 @@ static bool features_is_valid(struct vduse_dev_config *config)
 			(config->features & (1ULL << VIRTIO_BLK_F_CONFIG_WCE)))
 		return false;
 
+	if ((config->device_id == VIRTIO_ID_NET) &&
+			!(config->features & (1ULL << VIRTIO_F_VERSION_1)))
+		return false;
+
 	return true;
 }
 
@@ -2023,6 +2028,7 @@ static const struct vdpa_mgmtdev_ops vdpa_dev_mgmtdev_ops = {
 
 static struct virtio_device_id id_table[] = {
 	{ VIRTIO_ID_BLOCK, VIRTIO_DEV_ANY_ID },
+	{ VIRTIO_ID_NET, VIRTIO_DEV_ANY_ID },
 	{ 0 },
 };
 
-- 
2.41.0

_______________________________________________
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization

^ permalink raw reply related	[flat|nested] 30+ messages in thread

* [PATCH v1 2/2] vduse: enable Virtio-net device type
@ 2023-06-27 11:36   ` Maxime Coquelin
  0 siblings, 0 replies; 30+ messages in thread
From: Maxime Coquelin @ 2023-06-27 11:36 UTC (permalink / raw)
  To: xieyongji, jasowang, mst, david.marchand, lulu
  Cc: linux-kernel, virtualization, netdev, xuanzhuo, eperezma,
	Maxime Coquelin

This patch adds Virtio-net device type to the supported
devices types. Initialization fails if the device does
not support VIRTIO_F_VERSION_1 feature, in order to
guarantee the configuration space is read-only.

Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
---
 drivers/vdpa/vdpa_user/vduse_dev.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/vdpa/vdpa_user/vduse_dev.c b/drivers/vdpa/vdpa_user/vduse_dev.c
index c1c2f4c711ae..89088fa27026 100644
--- a/drivers/vdpa/vdpa_user/vduse_dev.c
+++ b/drivers/vdpa/vdpa_user/vduse_dev.c
@@ -142,6 +142,7 @@ static struct workqueue_struct *vduse_irq_bound_wq;
 
 static u32 allowed_device_id[] = {
 	VIRTIO_ID_BLOCK,
+	VIRTIO_ID_NET,
 };
 
 static inline struct vduse_dev *vdpa_to_vduse(struct vdpa_device *vdpa)
@@ -1668,6 +1669,10 @@ static bool features_is_valid(struct vduse_dev_config *config)
 			(config->features & (1ULL << VIRTIO_BLK_F_CONFIG_WCE)))
 		return false;
 
+	if ((config->device_id == VIRTIO_ID_NET) &&
+			!(config->features & (1ULL << VIRTIO_F_VERSION_1)))
+		return false;
+
 	return true;
 }
 
@@ -2023,6 +2028,7 @@ static const struct vdpa_mgmtdev_ops vdpa_dev_mgmtdev_ops = {
 
 static struct virtio_device_id id_table[] = {
 	{ VIRTIO_ID_BLOCK, VIRTIO_DEV_ANY_ID },
+	{ VIRTIO_ID_NET, VIRTIO_DEV_ANY_ID },
 	{ 0 },
 };
 
-- 
2.41.0


^ permalink raw reply related	[flat|nested] 30+ messages in thread

* Re: [PATCH v1 1/2] vduse: validate block features only with block devices
  2023-06-27 11:36   ` Maxime Coquelin
@ 2023-06-28  2:34     ` Jason Wang
  -1 siblings, 0 replies; 30+ messages in thread
From: Jason Wang @ 2023-06-28  2:34 UTC (permalink / raw)
  To: Maxime Coquelin
  Cc: xuanzhuo, lulu, mst, netdev, linux-kernel, virtualization,
	xieyongji, eperezma, david.marchand

On Tue, Jun 27, 2023 at 7:37 PM Maxime Coquelin
<maxime.coquelin@redhat.com> wrote:
>
> This patch is preliminary work to enable network device
> type support to VDUSE.
>
> As VIRTIO_BLK_F_CONFIG_WCE shares the same value as
> VIRTIO_NET_F_HOST_TSO4, we need to restrict its check
> to Virtio-blk device type.
>
> Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>

Acked-by: Jason Wang <jasowang@redhat.com>

Thanks

> ---
>  drivers/vdpa/vdpa_user/vduse_dev.c | 9 +++++----
>  1 file changed, 5 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/vdpa/vdpa_user/vduse_dev.c b/drivers/vdpa/vdpa_user/vduse_dev.c
> index 5f5c21674fdc..c1c2f4c711ae 100644
> --- a/drivers/vdpa/vdpa_user/vduse_dev.c
> +++ b/drivers/vdpa/vdpa_user/vduse_dev.c
> @@ -1658,13 +1658,14 @@ static bool device_is_allowed(u32 device_id)
>         return false;
>  }
>
> -static bool features_is_valid(u64 features)
> +static bool features_is_valid(struct vduse_dev_config *config)
>  {
> -       if (!(features & (1ULL << VIRTIO_F_ACCESS_PLATFORM)))
> +       if (!(config->features & (1ULL << VIRTIO_F_ACCESS_PLATFORM)))
>                 return false;
>
>         /* Now we only support read-only configuration space */
> -       if (features & (1ULL << VIRTIO_BLK_F_CONFIG_WCE))
> +       if ((config->device_id == VIRTIO_ID_BLOCK) &&
> +                       (config->features & (1ULL << VIRTIO_BLK_F_CONFIG_WCE)))
>                 return false;
>
>         return true;
> @@ -1691,7 +1692,7 @@ static bool vduse_validate_config(struct vduse_dev_config *config)
>         if (!device_is_allowed(config->device_id))
>                 return false;
>
> -       if (!features_is_valid(config->features))
> +       if (!features_is_valid(config))
>                 return false;
>
>         return true;
> --
> 2.41.0
>

_______________________________________________
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization

^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: [PATCH v1 1/2] vduse: validate block features only with block devices
@ 2023-06-28  2:34     ` Jason Wang
  0 siblings, 0 replies; 30+ messages in thread
From: Jason Wang @ 2023-06-28  2:34 UTC (permalink / raw)
  To: Maxime Coquelin
  Cc: xieyongji, mst, david.marchand, lulu, linux-kernel,
	virtualization, netdev, xuanzhuo, eperezma

On Tue, Jun 27, 2023 at 7:37 PM Maxime Coquelin
<maxime.coquelin@redhat.com> wrote:
>
> This patch is preliminary work to enable network device
> type support to VDUSE.
>
> As VIRTIO_BLK_F_CONFIG_WCE shares the same value as
> VIRTIO_NET_F_HOST_TSO4, we need to restrict its check
> to Virtio-blk device type.
>
> Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>

Acked-by: Jason Wang <jasowang@redhat.com>

Thanks

> ---
>  drivers/vdpa/vdpa_user/vduse_dev.c | 9 +++++----
>  1 file changed, 5 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/vdpa/vdpa_user/vduse_dev.c b/drivers/vdpa/vdpa_user/vduse_dev.c
> index 5f5c21674fdc..c1c2f4c711ae 100644
> --- a/drivers/vdpa/vdpa_user/vduse_dev.c
> +++ b/drivers/vdpa/vdpa_user/vduse_dev.c
> @@ -1658,13 +1658,14 @@ static bool device_is_allowed(u32 device_id)
>         return false;
>  }
>
> -static bool features_is_valid(u64 features)
> +static bool features_is_valid(struct vduse_dev_config *config)
>  {
> -       if (!(features & (1ULL << VIRTIO_F_ACCESS_PLATFORM)))
> +       if (!(config->features & (1ULL << VIRTIO_F_ACCESS_PLATFORM)))
>                 return false;
>
>         /* Now we only support read-only configuration space */
> -       if (features & (1ULL << VIRTIO_BLK_F_CONFIG_WCE))
> +       if ((config->device_id == VIRTIO_ID_BLOCK) &&
> +                       (config->features & (1ULL << VIRTIO_BLK_F_CONFIG_WCE)))
>                 return false;
>
>         return true;
> @@ -1691,7 +1692,7 @@ static bool vduse_validate_config(struct vduse_dev_config *config)
>         if (!device_is_allowed(config->device_id))
>                 return false;
>
> -       if (!features_is_valid(config->features))
> +       if (!features_is_valid(config))
>                 return false;
>
>         return true;
> --
> 2.41.0
>


^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: [PATCH v1 2/2] vduse: enable Virtio-net device type
  2023-06-27 11:36   ` Maxime Coquelin
@ 2023-06-28  2:34     ` Jason Wang
  -1 siblings, 0 replies; 30+ messages in thread
From: Jason Wang @ 2023-06-28  2:34 UTC (permalink / raw)
  To: Maxime Coquelin
  Cc: xieyongji, mst, david.marchand, lulu, linux-kernel,
	virtualization, netdev, xuanzhuo, eperezma

On Tue, Jun 27, 2023 at 7:37 PM Maxime Coquelin
<maxime.coquelin@redhat.com> wrote:
>
> This patch adds Virtio-net device type to the supported
> devices types. Initialization fails if the device does
> not support VIRTIO_F_VERSION_1 feature, in order to
> guarantee the configuration space is read-only.
>
> Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>

Acked-by: Jason Wang <jasowang@redhat.com>

Thanks

> ---
>  drivers/vdpa/vdpa_user/vduse_dev.c | 6 ++++++
>  1 file changed, 6 insertions(+)
>
> diff --git a/drivers/vdpa/vdpa_user/vduse_dev.c b/drivers/vdpa/vdpa_user/vduse_dev.c
> index c1c2f4c711ae..89088fa27026 100644
> --- a/drivers/vdpa/vdpa_user/vduse_dev.c
> +++ b/drivers/vdpa/vdpa_user/vduse_dev.c
> @@ -142,6 +142,7 @@ static struct workqueue_struct *vduse_irq_bound_wq;
>
>  static u32 allowed_device_id[] = {
>         VIRTIO_ID_BLOCK,
> +       VIRTIO_ID_NET,
>  };
>
>  static inline struct vduse_dev *vdpa_to_vduse(struct vdpa_device *vdpa)
> @@ -1668,6 +1669,10 @@ static bool features_is_valid(struct vduse_dev_config *config)
>                         (config->features & (1ULL << VIRTIO_BLK_F_CONFIG_WCE)))
>                 return false;
>
> +       if ((config->device_id == VIRTIO_ID_NET) &&
> +                       !(config->features & (1ULL << VIRTIO_F_VERSION_1)))
> +               return false;
> +
>         return true;
>  }
>
> @@ -2023,6 +2028,7 @@ static const struct vdpa_mgmtdev_ops vdpa_dev_mgmtdev_ops = {
>
>  static struct virtio_device_id id_table[] = {
>         { VIRTIO_ID_BLOCK, VIRTIO_DEV_ANY_ID },
> +       { VIRTIO_ID_NET, VIRTIO_DEV_ANY_ID },
>         { 0 },
>  };
>
> --
> 2.41.0
>


^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: [PATCH v1 2/2] vduse: enable Virtio-net device type
@ 2023-06-28  2:34     ` Jason Wang
  0 siblings, 0 replies; 30+ messages in thread
From: Jason Wang @ 2023-06-28  2:34 UTC (permalink / raw)
  To: Maxime Coquelin
  Cc: xuanzhuo, lulu, mst, netdev, linux-kernel, virtualization,
	xieyongji, eperezma, david.marchand

On Tue, Jun 27, 2023 at 7:37 PM Maxime Coquelin
<maxime.coquelin@redhat.com> wrote:
>
> This patch adds Virtio-net device type to the supported
> devices types. Initialization fails if the device does
> not support VIRTIO_F_VERSION_1 feature, in order to
> guarantee the configuration space is read-only.
>
> Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>

Acked-by: Jason Wang <jasowang@redhat.com>

Thanks

> ---
>  drivers/vdpa/vdpa_user/vduse_dev.c | 6 ++++++
>  1 file changed, 6 insertions(+)
>
> diff --git a/drivers/vdpa/vdpa_user/vduse_dev.c b/drivers/vdpa/vdpa_user/vduse_dev.c
> index c1c2f4c711ae..89088fa27026 100644
> --- a/drivers/vdpa/vdpa_user/vduse_dev.c
> +++ b/drivers/vdpa/vdpa_user/vduse_dev.c
> @@ -142,6 +142,7 @@ static struct workqueue_struct *vduse_irq_bound_wq;
>
>  static u32 allowed_device_id[] = {
>         VIRTIO_ID_BLOCK,
> +       VIRTIO_ID_NET,
>  };
>
>  static inline struct vduse_dev *vdpa_to_vduse(struct vdpa_device *vdpa)
> @@ -1668,6 +1669,10 @@ static bool features_is_valid(struct vduse_dev_config *config)
>                         (config->features & (1ULL << VIRTIO_BLK_F_CONFIG_WCE)))
>                 return false;
>
> +       if ((config->device_id == VIRTIO_ID_NET) &&
> +                       !(config->features & (1ULL << VIRTIO_F_VERSION_1)))
> +               return false;
> +
>         return true;
>  }
>
> @@ -2023,6 +2028,7 @@ static const struct vdpa_mgmtdev_ops vdpa_dev_mgmtdev_ops = {
>
>  static struct virtio_device_id id_table[] = {
>         { VIRTIO_ID_BLOCK, VIRTIO_DEV_ANY_ID },
> +       { VIRTIO_ID_NET, VIRTIO_DEV_ANY_ID },
>         { 0 },
>  };
>
> --
> 2.41.0
>

_______________________________________________
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization

^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: [PATCH v1 1/2] vduse: validate block features only with block devices
  2023-06-27 11:36   ` Maxime Coquelin
  (?)
  (?)
@ 2023-07-02  7:49   ` Yongji Xie
  -1 siblings, 0 replies; 30+ messages in thread
From: Yongji Xie @ 2023-07-02  7:49 UTC (permalink / raw)
  To: Maxime Coquelin
  Cc: Jason Wang, Michael S. Tsirkin, David Marchand, Cindy Lu,
	linux-kernel, virtualization, Netdev, xuanzhuo,
	Eugenio Perez Martin

On Tue, Jun 27, 2023 at 7:37 PM Maxime Coquelin
<maxime.coquelin@redhat.com> wrote:
>
> This patch is preliminary work to enable network device
> type support to VDUSE.
>
> As VIRTIO_BLK_F_CONFIG_WCE shares the same value as
> VIRTIO_NET_F_HOST_TSO4, we need to restrict its check
> to Virtio-blk device type.
>
> Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
> ---

Reviewed-by: Xie Yongji <xieyongji@bytedance.com>

Thanks,
Yongji

^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: [PATCH v1 2/2] vduse: enable Virtio-net device type
  2023-06-27 11:36   ` Maxime Coquelin
  (?)
  (?)
@ 2023-07-02  7:50   ` Yongji Xie
  -1 siblings, 0 replies; 30+ messages in thread
From: Yongji Xie @ 2023-07-02  7:50 UTC (permalink / raw)
  To: Maxime Coquelin
  Cc: Jason Wang, Michael S. Tsirkin, David Marchand, Cindy Lu,
	linux-kernel, virtualization, Netdev, xuanzhuo,
	Eugenio Perez Martin

On Tue, Jun 27, 2023 at 7:37 PM Maxime Coquelin
<maxime.coquelin@redhat.com> wrote:
>
> This patch adds Virtio-net device type to the supported
> devices types. Initialization fails if the device does
> not support VIRTIO_F_VERSION_1 feature, in order to
> guarantee the configuration space is read-only.
>
> Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
> ---

Reviewed-by: Xie Yongji <xieyongji@bytedance.com>

Thanks,
Yongji

^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: [PATCH v1 0/2] vduse: add support for networking devices
  2023-06-27 11:36 ` Maxime Coquelin
@ 2023-07-02 13:37   ` Michael S. Tsirkin
  -1 siblings, 0 replies; 30+ messages in thread
From: Michael S. Tsirkin @ 2023-07-02 13:37 UTC (permalink / raw)
  To: Maxime Coquelin
  Cc: xieyongji, jasowang, david.marchand, lulu, linux-kernel,
	virtualization, netdev, xuanzhuo, eperezma

On Tue, Jun 27, 2023 at 01:36:50PM +0200, Maxime Coquelin wrote:
> This small series enables virtio-net device type in VDUSE.
> With it, basic operation have been tested, both with
> virtio-vdpa and vhost-vdpa using DPDK Vhost library series
> adding VDUSE support using split rings layout (merged in
> DPDK v23.07-rc1).
> 
> Control queue support (and so multiqueue) has also been
> tested, but requires a Kernel series from Jason Wang
> relaxing control queue polling [1] to function reliably.
> 
> [1]: https://lore.kernel.org/lkml/CACGkMEtgrxN3PPwsDo4oOsnsSLJfEmBEZ0WvjGRr3whU+QasUg@mail.gmail.com/T/

Jason promised to post a new version of that patch.
Right Jason?
For now let's make sure CVQ feature flag is off?

> RFC -> v1 changes:
> ==================
> - Fail device init if it does not support VERSION_1 (Jason)
> 
> Maxime Coquelin (2):
>   vduse: validate block features only with block devices
>   vduse: enable Virtio-net device type
> 
>  drivers/vdpa/vdpa_user/vduse_dev.c | 15 +++++++++++----
>  1 file changed, 11 insertions(+), 4 deletions(-)
> 
> -- 
> 2.41.0


^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: [PATCH v1 0/2] vduse: add support for networking devices
@ 2023-07-02 13:37   ` Michael S. Tsirkin
  0 siblings, 0 replies; 30+ messages in thread
From: Michael S. Tsirkin @ 2023-07-02 13:37 UTC (permalink / raw)
  To: Maxime Coquelin
  Cc: xuanzhuo, lulu, eperezma, netdev, linux-kernel, virtualization,
	xieyongji, david.marchand

On Tue, Jun 27, 2023 at 01:36:50PM +0200, Maxime Coquelin wrote:
> This small series enables virtio-net device type in VDUSE.
> With it, basic operation have been tested, both with
> virtio-vdpa and vhost-vdpa using DPDK Vhost library series
> adding VDUSE support using split rings layout (merged in
> DPDK v23.07-rc1).
> 
> Control queue support (and so multiqueue) has also been
> tested, but requires a Kernel series from Jason Wang
> relaxing control queue polling [1] to function reliably.
> 
> [1]: https://lore.kernel.org/lkml/CACGkMEtgrxN3PPwsDo4oOsnsSLJfEmBEZ0WvjGRr3whU+QasUg@mail.gmail.com/T/

Jason promised to post a new version of that patch.
Right Jason?
For now let's make sure CVQ feature flag is off?

> RFC -> v1 changes:
> ==================
> - Fail device init if it does not support VERSION_1 (Jason)
> 
> Maxime Coquelin (2):
>   vduse: validate block features only with block devices
>   vduse: enable Virtio-net device type
> 
>  drivers/vdpa/vdpa_user/vduse_dev.c | 15 +++++++++++----
>  1 file changed, 11 insertions(+), 4 deletions(-)
> 
> -- 
> 2.41.0

_______________________________________________
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization

^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: [PATCH v1 0/2] vduse: add support for networking devices
  2023-07-02 13:37   ` Michael S. Tsirkin
@ 2023-07-03  6:44     ` Jason Wang
  -1 siblings, 0 replies; 30+ messages in thread
From: Jason Wang @ 2023-07-03  6:44 UTC (permalink / raw)
  To: Michael S. Tsirkin
  Cc: xuanzhuo, lulu, eperezma, netdev, linux-kernel, virtualization,
	xieyongji, Maxime Coquelin, david.marchand

On Sun, Jul 2, 2023 at 9:37 PM Michael S. Tsirkin <mst@redhat.com> wrote:
>
> On Tue, Jun 27, 2023 at 01:36:50PM +0200, Maxime Coquelin wrote:
> > This small series enables virtio-net device type in VDUSE.
> > With it, basic operation have been tested, both with
> > virtio-vdpa and vhost-vdpa using DPDK Vhost library series
> > adding VDUSE support using split rings layout (merged in
> > DPDK v23.07-rc1).
> >
> > Control queue support (and so multiqueue) has also been
> > tested, but requires a Kernel series from Jason Wang
> > relaxing control queue polling [1] to function reliably.
> >
> > [1]: https://lore.kernel.org/lkml/CACGkMEtgrxN3PPwsDo4oOsnsSLJfEmBEZ0WvjGRr3whU+QasUg@mail.gmail.com/T/
>
> Jason promised to post a new version of that patch.
> Right Jason?

Yes.

> For now let's make sure CVQ feature flag is off?

We can do that and relax on top of my patch.

Thanks

>
> > RFC -> v1 changes:
> > ==================
> > - Fail device init if it does not support VERSION_1 (Jason)
> >
> > Maxime Coquelin (2):
> >   vduse: validate block features only with block devices
> >   vduse: enable Virtio-net device type
> >
> >  drivers/vdpa/vdpa_user/vduse_dev.c | 15 +++++++++++----
> >  1 file changed, 11 insertions(+), 4 deletions(-)
> >
> > --
> > 2.41.0
>

_______________________________________________
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization

^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: [PATCH v1 0/2] vduse: add support for networking devices
@ 2023-07-03  6:44     ` Jason Wang
  0 siblings, 0 replies; 30+ messages in thread
From: Jason Wang @ 2023-07-03  6:44 UTC (permalink / raw)
  To: Michael S. Tsirkin
  Cc: Maxime Coquelin, xieyongji, david.marchand, lulu, linux-kernel,
	virtualization, netdev, xuanzhuo, eperezma

On Sun, Jul 2, 2023 at 9:37 PM Michael S. Tsirkin <mst@redhat.com> wrote:
>
> On Tue, Jun 27, 2023 at 01:36:50PM +0200, Maxime Coquelin wrote:
> > This small series enables virtio-net device type in VDUSE.
> > With it, basic operation have been tested, both with
> > virtio-vdpa and vhost-vdpa using DPDK Vhost library series
> > adding VDUSE support using split rings layout (merged in
> > DPDK v23.07-rc1).
> >
> > Control queue support (and so multiqueue) has also been
> > tested, but requires a Kernel series from Jason Wang
> > relaxing control queue polling [1] to function reliably.
> >
> > [1]: https://lore.kernel.org/lkml/CACGkMEtgrxN3PPwsDo4oOsnsSLJfEmBEZ0WvjGRr3whU+QasUg@mail.gmail.com/T/
>
> Jason promised to post a new version of that patch.
> Right Jason?

Yes.

> For now let's make sure CVQ feature flag is off?

We can do that and relax on top of my patch.

Thanks

>
> > RFC -> v1 changes:
> > ==================
> > - Fail device init if it does not support VERSION_1 (Jason)
> >
> > Maxime Coquelin (2):
> >   vduse: validate block features only with block devices
> >   vduse: enable Virtio-net device type
> >
> >  drivers/vdpa/vdpa_user/vduse_dev.c | 15 +++++++++++----
> >  1 file changed, 11 insertions(+), 4 deletions(-)
> >
> > --
> > 2.41.0
>


^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: [PATCH v1 0/2] vduse: add support for networking devices
  2023-07-03  6:44     ` Jason Wang
@ 2023-07-03  7:43       ` Maxime Coquelin
  -1 siblings, 0 replies; 30+ messages in thread
From: Maxime Coquelin @ 2023-07-03  7:43 UTC (permalink / raw)
  To: Jason Wang, Michael S. Tsirkin
  Cc: xuanzhuo, lulu, eperezma, netdev, linux-kernel, virtualization,
	xieyongji, david.marchand


On 7/3/23 08:44, Jason Wang wrote:
> On Sun, Jul 2, 2023 at 9:37 PM Michael S. Tsirkin <mst@redhat.com> wrote:
>>
>> On Tue, Jun 27, 2023 at 01:36:50PM +0200, Maxime Coquelin wrote:
>>> This small series enables virtio-net device type in VDUSE.
>>> With it, basic operation have been tested, both with
>>> virtio-vdpa and vhost-vdpa using DPDK Vhost library series
>>> adding VDUSE support using split rings layout (merged in
>>> DPDK v23.07-rc1).
>>>
>>> Control queue support (and so multiqueue) has also been
>>> tested, but requires a Kernel series from Jason Wang
>>> relaxing control queue polling [1] to function reliably.
>>>
>>> [1]: https://lore.kernel.org/lkml/CACGkMEtgrxN3PPwsDo4oOsnsSLJfEmBEZ0WvjGRr3whU+QasUg@mail.gmail.com/T/
>>
>> Jason promised to post a new version of that patch.
>> Right Jason?
> 
> Yes.
> 
>> For now let's make sure CVQ feature flag is off?
> 
> We can do that and relax on top of my patch.

I agree? Do you prefer a features negotiation, or failing init (like
done for VERSION_1) if the VDUSE application advertises CVQ?

Thanks,
Maxime

> Thanks
> 
>>
>>> RFC -> v1 changes:
>>> ==================
>>> - Fail device init if it does not support VERSION_1 (Jason)
>>>
>>> Maxime Coquelin (2):
>>>    vduse: validate block features only with block devices
>>>    vduse: enable Virtio-net device type
>>>
>>>   drivers/vdpa/vdpa_user/vduse_dev.c | 15 +++++++++++----
>>>   1 file changed, 11 insertions(+), 4 deletions(-)
>>>
>>> --
>>> 2.41.0
>>
> 

_______________________________________________
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization

^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: [PATCH v1 0/2] vduse: add support for networking devices
@ 2023-07-03  7:43       ` Maxime Coquelin
  0 siblings, 0 replies; 30+ messages in thread
From: Maxime Coquelin @ 2023-07-03  7:43 UTC (permalink / raw)
  To: Jason Wang, Michael S. Tsirkin
  Cc: xieyongji, david.marchand, lulu, linux-kernel, virtualization,
	netdev, xuanzhuo, eperezma


On 7/3/23 08:44, Jason Wang wrote:
> On Sun, Jul 2, 2023 at 9:37 PM Michael S. Tsirkin <mst@redhat.com> wrote:
>>
>> On Tue, Jun 27, 2023 at 01:36:50PM +0200, Maxime Coquelin wrote:
>>> This small series enables virtio-net device type in VDUSE.
>>> With it, basic operation have been tested, both with
>>> virtio-vdpa and vhost-vdpa using DPDK Vhost library series
>>> adding VDUSE support using split rings layout (merged in
>>> DPDK v23.07-rc1).
>>>
>>> Control queue support (and so multiqueue) has also been
>>> tested, but requires a Kernel series from Jason Wang
>>> relaxing control queue polling [1] to function reliably.
>>>
>>> [1]: https://lore.kernel.org/lkml/CACGkMEtgrxN3PPwsDo4oOsnsSLJfEmBEZ0WvjGRr3whU+QasUg@mail.gmail.com/T/
>>
>> Jason promised to post a new version of that patch.
>> Right Jason?
> 
> Yes.
> 
>> For now let's make sure CVQ feature flag is off?
> 
> We can do that and relax on top of my patch.

I agree? Do you prefer a features negotiation, or failing init (like
done for VERSION_1) if the VDUSE application advertises CVQ?

Thanks,
Maxime

> Thanks
> 
>>
>>> RFC -> v1 changes:
>>> ==================
>>> - Fail device init if it does not support VERSION_1 (Jason)
>>>
>>> Maxime Coquelin (2):
>>>    vduse: validate block features only with block devices
>>>    vduse: enable Virtio-net device type
>>>
>>>   drivers/vdpa/vdpa_user/vduse_dev.c | 15 +++++++++++----
>>>   1 file changed, 11 insertions(+), 4 deletions(-)
>>>
>>> --
>>> 2.41.0
>>
> 


^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: [PATCH v1 0/2] vduse: add support for networking devices
  2023-07-03  7:43       ` Maxime Coquelin
@ 2023-07-03  7:44         ` Jason Wang
  -1 siblings, 0 replies; 30+ messages in thread
From: Jason Wang @ 2023-07-03  7:44 UTC (permalink / raw)
  To: Maxime Coquelin
  Cc: Michael S. Tsirkin, xieyongji, david.marchand, lulu,
	linux-kernel, virtualization, netdev, xuanzhuo, eperezma

On Mon, Jul 3, 2023 at 3:43 PM Maxime Coquelin
<maxime.coquelin@redhat.com> wrote:
>
>
> On 7/3/23 08:44, Jason Wang wrote:
> > On Sun, Jul 2, 2023 at 9:37 PM Michael S. Tsirkin <mst@redhat.com> wrote:
> >>
> >> On Tue, Jun 27, 2023 at 01:36:50PM +0200, Maxime Coquelin wrote:
> >>> This small series enables virtio-net device type in VDUSE.
> >>> With it, basic operation have been tested, both with
> >>> virtio-vdpa and vhost-vdpa using DPDK Vhost library series
> >>> adding VDUSE support using split rings layout (merged in
> >>> DPDK v23.07-rc1).
> >>>
> >>> Control queue support (and so multiqueue) has also been
> >>> tested, but requires a Kernel series from Jason Wang
> >>> relaxing control queue polling [1] to function reliably.
> >>>
> >>> [1]: https://lore.kernel.org/lkml/CACGkMEtgrxN3PPwsDo4oOsnsSLJfEmBEZ0WvjGRr3whU+QasUg@mail.gmail.com/T/
> >>
> >> Jason promised to post a new version of that patch.
> >> Right Jason?
> >
> > Yes.
> >
> >> For now let's make sure CVQ feature flag is off?
> >
> > We can do that and relax on top of my patch.
>
> I agree? Do you prefer a features negotiation, or failing init (like
> done for VERSION_1) if the VDUSE application advertises CVQ?

Assuming we will relax it soon, I think we can choose the easier way.
I guess it's just failing.

Thanks

>
> Thanks,
> Maxime
>
> > Thanks
> >
> >>
> >>> RFC -> v1 changes:
> >>> ==================
> >>> - Fail device init if it does not support VERSION_1 (Jason)
> >>>
> >>> Maxime Coquelin (2):
> >>>    vduse: validate block features only with block devices
> >>>    vduse: enable Virtio-net device type
> >>>
> >>>   drivers/vdpa/vdpa_user/vduse_dev.c | 15 +++++++++++----
> >>>   1 file changed, 11 insertions(+), 4 deletions(-)
> >>>
> >>> --
> >>> 2.41.0
> >>
> >
>


^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: [PATCH v1 0/2] vduse: add support for networking devices
@ 2023-07-03  7:44         ` Jason Wang
  0 siblings, 0 replies; 30+ messages in thread
From: Jason Wang @ 2023-07-03  7:44 UTC (permalink / raw)
  To: Maxime Coquelin
  Cc: xuanzhuo, lulu, Michael S. Tsirkin, netdev, linux-kernel,
	virtualization, xieyongji, eperezma, david.marchand

On Mon, Jul 3, 2023 at 3:43 PM Maxime Coquelin
<maxime.coquelin@redhat.com> wrote:
>
>
> On 7/3/23 08:44, Jason Wang wrote:
> > On Sun, Jul 2, 2023 at 9:37 PM Michael S. Tsirkin <mst@redhat.com> wrote:
> >>
> >> On Tue, Jun 27, 2023 at 01:36:50PM +0200, Maxime Coquelin wrote:
> >>> This small series enables virtio-net device type in VDUSE.
> >>> With it, basic operation have been tested, both with
> >>> virtio-vdpa and vhost-vdpa using DPDK Vhost library series
> >>> adding VDUSE support using split rings layout (merged in
> >>> DPDK v23.07-rc1).
> >>>
> >>> Control queue support (and so multiqueue) has also been
> >>> tested, but requires a Kernel series from Jason Wang
> >>> relaxing control queue polling [1] to function reliably.
> >>>
> >>> [1]: https://lore.kernel.org/lkml/CACGkMEtgrxN3PPwsDo4oOsnsSLJfEmBEZ0WvjGRr3whU+QasUg@mail.gmail.com/T/
> >>
> >> Jason promised to post a new version of that patch.
> >> Right Jason?
> >
> > Yes.
> >
> >> For now let's make sure CVQ feature flag is off?
> >
> > We can do that and relax on top of my patch.
>
> I agree? Do you prefer a features negotiation, or failing init (like
> done for VERSION_1) if the VDUSE application advertises CVQ?

Assuming we will relax it soon, I think we can choose the easier way.
I guess it's just failing.

Thanks

>
> Thanks,
> Maxime
>
> > Thanks
> >
> >>
> >>> RFC -> v1 changes:
> >>> ==================
> >>> - Fail device init if it does not support VERSION_1 (Jason)
> >>>
> >>> Maxime Coquelin (2):
> >>>    vduse: validate block features only with block devices
> >>>    vduse: enable Virtio-net device type
> >>>
> >>>   drivers/vdpa/vdpa_user/vduse_dev.c | 15 +++++++++++----
> >>>   1 file changed, 11 insertions(+), 4 deletions(-)
> >>>
> >>> --
> >>> 2.41.0
> >>
> >
>

_______________________________________________
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization

^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: [PATCH v1 0/2] vduse: add support for networking devices
  2023-07-03  7:43       ` Maxime Coquelin
@ 2023-07-03 21:45         ` Michael S. Tsirkin
  -1 siblings, 0 replies; 30+ messages in thread
From: Michael S. Tsirkin @ 2023-07-03 21:45 UTC (permalink / raw)
  To: Maxime Coquelin
  Cc: Jason Wang, xieyongji, david.marchand, lulu, linux-kernel,
	virtualization, netdev, xuanzhuo, eperezma

On Mon, Jul 03, 2023 at 09:43:49AM +0200, Maxime Coquelin wrote:
> 
> On 7/3/23 08:44, Jason Wang wrote:
> > On Sun, Jul 2, 2023 at 9:37 PM Michael S. Tsirkin <mst@redhat.com> wrote:
> > > 
> > > On Tue, Jun 27, 2023 at 01:36:50PM +0200, Maxime Coquelin wrote:
> > > > This small series enables virtio-net device type in VDUSE.
> > > > With it, basic operation have been tested, both with
> > > > virtio-vdpa and vhost-vdpa using DPDK Vhost library series
> > > > adding VDUSE support using split rings layout (merged in
> > > > DPDK v23.07-rc1).
> > > > 
> > > > Control queue support (and so multiqueue) has also been
> > > > tested, but requires a Kernel series from Jason Wang
> > > > relaxing control queue polling [1] to function reliably.
> > > > 
> > > > [1]: https://lore.kernel.org/lkml/CACGkMEtgrxN3PPwsDo4oOsnsSLJfEmBEZ0WvjGRr3whU+QasUg@mail.gmail.com/T/
> > > 
> > > Jason promised to post a new version of that patch.
> > > Right Jason?
> > 
> > Yes.
> > 
> > > For now let's make sure CVQ feature flag is off?
> > 
> > We can do that and relax on top of my patch.
> 
> I agree? Do you prefer a features negotiation, or failing init (like
> done for VERSION_1) if the VDUSE application advertises CVQ?
> 
> Thanks,
> Maxime

Unfortunately guests fail probe if feature set is inconsistent.
So I don't think passing through features is a good idea,
you need a list of legal bits. And when doing this,
clear CVQ and everything that depends on it.



> > Thanks
> > 
> > > 
> > > > RFC -> v1 changes:
> > > > ==================
> > > > - Fail device init if it does not support VERSION_1 (Jason)
> > > > 
> > > > Maxime Coquelin (2):
> > > >    vduse: validate block features only with block devices
> > > >    vduse: enable Virtio-net device type
> > > > 
> > > >   drivers/vdpa/vdpa_user/vduse_dev.c | 15 +++++++++++----
> > > >   1 file changed, 11 insertions(+), 4 deletions(-)
> > > > 
> > > > --
> > > > 2.41.0
> > > 
> > 


^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: [PATCH v1 0/2] vduse: add support for networking devices
@ 2023-07-03 21:45         ` Michael S. Tsirkin
  0 siblings, 0 replies; 30+ messages in thread
From: Michael S. Tsirkin @ 2023-07-03 21:45 UTC (permalink / raw)
  To: Maxime Coquelin
  Cc: xuanzhuo, lulu, eperezma, netdev, linux-kernel, virtualization,
	xieyongji, david.marchand

On Mon, Jul 03, 2023 at 09:43:49AM +0200, Maxime Coquelin wrote:
> 
> On 7/3/23 08:44, Jason Wang wrote:
> > On Sun, Jul 2, 2023 at 9:37 PM Michael S. Tsirkin <mst@redhat.com> wrote:
> > > 
> > > On Tue, Jun 27, 2023 at 01:36:50PM +0200, Maxime Coquelin wrote:
> > > > This small series enables virtio-net device type in VDUSE.
> > > > With it, basic operation have been tested, both with
> > > > virtio-vdpa and vhost-vdpa using DPDK Vhost library series
> > > > adding VDUSE support using split rings layout (merged in
> > > > DPDK v23.07-rc1).
> > > > 
> > > > Control queue support (and so multiqueue) has also been
> > > > tested, but requires a Kernel series from Jason Wang
> > > > relaxing control queue polling [1] to function reliably.
> > > > 
> > > > [1]: https://lore.kernel.org/lkml/CACGkMEtgrxN3PPwsDo4oOsnsSLJfEmBEZ0WvjGRr3whU+QasUg@mail.gmail.com/T/
> > > 
> > > Jason promised to post a new version of that patch.
> > > Right Jason?
> > 
> > Yes.
> > 
> > > For now let's make sure CVQ feature flag is off?
> > 
> > We can do that and relax on top of my patch.
> 
> I agree? Do you prefer a features negotiation, or failing init (like
> done for VERSION_1) if the VDUSE application advertises CVQ?
> 
> Thanks,
> Maxime

Unfortunately guests fail probe if feature set is inconsistent.
So I don't think passing through features is a good idea,
you need a list of legal bits. And when doing this,
clear CVQ and everything that depends on it.



> > Thanks
> > 
> > > 
> > > > RFC -> v1 changes:
> > > > ==================
> > > > - Fail device init if it does not support VERSION_1 (Jason)
> > > > 
> > > > Maxime Coquelin (2):
> > > >    vduse: validate block features only with block devices
> > > >    vduse: enable Virtio-net device type
> > > > 
> > > >   drivers/vdpa/vdpa_user/vduse_dev.c | 15 +++++++++++----
> > > >   1 file changed, 11 insertions(+), 4 deletions(-)
> > > > 
> > > > --
> > > > 2.41.0
> > > 
> > 

_______________________________________________
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization

^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: [PATCH v1 0/2] vduse: add support for networking devices
  2023-07-03 21:45         ` Michael S. Tsirkin
@ 2023-07-04  8:43           ` Maxime Coquelin
  -1 siblings, 0 replies; 30+ messages in thread
From: Maxime Coquelin @ 2023-07-04  8:43 UTC (permalink / raw)
  To: Michael S. Tsirkin
  Cc: Jason Wang, xieyongji, david.marchand, lulu, linux-kernel,
	virtualization, netdev, xuanzhuo, eperezma



On 7/3/23 23:45, Michael S. Tsirkin wrote:
> On Mon, Jul 03, 2023 at 09:43:49AM +0200, Maxime Coquelin wrote:
>>
>> On 7/3/23 08:44, Jason Wang wrote:
>>> On Sun, Jul 2, 2023 at 9:37 PM Michael S. Tsirkin <mst@redhat.com> wrote:
>>>>
>>>> On Tue, Jun 27, 2023 at 01:36:50PM +0200, Maxime Coquelin wrote:
>>>>> This small series enables virtio-net device type in VDUSE.
>>>>> With it, basic operation have been tested, both with
>>>>> virtio-vdpa and vhost-vdpa using DPDK Vhost library series
>>>>> adding VDUSE support using split rings layout (merged in
>>>>> DPDK v23.07-rc1).
>>>>>
>>>>> Control queue support (and so multiqueue) has also been
>>>>> tested, but requires a Kernel series from Jason Wang
>>>>> relaxing control queue polling [1] to function reliably.
>>>>>
>>>>> [1]: https://lore.kernel.org/lkml/CACGkMEtgrxN3PPwsDo4oOsnsSLJfEmBEZ0WvjGRr3whU+QasUg@mail.gmail.com/T/
>>>>
>>>> Jason promised to post a new version of that patch.
>>>> Right Jason?
>>>
>>> Yes.
>>>
>>>> For now let's make sure CVQ feature flag is off?
>>>
>>> We can do that and relax on top of my patch.
>>
>> I agree? Do you prefer a features negotiation, or failing init (like
>> done for VERSION_1) if the VDUSE application advertises CVQ?
>>
>> Thanks,
>> Maxime
> 
> Unfortunately guests fail probe if feature set is inconsistent.
> So I don't think passing through features is a good idea,
> you need a list of legal bits. And when doing this,
> clear CVQ and everything that depends on it.

Since this is temporary, while cvq is made more robust, I think it is
better to fail VDUSE device creation if CVQ feature is advertised by the
VDUSE application, instead of ensuring features depending on CVQ are
also cleared.

Jason seems to think likewise, would that work for you?

Thanks,
Maxime

> 
> 
>>> Thanks
>>>
>>>>
>>>>> RFC -> v1 changes:
>>>>> ==================
>>>>> - Fail device init if it does not support VERSION_1 (Jason)
>>>>>
>>>>> Maxime Coquelin (2):
>>>>>     vduse: validate block features only with block devices
>>>>>     vduse: enable Virtio-net device type
>>>>>
>>>>>    drivers/vdpa/vdpa_user/vduse_dev.c | 15 +++++++++++----
>>>>>    1 file changed, 11 insertions(+), 4 deletions(-)
>>>>>
>>>>> --
>>>>> 2.41.0
>>>>
>>>
> 


^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: [PATCH v1 0/2] vduse: add support for networking devices
@ 2023-07-04  8:43           ` Maxime Coquelin
  0 siblings, 0 replies; 30+ messages in thread
From: Maxime Coquelin @ 2023-07-04  8:43 UTC (permalink / raw)
  To: Michael S. Tsirkin
  Cc: xuanzhuo, lulu, eperezma, netdev, linux-kernel, virtualization,
	xieyongji, david.marchand



On 7/3/23 23:45, Michael S. Tsirkin wrote:
> On Mon, Jul 03, 2023 at 09:43:49AM +0200, Maxime Coquelin wrote:
>>
>> On 7/3/23 08:44, Jason Wang wrote:
>>> On Sun, Jul 2, 2023 at 9:37 PM Michael S. Tsirkin <mst@redhat.com> wrote:
>>>>
>>>> On Tue, Jun 27, 2023 at 01:36:50PM +0200, Maxime Coquelin wrote:
>>>>> This small series enables virtio-net device type in VDUSE.
>>>>> With it, basic operation have been tested, both with
>>>>> virtio-vdpa and vhost-vdpa using DPDK Vhost library series
>>>>> adding VDUSE support using split rings layout (merged in
>>>>> DPDK v23.07-rc1).
>>>>>
>>>>> Control queue support (and so multiqueue) has also been
>>>>> tested, but requires a Kernel series from Jason Wang
>>>>> relaxing control queue polling [1] to function reliably.
>>>>>
>>>>> [1]: https://lore.kernel.org/lkml/CACGkMEtgrxN3PPwsDo4oOsnsSLJfEmBEZ0WvjGRr3whU+QasUg@mail.gmail.com/T/
>>>>
>>>> Jason promised to post a new version of that patch.
>>>> Right Jason?
>>>
>>> Yes.
>>>
>>>> For now let's make sure CVQ feature flag is off?
>>>
>>> We can do that and relax on top of my patch.
>>
>> I agree? Do you prefer a features negotiation, or failing init (like
>> done for VERSION_1) if the VDUSE application advertises CVQ?
>>
>> Thanks,
>> Maxime
> 
> Unfortunately guests fail probe if feature set is inconsistent.
> So I don't think passing through features is a good idea,
> you need a list of legal bits. And when doing this,
> clear CVQ and everything that depends on it.

Since this is temporary, while cvq is made more robust, I think it is
better to fail VDUSE device creation if CVQ feature is advertised by the
VDUSE application, instead of ensuring features depending on CVQ are
also cleared.

Jason seems to think likewise, would that work for you?

Thanks,
Maxime

> 
> 
>>> Thanks
>>>
>>>>
>>>>> RFC -> v1 changes:
>>>>> ==================
>>>>> - Fail device init if it does not support VERSION_1 (Jason)
>>>>>
>>>>> Maxime Coquelin (2):
>>>>>     vduse: validate block features only with block devices
>>>>>     vduse: enable Virtio-net device type
>>>>>
>>>>>    drivers/vdpa/vdpa_user/vduse_dev.c | 15 +++++++++++----
>>>>>    1 file changed, 11 insertions(+), 4 deletions(-)
>>>>>
>>>>> --
>>>>> 2.41.0
>>>>
>>>
> 

_______________________________________________
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization

^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: [PATCH v1 0/2] vduse: add support for networking devices
  2023-07-04  8:43           ` Maxime Coquelin
@ 2023-07-04  9:59             ` Michael S. Tsirkin
  -1 siblings, 0 replies; 30+ messages in thread
From: Michael S. Tsirkin @ 2023-07-04  9:59 UTC (permalink / raw)
  To: Maxime Coquelin
  Cc: Jason Wang, xieyongji, david.marchand, lulu, linux-kernel,
	virtualization, netdev, xuanzhuo, eperezma

On Tue, Jul 04, 2023 at 10:43:07AM +0200, Maxime Coquelin wrote:
> 
> 
> On 7/3/23 23:45, Michael S. Tsirkin wrote:
> > On Mon, Jul 03, 2023 at 09:43:49AM +0200, Maxime Coquelin wrote:
> > > 
> > > On 7/3/23 08:44, Jason Wang wrote:
> > > > On Sun, Jul 2, 2023 at 9:37 PM Michael S. Tsirkin <mst@redhat.com> wrote:
> > > > > 
> > > > > On Tue, Jun 27, 2023 at 01:36:50PM +0200, Maxime Coquelin wrote:
> > > > > > This small series enables virtio-net device type in VDUSE.
> > > > > > With it, basic operation have been tested, both with
> > > > > > virtio-vdpa and vhost-vdpa using DPDK Vhost library series
> > > > > > adding VDUSE support using split rings layout (merged in
> > > > > > DPDK v23.07-rc1).
> > > > > > 
> > > > > > Control queue support (and so multiqueue) has also been
> > > > > > tested, but requires a Kernel series from Jason Wang
> > > > > > relaxing control queue polling [1] to function reliably.
> > > > > > 
> > > > > > [1]: https://lore.kernel.org/lkml/CACGkMEtgrxN3PPwsDo4oOsnsSLJfEmBEZ0WvjGRr3whU+QasUg@mail.gmail.com/T/
> > > > > 
> > > > > Jason promised to post a new version of that patch.
> > > > > Right Jason?
> > > > 
> > > > Yes.
> > > > 
> > > > > For now let's make sure CVQ feature flag is off?
> > > > 
> > > > We can do that and relax on top of my patch.
> > > 
> > > I agree? Do you prefer a features negotiation, or failing init (like
> > > done for VERSION_1) if the VDUSE application advertises CVQ?
> > > 
> > > Thanks,
> > > Maxime
> > 
> > Unfortunately guests fail probe if feature set is inconsistent.
> > So I don't think passing through features is a good idea,
> > you need a list of legal bits. And when doing this,
> > clear CVQ and everything that depends on it.
> 
> Since this is temporary, while cvq is made more robust, I think it is
> better to fail VDUSE device creation if CVQ feature is advertised by the
> VDUSE application, instead of ensuring features depending on CVQ are
> also cleared.
> 
> Jason seems to think likewise, would that work for you?
> 
> Thanks,
> Maxime

Nothing is more permanent than temporary solutions.
My concern would be that hardware devices then start masking CVQ
intentionally just to avoid the pain of broken software.

> > 
> > 
> > > > Thanks
> > > > 
> > > > > 
> > > > > > RFC -> v1 changes:
> > > > > > ==================
> > > > > > - Fail device init if it does not support VERSION_1 (Jason)
> > > > > > 
> > > > > > Maxime Coquelin (2):
> > > > > >     vduse: validate block features only with block devices
> > > > > >     vduse: enable Virtio-net device type
> > > > > > 
> > > > > >    drivers/vdpa/vdpa_user/vduse_dev.c | 15 +++++++++++----
> > > > > >    1 file changed, 11 insertions(+), 4 deletions(-)
> > > > > > 
> > > > > > --
> > > > > > 2.41.0
> > > > > 
> > > > 
> > 


^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: [PATCH v1 0/2] vduse: add support for networking devices
@ 2023-07-04  9:59             ` Michael S. Tsirkin
  0 siblings, 0 replies; 30+ messages in thread
From: Michael S. Tsirkin @ 2023-07-04  9:59 UTC (permalink / raw)
  To: Maxime Coquelin
  Cc: xuanzhuo, lulu, eperezma, netdev, linux-kernel, virtualization,
	xieyongji, david.marchand

On Tue, Jul 04, 2023 at 10:43:07AM +0200, Maxime Coquelin wrote:
> 
> 
> On 7/3/23 23:45, Michael S. Tsirkin wrote:
> > On Mon, Jul 03, 2023 at 09:43:49AM +0200, Maxime Coquelin wrote:
> > > 
> > > On 7/3/23 08:44, Jason Wang wrote:
> > > > On Sun, Jul 2, 2023 at 9:37 PM Michael S. Tsirkin <mst@redhat.com> wrote:
> > > > > 
> > > > > On Tue, Jun 27, 2023 at 01:36:50PM +0200, Maxime Coquelin wrote:
> > > > > > This small series enables virtio-net device type in VDUSE.
> > > > > > With it, basic operation have been tested, both with
> > > > > > virtio-vdpa and vhost-vdpa using DPDK Vhost library series
> > > > > > adding VDUSE support using split rings layout (merged in
> > > > > > DPDK v23.07-rc1).
> > > > > > 
> > > > > > Control queue support (and so multiqueue) has also been
> > > > > > tested, but requires a Kernel series from Jason Wang
> > > > > > relaxing control queue polling [1] to function reliably.
> > > > > > 
> > > > > > [1]: https://lore.kernel.org/lkml/CACGkMEtgrxN3PPwsDo4oOsnsSLJfEmBEZ0WvjGRr3whU+QasUg@mail.gmail.com/T/
> > > > > 
> > > > > Jason promised to post a new version of that patch.
> > > > > Right Jason?
> > > > 
> > > > Yes.
> > > > 
> > > > > For now let's make sure CVQ feature flag is off?
> > > > 
> > > > We can do that and relax on top of my patch.
> > > 
> > > I agree? Do you prefer a features negotiation, or failing init (like
> > > done for VERSION_1) if the VDUSE application advertises CVQ?
> > > 
> > > Thanks,
> > > Maxime
> > 
> > Unfortunately guests fail probe if feature set is inconsistent.
> > So I don't think passing through features is a good idea,
> > you need a list of legal bits. And when doing this,
> > clear CVQ and everything that depends on it.
> 
> Since this is temporary, while cvq is made more robust, I think it is
> better to fail VDUSE device creation if CVQ feature is advertised by the
> VDUSE application, instead of ensuring features depending on CVQ are
> also cleared.
> 
> Jason seems to think likewise, would that work for you?
> 
> Thanks,
> Maxime

Nothing is more permanent than temporary solutions.
My concern would be that hardware devices then start masking CVQ
intentionally just to avoid the pain of broken software.

> > 
> > 
> > > > Thanks
> > > > 
> > > > > 
> > > > > > RFC -> v1 changes:
> > > > > > ==================
> > > > > > - Fail device init if it does not support VERSION_1 (Jason)
> > > > > > 
> > > > > > Maxime Coquelin (2):
> > > > > >     vduse: validate block features only with block devices
> > > > > >     vduse: enable Virtio-net device type
> > > > > > 
> > > > > >    drivers/vdpa/vdpa_user/vduse_dev.c | 15 +++++++++++----
> > > > > >    1 file changed, 11 insertions(+), 4 deletions(-)
> > > > > > 
> > > > > > --
> > > > > > 2.41.0
> > > > > 
> > > > 
> > 

_______________________________________________
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization

^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: [PATCH v1 0/2] vduse: add support for networking devices
  2023-07-04  9:59             ` Michael S. Tsirkin
@ 2023-07-04 13:17               ` Maxime Coquelin
  -1 siblings, 0 replies; 30+ messages in thread
From: Maxime Coquelin @ 2023-07-04 13:17 UTC (permalink / raw)
  To: Michael S. Tsirkin
  Cc: xuanzhuo, lulu, eperezma, netdev, linux-kernel, virtualization,
	xieyongji, david.marchand



On 7/4/23 11:59, Michael S. Tsirkin wrote:
> On Tue, Jul 04, 2023 at 10:43:07AM +0200, Maxime Coquelin wrote:
>>
>>
>> On 7/3/23 23:45, Michael S. Tsirkin wrote:
>>> On Mon, Jul 03, 2023 at 09:43:49AM +0200, Maxime Coquelin wrote:
>>>>
>>>> On 7/3/23 08:44, Jason Wang wrote:
>>>>> On Sun, Jul 2, 2023 at 9:37 PM Michael S. Tsirkin <mst@redhat.com> wrote:
>>>>>>
>>>>>> On Tue, Jun 27, 2023 at 01:36:50PM +0200, Maxime Coquelin wrote:
>>>>>>> This small series enables virtio-net device type in VDUSE.
>>>>>>> With it, basic operation have been tested, both with
>>>>>>> virtio-vdpa and vhost-vdpa using DPDK Vhost library series
>>>>>>> adding VDUSE support using split rings layout (merged in
>>>>>>> DPDK v23.07-rc1).
>>>>>>>
>>>>>>> Control queue support (and so multiqueue) has also been
>>>>>>> tested, but requires a Kernel series from Jason Wang
>>>>>>> relaxing control queue polling [1] to function reliably.
>>>>>>>
>>>>>>> [1]: https://lore.kernel.org/lkml/CACGkMEtgrxN3PPwsDo4oOsnsSLJfEmBEZ0WvjGRr3whU+QasUg@mail.gmail.com/T/
>>>>>>
>>>>>> Jason promised to post a new version of that patch.
>>>>>> Right Jason?
>>>>>
>>>>> Yes.
>>>>>
>>>>>> For now let's make sure CVQ feature flag is off?
>>>>>
>>>>> We can do that and relax on top of my patch.
>>>>
>>>> I agree? Do you prefer a features negotiation, or failing init (like
>>>> done for VERSION_1) if the VDUSE application advertises CVQ?
>>>>
>>>> Thanks,
>>>> Maxime
>>>
>>> Unfortunately guests fail probe if feature set is inconsistent.
>>> So I don't think passing through features is a good idea,
>>> you need a list of legal bits. And when doing this,
>>> clear CVQ and everything that depends on it.
>>
>> Since this is temporary, while cvq is made more robust, I think it is
>> better to fail VDUSE device creation if CVQ feature is advertised by the
>> VDUSE application, instead of ensuring features depending on CVQ are
>> also cleared.
>>
>> Jason seems to think likewise, would that work for you?
>>
>> Thanks,
>> Maxime
> 
> Nothing is more permanent than temporary solutions.
> My concern would be that hardware devices then start masking CVQ
> intentionally just to avoid the pain of broken software.

Got it, I'll add a patch on top that filters out CVQ feature and all the
features that depend on it.

Thanks,
Maxime

> 
>>>
>>>
>>>>> Thanks
>>>>>
>>>>>>
>>>>>>> RFC -> v1 changes:
>>>>>>> ==================
>>>>>>> - Fail device init if it does not support VERSION_1 (Jason)
>>>>>>>
>>>>>>> Maxime Coquelin (2):
>>>>>>>      vduse: validate block features only with block devices
>>>>>>>      vduse: enable Virtio-net device type
>>>>>>>
>>>>>>>     drivers/vdpa/vdpa_user/vduse_dev.c | 15 +++++++++++----
>>>>>>>     1 file changed, 11 insertions(+), 4 deletions(-)
>>>>>>>
>>>>>>> --
>>>>>>> 2.41.0
>>>>>>
>>>>>
>>>
> 

_______________________________________________
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization

^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: [PATCH v1 0/2] vduse: add support for networking devices
@ 2023-07-04 13:17               ` Maxime Coquelin
  0 siblings, 0 replies; 30+ messages in thread
From: Maxime Coquelin @ 2023-07-04 13:17 UTC (permalink / raw)
  To: Michael S. Tsirkin
  Cc: Jason Wang, xieyongji, david.marchand, lulu, linux-kernel,
	virtualization, netdev, xuanzhuo, eperezma



On 7/4/23 11:59, Michael S. Tsirkin wrote:
> On Tue, Jul 04, 2023 at 10:43:07AM +0200, Maxime Coquelin wrote:
>>
>>
>> On 7/3/23 23:45, Michael S. Tsirkin wrote:
>>> On Mon, Jul 03, 2023 at 09:43:49AM +0200, Maxime Coquelin wrote:
>>>>
>>>> On 7/3/23 08:44, Jason Wang wrote:
>>>>> On Sun, Jul 2, 2023 at 9:37 PM Michael S. Tsirkin <mst@redhat.com> wrote:
>>>>>>
>>>>>> On Tue, Jun 27, 2023 at 01:36:50PM +0200, Maxime Coquelin wrote:
>>>>>>> This small series enables virtio-net device type in VDUSE.
>>>>>>> With it, basic operation have been tested, both with
>>>>>>> virtio-vdpa and vhost-vdpa using DPDK Vhost library series
>>>>>>> adding VDUSE support using split rings layout (merged in
>>>>>>> DPDK v23.07-rc1).
>>>>>>>
>>>>>>> Control queue support (and so multiqueue) has also been
>>>>>>> tested, but requires a Kernel series from Jason Wang
>>>>>>> relaxing control queue polling [1] to function reliably.
>>>>>>>
>>>>>>> [1]: https://lore.kernel.org/lkml/CACGkMEtgrxN3PPwsDo4oOsnsSLJfEmBEZ0WvjGRr3whU+QasUg@mail.gmail.com/T/
>>>>>>
>>>>>> Jason promised to post a new version of that patch.
>>>>>> Right Jason?
>>>>>
>>>>> Yes.
>>>>>
>>>>>> For now let's make sure CVQ feature flag is off?
>>>>>
>>>>> We can do that and relax on top of my patch.
>>>>
>>>> I agree? Do you prefer a features negotiation, or failing init (like
>>>> done for VERSION_1) if the VDUSE application advertises CVQ?
>>>>
>>>> Thanks,
>>>> Maxime
>>>
>>> Unfortunately guests fail probe if feature set is inconsistent.
>>> So I don't think passing through features is a good idea,
>>> you need a list of legal bits. And when doing this,
>>> clear CVQ and everything that depends on it.
>>
>> Since this is temporary, while cvq is made more robust, I think it is
>> better to fail VDUSE device creation if CVQ feature is advertised by the
>> VDUSE application, instead of ensuring features depending on CVQ are
>> also cleared.
>>
>> Jason seems to think likewise, would that work for you?
>>
>> Thanks,
>> Maxime
> 
> Nothing is more permanent than temporary solutions.
> My concern would be that hardware devices then start masking CVQ
> intentionally just to avoid the pain of broken software.

Got it, I'll add a patch on top that filters out CVQ feature and all the
features that depend on it.

Thanks,
Maxime

> 
>>>
>>>
>>>>> Thanks
>>>>>
>>>>>>
>>>>>>> RFC -> v1 changes:
>>>>>>> ==================
>>>>>>> - Fail device init if it does not support VERSION_1 (Jason)
>>>>>>>
>>>>>>> Maxime Coquelin (2):
>>>>>>>      vduse: validate block features only with block devices
>>>>>>>      vduse: enable Virtio-net device type
>>>>>>>
>>>>>>>     drivers/vdpa/vdpa_user/vduse_dev.c | 15 +++++++++++----
>>>>>>>     1 file changed, 11 insertions(+), 4 deletions(-)
>>>>>>>
>>>>>>> --
>>>>>>> 2.41.0
>>>>>>
>>>>>
>>>
> 


^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: [PATCH v1 0/2] vduse: add support for networking devices
  2023-06-27 11:36 ` Maxime Coquelin
@ 2023-08-10 19:02   ` Michael S. Tsirkin
  -1 siblings, 0 replies; 30+ messages in thread
From: Michael S. Tsirkin @ 2023-08-10 19:02 UTC (permalink / raw)
  To: Maxime Coquelin
  Cc: xieyongji, jasowang, david.marchand, lulu, linux-kernel,
	virtualization, netdev, xuanzhuo, eperezma

On Tue, Jun 27, 2023 at 01:36:50PM +0200, Maxime Coquelin wrote:
> This small series enables virtio-net device type in VDUSE.
> With it, basic operation have been tested, both with
> virtio-vdpa and vhost-vdpa using DPDK Vhost library series
> adding VDUSE support using split rings layout (merged in
> DPDK v23.07-rc1).
> 
> Control queue support (and so multiqueue) has also been
> tested, but requires a Kernel series from Jason Wang
> relaxing control queue polling [1] to function reliably.
> 
> [1]: https://lore.kernel.org/lkml/CACGkMEtgrxN3PPwsDo4oOsnsSLJfEmBEZ0WvjGRr3whU+QasUg@mail.gmail.com/T/
> 
> RFC -> v1 changes:
> ==================
> - Fail device init if it does not support VERSION_1 (Jason)

So I can put this in next, the issue I think is
that of security: currently selinux can if necessary block
access to creating virtio block devices.
But if we have more than one type we need a way for selinux to
block specific types. Can be a patch on top but pls work to
address.

Another question is that with this userspace can inject
packets directly into net stack. Should we check CAP_NET_ADMIN
or such?


> Maxime Coquelin (2):
>   vduse: validate block features only with block devices
>   vduse: enable Virtio-net device type
> 
>  drivers/vdpa/vdpa_user/vduse_dev.c | 15 +++++++++++----
>  1 file changed, 11 insertions(+), 4 deletions(-)
> 
> -- 
> 2.41.0


^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: [PATCH v1 0/2] vduse: add support for networking devices
@ 2023-08-10 19:02   ` Michael S. Tsirkin
  0 siblings, 0 replies; 30+ messages in thread
From: Michael S. Tsirkin @ 2023-08-10 19:02 UTC (permalink / raw)
  To: Maxime Coquelin
  Cc: xuanzhuo, lulu, eperezma, netdev, linux-kernel, virtualization,
	xieyongji, david.marchand

On Tue, Jun 27, 2023 at 01:36:50PM +0200, Maxime Coquelin wrote:
> This small series enables virtio-net device type in VDUSE.
> With it, basic operation have been tested, both with
> virtio-vdpa and vhost-vdpa using DPDK Vhost library series
> adding VDUSE support using split rings layout (merged in
> DPDK v23.07-rc1).
> 
> Control queue support (and so multiqueue) has also been
> tested, but requires a Kernel series from Jason Wang
> relaxing control queue polling [1] to function reliably.
> 
> [1]: https://lore.kernel.org/lkml/CACGkMEtgrxN3PPwsDo4oOsnsSLJfEmBEZ0WvjGRr3whU+QasUg@mail.gmail.com/T/
> 
> RFC -> v1 changes:
> ==================
> - Fail device init if it does not support VERSION_1 (Jason)

So I can put this in next, the issue I think is
that of security: currently selinux can if necessary block
access to creating virtio block devices.
But if we have more than one type we need a way for selinux to
block specific types. Can be a patch on top but pls work to
address.

Another question is that with this userspace can inject
packets directly into net stack. Should we check CAP_NET_ADMIN
or such?


> Maxime Coquelin (2):
>   vduse: validate block features only with block devices
>   vduse: enable Virtio-net device type
> 
>  drivers/vdpa/vdpa_user/vduse_dev.c | 15 +++++++++++----
>  1 file changed, 11 insertions(+), 4 deletions(-)
> 
> -- 
> 2.41.0

_______________________________________________
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization

^ permalink raw reply	[flat|nested] 30+ messages in thread

end of thread, other threads:[~2023-08-10 19:03 UTC | newest]

Thread overview: 30+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-06-27 11:36 [PATCH v1 0/2] vduse: add support for networking devices Maxime Coquelin
2023-06-27 11:36 ` Maxime Coquelin
2023-06-27 11:36 ` [PATCH v1 1/2] vduse: validate block features only with block devices Maxime Coquelin
2023-06-27 11:36   ` Maxime Coquelin
2023-06-28  2:34   ` Jason Wang
2023-06-28  2:34     ` Jason Wang
2023-07-02  7:49   ` Yongji Xie
2023-06-27 11:36 ` [PATCH v1 2/2] vduse: enable Virtio-net device type Maxime Coquelin
2023-06-27 11:36   ` Maxime Coquelin
2023-06-28  2:34   ` Jason Wang
2023-06-28  2:34     ` Jason Wang
2023-07-02  7:50   ` Yongji Xie
2023-07-02 13:37 ` [PATCH v1 0/2] vduse: add support for networking devices Michael S. Tsirkin
2023-07-02 13:37   ` Michael S. Tsirkin
2023-07-03  6:44   ` Jason Wang
2023-07-03  6:44     ` Jason Wang
2023-07-03  7:43     ` Maxime Coquelin
2023-07-03  7:43       ` Maxime Coquelin
2023-07-03  7:44       ` Jason Wang
2023-07-03  7:44         ` Jason Wang
2023-07-03 21:45       ` Michael S. Tsirkin
2023-07-03 21:45         ` Michael S. Tsirkin
2023-07-04  8:43         ` Maxime Coquelin
2023-07-04  8:43           ` Maxime Coquelin
2023-07-04  9:59           ` Michael S. Tsirkin
2023-07-04  9:59             ` Michael S. Tsirkin
2023-07-04 13:17             ` Maxime Coquelin
2023-07-04 13:17               ` Maxime Coquelin
2023-08-10 19:02 ` Michael S. Tsirkin
2023-08-10 19:02   ` Michael S. Tsirkin

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.