From: Ferruh Yigit <ferruh.yigit@intel.com>
To: Bruce Richardson <bruce.richardson@intel.com>,
"Ananyev, Konstantin" <konstantin.ananyev@intel.com>
Cc: Thomas Monjalon <thomas@monjalon.net>,
"dev@dpdk.org" <dev@dpdk.org>,
"vladz@cloudius-systems.com" <vladz@cloudius-systems.com>
Subject: Re: [dpdk-dev] [PATCH 7/7] ethdev: use opaque user callback object
Date: Fri, 1 Dec 2017 15:51:52 -0800 [thread overview]
Message-ID: <964acb9f-28ee-9c69-fd02-de7d3f09e429@intel.com> (raw)
In-Reply-To: <20171201131702.GA2552@bricha3-MOBL3.ger.corp.intel.com>
On 12/1/2017 5:17 AM, Bruce Richardson wrote:
> On Fri, Dec 01, 2017 at 11:22:12AM +0000, Ananyev, Konstantin wrote:
>>
>>
>>> -----Original Message-----
>>> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Bruce Richardson
>>> Sent: Friday, December 1, 2017 10:33 AM
>>> To: Yigit, Ferruh <ferruh.yigit@intel.com>
>>> Cc: Thomas Monjalon <thomas@monjalon.net>; dev@dpdk.org; vladz@cloudius-systems.com
>>> Subject: Re: [dpdk-dev] [PATCH 7/7] ethdev: use opaque user callback object
>>>
>>> On Fri, Dec 01, 2017 at 02:29:57AM +0000, Ferruh Yigit wrote:
>>>> "struct rte_eth_rxtx_callback" is defined as internal data structure but
>>>> used in public APIs.
>>>>
>>>> Checking the API documentation shows that intention was using this
>>>> object as opaque object. Data structure only used in delete APIs which
>>>> doesn't require to know the internals of the data structure.
>>>>
>>>> Converting callback parameter in API to void pointer should not require
>>>> any modification in user application because this data structure was
>>>> already marked as internal and only should be used as pointer in
>>>> application.
>>>>
>>>> Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
>>>> ---
>>>
>>> I disagree on this patch. The structure itself is not exposed, only the
>>> name, since it is only passed around as a pointer, so there is no need
>>> to change the parameters to void pointer. It's a named opaque type.
>>
>> Personally I think it would be better to do visa-versa:
>> make rte_eth_add_(rx|tx)_callback() to return struct rte_eth_rxtx_callback *
>> instead of void *.
>> Konstantin
>>
> I didn't realise that it did, so definite +1 to that suggestion.
No issue on having a named opaque type, but unfortunately struct is exposed
because of inline functions again.
It has been moved into rte_ethdev_core.h but accessible by applications.
And since intention is an opaque type, because of "void *" return types, I
thought it is better to hide type completely so that application can't access
details.
next prev parent reply other threads:[~2017-12-01 23:51 UTC|newest]
Thread overview: 76+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-01 2:29 [dpdk-dev] [PATCH 1/7] ethdev: remove unused flag from header Ferruh Yigit
2017-12-01 2:29 ` [dpdk-dev] [PATCH 2/7] ethdev: fix port id storage Ferruh Yigit
2017-12-01 9:01 ` Hemant Agrawal
2017-12-01 23:52 ` Ferruh Yigit
2017-12-01 2:29 ` [dpdk-dev] [PATCH 3/7] ethdev: separate driver APIs Ferruh Yigit
2017-12-01 6:24 ` Shreyansh Jain
2017-12-01 8:59 ` Hemant Agrawal
2017-12-01 23:51 ` Ferruh Yigit
2017-12-01 2:29 ` [dpdk-dev] [PATCH 4/7] ethdev: separate internal structures into own header Ferruh Yigit
2017-12-01 5:44 ` Hemant Agrawal
2017-12-01 2:29 ` [dpdk-dev] [PATCH 5/7] ethdev: reorder inline functions Ferruh Yigit
2017-12-01 2:29 ` [dpdk-dev] [PATCH 6/7] ethdev: rename function parameter for consistency Ferruh Yigit
2017-12-01 2:29 ` [dpdk-dev] [PATCH 7/7] ethdev: use opaque user callback object Ferruh Yigit
2017-12-01 10:33 ` Bruce Richardson
2017-12-01 11:22 ` Ananyev, Konstantin
2017-12-01 13:17 ` Bruce Richardson
2017-12-01 23:51 ` Ferruh Yigit [this message]
2017-12-04 10:31 ` Bruce Richardson
2017-12-04 17:49 ` Ferruh Yigit
[not found] ` <49eb13f1-e12f-071a-b58b-1cd4852b7c8b@scylladb.com>
2017-12-01 22:30 ` [dpdk-dev] [PATCH 1/7] ethdev: remove unused flag from header Vlad Zolotarov
2017-12-01 23:51 ` Ferruh Yigit
2017-12-02 2:22 ` Vlad Zolotarov
2017-12-04 17:54 ` Ferruh Yigit
2017-12-04 19:37 ` Vlad Zolotarov
2018-01-09 16:23 ` [dpdk-dev] [PATCH v2 1/6] ethdev: fix port id storage Ferruh Yigit
2018-01-09 16:23 ` [dpdk-dev] [PATCH v2 2/6] ethdev: separate driver APIs Ferruh Yigit
2018-01-09 19:19 ` Andrew Rybchenko
2018-01-09 16:23 ` [dpdk-dev] [PATCH v2 3/6] ethdev: separate internal structures into own header Ferruh Yigit
2018-01-09 16:23 ` [dpdk-dev] [PATCH v2 4/6] ethdev: reorder inline functions Ferruh Yigit
2018-01-09 16:23 ` [dpdk-dev] [PATCH v2 5/6] ethdev: rename function parameter for consistency Ferruh Yigit
2018-01-09 16:23 ` [dpdk-dev] [PATCH v2 6/6] ethdev: return named opaque type instead of void pointer Ferruh Yigit
2018-01-09 18:55 ` Stephen Hemminger
2018-01-09 18:58 ` Stephen Hemminger
2018-01-17 21:57 ` [dpdk-dev] [PATCH v3 1/6] ethdev: fix port id storage Ferruh Yigit
2018-01-17 21:57 ` [dpdk-dev] [PATCH v3 2/6] ethdev: return named opaque type instead of void pointer Ferruh Yigit
2018-01-17 22:11 ` [dpdk-dev] [dpdk-stable] " Thomas Monjalon
2018-01-18 10:09 ` Ferruh Yigit
2018-03-09 11:25 ` [dpdk-dev] [PATCH v4] " Ferruh Yigit
[not found] ` <20180309123651.GB19004@hmswarspite.think-freely.org>
2018-03-09 13:00 ` Ferruh Yigit
2018-03-09 15:16 ` Neil Horman
2018-03-09 15:45 ` Ferruh Yigit
2018-03-09 19:06 ` Neil Horman
2018-03-20 15:51 ` Ferruh Yigit
2018-03-20 16:34 ` [dpdk-dev] [PATCH v5] " Ferruh Yigit
2018-03-21 13:04 ` Neil Horman
2018-03-23 17:00 ` Bruce Richardson
2018-03-24 2:08 ` Neil Horman
2018-03-26 8:47 ` Ananyev, Konstantin
2018-03-27 19:10 ` Ferruh Yigit
2018-01-17 21:57 ` [dpdk-dev] [PATCH v3 3/6] ethdev: separate driver APIs Ferruh Yigit
2018-01-17 21:58 ` [dpdk-dev] [PATCH v3 4/6] ethdev: separate internal structures into own header Ferruh Yigit
2018-01-17 22:24 ` [dpdk-dev] [dpdk-stable] " Thomas Monjalon
2018-01-18 10:09 ` Ferruh Yigit
2018-01-17 21:58 ` [dpdk-dev] [PATCH v3 5/6] ethdev: reorder inline functions Ferruh Yigit
2018-01-17 21:58 ` [dpdk-dev] [PATCH v3 6/6] ethdev: rename function parameter for consistency Ferruh Yigit
2018-01-17 22:09 ` [dpdk-dev] [PATCH v3 1/6] ethdev: fix port id storage Thomas Monjalon
2018-01-17 22:19 ` Thomas Monjalon
2018-01-18 10:15 ` Ferruh Yigit
2018-01-18 11:29 ` Thomas Monjalon
2018-01-20 16:57 ` [dpdk-dev] [PATCH v4 1/4] ethdev: separate driver APIs Ferruh Yigit
2018-01-20 16:57 ` [dpdk-dev] [PATCH v4 2/4] ethdev: separate internal structures into own header Ferruh Yigit
2018-01-20 16:57 ` [dpdk-dev] [PATCH v4 3/4] ethdev: reorder inline functions Ferruh Yigit
2018-01-20 16:57 ` [dpdk-dev] [PATCH v4 4/4] ethdev: rename function parameter for consistency Ferruh Yigit
2018-01-21 23:12 ` [dpdk-dev] [PATCH v4 1/4] ethdev: separate driver APIs Thomas Monjalon
2018-01-21 23:35 ` [dpdk-dev] [PATCH v5 " Ferruh Yigit
2018-01-21 23:35 ` [dpdk-dev] [PATCH v5 2/4] ethdev: separate internal structures into own header Ferruh Yigit
2018-01-21 23:35 ` [dpdk-dev] [PATCH v5 3/4] ethdev: reorder inline functions Ferruh Yigit
2018-01-21 23:35 ` [dpdk-dev] [PATCH v5 4/4] ethdev: rename function parameter for consistency Ferruh Yigit
2018-01-22 0:16 ` [dpdk-dev] [PATCH v6 1/4] ethdev: separate driver APIs Ferruh Yigit
2018-01-22 0:16 ` [dpdk-dev] [PATCH v6 2/4] ethdev: separate internal structures into own header Ferruh Yigit
2018-01-22 0:16 ` [dpdk-dev] [PATCH v6 3/4] ethdev: reorder inline functions Ferruh Yigit
2018-01-22 0:16 ` [dpdk-dev] [PATCH v6 4/4] ethdev: rename function parameter for consistency Ferruh Yigit
2018-01-22 0:51 ` [dpdk-dev] [PATCH v6 1/4] ethdev: separate driver APIs Thomas Monjalon
2018-03-09 11:27 ` [dpdk-dev] [PATCH v4] ethdev: fix port id storage Ferruh Yigit
2018-03-09 12:58 ` Thomas Monjalon
2018-03-26 20:25 ` Ferruh Yigit
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=964acb9f-28ee-9c69-fd02-de7d3f09e429@intel.com \
--to=ferruh.yigit@intel.com \
--cc=bruce.richardson@intel.com \
--cc=dev@dpdk.org \
--cc=konstantin.ananyev@intel.com \
--cc=thomas@monjalon.net \
--cc=vladz@cloudius-systems.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).