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 16CF23195 for ; Wed, 9 Mar 2016 19:12:15 +0100 (CET) Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga101.fm.intel.com with ESMTP; 09 Mar 2016 10:12:16 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.24,312,1455004800"; d="scan'208";a="666563073" Received: from irsmsx109.ger.corp.intel.com ([163.33.3.23]) by FMSMGA003.fm.intel.com with ESMTP; 09 Mar 2016 10:12:14 -0800 Received: from irsmsx102.ger.corp.intel.com ([169.254.2.19]) by IRSMSX109.ger.corp.intel.com ([169.254.13.174]) with mapi id 14.03.0248.002; Wed, 9 Mar 2016 18:12:13 +0000 From: "Kulasek, TomaszX" To: Thomas Monjalon Thread-Topic: [dpdk-dev] [PATCH v2 1/2] ethdev: add buffered tx api Thread-Index: AQHRbyZQCQVz9kDF50ioZq1uS6eP859QO/iAgAEmJ/CAAAuuAIAABMRg Date: Wed, 9 Mar 2016 18:12:12 +0000 Message-ID: <3042915272161B4EB253DA4D77EB373A14E6A9BB@IRSMSX102.ger.corp.intel.com> References: <1452869038-9140-1-git-send-email-tomaszx.kulasek@intel.com> <4446137.g0qt5Fe5Df@xps13> <3042915272161B4EB253DA4D77EB373A14E6A953@IRSMSX102.ger.corp.intel.com> <3343567.WE1fQm0xnM@xps13> In-Reply-To: <3343567.WE1fQm0xnM@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 18:12:16 -0000 > -----Original Message----- > From: Thomas Monjalon [mailto:thomas.monjalon@6wind.com] > Sent: Wednesday, March 9, 2016 18:07 > To: Kulasek, TomaszX > Cc: dev@dpdk.org; Ananyev, Konstantin > Subject: Re: [dpdk-dev] [PATCH v2 1/2] ethdev: add buffered tx api >=20 > 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 thes= e > names are more descriptive: > > > > rte_eth_tx_buffer_drop_callback > > rte_eth_tx_buffer_count_callback > > > > What you think? >=20 > I think you are right about the name. >=20 > Are you sure providing a "count" callback is needed? > Is it just to refactor the examples? I think it's useful to have a callback which let you easily to track the ov= erall number of packets dropped. It's handy when you want to drop packets a= nd not leave them untracked. It's good to have it, but it's not critical. Changing the examples is not a problem while I've got copy-paste superpower= . Tomasz