From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id 094B847CE for ; Wed, 9 Mar 2016 17:35:27 +0100 (CET) Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga101.fm.intel.com with ESMTP; 09 Mar 2016 08:35:27 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.24,311,1455004800"; d="scan'208";a="62916973" Received: from irsmsx154.ger.corp.intel.com ([163.33.192.96]) by fmsmga004.fm.intel.com with ESMTP; 09 Mar 2016 08:35:26 -0800 Received: from irsmsx112.ger.corp.intel.com (10.108.20.5) by IRSMSX154.ger.corp.intel.com (163.33.192.96) with Microsoft SMTP Server (TLS) id 14.3.248.2; Wed, 9 Mar 2016 16:35:25 +0000 Received: from irsmsx102.ger.corp.intel.com ([169.254.2.19]) by irsmsx112.ger.corp.intel.com ([169.254.1.234]) with mapi id 14.03.0248.002; Wed, 9 Mar 2016 16:35:25 +0000 From: "Kulasek, TomaszX" To: Thomas Monjalon Thread-Topic: [dpdk-dev] [PATCH v2 1/2] ethdev: add buffered tx api Thread-Index: AQHRbyZQCQVz9kDF50ioZq1uS6eP859QO/iAgAEmJ/A= Date: Wed, 9 Mar 2016 16:35:24 +0000 Message-ID: <3042915272161B4EB253DA4D77EB373A14E6A953@IRSMSX102.ger.corp.intel.com> References: <1452869038-9140-1-git-send-email-tomaszx.kulasek@intel.com> <1456333729-3804-1-git-send-email-tomaszx.kulasek@intel.com> <1456333729-3804-2-git-send-email-tomaszx.kulasek@intel.com> <4446137.g0qt5Fe5Df@xps13> In-Reply-To: <4446137.g0qt5Fe5Df@xps13> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [163.33.239.182] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Cc: "dev@dpdk.org" Subject: Re: [dpdk-dev] [PATCH v2 1/2] ethdev: add buffered tx api X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 Mar 2016 16:35:28 -0000 > -----Original Message----- > From: Thomas Monjalon [mailto:thomas.monjalon@6wind.com] > Sent: Tuesday, March 8, 2016 23:52 > To: Kulasek, TomaszX > Cc: dev@dpdk.org; Ananyev, Konstantin > Subject: Re: [dpdk-dev] [PATCH v2 1/2] ethdev: add buffered tx api >=20 > Hi, >=20 [...] > > +/** > > + * Callback function for tracking unsent buffered packets. > > + * > > + * This function can be passed to > > +rte_eth_tx_buffer_set_err_callback() to > > + * adjust the default behaviour when buffered packets cannot be sent. > > +This > > + * function drops any unsent packets, but also updates a > > +user-supplied counter > > + * to track the overall number of packets dropped. The counter should > > +be an > > + * uint64_t variable. > > + * > > + * NOTE: this function should not be called directly, instead it shoul= d > be used > > + * as a callback for packet buffering. > > + * > > + * NOTE: when configuring this function as a callback with > > + * rte_eth_tx_buffer_set_err_callback(), the final, userdata > parameter > > + * should point to an uint64_t value. >=20 > Please forget this idea of counter in the default callback. >=20 Ok, I forgot. > [...] > > +void > > +rte_eth_count_unsent_packet_callback(struct rte_mbuf **pkts, uint16_t > unsent, > > + void *userdata); >=20 > 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 an= d 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? Tomasz