[dpdk-dev] [RFC 15/29] vhost: descriptor length should include	vhost header
    Tiwei Bie 
    tiwei.bie at intel.com
       
    Wed Jun 21 04:57:51 CEST 2017
    
    
  
From: Jens Freimann <jfreiman at redhat.com>
Signed-off-by: Jens Freimann <jfreiman at redhat.com>
---
 lib/librte_vhost/virtio_net.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
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;
-- 
2.7.4
    
    
More information about the dev
mailing list