From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Monjalon Subject: Re: [PATCH v2 1/2] ethdev: add buffered tx api Date: Wed, 09 Mar 2016 18:06:42 +0100 Message-ID: <3343567.WE1fQm0xnM@xps13> References: <1452869038-9140-1-git-send-email-tomaszx.kulasek@intel.com> <4446137.g0qt5Fe5Df@xps13> <3042915272161B4EB253DA4D77EB373A14E6A953@IRSMSX102.ger.corp.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7Bit Cc: dev@dpdk.org To: "Kulasek, TomaszX" Return-path: Received: from mail-wm0-f50.google.com (mail-wm0-f50.google.com [74.125.82.50]) by dpdk.org (Postfix) with ESMTP id 9B4BA5683 for ; Wed, 9 Mar 2016 18:08:23 +0100 (CET) Received: by mail-wm0-f50.google.com with SMTP id p65so80160289wmp.0 for ; Wed, 09 Mar 2016 09:08:23 -0800 (PST) In-Reply-To: <3042915272161B4EB253DA4D77EB373A14E6A953@IRSMSX102.ger.corp.intel.com> List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 2016-03-09 16:35, Kulasek, TomaszX: > From: Thomas Monjalon [mailto:thomas.monjalon@6wind.com] > > > +void > > > +rte_eth_count_unsent_packet_callback(struct rte_mbuf **pkts, uint16_t > > unsent, > > > + void *userdata); > > > > What about rte_eth_tx_buffer_default_callback as name? > > This function is used now as default to count silently dropped packets and update error counter in tx_buffer structure. When I remove error counter and set silent drop as default behavior, it's better to have two callbacks to choice: > > 1) silently dropping packets (set as default) > 2) as defined above to dropping with counter. > > Maybe better is to define two default callbacks while many applications can still update it's internal error counter, > So IHMO these names are more descriptive: > > rte_eth_tx_buffer_drop_callback > rte_eth_tx_buffer_count_callback > > What you think? I think you are right about the name. Are you sure providing a "count" callback is needed? Is it just to refactor the examples?