From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pf0-f178.google.com (mail-pf0-f178.google.com [209.85.192.178]) by dpdk.org (Postfix) with ESMTP id 9864E558D for ; Thu, 12 Jan 2017 02:40:03 +0100 (CET) Received: by mail-pf0-f178.google.com with SMTP id y143so3485565pfb.0 for ; Wed, 11 Jan 2017 17:40:03 -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=pYgozMo11xGk5CNhkZ7ncki4CLoIUvfQjvG80WsqxS8=; b=1ur/jUXONNb9wEaH55JeAsTE9QFtm0TfoAUVFuikuUYySw05rkX2jYPMPCx1W4CS/M YAgYtg/V9YQdG66Cp+NeJgW+MvQRdlRWV5YGkOzFiTceOFGFhFfjADO69rY7JsNVrnJI 137z2arsJ8coM5q2EqpQzGC8+g3Dpa5KuMuFc7unCvl1xvj+p5fO4/MYDeIqGrf7AIe0 iphXlnGDhRwDP9y8I41AGDBBlAUQPEk5T6c7p4ZMBnxthULkxuIyxne3oqdTGNDLAPCn LF7JgStuVgAxE9wLamWdEQ2RK19H4dfcJmN12Kb2u3ohAt2nfdDc4UO22ceeCKLKN71Q ZbCQ== 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=pYgozMo11xGk5CNhkZ7ncki4CLoIUvfQjvG80WsqxS8=; b=U1g/nt5W0ToB/xLa6hVaQnUBVJ8K2m/QLcD/DDB6L+Dxt05+4zSjrY/r/0sGAeXC8a rjOpKjr6leZnnxaD9m+YRXVBETNDY0QBRuHTsq95qMxvEychPCcSMAkhVICimdLKyd6u ZHyPH34e9lNa5D/XRcVTE8SFCSZbUFnxj/EQKAlF7jjLiBPRyNrtPohkP5+kvaYBTH6U k39d71Cl2sreX7n4JjqPb2lkQE0RXVwoBv+t+zVRZjBpQHGx+QfummkoeoSZrXIIEFbK XQrvd748ekpaeskjcN1FxFIYu4T/OnRmPR6wWNIB0iILJef57AhExIVvHc+TE6rDxDiY ExsQ== X-Gm-Message-State: AIkVDXJsIHIwypctRCdTNyZZNKoeduMLjUA+Pn+SImb4MR8p7wXYAPHEMe7dQL/xjXYPUg== X-Received: by 10.84.218.205 with SMTP id g13mr17312284plm.78.1484185202581; Wed, 11 Jan 2017 17:40:02 -0800 (PST) Received: from xeon-e3 (204-195-18-65.wavecable.com. [204.195.18.65]) by smtp.gmail.com with ESMTPSA id s8sm16550032pfj.30.2017.01.11.17.40.02 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 11 Jan 2017 17:40:02 -0800 (PST) Date: Wed, 11 Jan 2017 17:39:50 -0800 From: Stephen Hemminger To: Billy McFall Cc: thomas.monjalon@6wind.com, wenzhuo.lu@intel.com, dev@dpdk.org Message-ID: <20170111173950.4e2c87ae@xeon-e3> In-Reply-To: <20170111200323.12938-4-bmcfall@redhat.com> References: <20170111200323.12938-1-bmcfall@redhat.com> <20170111200323.12938-4-bmcfall@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH v2 3/3] net/vhost: 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: Thu, 12 Jan 2017 01:40:04 -0000 On Wed, 11 Jan 2017 15:03:23 -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 change drivers, since this is not critical path, make it optional to have tx_done_cleanup.