From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-oi0-f53.google.com (mail-oi0-f53.google.com [209.85.218.53]) by dpdk.org (Postfix) with ESMTP id 5FCE8DE0 for ; Thu, 31 Aug 2017 11:35:35 +0200 (CEST) Received: by mail-oi0-f53.google.com with SMTP id k77so1309930oib.2 for ; Thu, 31 Aug 2017 02:35:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=netronome-com.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=9QFRce62uRGf/4M0rWKZoFEBL6a5/plC7QEf/hD2n/Y=; b=Kp11bkHmLuEt56IiPk0or/VI1IAsr8+jS0n5tG6eWwpzTVikSU2PhP9IuSwnPZpCmC tR0m3J4Rundm7ntwwZvmfxHxQsfnRO+y2xhDS9Hdhmt66bp89sZ6Z08MXuE2C/Amdlu2 WU7rgCP0d1FjBLFM/scMz56cIesYjl/G4SIZkojAys1wZOt5Rr0TXDuqwjGGS7cQmeVX gh6gFdUBFj1a1veK4yfaZv6HhFJMg1qjs0TPQ+qv0AN6/IaBIIfBQARkE+iRBIb0C4c0 byxXu2tU0n65pwV4zajx5qh8s0eW0ZTCdJxsyiY0Og+jSkcyrzHq5XP5D1MIy7TEcHOh 9DLw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=9QFRce62uRGf/4M0rWKZoFEBL6a5/plC7QEf/hD2n/Y=; b=tNkMEJWmhP0JSElrDI3EajlIS4gzJiJ3BH3c3bcT/FjtGCgQjFLngQqVh2cHstAd+O XrjrhyM6SrrkdjNLBCaqP8q8oh2GR99QO4rENdtqtSPrsd0z89FpM5ObdUpjvv64v42q 4iAKDkKNgoYgfThCwm+lwlTEpDk5KkHCC0K67W2gH/4WkkM1VDYJXxSFSdRAtpWt3FOb 8bbvt0OLmWa5kcivkAbXSz5zYEAaWK/8grIAHSKW7AafYYwVVGqNi5uTJtdevczfqsKM XQQ7lBCuhvONVmQ9yANgBT58FYJStEfbypm9FVIPa7cPSCF5R+LqXL2P1co6PHAceuNJ By6w== X-Gm-Message-State: AHYfb5iJe9PFeBPEXJ7bVhpgyja3AbiHVqeNG1n9tpg+UqdkN/Y0dw1p fPLNHIy2aSsf33QCjLCQe30Qz3it0Mq6 X-Received: by 10.202.230.20 with SMTP id d20mr5048853oih.289.1504172134679; Thu, 31 Aug 2017 02:35:34 -0700 (PDT) MIME-Version: 1.0 Received: by 10.58.33.212 with HTTP; Thu, 31 Aug 2017 02:35:34 -0700 (PDT) In-Reply-To: <10ad2437-d665-5c42-ec61-2cf830f2f92e@intel.com> References: <1503591622-16232-1-git-send-email-alejandro.lucero@netronome.com> <1503591622-16232-7-git-send-email-alejandro.lucero@netronome.com> <10ad2437-d665-5c42-ec61-2cf830f2f92e@intel.com> From: Alejandro Lucero Date: Thu, 31 Aug 2017 10:35:34 +0100 Message-ID: To: Ferruh Yigit Cc: dev Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.15 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: Thu, 31 Aug 2017 09:35:35 -0000 On Mon, Aug 28, 2017 at 5:42 PM, Ferruh Yigit wrote: > 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 >=3D 24 && domain << 28 && target =3D=3D 7) { > > gcc is giving following compiler warning [1]. Most probably intention is > the compare, but it is not clear, can you please check? > I have not seen this warning but I will add parenthesis for avoiding ambiguity. Thanks > > [1] > .../drivers/net/nfp/nfp_nspu.c: In function =E2=80=98nfp_nspu_set_bar_fro= m_symbl=E2=80=99: > .../drivers/net/nfp/nfp_nspu.c:446:29: error: =E2=80=98<<=E2=80=99 in boo= lean context, > did you mean =E2=80=98<=E2=80=99 ? [-Werror=3Dint-in-bool-context] > if (domain >=3D 24 && domain << 28 && target =3D=3D 7) { > ~~~~~~~^~~~~ > > > + addr =3D 1ULL << 37 | addr | ((uint64_t)domain & 0x3) << = 35; > > + } else { > > + addr =3D 1ULL << 39 | addr | ((uint64_t)domain & 0x3f) <<= 32; > > + if (target =3D=3D -7) > > + target =3D 7; > > + } >