On 4/15/2020 9:18 AM, Venkat Duvvuru wrote: > From: Michael Wildt <michael.wi...@broadcom.com> > > - Add infrastructure support > - Add tf_core open session support > > Signed-off-by: Michael Wildt <michael.wi...@broadcom.com> > Reviewed-by: Randy Schacher <stuart.schac...@broadcom.com> > Reviewed-by: Ajit Kumar Khaparde <ajit.khapa...@broadcom.com> > Signed-off-by: Venkat Duvvuru <venkatkumar.duvv...@broadcom.com>
<...> > +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)) {