From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.warmcat.com (mail.warmcat.com [163.172.24.82]) by dpdk.org (Postfix) with ESMTP id CFB9B1BC4D for ; Mon, 14 May 2018 01:11:00 +0200 (CEST) To: Thomas Monjalon Cc: dev@dpdk.org, Stephen Hemminger References: <152609021699.121661.5295227351721865436.stgit@localhost.localdomain> <152609033224.121661.12927135119918583257.stgit@localhost.localdomain> <58706255.BWJRb5PVTu@xps> From: Andy Green Message-ID: Date: Mon, 14 May 2018 07:10:56 +0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 In-Reply-To: <58706255.BWJRb5PVTu@xps> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH v3 02/24] lib/librte_ethdev: change eth-dev-ops API to return int X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 13 May 2018 23:11:01 -0000 On 05/13/2018 10:58 PM, Thomas Monjalon wrote: > 12/05/2018 03:58, Andy Green: >> Signed-off-by: Andy Green > [...] >> --- a/lib/librte_ethdev/rte_ethdev_core.h >> +++ b/lib/librte_ethdev/rte_ethdev_core.h >> -typedef uint32_t (*eth_rx_queue_count_t)(struct rte_eth_dev *dev, >> - uint16_t rx_queue_id); >> +typedef int (*eth_rx_queue_count_t)(struct rte_eth_dev *dev, >> + uint16_t rx_queue_id); >> /**< @internal Get number of used descriptors on a receive queue. */ > > What is the reason of this change? I thought I wasn't making enough patches, so I randomly started changing stuff. Just kidding. Again, the original version of this patch just fixed the compiler warning, but Stephen Hemminger suggested going one level deeper and having this api return an int, so it has a way to signal errors. It sounded reasonable to me so I did it. -Andy >