[dpdk-dev] [PATCH v4 04/34] net/bnxt: add initial tf core session open
Ferruh Yigit
ferruh.yigit at intel.com
Thu Apr 16 19:39:54 CEST 2020
On 4/15/2020 9:18 AM, Venkat Duvvuru wrote:
> From: Michael Wildt <michael.wildt at broadcom.com>
>
> - Add infrastructure support
> - Add tf_core open session support
>
> Signed-off-by: Michael Wildt <michael.wildt at broadcom.com>
> Reviewed-by: Randy Schacher <stuart.schacher at broadcom.com>
> Reviewed-by: Ajit Kumar Khaparde <ajit.khaparde at broadcom.com>
> Signed-off-by: Venkat Duvvuru <venkatkumar.duvvuru at 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)) {
More information about the dev
mailing list