From mboxrd@z Thu Jan 1 00:00:00 1970 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) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bigswitch-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id; bh=6QE+w4+WZOFcfFTxwiy3pCVOGhExQzUQBn08wX3wyOg=; b=fXP1ro6tfO6G9JOYgO0MQ4kcNhOH48gjYz6ndEKOdRNYbcWDwu1fuuZzeEOLfftHSe FyeTfilPhusFVJsHdE87daDB6YuxB8f4oTrLSBE5RDqrWqRL1eILKxvZ5vBOEFOIS9Ub TQazodnuUIyPwfkRXV/SlhvCf0qddnjH4DKA87LUYubKepQe9w0lGKsBuV+7F5XY/DFu 2caj75G8Q1onQ+y7c/NHaEuW1APCDdCIbiKnLoy3qHWW4azH9pv46ZRD4oyQ6wHev2Ip AS1JvUutPHN9ZgG1E3ysnTAkjBkPL065/h6rLVUxklUHCaq3nJl5qpd53M3hslF/zkcT 6Zyg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=6QE+w4+WZOFcfFTxwiy3pCVOGhExQzUQBn08wX3wyOg=; b=an64AnZDLQaMOacPFG5dFlg5YBB37ymTsH+zteD/iRbXIgrtiU15U3SDFX8SRMdOBI Hds+pUkEufVUuGzsFXFcxGXbVoR5tjsj1fHYyoVeao3baqB8Q4KSe1ougxzSCfi4rvk2 QKsnA4X3YUoFFqxHL6UgynlcHakjTY4m4SsyPnC4d0cDFeHOzV9V00m2rd8wTEiuDHHb S1SKyGylq4KJYqNbyerpckq5Ff5FQX1wQUMluBmzfe5EdaZuCRFqjxxhu/xday80ux5C HBZwNUoQHB0mKyOpVkgusdOWnsVd8wvb3SLDVBiBTBRPn/mQC95Bey21jx0P/TFd/glq o7UA== X-Gm-Message-State: AD7BkJLw1DNkm9vner2Ya49CwSmtJ09BapTaOkQW0o9cRkQneXBnDlCisIUTO+iKoI3ZHCVe X-Received: by 10.98.74.17 with SMTP id x17mr24847103pfa.14.1459454491234; Thu, 31 Mar 2016 13:01:31 -0700 (PDT) Received: from rlane-work.eng.bigswitch.com ([173.227.38.50]) by smtp.gmail.com with ESMTPSA id o7sm15329020pfa.37.2016.03.31.13.01.30 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 31 Mar 2016 13:01:30 -0700 (PDT) From: Rich Lane X-Google-Original-From: Rich Lane To: dev@dpdk.org Cc: Huawei Xie , Yuanhan Liu Date: Thu, 31 Mar 2016 13:01:16 -0700 Message-Id: <1459454476-6029-1-git-send-email-rlane@bigswitch.com> X-Mailer: git-send-email 1.9.1 Subject: [dpdk-dev] [PATCH] virtio: use zeroed memory for simple TX header X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 31 Mar 2016 20:01:32 -0000 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