From: Ophir Munk <ophirmu@mellanox.com>
To: dev@dpdk.org, Matan Azrad <matan@mellanox.com>,
Raslan Darawsheh <rasland@mellanox.com>
Cc: Ophir Munk <ophirmu@mellanox.com>
Subject: [dpdk-dev] [PATCH v1 1/8] net/mlx5: remove dv dependency in mlx5_dev_ctx_shared struct
Date: Wed, 10 Jun 2020 09:32:26 +0000 [thread overview]
Message-ID: <20200610093233.23902-2-ophirmu@mellanox.com> (raw)
In-Reply-To: <20200610093233.23902-1-ophirmu@mellanox.com>
Replace 'struct mlx5dv_devx_cmd_comp *' with 'void *' in 'struct
mlx5_dev_ctx_shared'.
Signed-off-by: Ophir Munk <ophirmu@mellanox.com>
---
drivers/net/mlx5/linux/mlx5_os.c | 12 +++++++-----
drivers/net/mlx5/mlx5.h | 2 +-
2 files changed, 8 insertions(+), 6 deletions(-)
diff --git a/drivers/net/mlx5/linux/mlx5_os.c b/drivers/net/mlx5/linux/mlx5_os.c
index 92422db..21eff38 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 8c4b234..d624740 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. */
--
2.8.4
next prev parent reply other threads:[~2020-06-10 9:33 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-10 9:32 [dpdk-dev] [PATCH v1 0/8] mlx5 PMD multi OS support - part #2 Ophir Munk
2020-06-10 9:32 ` Ophir Munk [this message]
2020-06-10 9:32 ` [dpdk-dev] [PATCH v1 2/8] net/mlx5: rename ib in names Ophir Munk
2020-06-10 9:32 ` [dpdk-dev] [PATCH v1 3/8] net/mlx5: move socket files under Linux directory Ophir Munk
2020-06-10 9:32 ` [dpdk-dev] [PATCH v1 4/8] net/mlx5: split mlx5 ethdev " Ophir Munk
2020-06-10 9:32 ` [dpdk-dev] [PATCH v1 5/8] net/mlx5: refactor eth dev ops for Linux Ophir Munk
2020-06-10 9:32 ` [dpdk-dev] [PATCH v1 6/8] common/mlx5: exclude ibv dependent calls in devx commands Ophir Munk
2020-06-10 9:32 ` [dpdk-dev] [PATCH v1 7/8] common/mlx5: exclude OS dependency " Ophir Munk
2020-06-18 22:47 ` Thomas Monjalon
2020-06-18 22:48 ` Thomas Monjalon
2020-06-10 9:32 ` [dpdk-dev] [PATCH v1 8/8] net/mlx5: refactor statistics Ophir Munk
2020-06-14 8:21 ` [dpdk-dev] [PATCH v1 0/8] mlx5 PMD multi OS support - part #2 Matan Azrad
2020-06-15 6:58 ` Raslan Darawsheh
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200610093233.23902-2-ophirmu@mellanox.com \
--to=ophirmu@mellanox.com \
--cc=dev@dpdk.org \
--cc=matan@mellanox.com \
--cc=rasland@mellanox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).