From: Ophir Munk Date: Wed, 10 Jun 2020 09:32:26 +0000 (+0000) Subject: net/mlx5: remove completion object dependency on DV X-Git-Url: http://git.droids-corp.org/?p=dpdk.git;a=commitdiff_plain;h=21b7c452a6bb0f7a04260fb7b0d7140c113cf5dc net/mlx5: remove completion object dependency on DV Replace 'struct mlx5dv_devx_cmd_comp *' with 'void *' in 'struct mlx5_dev_ctx_shared'. Signed-off-by: Ophir Munk Acked-by: Matan Azrad --- diff --git a/drivers/net/mlx5/linux/mlx5_os.c b/drivers/net/mlx5/linux/mlx5_os.c index 6286121e8a..faa7b143f9 100644 --- a/drivers/net/mlx5/linux/mlx5_os.c +++ b/drivers/net/mlx5/linux/mlx5_os.c @@ -1944,19 +1944,21 @@ mlx5_os_dev_shared_handler_install(struct mlx5_dev_ctx_shared *sh) if (sh->devx) { #ifdef HAVE_IBV_DEVX_ASYNC sh->intr_handle_devx.fd = -1; - sh->devx_comp = mlx5_glue->devx_create_cmd_comp(sh->ctx); - if (!sh->devx_comp) { + sh->devx_comp = + (void *)mlx5_glue->devx_create_cmd_comp(sh->ctx); + struct mlx5dv_devx_cmd_comp *devx_comp = sh->devx_comp; + if (!devx_comp) { DRV_LOG(INFO, "failed to allocate devx_comp."); return; } - flags = fcntl(sh->devx_comp->fd, F_GETFL); - ret = fcntl(sh->devx_comp->fd, F_SETFL, flags | O_NONBLOCK); + flags = fcntl(devx_comp->fd, F_GETFL); + ret = fcntl(devx_comp->fd, F_SETFL, flags | O_NONBLOCK); if (ret) { DRV_LOG(INFO, "failed to change file descriptor" " devx comp"); return; } - sh->intr_handle_devx.fd = sh->devx_comp->fd; + sh->intr_handle_devx.fd = devx_comp->fd; sh->intr_handle_devx.type = RTE_INTR_HANDLE_EXT; if (rte_intr_callback_register(&sh->intr_handle_devx, mlx5_dev_interrupt_handler_devx, sh)) { diff --git a/drivers/net/mlx5/mlx5.h b/drivers/net/mlx5/mlx5.h index 8c4b234e54..d6247405bf 100644 --- a/drivers/net/mlx5/mlx5.h +++ b/drivers/net/mlx5/mlx5.h @@ -567,7 +567,7 @@ struct mlx5_dev_ctx_shared { /* Shared interrupt handler section. */ struct rte_intr_handle intr_handle; /* Interrupt handler for device. */ struct rte_intr_handle intr_handle_devx; /* DEVX interrupt handler. */ - struct mlx5dv_devx_cmd_comp *devx_comp; /* DEVX async comp obj. */ + void *devx_comp; /* DEVX async comp obj. */ struct mlx5_devx_obj *tis; /* TIS object. */ struct mlx5_devx_obj *td; /* Transport domain. */ struct mlx5_flow_id_pool *flow_id_pool; /* Flow ID pool. */