From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stephen Hemminger Subject: Re: [PATCH] ip_pipeline: fix cpu socket-id error Date: Wed, 20 Jan 2016 10:32:50 -0800 Message-ID: <20160120103250.23706716@xeon-e3> References: <1453287677-221142-1-git-send-email-jasvinder.singh@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: dev@dpdk.org To: Jasvinder Singh Return-path: Received: from mail-pa0-f50.google.com (mail-pa0-f50.google.com [209.85.220.50]) by dpdk.org (Postfix) with ESMTP id 47A488DAF for ; Wed, 20 Jan 2016 19:32:44 +0100 (CET) Received: by mail-pa0-f50.google.com with SMTP id ho8so8602705pac.2 for ; Wed, 20 Jan 2016 10:32:44 -0800 (PST) In-Reply-To: <1453287677-221142-1-git-send-email-jasvinder.singh@intel.com> 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" On Wed, 20 Jan 2016 11:01:17 +0000 Jasvinder Singh wrote: > +static inline int > +app_get_cpu_socket_id(uint32_t pmd_id) > +{ > + int status = rte_eth_dev_socket_id(pmd_id); > + > + if (status == -1) > + return 0; > + > + return status; > + Why not: return (status != SOCKET_ID_ANY) ? status : 0;