From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id E5C2D1E2F for ; Mon, 28 Aug 2017 18:42:53 +0200 (CEST) Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 28 Aug 2017 09:42:52 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.41,442,1498546800"; d="scan'208";a="123302166" Received: from fyigit-mobl1.ger.corp.intel.com (HELO [10.237.220.57]) ([10.237.220.57]) by orsmga004.jf.intel.com with ESMTP; 28 Aug 2017 09:42:50 -0700 To: Alejandro Lucero , dev@dpdk.org References: <1503591622-16232-1-git-send-email-alejandro.lucero@netronome.com> <1503591622-16232-7-git-send-email-alejandro.lucero@netronome.com> From: Ferruh Yigit Message-ID: <10ad2437-d665-5c42-ec61-2cf830f2f92e@intel.com> Date: Mon, 28 Aug 2017 17:42:49 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 MIME-Version: 1.0 In-Reply-To: <1503591622-16232-7-git-send-email-alejandro.lucero@netronome.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Subject: Re: [dpdk-dev] [PATCH 06/16] nfp: add nsp symbol resolution command X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Aug 2017 16:42:54 -0000 On 8/24/2017 5:20 PM, Alejandro Lucero wrote: > Firmware has symbols helping to configure things like number of > PF ports, vNIC BARs addresses inside NFP memories, or ethernet > link state. Different firmware apps have different things to map > and likely different internal NFP addresses to use. > > Host drivers can use the NSPU interface for getting symbol data > regarding different hardware configurations. Once the driver has > the information about a specific object, a mapping is required > configuring an NFP expansion bar creating a device PCI bar window. > > Signed-off-by: Alejandro Lucero <...> > + > + /* Adjusting address based on symbol location */ > + if (domain >= 24 && domain << 28 && target == 7) { gcc is giving following compiler warning [1]. Most probably intention is the compare, but it is not clear, can you please check? [1] .../drivers/net/nfp/nfp_nspu.c: In function ‘nfp_nspu_set_bar_from_symbl’: .../drivers/net/nfp/nfp_nspu.c:446:29: error: ‘<<’ in boolean context, did you mean ‘<’ ? [-Werror=int-in-bool-context] if (domain >= 24 && domain << 28 && target == 7) { ~~~~~~~^~~~~ > + addr = 1ULL << 37 | addr | ((uint64_t)domain & 0x3) << 35; > + } else { > + addr = 1ULL << 39 | addr | ((uint64_t)domain & 0x3f) << 32; > + if (target == -7) > + target = 7; > + }