Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1691129 > unrolled thread

[PATCH net-next V2 1/5] virtio_ring: allow to store zero as the ctx

Started byJason Wang <jasowang@redhat.com>
First post2017-07-19 11:00 +0200
Last post2017-07-19 11:00 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH net-next V2 1/5] virtio_ring: allow to store zero as the ctx Jason Wang <jasowang@redhat.com> - 2017-07-19 11:00 +0200

#1691129 — [PATCH net-next V2 1/5] virtio_ring: allow to store zero as the ctx

FromJason Wang <jasowang@redhat.com>
Date2017-07-19 11:00 +0200
Subject[PATCH net-next V2 1/5] virtio_ring: allow to store zero as the ctx
Message-ID<u4SZP-68j-9@gated-at.bofh.it>
Allow zero to be store as a ctx, with this we could store e.g zero
value which could be meaningful for the case of storing headroom
through ctx.

Signed-off-by: Jason Wang <jasowang@redhat.com>
---
 drivers/virtio/virtio_ring.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/virtio/virtio_ring.c b/drivers/virtio/virtio_ring.c
index 5e1b548..9aaa177 100644
--- a/drivers/virtio/virtio_ring.c
+++ b/drivers/virtio/virtio_ring.c
@@ -391,7 +391,7 @@ static inline int virtqueue_add(struct virtqueue *_vq,
 	vq->desc_state[head].data = data;
 	if (indirect)
 		vq->desc_state[head].indir_desc = desc;
-	if (ctx)
+	else
 		vq->desc_state[head].indir_desc = ctx;
 
 	/* Put entry in available array (but don't update avail->idx until they
-- 
2.7.4

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web