DPDK patches and discussions
 help / color / mirror / Atom feed
From: Maxime Coquelin <maxime.coquelin@redhat.com>
To: "Chautru, Nicolas" <nicolas.chautru@intel.com>,
	David Marchand <david.marchand@redhat.com>
Cc: Stephen Hemminger <stephen@networkplumber.org>,
	"dev@dpdk.org" <dev@dpdk.org>, "Rix, Tom" <trix@redhat.com>,
	"hemant.agrawal@nxp.com" <hemant.agrawal@nxp.com>,
	"Vargas, Hernan" <hernan.vargas@intel.com>
Subject: Re: [PATCH v1 1/1] doc: announce change in bbdev api related to operation extension
Date: Tue, 13 Jun 2023 10:14:24 +0200	[thread overview]
Message-ID: <ab764d87-60d5-682d-1d26-c4248bbb691d@redhat.com> (raw)
In-Reply-To: <BY5PR11MB445142374AE19FC863C5AB7BF854A@BY5PR11MB4451.namprd11.prod.outlook.com>



On 6/12/23 22:53, Chautru, Nicolas wrote:
> Hi Maxime, David,
> 
>> -----Original Message-----
>> From: Maxime Coquelin <maxime.coquelin@redhat.com>
>>
>> On 6/6/23 23:01, Chautru, Nicolas wrote:
>>> Hi David,
>>>
>>>> -----Original Message-----
>>>> From: David Marchand <david.marchand@redhat.com>> >>
>>>> On Mon, Jun 5, 2023 at 10:08 PM Chautru, Nicolas
>>>> <nicolas.chautru@intel.com> wrote:
>>>>> Wrt the MLD functions: these are new into the related serie but
>>>>> still the
>>>> break the ABI since the struct rte_bbdev includes these functions
>>>> hence causing offset changes.
>>>>>
>>>>> Should I then just rephrase as:
>>>>>
>>>>> +* bbdev: Will extend the API to support the new operation type
>>>>>    +``RTE_BBDEV_OP_MLDTS`` as per
>>>>>    +  this `v1
>>>>>    +<https://patches.dpdk.org/project/dpdk/list/?series=28192>`. This
>>>>> + will notably introduce  +  new symbols for
>>>>> ``rte_bbdev_dequeue_mldts_ops``,  +``rte_bbdev_enqueue_mldts_ops``
>>>>> into the stuct rte_bbdev.
>>>>
>>>> I don't think we need this deprecation notice.
>>>>
>>>>
>>>> Do you need to expose those new mldts ops in rte_bbdev?
>>>> Can't they go to dev_ops?
>>>> If you can't, at least moving those new ops at the end of the
>>>> structure would avoid the breakage on rte_bbdev.
>>>
>>> It would probably be best to move all these ops at the end of the structure
>> (ie. keep them together).
>>> In that case the deprecation notice would call out that the rte_bbdev
>> structure content is more generally modified. Probably best for the longer
>> run.
>>> David, Maxime, ok with that option?
>>>
>>> struct __rte_cache_aligned rte_bbdev {
>>>        rte_bbdev_enqueue_enc_ops_t enqueue_enc_ops;
>>>        rte_bbdev_enqueue_dec_ops_t enqueue_dec_ops;
>>>        rte_bbdev_dequeue_enc_ops_t dequeue_enc_ops;
>>>        rte_bbdev_dequeue_dec_ops_t dequeue_dec_ops;
>>>        rte_bbdev_enqueue_enc_ops_t enqueue_ldpc_enc_ops;
>>>        rte_bbdev_enqueue_dec_ops_t enqueue_ldpc_dec_ops;
>>>        rte_bbdev_dequeue_enc_ops_t dequeue_ldpc_enc_ops;
>>>        rte_bbdev_dequeue_dec_ops_t dequeue_ldpc_dec_ops;
>>>        rte_bbdev_enqueue_fft_ops_t enqueue_fft_ops;
>>>        rte_bbdev_dequeue_fft_ops_t dequeue_fft_ops;
>>>        const struct rte_bbdev_ops *dev_ops;
>>>        struct rte_bbdev_data *data;
>>>        enum rte_bbdev_state state;
>>>        struct rte_device *device;
>>>        struct rte_bbdev_cb_list list_cbs;
>>>        struct rte_intr_handle *intr_handle;
>>>    };
>>
>> The best thing, as suggested by David, would be to move all the ops out of
>> struct rte_bbdev, as these should not be visible to the application.
> 
> That would be quite disruptive across all PMDs and possible perf impact to validate. I don’t think this is anywhere realistic to consider such a change in 23.11.
> I believe moving these function at the end of the structure is a good compromise to avoid future breakage of rte_bbdev structure with almost seamless impact (purely a ABI break when moving into 23.11 which is not avoidable. Retrospectively we should have done that in 22.11 really.

If we are going to break the ABI, better to do the right rework 
directly. Otherwise we'll end-up breaking it again next year.

IMHO, moving these ops should be quite trivial and not much work.

Otherwise, if we just placed the rte_bbdev_dequeue_mldts_ops and
rte_bbdev_enqueue_mldts_ops at the bottom of struct rte_bbdev, it may
not break the ABI, but that's a bit fragile:
- rte_bbdev_devices[] is not static, but is placed in the BSS section so
   should be OK
- struct rte_bbdev is cache-aligned, so it may work if adding these two
   ops do not overlap a cacheline which depends on the CPU architecture.

Maxime

> What do you think Maxime, David? Based on this I can adjust the change for 23.11 and update slightly the deprecation notice accordingly.
> 
> Thanks
> Nic
> 


  reply	other threads:[~2023-06-13  8:14 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-26  2:11 [PATCH v1 0/1] doc: accounce change in bbdev extension Nicolas Chautru
2023-05-26  2:11 ` [PATCH v1 1/1] doc: announce change in bbdev api related to operation extension Nicolas Chautru
2023-05-26  3:47   ` Stephen Hemminger
2023-06-05 19:07     ` Maxime Coquelin
2023-06-05 20:08       ` Chautru, Nicolas
2023-06-06  9:20         ` David Marchand
2023-06-06 21:01           ` Chautru, Nicolas
2023-06-08  8:47             ` Maxime Coquelin
2023-06-12 20:53               ` Chautru, Nicolas
2023-06-13  8:14                 ` Maxime Coquelin [this message]
2023-06-13 17:16                   ` Chautru, Nicolas
2023-06-13 20:00                     ` Maxime Coquelin
2023-06-13 21:22                       ` Stephen Hemminger
2023-06-14 18:18                       ` Chautru, Nicolas
2023-06-15  7:52                         ` Maxime Coquelin
2023-06-15 19:30                           ` Chautru, Nicolas
2023-06-16  7:36                             ` Maxime Coquelin
2023-06-16 15:48                               ` Chautru, Nicolas

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=ab764d87-60d5-682d-1d26-c4248bbb691d@redhat.com \
    --to=maxime.coquelin@redhat.com \
    --cc=david.marchand@redhat.com \
    --cc=dev@dpdk.org \
    --cc=hemant.agrawal@nxp.com \
    --cc=hernan.vargas@intel.com \
    --cc=nicolas.chautru@intel.com \
    --cc=stephen@networkplumber.org \
    --cc=trix@redhat.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).