From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?UTF-8?Q?Mauricio_V=C3=A1squez?= Subject: Re: [PATCH] librte_ether: use RTE_ETH_VALID_PORTID_OR_ERR_RET to check port_id Date: Tue, 17 May 2016 22:02:14 +0200 Message-ID: References: <1461943396-7094-1-git-send-email-mauricio.vasquezbernal@studenti.polito.it> <2661729.DcqZie9VKo@xps13> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Cc: dev@dpdk.org To: Thomas Monjalon Return-path: Received: from compass.polito.it (compass.polito.it [130.192.55.110]) by dpdk.org (Postfix) with ESMTP id 0E8F568D1 for ; Tue, 17 May 2016 22:02:17 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by compass.polito.it (Postfix) with ESMTP id CE906100128 for ; Tue, 17 May 2016 22:02:16 +0200 (CEST) Received: from compass.polito.it ([127.0.0.1]) by localhost (compass.polito.it [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id 9XYbvZIy8rF2 for ; Tue, 17 May 2016 22:02:15 +0200 (CEST) Received: from mail-lb0-f178.google.com (mail-lb0-f178.google.com [209.85.217.178]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: s203403@studenti.polito.it) by compass.polito.it (Postfix) with ESMTPSA id C237A1000C0 for ; Tue, 17 May 2016 22:02:15 +0200 (CEST) Received: by mail-lb0-f178.google.com with SMTP id n11so10002999lbh.1 for ; Tue, 17 May 2016 13:02:15 -0700 (PDT) In-Reply-To: <2661729.DcqZie9VKo@xps13> List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Hello Thomas, 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 it in > > some new parts of the code. > > There are other occurences: > rte_eth_dev_socket_id > I missed it. > 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_errno variable before returning. > I think it could be done also in examples/ethtool/lib. > I'll send v2 including that one. Mauricio V,