From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 9313CA0588; Thu, 16 Apr 2020 19:47:30 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id A41331DDE2; Thu, 16 Apr 2020 19:47:29 +0200 (CEST) Received: from mail-oi1-f196.google.com (mail-oi1-f196.google.com [209.85.167.196]) by dpdk.org (Postfix) with ESMTP id 130F71DDDF for ; Thu, 16 Apr 2020 19:47:28 +0200 (CEST) Received: by mail-oi1-f196.google.com with SMTP id o25so17243179oic.11 for ; Thu, 16 Apr 2020 10:47:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=74PpY7TYQIxoemYfWS7VYtPyTjNUX5AZXwhcK1qBU1c=; b=QLV5pC0euR39bGctLCRhup0WCu+CwZGrHGEwegmT5snZgePVUWvVJTRLfP0EHjpImt yTWUyfGvCQSSinWxekl5yBhAGwmgLgkK9hItLzt6Ud3Y19hBEFLnPlqTwTrlQEoMbpwr SQ5Y2/aMwrrB5Bi+CiJbvSWcxMxGN1XDz7TiQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=74PpY7TYQIxoemYfWS7VYtPyTjNUX5AZXwhcK1qBU1c=; b=j9jRlDmwAmnBJ6SGd75tFhGBVg3WJ/5H0rzgGVZpvx2ICCLIf0TAqcu8U47pMYN5fh g6rQWOFq523HuZ4DjpWJWvWtenVSN9DZg9o84T9F1LCBDDHQRjHsfkMEPZGogbr1P+lb QljJoRoTt/MTxVdby39P44r8R2lydCFmLWcl/Cp8qFnY/qW41AHSKJZ/mk67I4gVU5JS ltsf8AtzEv6Xy3NxCy1WDziXYfLP02F2WuaxMaK+WDF8V7IlKg6QamZEN7y0oKrVFZCv vsdVW5SCQGNONed/Ss0zy2Dmp0FWo1P+KPKBgDhezTkL9Fu2LCZq1YqLo0OyARMLcdW3 Lmxw== X-Gm-Message-State: AGi0PubfO7Q66X2bu7pkJpdWwpm1nBHmt29DOTK2UdspDtghRJIb+csA MghstiXWAF6jRMbj+IkFYHkPV405v++klnufsNMWjw== X-Google-Smtp-Source: APiQypJU0ruT4H6wXKdv+0TO+NJRVTI1ke5D06uog2MuIhHTi0yrTlNbsMV3JW4jKWWbu9/tyVuzf3tjJkh9d4BLjxs= X-Received: by 2002:aca:5583:: with SMTP id j125mr56716oib.179.1587059247043; Thu, 16 Apr 2020 10:47:27 -0700 (PDT) MIME-Version: 1.0 References: <1586852011-37536-1-git-send-email-venkatkumar.duvvuru@broadcom.com> <1586938751-32808-1-git-send-email-venkatkumar.duvvuru@broadcom.com> <1586938751-32808-5-git-send-email-venkatkumar.duvvuru@broadcom.com> In-Reply-To: From: Ajit Khaparde Date: Thu, 16 Apr 2020 10:47:11 -0700 Message-ID: To: Ferruh Yigit Cc: Venkat Duvvuru , dpdk-dev , Michael Wildt Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Subject: Re: [dpdk-dev] [PATCH v4 04/34] net/bnxt: add initial tf core session open 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Thu, Apr 16, 2020 at 10:40 AM Ferruh Yigit wrote: > On 4/15/2020 9:18 AM, Venkat Duvvuru wrote: > > From: Michael Wildt > > > > - Add infrastructure support > > - Add tf_core open session support > > > > Signed-off-by: Michael Wildt > > Reviewed-by: Randy Schacher > > Reviewed-by: Ajit Kumar Khaparde > > Signed-off-by: Venkat Duvvuru > > <...> > > > +int > > +tfp_calloc(struct tfp_calloc_parms *parms) > > +{ > > + if (parms == NULL) > > + return -EINVAL; > > + > > + parms->mem_va = rte_zmalloc("tf", > > + (parms->nitems * parms->size), > > + parms->alignment); > > + if (parms->mem_va == NULL) { > > + PMD_DRV_LOG(ERR, "Allocate failed mem_va\n"); > > + return -ENOMEM; > > + } > > + > > + parms->mem_pa = (void > *)((uintptr_t)rte_mem_virt2iova(parms->mem_va)); > > + if (parms->mem_pa == (void *)RTE_BAD_IOVA) { > > This is causing a warning for 32bit icc [1], becuase 64-bit value > converted to > 32-bit pointer. Can you do the same casting that has been done in one line > above, like [2]. > > [1] > .../drivers/net/bnxt/tf_core/tfp.c(110): warning #2259: non-pointer > conversion > from "rte_iova_t={uint64_t={__uint64_t={unsigned long long}}}" to "void *" > may > lose significant bits > if (parms->mem_pa == (void *)RTE_BAD_IOVA) { > ^ > [2] > - if (parms->mem_pa == (void *)RTE_BAD_IOVA) { > + if (parms->mem_pa == (void *)((uintptr_t)RTE_BAD_IOVA)) { > Makes sense. Thanks