Skip to contentSkip to conversation

examples/vhost_scsi: drop unimplemented EVENT_IDX feature bit

PATCH Applied Stefan Hajnoczi 4 participants 4 messages Jan 31, 2018 – Feb 5, 2018

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 examples/vhost_scsi: drop unimplemented EVENT_IDX feature bit

The vhost_scsi example application negotiates the VIRTIO_RING_F_EVENT_IDX feature bit but does not honor it when accessing vrings.

In particular, commit e37ff954405addb8ea422426a2d162d00dcad196 ("vhost:
support virtqueue interrupt/notification suppression") broke vring call because vq->last_used_idx is never updated by vhost_scsi. The vq->last_used_idx field is not even available via the librte_vhost public API, so VIRTIO_RING_F_EVENT_IDX is currently only usable by the built-in virtio_net.c driver in librte_vhost.

This patch drops VIRTIO_RING_F_EVENT_IDX from vhost_scsi so that vring call works again.

Cc Changpeng Liu <[email protected]>
Cc Junjie Chen <[email protected]>
---
 examples/vhost_scsi/vhost_scsi.c | 1 -
 1 file changed, 1 deletion(-)
examples/vhost_scsi/vhost_scsi.c +0 -1
index da01ad378..3cb4383e9 100644
@@ -21,7 +21,6 @@
 #include "scsi_spec.h"
 
 #define VIRTIO_SCSI_FEATURES ((1 << VIRTIO_F_NOTIFY_ON_EMPTY) |\
-			      (1 << VIRTIO_RING_F_EVENT_IDX) |\
 			      (1 << VIRTIO_SCSI_F_INOUT) |\
 			      (1 << VIRTIO_SCSI_F_CHANGE))
 
Signature · 1 line
2.14.3
Reviewed-by on v1 1/1
#1 lore raw
Quoted 26 lines

-----Original Message-----
From: Stefan Hajnoczi [mailto:[email protected]]
Sent: Thursday, February 1, 2018 1:48 AM
To: [email protected]
Cc: Chen, Junjie J <[email protected]>; Yuanhan Liu <[email protected]>; Liu, Changpeng <[email protected]>; Maxime Coquelin <[email protected]>; Stefan Hajnoczi <[email protected]>
Subject: [PATCH] examples/vhost_scsi: drop unimplemented EVENT_IDX feature bit

The vhost_scsi example application negotiates the VIRTIO_RING_F_EVENT_IDX feature bit but does not honor it when accessing vrings.

In particular, commit e37ff954405addb8ea422426a2d162d00dcad196 ("vhost:
support virtqueue interrupt/notification suppression") broke vring call because vq->last_used_idx is never updated by vhost_scsi. The vq->last_used_idx field is not even available via the librte_vhost public API, so VIRTIO_RING_F_EVENT_IDX is currently only usable by the built-in virtio_net.c driver in librte_vhost.

This patch drops VIRTIO_RING_F_EVENT_IDX from vhost_scsi so that vring call works again.

Quoted 6 lines
Cc Changpeng Liu <[email protected]>
Cc Junjie Chen <[email protected]>
---
 examples/vhost_scsi/vhost_scsi.c | 1 -
 1 file changed, 1 deletion(-)
Quoted 15 lines
examples/vhost_scsi/vhost_scsi.c +0 -2
index da01ad378..3cb4383e9 100644
@@ -21,7 +21,6 @@
 #include "scsi_spec.h"
 
 #define VIRTIO_SCSI_FEATURES ((1 << VIRTIO_F_NOTIFY_ON_EMPTY) |\
-			      (1 << VIRTIO_RING_F_EVENT_IDX) |\
 			      (1 << VIRTIO_SCSI_F_INOUT) |\
 			      (1 << VIRTIO_SCSI_F_CHANGE))
 
--

2.14.3

Acked-by on v1 1/1
#2 lore raw
In reply to Stefan Hajnoczi
Quoted 11 lines · Stefan Hajnoczi

The vhost_scsi example application negotiates the VIRTIO_RING_F_EVENT_IDX feature bit but does not honor it when accessing vrings.

In particular, commit e37ff954405addb8ea422426a2d162d00dcad196 ("vhost:
support virtqueue interrupt/notification suppression") broke vring call because vq->last_used_idx is never updated by vhost_scsi. The vq->last_used_idx field is not even available via the librte_vhost public API, so VIRTIO_RING_F_EVENT_IDX is currently only usable by the built-in virtio_net.c driver in librte_vhost.

Quoted 6 lines

This patch drops VIRTIO_RING_F_EVENT_IDX from vhost_scsi so that vring call works again.

Cc Changpeng Liu <[email protected]>
Cc Junjie Chen <[email protected]>

Thanks.

	--yliu
Quoted 18 lines
---
 examples/vhost_scsi/vhost_scsi.c | 1 -
 1 file changed, 1 deletion(-)
examples/vhost_scsi/vhost_scsi.c +0 -1
index da01ad378..3cb4383e9 100644
@@ -21,7 +21,6 @@
 #include "scsi_spec.h"
 
 #define VIRTIO_SCSI_FEATURES ((1 << VIRTIO_F_NOTIFY_ON_EMPTY) |\
-			      (1 << VIRTIO_RING_F_EVENT_IDX) |\
 			      (1 << VIRTIO_SCSI_F_INOUT) |\
 			      (1 << VIRTIO_SCSI_F_CHANGE))
 
Signature · 1 line
2.14.3
Applied
#3 lore raw
Quoted 12 lines · Yuanhan Liu
Quoted 11 lines · Stefan Hajnoczi

The vhost_scsi example application negotiates the VIRTIO_RING_F_EVENT_IDX feature bit but does not honor it when accessing vrings.

In particular, commit e37ff954405addb8ea422426a2d162d00dcad196 ("vhost:
support virtqueue interrupt/notification suppression") broke vring call because vq->last_used_idx is never updated by vhost_scsi. The vq->last_used_idx field is not even available via the librte_vhost public API, so VIRTIO_RING_F_EVENT_IDX is currently only usable by the built-in virtio_net.c driver in librte_vhost.

Quoted 8 lines
Quoted 6 lines

This patch drops VIRTIO_RING_F_EVENT_IDX from vhost_scsi so that vring call works again.

Cc Changpeng Liu <[email protected]>
Cc Junjie Chen <[email protected]>

Applied to dpdk-next-net/master, thanks.