From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rich Lane Subject: [PATCH] virtio: use zeroed memory for simple TX header Date: Thu, 31 Mar 2016 13:01:16 -0700 Message-ID: <1459454476-6029-1-git-send-email-rlane@bigswitch.com> Cc: Huawei Xie , Yuanhan Liu To: dev@dpdk.org Return-path: Received: from mail-pf0-f181.google.com (mail-pf0-f181.google.com [209.85.192.181]) by dpdk.org (Postfix) with ESMTP id D2CBE9604 for ; Thu, 31 Mar 2016 22:01:31 +0200 (CEST) Received: by mail-pf0-f181.google.com with SMTP id n5so76599904pfn.2 for ; Thu, 31 Mar 2016 13:01:31 -0700 (PDT) List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" For simple TX the virtio-net header must be zeroed, but it was using memory that had been initialized with indirect descriptor tables. This resulted in "unsupported gso type" errors from librte_vhost. We can use the same memory for every descriptor to save cachelines in the vswitch. Signed-off-by: Rich Lane --- drivers/net/virtio/virtio_rxtx.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/net/virtio/virtio_rxtx.c b/drivers/net/virtio/virtio_rxtx.c index 2b88efd..1df2df6 100644 --- a/drivers/net/virtio/virtio_rxtx.c +++ b/drivers/net/virtio/virtio_rxtx.c @@ -376,8 +376,7 @@ virtio_dev_vring_start(struct virtqueue *vq, int queue_type) vq->vq_ring.avail->ring[i] = i + mid_idx; vq->vq_ring.desc[i + mid_idx].next = i; vq->vq_ring.desc[i + mid_idx].addr = - vq->virtio_net_hdr_mem + - i * vq->hw->vtnet_hdr_size; + vq->virtio_net_hdr_mem; vq->vq_ring.desc[i + mid_idx].len = vq->hw->vtnet_hdr_size; vq->vq_ring.desc[i + mid_idx].flags = -- 1.9.1