From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Monjalon Subject: Re: [PATCH v6 1/3] ethdev: new API to free consumed buffers in Tx ring Date: Wed, 15 Mar 2017 11:30:58 +0100 Message-ID: <22570036.nsHDZ2LR4Y@xps13> References: <20170127183800.27466-1-bmcfall@redhat.com> <20170309205119.28170-1-bmcfall@redhat.com> <20170309205119.28170-2-bmcfall@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7Bit Cc: wenzhuo.lu@intel.com, olivier.matz@6wind.com, dev@dpdk.org To: Billy McFall 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) In-Reply-To: <20170309205119.28170-2-bmcfall@redhat.com> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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).