From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr0-f171.google.com (mail-wr0-f171.google.com [209.85.128.171]) by dpdk.org (Postfix) with ESMTP id D7CCC214A for ; Wed, 15 Mar 2017 11:30:59 +0100 (CET) Received: by mail-wr0-f171.google.com with SMTP id u48so7888523wrc.0 for ; Wed, 15 Mar 2017 03:30:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:user-agent:in-reply-to :references:mime-version:content-transfer-encoding; bh=cq3S2pC7viwwOPvU+PObiKG1vNrd17k3/7qWJPf27Ms=; b=ct9KjjCnMSP3XT4/RntzOyLtULxraK6T8/BRQGNDTp21Qv+H097X63IR4cPiMZO/W3 49yCao92uvhlR3JDXA3HqKB3DN2JbBQfAhXG3zIhvmE3NBSRZZ85g5f//J2Gsonj0zdM bB9Jjavi9GkoaTHOGvtAaUdTMk/LrGjh1l3HQ5noLoW3SC4yxsd5i8ZaZu7k+DDIfjr5 yGTwQ/iKPKdQa2tGCcercmViTgZbDU+ifTtx+GPn2e60ytr8Ko5Sc3UEiovPgLHefRfX ci3W6QFQe3O8Oe+9shIF3SPirSHkYn3RKS6kuye9TtrWiIvToQWv1GZdaCLKSz2cP97a w6EQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:user-agent :in-reply-to:references:mime-version:content-transfer-encoding; bh=cq3S2pC7viwwOPvU+PObiKG1vNrd17k3/7qWJPf27Ms=; b=c8klizZ9nX5y5zFSSHwrrPHgKcX4+qYaQ/2lzkFuNI/W82yi3uQLE0LUPIONsm3IOU Cc3xa6CojlsMPPxk+FAtU8oSZpOyyEsfuSmdjObKLImTWv9mxnYgK90D9Vayulxclgnl xBiLbHo91WZPTT3184tucxswrn/YKow8Dvhdv2VtDbka82V3zX/Gh7j5vcX1gFaPL9hu qrl42C1Nc7Rm3mtcOo59Fq7Oiyh4Mi+zycQHocFmtu1tFIbCxBtScoBeJNvK4isRtHZG 2sfrDQ5KGJwtcu++cscr+1Tbm+RAgulIIMH4F3nOT89l3K6HrIFQyT5UhSwFgNJQxDHc ajyQ== X-Gm-Message-State: AFeK/H3mJUUOyPX8BdAql1bBHJzGxg2A6/7b/DHqJhk/+tjhZWjBbmPlEJIk/z0FUx6IMtsh X-Received: by 10.223.170.157 with SMTP id h29mr2185667wrc.21.1489573859552; Wed, 15 Mar 2017 03:30:59 -0700 (PDT) Received: from xps13.localnet (184.203.134.77.rev.sfr.net. [77.134.203.184]) by smtp.gmail.com with ESMTPSA id u41sm1810183wrc.24.2017.03.15.03.30.58 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 15 Mar 2017 03:30:58 -0700 (PDT) From: Thomas Monjalon To: Billy McFall Cc: wenzhuo.lu@intel.com, olivier.matz@6wind.com, dev@dpdk.org Date: Wed, 15 Mar 2017 11:30:58 +0100 Message-ID: <22570036.nsHDZ2LR4Y@xps13> User-Agent: KMail/4.14.10 (Linux/4.5.4-1-ARCH; KDE/4.14.11; x86_64; ; ) In-Reply-To: <20170309205119.28170-2-bmcfall@redhat.com> References: <20170127183800.27466-1-bmcfall@redhat.com> <20170309205119.28170-1-bmcfall@redhat.com> <20170309205119.28170-2-bmcfall@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [dpdk-dev] [PATCH v6 1/3] ethdev: 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: Wed, 15 Mar 2017 10:31:00 -0000 2017-03-09 15:51, Billy McFall: > @@ -3097,6 +3101,33 @@ rte_eth_tx_buffer(uint8_t port_id, uint16_t queue_id, > } > > /** > + * Request the driver to free mbufs currently cached by the driver. The > + * driver will only free the mbuf if it is no longer in use. It is the > + * application's responsibity to ensure rte_eth_tx_buffer_flush(..) is > + * called if needed. > + * > + * @param port_id > + * The port identifier of the Ethernet device. > + * @param queue_id > + * The index of the transmit queue through which output packets must be > + * sent. > + * The value must be in the range [0, nb_tx_queue - 1] previously supplied > + * to rte_eth_dev_configure(). > + * @param free_cnt > + * Maximum number of packets to free. Use 0 to indicate all possible packets > + * should be freed. Note that a packet may be using multiple mbufs. > + * @return > + * Failure: < 0 > + * -ENODEV: Invalid interface > + * -ENOTSUP: Driver does not support function > + * Success: >= 0 > + * 0-n: Number of packets freed. More packets may still remain in ring that > + * are in use. > + */ > +int > +rte_eth_tx_done_cleanup(uint8_t port_id, uint16_t queue_id, uint32_t free_cnt); > + > +/** > * Configure a callback for buffered packets which cannot be sent > * > * Register a specific callback to be called when an attempt is made to send > Please move this function below the tx_buffer functions (it is currently between rte_eth_tx_buffer and rte_eth_tx_buffer_set_err_callback).