From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by dpdk.org (Postfix) with ESMTP id 06D873DC for ; Fri, 16 Dec 2016 13:48:54 +0100 (CET) Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 5BC72C001C16; Fri, 16 Dec 2016 12:48:54 +0000 (UTC) Received: from localhost.localdomain.com (ovpn-117-14.rdu2.redhat.com [10.10.117.14]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id uBGCmrOf012481; Fri, 16 Dec 2016 07:48:53 -0500 From: Billy McFall To: thomas.monjalon@6wind.com, wenzhuo.lu@intel.com Cc: dev@dpdk.org, Billy McFall Date: Fri, 16 Dec 2016 07:48:48 -0500 Message-Id: <20161216124851.2640-1-bmcfall@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.23 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]); Fri, 16 Dec 2016 12:48:54 +0000 (UTC) Subject: [dpdk-dev] [PATCH 0/3] New API to free consumed buffers in TX ring 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 12:48:55 -0000 Based on a request from Damjan Marion and seconded by Keith Wiles, see dpdk-dev mailling list from 11/21/2016, add a new API to free consumed buffers on TX ring. This addresses two scenarios: 1) Flooding a packet and want to reuse existing mbuf to avoid a packet copy. Increment the reference count of the packet and poll new API until reference count is decremented. 2) Application runs out of mbufs so call API to free consumed packets so processing can continue. API will return the number of packets freed (0-n) or error code if feature not supported (-ENOTSUP) or input invalid (-ENODEV). API for e1000 igb driver and vHost driver have been implemented. Other drivers can be implemented over time. Some drivers implement a TX done flush routine that should be reused where possible. e1000 igb driver and vHost driver do not have such functions. Billy McFall (3): ethdev: New API to free consumed buffers in TX ring driver: e1000 igb support to free consumed buffers driver: vHost support to free consumed buffers drivers/net/e1000/e1000_ethdev.h | 2 + drivers/net/e1000/igb_ethdev.c | 1 + drivers/net/e1000/igb_rxtx.c | 126 ++++++++++++++++++++++++++++++++++++++ drivers/net/vhost/rte_eth_vhost.c | 11 ++++ lib/librte_ether/rte_ethdev.h | 56 +++++++++++++++++ 5 files changed, 196 insertions(+) -- 2.9.3