From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f54.google.com (mail-wm0-f54.google.com [74.125.82.54]) by dpdk.org (Postfix) with ESMTP id F1D3A5A55 for ; Wed, 18 May 2016 10:15:38 +0200 (CEST) Received: by mail-wm0-f54.google.com with SMTP id g17so66635795wme.1 for ; Wed, 18 May 2016 01:15:38 -0700 (PDT) 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:user-agent:in-reply-to :references:mime-version:content-transfer-encoding; bh=Fpi+0oODgGTOUyZCSy4PVO3VDEVFwfMKKKTUjPx92LU=; b=cUuGhltvqMlDrdS4znkpxF3veybtcCDtBKW8BQCfg56AUq0MkMWpN0SeyBwuy4LLYJ /dUrbmv7WCdAAvgV+4cj08miQqvezWkog098tc2Mo23ylLVWBkoMC1jx3959EPOn9+g0 Ex3035W+mZEcn4ZA7NB5318eQPOXQaJAoIWSkAKkmHhiyEDPDnL+ITDCERoDpQc2xLnd C+0MVM3wrcNU6x6NxUS5wwzewlY2y7CUy04iUmrsQ/yJWsUz0twjHMyMtWjHIueZ8ile vICPmGuXihe/ri1nixJTPgfma+GI6HVEYzY3Ui2FV8NijyvDZFYBn91sZ5zmMxl/O/nD EG6g== 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:user-agent :in-reply-to:references:mime-version:content-transfer-encoding; bh=Fpi+0oODgGTOUyZCSy4PVO3VDEVFwfMKKKTUjPx92LU=; b=Wfzb2Y5Zcnq6XFM628HKx/37t9vPwW+TCvOwRJMxXsi6flgVtMPsakgDhKbiWjw6v4 asTV2fCcXVkhf/8tjAZ4wjIib/e+X4tLKrka1/ZPHRy+7L5wrwSSglmgDrKxKxJJcaQx r80neIjJnhlvuMZn3dqLiXCIzckkqWkkf2H98j9gssYG2NTEd3IePI0ClW4kuAMuOf3S cIfkpfnCynr8hos9Jby0B7wAG5fTziLVWKZyCAoXFvnYu2+InvlzZTxEOK7rwe4dQgfV LQfvlAZmDg7KU4n2yQ7VxA90mw30J3Mu3svDoz2AGeviy1lVZjbE+BFEc9GpCIvquIJs F3Hg== X-Gm-Message-State: AOPr4FXj76vTHU4Qy7q+uctiTRWKjJuOavPQEQE8ylhqopUJGSW8y2AkvmuGpv75zqtm1as6 X-Received: by 10.194.45.169 with SMTP id o9mr5532146wjm.156.1463559337758; Wed, 18 May 2016 01:15:37 -0700 (PDT) Received: from xps13.localnet (guy78-3-82-239-227-177.fbx.proxad.net. [82.239.227.177]) by smtp.gmail.com with ESMTPSA id lm1sm7282442wjc.25.2016.05.18.01.15.36 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 18 May 2016 01:15:36 -0700 (PDT) From: Thomas Monjalon To: Mauricio =?ISO-8859-1?Q?V=E1squez?= Cc: dev@dpdk.org Date: Wed, 18 May 2016 10:15:16 +0200 Message-ID: <2109161.zCfKjVzhiS@xps13> User-Agent: KMail/4.14.10 (Linux/4.1.6-1-ARCH; KDE/4.14.11; x86_64; ; ) In-Reply-To: References: <1461943396-7094-1-git-send-email-mauricio.vasquezbernal@studenti.polito.it> <2661729.DcqZie9VKo@xps13> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="iso-8859-1" Subject: Re: [dpdk-dev] [PATCH] librte_ether: use RTE_ETH_VALID_PORTID_OR_ERR_RET to check port_id 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, 18 May 2016 08:15:39 -0000 2016-05-17 22:02, Mauricio V=E1squez: > On Fri, May 13, 2016 at 6:20 PM, Thomas Monjalon > wrote: > > 2016-04-29 17:23, Mauricio Vasquez B: > > > The RTE_ETH_VALID_PORTID_OR_ERR_RET macro is used in some places > > > to check if a port id is valid or not. This commit makes use of i= t in > > > some new parts of the code. > > > > There are other occurences: > > rte_eth_dev_socket_id > > > I missed it. >=20 > > rte_eth_add_rx_callback > > rte_eth_add_tx_callback > > rte_eth_remove_rx_callback > > rte_eth_remove_tx_callback > > > The macro can not be used on those ones because they set the rte_errn= o > variable before returning. It may be a good idea to set rte_errno to EINVAL in these macros. Generally speaking, rte_errno is not used a lot currently.