From mboxrd@z Thu Jan 1 00:00:00 1970 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) 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:organization:user-agent :in-reply-to:references:mime-version:content-transfer-encoding; bh=0XZC/yvWmpIGCh3gnagiC/DXjKEWahJAkRcHxvoX8Lg=; b=C6owI7BJYdP8P/HXGj9nysOPZEmslXrFMAxYFJzd3ofEJxg7iksIIhNuVSSpRfk+qN nIeyXdmji9prZW6TbtegSAdrEpYcKi2cOi9W5OmhOPlgjpyrUjD5qircWm8yMZD6Sd5R G6JNnpRJtBECk0h5J0aVmD00XdB80fbLq31raEephVw3PU+0j/s2jvvSrRMQVTPqiLU1 dM8mq+yoXdk4fkfeutYpp78d9nNBbU49PWomM8cG1t2hSx7SlxGTGO14XlAYqWDKwGSo z0s9wa+QqJac2RjKFRWNOHyHWKZ1p6VyoIdAd7R2l5SCPSqWPc/b/Bic/lMuljqJ2brS S0Kg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:organization :user-agent:in-reply-to:references:mime-version :content-transfer-encoding; bh=0XZC/yvWmpIGCh3gnagiC/DXjKEWahJAkRcHxvoX8Lg=; b=Ceh0RaOqIXdLTrAWFG2hMmfoE6Kz9I4JGiYjhExa3TgeNvxgNmeAki6S3Z5F3Tg2EB vu0/ppomgrJTX/FYt/Wmw788W8ZaMiZQ6KaOgRQceweroCNzoKJMnuHIlf+EpqHfUst6 exTuHLzcdx22+kMtTg8WhlZvp6aLUUyeI3p5y168jY2BYvsYaiRqLuQP0WbsedbsSo/N x2sHvma2QrU3AfV8AJ0/8dc0krXz3/7e7vY+OnJlJjMLx6JF3hYrBZ9DZkTWjLdcTjC9 wJ1BU2OBZ2N3MZHhpxXBnnjdT01IULHX3NjARdX+yaG7oz2vovtNkxfVkSl+By1HQO9z XyxA== X-Gm-Message-State: AD7BkJIxyN7A9ilcphP9aCZ0l4JA1k0OAY2H/2l0bkKaIdFwOCyw/abPaUXxKKbWC5udIdAJ X-Received: by 10.28.53.134 with SMTP id c128mr26963194wma.10.1457543303481; Wed, 09 Mar 2016 09:08:23 -0800 (PST) Received: from xps13.localnet (91.111.75.86.rev.sfr.net. [86.75.111.91]) by smtp.gmail.com with ESMTPSA id v5sm3156617wmg.16.2016.03.09.09.08.22 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 09 Mar 2016 09:08:22 -0800 (PST) From: Thomas Monjalon To: "Kulasek, TomaszX" Date: Wed, 09 Mar 2016 18:06:42 +0100 Message-ID: <3343567.WE1fQm0xnM@xps13> Organization: 6WIND User-Agent: KMail/4.14.10 (Linux/4.1.6-1-ARCH; KDE/4.14.11; x86_64; ; ) In-Reply-To: <3042915272161B4EB253DA4D77EB373A14E6A953@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> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" 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 17:08:23 -0000 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?