Received: from eggs.gnu.org ([2001:4830:134:3::10]:34846) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bXoTa-0006LB-0a for qemu-devel@nongnu.org; Thu, 11 Aug 2016 07:48:43 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bXoTW-0003YA-Nh for qemu-devel@nongnu.org; Thu, 11 Aug 2016 07:48:41 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:33679) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bXoTW-0003Xp-GH for qemu-devel@nongnu.org; Thu, 11 Aug 2016 07:48:38 -0400 Received: from pps.filterd (m0098410.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.11/8.16.0.11) with SMTP id u7BBiikx040473 for ; Thu, 11 Aug 2016 07:48:37 -0400 Received: from e06smtp08.uk.ibm.com (e06smtp08.uk.ibm.com [195.75.94.104]) by mx0a-001b2d01.pphosted.com with ESMTP id 24qm9uvkam-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Thu, 11 Aug 2016 07:48:37 -0400 Received: from localhost by e06smtp08.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 11 Aug 2016 12:48:34 +0100 Received: from b06cxnps3075.portsmouth.uk.ibm.com (d06relay10.portsmouth.uk.ibm.com [9.149.109.195]) by d06dlp03.portsmouth.uk.ibm.com (Postfix) with ESMTP id 84CE41B0806E for ; Thu, 11 Aug 2016 12:50:06 +0100 (BST) Received: from d06av06.portsmouth.uk.ibm.com (d06av06.portsmouth.uk.ibm.com [9.149.37.217]) by b06cxnps3075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id u7BBmW5M30670966 for ; Thu, 11 Aug 2016 11:48:32 GMT Received: from d06av06.portsmouth.uk.ibm.com (localhost [127.0.0.1]) by d06av06.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id u7BBmWuF021555 for ; Thu, 11 Aug 2016 07:48:32 -0400 Date: Thu, 11 Aug 2016 13:48:31 +0200 From: Cornelia Huck In-Reply-To: <1470840390-29235-1-git-send-email-mst@redhat.com> References: <1470840390-29235-1-git-send-email-mst@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Message-Id: <20160811134831.768a9c2e.cornelia.huck@de.ibm.com> Subject: Re: [Qemu-devel] [PATCH v2] virtio-net: allow increasing rx queue size List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Michael S. Tsirkin" Cc: qemu-devel@nongnu.org, Jason Wang , Patrik Hermansson On Wed, 10 Aug 2016 17:47:16 +0300 "Michael S. Tsirkin" wrote: > This allows increasing the rx queue size up to 1024: unlike with tx, > guests don't put in huge S/G lists into RX so the risk of running into > the max 1024 limitation due to some off-by-one seems small. > > It's helpful for users like OVS-DPDK which don't do any buffering on the > host - 1K roughly matches 500 entries in tun + 256 in the current rx > queue, which seems to work reasonably well. We could probably make do > with ~750 entries but virtio spec limits us to powers of two. > It might be a good idea to specify an s/g size limit in a future > version. > > It also might be possible to make the queue size smaller down the road, 64 > seems like the minimal value which will still work (as guests seem to > assume a queue full of 1.5K buffers is enough to process the largest > incoming packet, which is ~64K). No one actually asked for this, and > with virtio 1 guests can reduce ring size without need for host > configuration, so don't bother with this for now. > > Cc: Cornelia Huck > Cc: Jason Wang > Suggested-by: Patrik Hermansson > Signed-off-by: Michael S. Tsirkin > --- > > changes from v1: > add macros as suggested by Cornelia > > include/hw/virtio/virtio-net.h | 1 + > hw/net/virtio-net.c | 26 +++++++++++++++++++++++++- > 2 files changed, 26 insertions(+), 1 deletion(-) Reviewed-by: Cornelia Huck