DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Kinsella, Ray" <mdr@ashroe.eu>
To: Stephen Hemminger <stephen@networkplumber.org>,
	Bruce Richardson <bruce.richardson@intel.com>
Cc: pbhagavatula@marvell.com, jerinj@marvell.com,
	Neil Horman <nhorman@tuxdriver.com>,
	John McNamara <john.mcnamara@intel.com>,
	Marko Kovacevic <marko.kovacevic@intel.com>,
	dev@dpdk.org, thomas@monjalon.net, david.marchand@redhat.com
Subject: Re: [dpdk-dev] [PATCH v2] doc: add reserve fields to eventdev public structures
Date: Wed, 5 Aug 2020 09:46:16 +0100	[thread overview]
Message-ID: <216e9b9d-3a4e-8250-ffb6-4dc4a74c7867@ashroe.eu> (raw)
In-Reply-To: <20200804092007.54bf76f3@hermes.lan>



On 04/08/2020 17:20, Stephen Hemminger wrote:
> On Tue, 4 Aug 2020 11:41:53 +0100
> Bruce Richardson <bruce.richardson@intel.com> wrote:
> 
>> On Mon, Aug 03, 2020 at 12:59:03PM +0530, pbhagavatula@marvell.com wrote:
>>> From: Pavan Nikhilesh <pbhagavatula@marvell.com>
>>>
>>> Add 64 byte padding at the end of event device public structure to allow
>>> future extensions.
>>>
>>> Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
>>> Acked-by: Jerin Jacob <jerinj@marvell.com>
>>> ---
>>>  v2 Changes:
>>>  - Modify commit title.
>>>  - Add patch reference to doc.
>>>
>>>  doc/guides/rel_notes/deprecation.rst | 11 +++++++++++
>>>  1 file changed, 11 insertions(+)
>>>
>>> diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst
>>> index ea4cfa7a4..ec5db68e9 100644
>>> --- a/doc/guides/rel_notes/deprecation.rst
>>> +++ b/doc/guides/rel_notes/deprecation.rst
>>> @@ -151,3 +151,14 @@ Deprecation Notices
>>>    Python 2 support will be completely removed in 20.11.
>>>    In 20.08, explicit deprecation warnings will be displayed when running
>>>    scripts with Python 2.
>>> +
>>> +* eventdev: A 64 byte padding is added at the end of the following structures
>>> +  in event device library to support future extensions:
>>> +  ``rte_event_crypto_adapter_conf``, ``rte_event_eth_rx_adapter_conf``,
>>> +  ``rte_event_eth_rx_adapter_queue_conf``, ``rte_event_eth_tx_adapter_conf``,
>>> +  ``rte_event_timer_adapter_conf``, ``rte_event_timer_adapter_info``,
>>> +  ``rte_event_dev_info``, ``rte_event_dev_config``, ``rte_event_queue_conf``,
>>> +  ``rte_event_port_conf``, ``rte_event_timer_adapter``,
>>> +  ``rte_event_timer_adapter_data``.
>>> +  Reference:
>>> +  http://patches.dpdk.org/project/dpdk/list/?series=10728&archive=both&state=*
>>> --  
>>
>> I don't like this idea of adding lots of padding to the ends of these
>> structures. For some structures, such as the public arrays for devices it
>> may be necessary, but for all the conf structures passed as parameters to
>> functions I think we can do better. Since these structures are passed by
>> the user to various functions, function versioning can be used to ensure
>> that the correct function in eventdev is always called. From there to the
>> individual PMDs, we can implement ABI compatibility by either:
>> 1. including the length of the struct as a parameter to the driver. (This is
>>   a bit similar to my proposal for rawdev [1])
>> 2. including the ABI version as a parameter to the driver.
>>
>> Regards
>> /Bruce
>>
>> [1] http://inbox.dpdk.org/dev/?q=enhance+rawdev+APIs
> 
> This is a bad idea.
> 
> Reserved fields won't work because nothing requires that the application
> zero them. You can't start using them later because the application
> may put uninitialized or junk data there.
> 

+1, to Stephens comments. 

  reply	other threads:[~2020-08-05  8:46 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-02 10:51 [dpdk-dev] [PATCH] doc: announce changes " pbhagavatula
2020-08-03  6:14 ` Jerin Jacob
2020-08-03  7:29 ` [dpdk-dev] [PATCH v2] doc: add reserve fields " pbhagavatula
2020-08-04 10:41   ` Bruce Richardson
2020-08-04 11:37     ` Jerin Jacob
2020-08-04 14:24       ` Bruce Richardson
2020-08-04 16:03         ` Jerin Jacob
2020-08-04 16:24           ` Bruce Richardson
2020-08-04 17:18             ` Jerin Jacob
2020-08-05  9:18               ` Kinsella, Ray
2020-08-05 10:07                 ` Bruce Richardson
2020-08-04 16:20     ` Stephen Hemminger
2020-08-05  8:46       ` Kinsella, Ray [this message]
2020-08-05  9:10         ` Jerin Jacob
2020-08-06  0:59           ` Stephen Hemminger
2020-08-06 16:57             ` Jerin Jacob

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=216e9b9d-3a4e-8250-ffb6-4dc4a74c7867@ashroe.eu \
    --to=mdr@ashroe.eu \
    --cc=bruce.richardson@intel.com \
    --cc=david.marchand@redhat.com \
    --cc=dev@dpdk.org \
    --cc=jerinj@marvell.com \
    --cc=john.mcnamara@intel.com \
    --cc=marko.kovacevic@intel.com \
    --cc=nhorman@tuxdriver.com \
    --cc=pbhagavatula@marvell.com \
    --cc=stephen@networkplumber.org \
    --cc=thomas@monjalon.net \
    /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).