From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pg0-f44.google.com (mail-pg0-f44.google.com [74.125.83.44]) by dpdk.org (Postfix) with ESMTP id 24407379E for ; Fri, 16 Dec 2016 17:24:13 +0100 (CET) Received: by mail-pg0-f44.google.com with SMTP id p66so33832435pga.2 for ; Fri, 16 Dec 2016 08:24:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=EoZvZOD8gBTfH1/eMY/skXrlfZbzvs+K95WN2Zh4qxE=; b=OA7tQ/pbHTJ3KWdBJouSVCuNiTOM3vN2kOFzaw89pEAhWKSp+MRNjQJAs+xixN9Xl8 NeEbkuOof47bL0KSr0CJG+KI/kPr5jO287IhJM4H5sQ4Y/T0NpgWjOryaK8lg7CQ9tWw eHdDIXpipC1emY2qVixqaUCeB4y/jMx1tF9MX6HWgAR3mxpkaQG2fMN9rw93+IJsIGN4 4xXZ+4l6C877c4MhuN+k1c7Q91zYKREtJQ0scaCkrh0QpXBYTUtxq3aqPoeUdRjGHaK5 15ZYt3RdYG1yA0rh0184Jds+GsLpHowGmdKbhLlDFrZ41DigzCluJzI2aUwE25Ri9r/s e/IA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=EoZvZOD8gBTfH1/eMY/skXrlfZbzvs+K95WN2Zh4qxE=; b=VRbZ2OaUfp+H4Ah90Hd37cr3rtVi4MQbRWK8QtUIJIdoAahDx27cORoogD293URakv 9wgyJARI854KJBkJMUiV0Sns1pQcVdJ+pf/PaPRHT6xsL6b9B2L9omACVz+IYJYC+1UA Xz0riaWNEzbYxw8+FKOHyTjovbL8jEKJEms6NIgj6Jye64OetQQg5lgg6NokYJZB7CdU wrKkGWh6/GFqzqkt9reZA/CVFwMztCSFBMBNKCiEiDPovVlYJ/x3/kWwH870xkiSqYU4 0fs2pdyEzlxk3yARdTIp3iDCIo6cGEU5GNbR3DW1suDaZdCkgbWWLKFN811m4CIOHuZN uZxw== X-Gm-Message-State: AKaTC01lJ4GLRkZr5AqbJGJr2y61ky3vTcr5W9E9MqpXtXuTsAnilVnaGJBudWuf1fkG3g== X-Received: by 10.98.192.21 with SMTP id x21mr3863986pff.94.1481905452402; Fri, 16 Dec 2016 08:24:12 -0800 (PST) Received: from xeon-e3 (204-195-18-65.wavecable.com. [204.195.18.65]) by smtp.gmail.com with ESMTPSA id r68sm3757151pfk.85.2016.12.16.08.24.11 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 16 Dec 2016 08:24:12 -0800 (PST) Date: Fri, 16 Dec 2016 08:24:04 -0800 From: Stephen Hemminger To: Billy McFall Cc: thomas.monjalon@6wind.com, wenzhuo.lu@intel.com, dev@dpdk.org Message-ID: <20161216082404.3377bfc6@xeon-e3> In-Reply-To: <20161216124851.2640-4-bmcfall@redhat.com> References: <20161216124851.2640-1-bmcfall@redhat.com> <20161216124851.2640-4-bmcfall@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH 3/3] driver: vHost support to free consumed buffers X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Dec 2016 16:24:13 -0000 On Fri, 16 Dec 2016 07:48:51 -0500 Billy McFall wrote: > Add support to the vHostdriver for the new API to force free consumed > buffers on TX ring. vHost does not cache the mbufs so there is no work > to do. > > Signed-off-by: Billy McFall > --- > drivers/net/vhost/rte_eth_vhost.c | 11 +++++++++++ > 1 file changed, 11 insertions(+) > > diff --git a/drivers/net/vhost/rte_eth_vhost.c b/drivers/net/vhost/rte_eth_vhost.c > index 766d4ef..6493d56 100644 > --- a/drivers/net/vhost/rte_eth_vhost.c > +++ b/drivers/net/vhost/rte_eth_vhost.c > @@ -939,6 +939,16 @@ eth_queue_release(void *q) > } > > static int > +eth_tx_done_cleanup(void *txq __rte_unused, uint32_t free_cnt __rte_unused) > +{ > + /* > + * vHost does not hang onto mbuf. eth_vhost_tx() copies packet data > + * and releases mbuf, so nothing to cleanup. > + */ > + return 0; > +} > + > +static int > eth_link_update(struct rte_eth_dev *dev __rte_unused, > int wait_to_complete __rte_unused) > { > @@ -979,6 +989,7 @@ static const struct eth_dev_ops ops = { > .tx_queue_setup = eth_tx_queue_setup, > .rx_queue_release = eth_queue_release, > .tx_queue_release = eth_queue_release, > + .tx_done_cleanup = eth_tx_done_cleanup, > .link_update = eth_link_update, > .stats_get = eth_stats_get, > .stats_reset = eth_stats_reset, Rather than having to change every drive, why not make this the default behavior?