[dpdk-dev,RFC,15/29] vhost: descriptor length should include vhost header

Message ID 1498013885-102779-16-git-send-email-tiwei.bie@intel.com (mailing list archive)
State Not Applicable, archived
Headers

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation success Compilation OK

Commit Message

Tiwei Bie June 21, 2017, 2:57 a.m. UTC
  From: Jens Freimann <jfreiman@redhat.com>

Signed-off-by: Jens Freimann <jfreiman@redhat.com>
---
 lib/librte_vhost/virtio_net.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Patch

diff --git a/lib/librte_vhost/virtio_net.c b/lib/librte_vhost/virtio_net.c
index f7dd4eb..7a978b9 100644
--- a/lib/librte_vhost/virtio_net.c
+++ b/lib/librte_vhost/virtio_net.c
@@ -697,7 +697,7 @@  vhost_enqueue_burst_1_1(struct virtio_net *dev, uint16_t queue_id,
 	for (i = 0; i < count; i++) {
 		idx = (head_idx + i) & (vq->size - 1);
 		desc[idx].flags &= ~DESC_HW;
-		desc[idx].len    = pkts[i]->pkt_len;
+		desc[idx].len    = pkts[i]->pkt_len + dev->vhost_hlen;
 	}
 
 	return count;