DPDK patches and discussions
 help / color / mirror / Atom feed
From: Ferruh Yigit <ferruh.yigit@intel.com>
To: Ophir Munk <ophirmu@mellanox.com>,
	dev@dpdk.org, Matan Azrad <matan@mellanox.com>,
	Raslan Darawsheh <rasland@mellanox.com>
Subject: Re: [dpdk-dev] [PATCH v1 2/8] net/mlx5: add mlx5 Linux specific file with getter functions
Date: Mon, 8 Jun 2020 12:20:06 +0100	[thread overview]
Message-ID: <ad9e6298-3a45-fc0c-afa9-db0359521276@intel.com> (raw)
In-Reply-To: <20200603150602.4686-3-ophirmu@mellanox.com>

On 6/3/2020 4:05 PM, Ophir Munk wrote:
> 'ctx' type (field in 'struct mlx5_ctx_shared') is changed from 'struct
> ibv_context *' to 'void *'.  'ctx' members which are verbs dependent
> (e.g. device_name) will be accessed through getter functions which are
> added to a new file under Linux directory: linux/mlx5_os.c.
> 
> Signed-off-by: Ophir Munk <ophirmu@mellanox.com>
> Acked-by: Matan Azrad <matan@mellanox.com>

<...>

> @@ -0,0 +1,87 @@
> +/* SPDX-License-Identifier: BSD-3-Clause
> + * Copyright 2015 6WIND S.A.
> + * Copyright 2020 Mellanox Technologies, Ltd
> + */

Just to double check if '6WIND' is copy/paste error in this new file?

<...>

> @@ -677,13 +677,14 @@ mlx5_dev_shared_handler_install(struct mlx5_dev_ctx_shared *sh)
>  	int flags;
>  
>  	sh->intr_handle.fd = -1;
> -	flags = fcntl(sh->ctx->async_fd, F_GETFL);
> -	ret = fcntl(sh->ctx->async_fd, F_SETFL, flags | O_NONBLOCK);
> +	flags = fcntl(((struct ibv_context *)sh->ctx)->async_fd, F_GETFL);
> +	ret = fcntl(((struct ibv_context *)sh->ctx)->async_fd,
> +		    F_SETFL, flags | O_NONBLOCK);

As far as I understand you are trying to remove to the dependency to ibverbs, at
least in root level, linux/x.c will have that dependency. (I assume this is for
Windows support)
The 'mlx5_os_get_ctx_device_path()' wrapper seems can work for it but what is
the point of above usage, that you explicitly cast "void *" to "(struct
ibv_context *)", so you still keep the ibv dependency?

  reply	other threads:[~2020-06-08 11:20 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-03 15:05 [dpdk-dev] [PATCH v1 0/8] mlx5 PMD multi OS support Ophir Munk
2020-06-03 15:05 ` [dpdk-dev] [PATCH v1 1/8] net/mlx5: rename mlx5 ibv shared struct Ophir Munk
2020-06-03 15:05 ` [dpdk-dev] [PATCH v1 2/8] net/mlx5: add mlx5 Linux specific file with getter functions Ophir Munk
2020-06-08 11:20   ` Ferruh Yigit [this message]
2020-06-09  8:40     ` Ophir Munk
2020-06-09  8:43       ` Ferruh Yigit
2020-06-03 15:05 ` [dpdk-dev] [PATCH v1 3/8] drivers: remove mlx5 protection domain dependency on ibv Ophir Munk
2020-06-03 15:05 ` [dpdk-dev] [PATCH v1 4/8] net/mlx5: remove attributes dependency on ibv and dv Ophir Munk
2020-06-03 15:05 ` [dpdk-dev] [PATCH v1 5/8] net/mlx5: remove umem field dependency on dv Ophir Munk
2020-06-03 15:06 ` [dpdk-dev] [PATCH v1 6/8] net/mlx5: refactor PCI probing under Linux Ophir Munk
2020-06-03 15:06 ` [dpdk-dev] [PATCH v1 7/8] net/mlx5: add mlx5 header file specific to Linux Ophir Munk
2020-06-08 11:31   ` Ferruh Yigit
2020-06-09  8:44     ` Ophir Munk
2020-06-09 11:48       ` Ferruh Yigit
2020-06-09 14:49         ` Ophir Munk
2020-06-03 15:06 ` [dpdk-dev] [PATCH v1 8/8] net/mlx5: remove ibv dependency in spawn struct Ophir Munk
2020-06-07  8:49 ` [dpdk-dev] [PATCH v1 0/8] mlx5 PMD multi OS support 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=ad9e6298-3a45-fc0c-afa9-db0359521276@intel.com \
    --to=ferruh.yigit@intel.com \
    --cc=dev@dpdk.org \
    --cc=matan@mellanox.com \
    --cc=ophirmu@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).