[v9,15/15] vhost: advertize packed ring layout support

Message ID 20180706070722.2043-16-maxime.coquelin@redhat.com (mailing list archive)
State Accepted, archived
Delegated to: Maxime Coquelin
Headers
Series Vhost: add support to packed ring layout |

Checks

Context Check Description
ci/Intel-compilation fail Compilation issues

Commit Message

Maxime Coquelin July 6, 2018, 7:07 a.m. UTC
  Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
---
 lib/librte_vhost/vhost.h | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
  

Comments

Tiwei Bie July 9, 2018, 7:11 a.m. UTC | #1
On Fri, Jul 06, 2018 at 09:07:22AM +0200, Maxime Coquelin wrote:
> Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
> ---
>  lib/librte_vhost/vhost.h | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/lib/librte_vhost/vhost.h b/lib/librte_vhost/vhost.h
> index 760a09c0d..9b0ebb754 100644
> --- a/lib/librte_vhost/vhost.h
> +++ b/lib/librte_vhost/vhost.h
> @@ -275,7 +275,8 @@ struct vring_packed_desc_event {
>  				(1ULL << VIRTIO_RING_F_EVENT_IDX) | \
>  				(1ULL << VIRTIO_NET_F_MTU)  | \
>  				(1ULL << VIRTIO_F_IN_ORDER) | \
> -				(1ULL << VIRTIO_F_IOMMU_PLATFORM))
> +				(1ULL << VIRTIO_F_IOMMU_PLATFORM) | \
> +				(1ULL << VIRTIO_F_RING_PACKED))
>  
>  
>  struct guest_page {
> -- 
> 2.14.4
> 

I didn't apply this patch, because the packed ring
support isn't complete, e.g. when doing live migration,
the wrap counter isn't synced. We can advertise this
feature bit when it's fully supported.
  

Patch

diff --git a/lib/librte_vhost/vhost.h b/lib/librte_vhost/vhost.h
index 760a09c0d..9b0ebb754 100644
--- a/lib/librte_vhost/vhost.h
+++ b/lib/librte_vhost/vhost.h
@@ -275,7 +275,8 @@  struct vring_packed_desc_event {
 				(1ULL << VIRTIO_RING_F_EVENT_IDX) | \
 				(1ULL << VIRTIO_NET_F_MTU)  | \
 				(1ULL << VIRTIO_F_IN_ORDER) | \
-				(1ULL << VIRTIO_F_IOMMU_PLATFORM))
+				(1ULL << VIRTIO_F_IOMMU_PLATFORM) | \
+				(1ULL << VIRTIO_F_RING_PACKED))
 
 
 struct guest_page {