From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pa0-f48.google.com (mail-pa0-f48.google.com [209.85.220.48]) by dpdk.org (Postfix) with ESMTP id 9B39B8EA0 for ; Sun, 6 Sep 2015 20:41:51 +0200 (CEST) Received: by padhy16 with SMTP id hy16so71328764pad.1 for ; Sun, 06 Sep 2015 11:41:51 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-type:content-transfer-encoding; bh=FB4wBjF0ZIKtbHvDEGMjJ9vWHY/y3i/r6n5a58cDoiI=; b=RjIhQ0+kshDvE7LUVuVPF3lhED5tWuFEAKXfTko+ElRrGrsVj4A5qv6gNA7NMrlcDX wGnV94iOmtFqIvDHM0ttjwvK0pbhbeArLTINdNC+OLl78ARoGKL12dy322z/ZPTwDoGP Eef2hTWQcFgQgffTZMmONsQjKCkjyCQ8/djkZQOlroc2ABs/I+w2e50UE4Tj7bwzSgGL G2cWePU6rvYAvshIcylSVZxlb7+ntOryLR+Msa7t1OWpjJEqOUrvKmBwKuWV9wTdKHhD PB69SJikqzsOrluDh1nSJEXErqFcpyrE6mmMlJfNVPyeQLuLictWJI1wDGV9d+CBKHYz 06KQ== X-Gm-Message-State: ALoCoQm/lRtZLbNLb4/XnAobcnyqDLIvsxEFsZwQq2x6tNnwtHNwNMH5sCRGUVNPnmGuD6Lfuic4 X-Received: by 10.66.193.73 with SMTP id hm9mr37036097pac.105.1441564910872; Sun, 06 Sep 2015 11:41:50 -0700 (PDT) Received: from urahara (static-50-53-82-155.bvtn.or.frontiernet.net. [50.53.82.155]) by smtp.gmail.com with ESMTPSA id d13sm9293602pbu.17.2015.09.06.11.41.50 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 06 Sep 2015 11:41:50 -0700 (PDT) Date: Sun, 6 Sep 2015 11:42:02 -0700 From: Stephen Hemminger To: "Ouyang, Changchun" Message-ID: <20150906114202.634c8602@urahara> In-Reply-To: References: <1441400308-5725-1-git-send-email-stephen@networkplumber.org> <1441400308-5725-4-git-send-email-stephen@networkplumber.org> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: "dev@dpdk.org" Subject: Re: [dpdk-dev] [PATCH 3/4] virtio: use indirect ring elements 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: Sun, 06 Sep 2015 18:41:51 -0000 On Sun, 6 Sep 2015 08:36:10 +0000 "Ouyang, Changchun" wrote: > > -----Original Message----- > > From: Stephen Hemminger [mailto:stephen@networkplumber.org] > > Sent: Saturday, September 5, 2015 4:58 AM > > To: Xie, Huawei; Ouyang, Changchun > > Cc: dev@dpdk.org; Stephen Hemminger > > Subject: [PATCH 3/4] virtio: use indirect ring elements > > > > The virtio ring in QEMU/KVM is usually limited to 256 entries and the normal > > way that virtio driver was queuing mbufs required nsegs + 1 ring elements. > > By using the indirect ring element feature if available, each packet will take > > only one ring slot even for multi-segment packets. > > > > Signed-off-by: Stephen Hemminger > > --- > > drivers/net/virtio/virtio_ethdev.c | 11 +++++--- > > drivers/net/virtio/virtio_ethdev.h | 3 ++- > > drivers/net/virtio/virtio_rxtx.c | 51 ++++++++++++++++++++++++++++++- > > ------- > > drivers/net/virtio/virtqueue.h | 8 ++++++ > > 4 files changed, 57 insertions(+), 16 deletions(-) > > > > diff --git a/drivers/net/virtio/virtio_ethdev.c > > b/drivers/net/virtio/virtio_ethdev.c > > index 465d3cd..bcfb87b 100644 > > --- a/drivers/net/virtio/virtio_ethdev.c > > +++ b/drivers/net/virtio/virtio_ethdev.c > > @@ -359,12 +359,15 @@ int virtio_dev_queue_setup(struct rte_eth_dev > > *dev, > > if (queue_type == VTNET_TQ) { > > Do we also need implement indirect ring elements for RX path? No. Look at Linux driver, indirect elements are never passed to RX driver.