From mboxrd@z Thu Jan 1 00:00:00 1970 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) Authentication-Results: compass.polito.it (amavisd-new); dkim=pass (1024-bit key) reason="pass (just generated, assumed good)" header.d=studenti.polito.it DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d= studenti.polito.it; h=content-type:content-type:cc:to:from:from :subject:subject:message-id:date:date:references:in-reply-to :received:mime-version:received:received:received; s=y2k10; t= 1463515335; bh=SmScTbkKvg7WF5Jhc0SNCBNMOBvyRyRpmef1jz5foRc=; b=R 9s67ztMUN4/p++W/Y/5bkv7dnVufkdK3KHXORPnhgFpzwN2aZ9aNjcVHL5hBGQJJ H5eInGwYNwfyAUOA9A45dvaG8woXEMwx5xKpNRLZy62rqmVfYSal1U5wfkrzrS/d iHDwN8uTSDNvOhdXvs4ro45IXHgEu5mkg5Duee9qj8= X-Virus-Scanned: amavisd-new at studenti.polito.it X-Spam-Flag: NO X-Spam-Score: -5.895 X-Spam-Level: X-Spam-Status: No, score=-5.895 tagged_above=-100 required=3.5 tests=[ALL_TRUSTED=-5, AWL=0.604, BAYES_00=-1.5, HTML_MESSAGE=0.001] autolearn=ham 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) X-Gm-Message-State: AOPr4FUOJ+33xyHdNUzDMIykQyOJticQV9EbmvPnUL8QcxDHna+Ac2RHDJX6MYMNfDvXN7j/Qua57CD3Su7DxA== MIME-Version: 1.0 X-Received: by 10.112.168.130 with SMTP id zw2mr1262514lbb.102.1463515335268; Tue, 17 May 2016 13:02:15 -0700 (PDT) Received: by 10.25.4.200 with HTTP; Tue, 17 May 2016 13:02:14 -0700 (PDT) In-Reply-To: <2661729.DcqZie9VKo@xps13> References: <1461943396-7094-1-git-send-email-mauricio.vasquezbernal@studenti.polito.it> <2661729.DcqZie9VKo@xps13> Date: Tue, 17 May 2016 22:02:14 +0200 X-Gmail-Original-Message-ID: Message-ID: From: =?UTF-8?Q?Mauricio_V=C3=A1squez?= To: Thomas Monjalon Cc: dev@dpdk.org Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.15 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: Tue, 17 May 2016 20:02:17 -0000 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,