From: Ferruh Yigit <ferruh.yigit@intel.com>
To: Ophir Munk <ophirmu@mellanox.com>, "dev@dpdk.org" <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: Tue, 9 Jun 2020 09:43:19 +0100 [thread overview]
Message-ID: <6809ade5-43af-9a27-1f72-abbc3ee31267@intel.com> (raw)
In-Reply-To: <AM0PR05MB4209684AE9B5F835AEB9499DD1820@AM0PR05MB4209.eurprd05.prod.outlook.com>
On 6/9/2020 9:40 AM, Ophir Munk wrote:
> Hi Ferruh,
> Please see inline
>
>> -----Original Message-----
>> From: Ferruh Yigit <ferruh.yigit@intel.com>
>> Sent: Monday, June 8, 2020 2:20 PM
>> 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
>>
>> 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?
>>
>
> Some functions were moved from file mlx5.c (with 6WIND copyright) to this file
> and renamed.
> Should 6WIND copyright be kept or removed in this file (mlx5_os.c)?
No. I just want to confirm this is not just copy/paste error, which happens on
new files, but done intentionally. As you did this intentionally, that is good.
>
>> <...>
>>
>>> @@ -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?
>
> The reason for keeping an explicit cast for async_fd (and not creating a new getter API)
> is that this code snippet will be moved under linux in next commits where no getter function is needed.
> I wanted to avoid adding a getter function here and then remove it in a follow up commit.
>
Make sense if it is removed later, thanks for clarification.
next prev parent reply other threads:[~2020-06-09 8:43 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
2020-06-09 8:40 ` Ophir Munk
2020-06-09 8:43 ` Ferruh Yigit [this message]
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=6809ade5-43af-9a27-1f72-abbc3ee31267@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).