From mboxrd@z Thu Jan 1 00:00:00 1970 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) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-type:content-transfer-encoding; bh=71M/lvRqx469p83NOv3IuezggjbJ8uskt9PqkrFN2V4=; b=wbzmv2MAQe1Yuy1XXNkl51EjBp3xUckyPXHzefII6jp3OwKiEUav20ldUSP7Eyqb9Y OjUHY1Q9SLPxMdKw0GQ53D9eIanhud7PWcO0zkBwUsA/rigaT/4quI+SRAzASEP6fp4F 5iUldYp0uLivDlFiD5lVvahCQJ0OcXreXlimzop+eT1ewCoJex1OebJtDqs61VeDkIRn bBh3CyounIkX/7xQp+9YpxyYoqANO4dHbDg5vr1AUmy2Q0MT/qT5VWEJhkQKamOjEOkN vV6EXtGc//jr3pTDk7Ibx0KhqmzNMdpzS3QLqh4AcyjkHgzoaSL6O2HRdunMhccHnELV hYKQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-type:content-transfer-encoding; bh=71M/lvRqx469p83NOv3IuezggjbJ8uskt9PqkrFN2V4=; b=DSa6wi2KWGTtmzDd6ktqkzMyBHfwr5O+ITDh57DG0ck82RTUonoCdrw2feXZFtLqdy Yi8ehuq3bChz7zQzAP6mish00+h95K18AFlnN+Bx0RDdpV45vkoZ2vYVxrKZFgD72YPR sD4o4tO3FNCEpj6vJe+DyuOgMBliOhUaWuchWx6oitVCg7cjabjsVKFhkSrsKjT5Lxn1 brv05U9rMG2jODWazoqDzbIyDNUbEnlzux+MnRIfFNG7o9R+EmtbIUBT3vl3k9fjnL5a zHLcf+pBCLKB6gkloj2F0SJfcRVaU2Cj/O2VmZr3LJVtnuFCYbpToem0kJ2qiE7Jd0x2 EpVA== X-Gm-Message-State: ALoCoQlugefNwv1p/RaVbTvMbi1WWgXYGi5xnn1ID5Viopt83SEQJ/V0onv0gTeATr/wUhJ4ssw+tHN0qC/AduIs1Ag38vseEQ== X-Received: by 10.66.156.106 with SMTP id wd10mr54919435pab.150.1453314763501; Wed, 20 Jan 2016 10:32:43 -0800 (PST) Received: from xeon-e3 (static-50-53-82-155.bvtn.or.frontiernet.net. [50.53.82.155]) by smtp.gmail.com with ESMTPSA id y86sm50394874pfa.26.2016.01.20.10.32.43 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 20 Jan 2016 10:32:43 -0800 (PST) Date: Wed, 20 Jan 2016 10:32:50 -0800 From: Stephen Hemminger To: Jasvinder Singh Message-ID: <20160120103250.23706716@xeon-e3> In-Reply-To: <1453287677-221142-1-git-send-email-jasvinder.singh@intel.com> 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 Subject: Re: [dpdk-dev] [PATCH] ip_pipeline: fix cpu socket-id error 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, 20 Jan 2016 18:32:45 -0000 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;