doc: accounce change in bbdev extension
cover doc: accounce change in bbdev extension
Hi Maxime,
Adding a deprecation notice for the change planning to be introduced in https://patches.dpdk.org/project/dpdk/list/?series=28192
Thanks
Nicolas
Nicolas Chautru (1):
doc: announce change in bbdev api related to operation extension
doc/guides/rel_notes/deprecation.rst | 6 ++++++ 1 file changed, 6 insertions(+)
Signature · 1 line
2.34.1
PATCH 1/1 doc: announce change in bbdev api related to operation extension
Intent to extend the bbdev api in DPDK 23.11 for new optional operations as well as addition of new members in existing structure.
--- doc/guides/rel_notes/deprecation.rst | 6 ++++++ 1 file changed, 6 insertions(+)
doc/guides/rel_notes/deprecation.rst +6 -0
@@ -135,3 +135,9 @@ Deprecation Notices Its removal has been postponed to let potential users report interest in maintaining it. In the absence of such interest, this library will be removed in DPDK 23.11. + +* 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 also introduce + new symbols for ``rte_bbdev_dequeue_mldts_ops``, ``rte_bbdev_enqueue_mldts_ops``, + ``rte_bbdev_mldts_op_alloc_bulk`` and ``rte_bbdev_mldts_op_free_bulk``. This will also extend + the API related to the FFT operation in ``rte_bbdev_op_fft``.
Signature · 1 line
2.34.1
Re: [PATCH v1 1/1] doc: announce change in bbdev api related to operation extension
doc/guides/rel_notes/deprecation.rst Deprecation Notices · line 143
Quoted 7 lines · On Fri, 26 May 2023 02:11:32 +0000 Nicolas Chautru <[email protected]>…
doc/guides/rel_notes/deprecation.rst +6
-0+ +* 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 also introduce + new symbols for ``rte_bbdev_dequeue_mldts_ops``, ``rte_bbdev_enqueue_mldts_ops``, + ``rte_bbdev_mldts_op_alloc_bulk`` and ``rte_bbdev_mldts_op_free_bulk``. This will also extend + the API related to the FFT operation in ``rte_bbdev_op_fft``.
New symbols do not require a deprecation notice.
Only changes and removal.
Re: [PATCH v1 1/1] doc: announce change in bbdev api related to operation extension
Quoted 14 lines · Stephen Hemminger
doc/guides/rel_notes/deprecation.rst Deprecation Notices · line 143
Quoted 7 lines · On Fri, 26 May 2023 02:11:32 +0000 Nicolas Chautru <[email protected]>…
doc/guides/rel_notes/deprecation.rst +6
-0+ +* 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 also introduce + new symbols for ``rte_bbdev_dequeue_mldts_ops``, ``rte_bbdev_enqueue_mldts_ops``, + ``rte_bbdev_mldts_op_alloc_bulk`` and ``rte_bbdev_mldts_op_free_bulk``. This will also extend + the API related to the FFT operation in ``rte_bbdev_op_fft``.New symbols do not require a deprecation notice.
Only changes and removal.
I agree with Stephen.
There is some changes in struct rte_bbdev_op_fft, but the related API are experimental, so I think it is not needed to have a deprecation notice.
Regards,
Maxime
RE: [PATCH v1 1/1] doc: announce change in bbdev api related to operation extension
Hi Maxime,
So basically the fft structure change is okay since these are still marked as rte_experimental (it got reported in the ABI report though).
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.
Pasting below the ABI results for reference
[C] 'function rte_bbdev* rte_bbdev_allocate(const char*)' at rte_bbdev.c:174:1 has some indirect sub-type changes:
return type changed:
in pointed to type 'struct rte_bbdev' at rte_bbdev.h:498:1:
type size hasn't changed
2 data member insertions:
'rte_bbdev_enqueue_mldts_ops_t rte_bbdev::enqueue_mldts_ops', at offset 640 (in bits) at rte_bbdev.h:520:1 'rte_bbdev_dequeue_mldts_ops_t rte_bbdev::dequeue_mldts_ops', at offset 704 (in bits) at rte_bbdev.h:522:1
7 data member changes (9 filtered):
type of 'rte_bbdev_dequeue_fft_ops_t rte_bbdev::dequeue_fft_ops' changed:
underlying type 'typedef uint16_t (rte_bbdev_queue_data*, rte_bbdev_fft_op**, typedef uint16_t)*' changed:
in pointed to type 'function type typedef uint16_t (rte_bbdev_queue_data*, rte_bbdev_fft_op**, typedef uint16_t)':
parameter 2 of type 'rte_bbdev_fft_op**' has sub-type changes:
in pointed to type 'rte_bbdev_fft_op*':
in pointed to type 'struct rte_bbdev_fft_op' at rte_bbdev_op.h:978:1:
type size changed from 832 to 1664 (in bits)
1 data member change:
type of 'rte_bbdev_op_fft rte_bbdev_fft_op::fft' changed:
type size changed from 640 to 1472 (in bits)
6 data member insertions:
'rte_bbdev_op_data rte_bbdev_op_fft::dewindowing_input', at offset 256 (in bits) at rte_bbdev_op.h:771:1 'int8_t rte_bbdev_op_fft::freq_resample_mode', at offset 768 (in bits) at rte_bbdev_op.h:807:1 'uint16_t rte_bbdev_op_fft::output_depadded_size', at offset 784 (in bits) at rte_bbdev_op.h:809:1 'uint16_t rte_bbdev_op_fft::cs_theta_0[12]', at offset 800 (in bits) at rte_bbdev_op.h:811:1 'uint32_t rte_bbdev_op_fft::cs_theta_d[12]', at offset 992 (in bits) at rte_bbdev_op.h:813:1 'int8_t rte_bbdev_op_fft::time_offset[12]', at offset 1376 (in bits) at rte_bbdev_op.h:815:1
17 data member changes:
'rte_bbdev_op_data rte_bbdev_op_fft::power_meas_output' offset changed from 256 to 384 (in bits) (by +128 bits) 'uint32_t rte_bbdev_op_fft::op_flags' offset changed from 384 to 512 (in bits) (by +128 bits) 'uint16_t rte_bbdev_op_fft::input_sequence_size' offset changed from 416 to 544 (in bits) (by +128 bits) 'uint16_t rte_bbdev_op_fft::input_leading_padding' offset changed from 432 to 560 (in bits) (by +128 bits) 'uint16_t rte_bbdev_op_fft::output_sequence_size' offset changed from 448 to 576 (in bits) (by +128 bits) 'uint16_t rte_bbdev_op_fft::output_leading_depadding' offset changed from 464 to 592 (in bits) (by +128 bits) 'uint8_t rte_bbdev_op_fft::window_index[6]' offset changed from 480 to 608 (in bits) (by +128 bits) 'uint16_t rte_bbdev_op_fft::cs_bitmap' offset changed from 528 to 656 (in bits) (by +128 bits) 'uint8_t rte_bbdev_op_fft::num_antennas_log2' offset changed from 544 to 672 (in bits) (by +128 bits) 'uint8_t rte_bbdev_op_fft::idft_log2' offset changed from 552 to 680 (in bits) (by +128 bits) 'uint8_t rte_bbdev_op_fft::dft_log2' offset changed from 560 to 688 (in bits) (by +128 bits) 'int8_t rte_bbdev_op_fft::cs_time_adjustment' offset changed from 568 to 696 (in bits) (by +128 bits) 'int8_t rte_bbdev_op_fft::idft_shift' offset changed from 576 to 704 (in bits) (by +128 bits) 'int8_t rte_bbdev_op_fft::dft_shift' offset changed from 584 to 712 (in bits) (by +128 bits) 'uint16_t rte_bbdev_op_fft::ncs_reciprocal' offset changed from 592 to 720 (in bits) (by +128 bits) 'uint16_t rte_bbdev_op_fft::power_shift' offset changed from 608 to 736 (in bits) (by +128 bits) 'uint16_t rte_bbdev_op_fft::fp16_exp_adjust' offset changed from 624 to 752 (in bits) (by +128 bits)
'const rte_bbdev_ops* rte_bbdev::dev_ops' offset changed from 640 to 768 (in bits) (by +128 bits) 'rte_bbdev_data* rte_bbdev::data' offset changed from 704 to 832 (in bits) (by +128 bits)
'rte_bbdev_state rte_bbdev::state' offset changed from 768 to 896 (in bits) (by +128 bits)
'rte_device* rte_bbdev::device' offset changed from 832 to 960 (in bits) (by +128 bits)
'rte_bbdev_cb_list rte_bbdev::list_cbs' offset changed from 896 to 1024 (in bits) (by +128 bits) 'rte_intr_handle* rte_bbdev::intr_handle' offset changed from 1024 to 1152 (in bits) (by +128 bits)
Thanks
Nic
Quoted 38 lines
-----Original Message-----
From: Maxime Coquelin <[email protected]>
Sent: Monday, June 5, 2023 12:08 PM
To: Stephen Hemminger <[email protected]>; Chautru, Nicolas <[email protected]>
Cc: [email protected]; Rix, Tom <[email protected]>; [email protected]; [email protected]; Vargas, Hernan <[email protected]>
Subject: Re: [PATCH v1 1/1] doc: announce change in bbdev api related to operation extensionQuoted 19 lines · Stephen Hemminger
Review
Quoted 12 lines · On Fri, 26 May 2023 02:11:32 +0000 Nicolas Chautru <[email protected]>…
(quoted diff) +11
-1+ +* 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 also introduce + new symbols for ``rte_bbdev_dequeue_mldts_ops``, +``rte_bbdev_enqueue_mldts_ops``, + ``rte_bbdev_mldts_op_alloc_bulk`` and +``rte_bbdev_mldts_op_free_bulk``. This will also extend + the API related to the FFT operation in ``rte_bbdev_op_fft``. --New symbols do not require a deprecation notice.
Only changes and removal.I agree with Stephen.
There is some changes in structrte_bbdev_op_fft, but the related API are experimental, so I think it is not needed to have a deprecation notice.Regards,
Maxime
Re: [PATCH v1 1/1] doc: announce change in bbdev api related to operation extension
Quoted 11 lines · Nicolas
Wrt the MLD functions: these are new into the related serie but still the break the ABI since the struct
rte_bbdevincludes 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
+ thisv1 +<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 stuctrte_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.
Quoted 44 lines
Pasting below the ABI results for reference
[C] 'function rte_bbdev*
rte_bbdev_allocate(const char*)' at rte_bbdev.c:174:1 has some indirect sub-type changes:
return type changed:
in pointed to type 'structrte_bbdev' at rte_bbdev.h:498:1:
type size hasn't changed
2 data member insertions:
'rte_bbdev_enqueue_mldts_ops_trte_bbdev::enqueue_mldts_ops', at offset 640 (in bits) at rte_bbdev.h:520:1 'rte_bbdev_dequeue_mldts_ops_trte_bbdev::dequeue_mldts_ops', at offset 704 (in bits) at rte_bbdev.h:522:1
7 data member changes (9 filtered):
type of 'rte_bbdev_dequeue_fft_ops_trte_bbdev::dequeue_fft_ops' changed:
underlying type 'typedefuint16_t(rte_bbdev_queue_data*, rte_bbdev_fft_op**, typedef uint16_t)*' changed:
in pointed to type 'function type typedefuint16_t(rte_bbdev_queue_data*, rte_bbdev_fft_op**, typedefuint16_t)':
parameter 2 of type 'rte_bbdev_fft_op**' has sub-type changes:
in pointed to type 'rte_bbdev_fft_op*':
in pointed to type 'structrte_bbdev_fft_op' at rte_bbdev_op.h:978:1:
type size changed from 832 to 1664 (in bits)
1 data member change:
type of 'rte_bbdev_op_fftrte_bbdev_fft_op::fft' changed:
type size changed from 640 to 1472 (in bits)
6 data member insertions:
'rte_bbdev_op_datarte_bbdev_op_fft::dewindowing_input', at offset 256 (in bits) at rte_bbdev_op.h:771:1 'int8_trte_bbdev_op_fft::freq_resample_mode', at offset 768 (in bits) at rte_bbdev_op.h:807:1 'uint16_trte_bbdev_op_fft::output_depadded_size', at offset 784 (in bits) at rte_bbdev_op.h:809:1 'uint16_trte_bbdev_op_fft::cs_theta_0[12]', at offset 800 (in bits) at rte_bbdev_op.h:811:1 'uint32_trte_bbdev_op_fft::cs_theta_d[12]', at offset 992 (in bits) at rte_bbdev_op.h:813:1 'int8_trte_bbdev_op_fft::time_offset[12]', at offset 1376 (in bits) at rte_bbdev_op.h:815:1
17 data member changes:
'rte_bbdev_op_datarte_bbdev_op_fft::power_meas_output' offset changed from 256 to 384 (in bits) (by +128 bits) 'uint32_trte_bbdev_op_fft::op_flags' offset changed from 384 to 512 (in bits) (by +128 bits) 'uint16_trte_bbdev_op_fft::input_sequence_size' offset changed from 416 to 544 (in bits) (by +128 bits) 'uint16_trte_bbdev_op_fft::input_leading_padding' offset changed from 432 to 560 (in bits) (by +128 bits) 'uint16_trte_bbdev_op_fft::output_sequence_size' offset changed from 448 to 576 (in bits) (by +128 bits) 'uint16_trte_bbdev_op_fft::output_leading_depadding' offset changed from 464 to 592 (in bits) (by +128 bits) 'uint8_trte_bbdev_op_fft::window_index[6]' offset changed from 480 to 608 (in bits) (by +128 bits) 'uint16_trte_bbdev_op_fft::cs_bitmap' offset changed from 528 to 656 (in bits) (by +128 bits) 'uint8_trte_bbdev_op_fft::num_antennas_log2' offset changed from 544 to 672 (in bits) (by +128 bits) 'uint8_trte_bbdev_op_fft::idft_log2' offset changed from 552 to 680 (in bits) (by +128 bits) 'uint8_trte_bbdev_op_fft::dft_log2' offset changed from 560 to 688 (in bits) (by +128 bits) 'int8_trte_bbdev_op_fft::cs_time_adjustment' offset changed from 568 to 696 (in bits) (by +128 bits) 'int8_trte_bbdev_op_fft::idft_shift' offset changed from 576 to 704 (in bits) (by +128 bits) 'int8_trte_bbdev_op_fft::dft_shift' offset changed from 584 to 712 (in bits) (by +128 bits) 'uint16_trte_bbdev_op_fft::ncs_reciprocal' offset changed from 592 to 720 (in bits) (by +128 bits)
Quoted 8 lines
'
uint16_trte_bbdev_op_fft::power_shift' offset changed from 608 to 736 (in bits) (by +128 bits) 'uint16_trte_bbdev_op_fft::fp16_exp_adjust' offset changed from 624 to 752 (in bits) (by +128 bits)
'const rte_bbdev_ops*rte_bbdev::dev_ops' offset changed from 640 to 768 (in bits) (by +128 bits) 'rte_bbdev_data*rte_bbdev::data' offset changed from 704 to 832 (in bits) (by +128 bits) 'rte_bbdev_staterte_bbdev::state' offset changed from 768 to 896 (in bits) (by +128 bits) 'rte_device*rte_bbdev::device' offset changed from 832 to 960 (in bits) (by +128 bits) 'rte_bbdev_cb_listrte_bbdev::list_cbs' offset changed from 896 to 1024 (in bits) (by +128 bits) 'rte_intr_handle*rte_bbdev::intr_handle' offset changed from 1024 to 1152 (in bits) (by +128 bits)
As for the report on the rte_bbdev_op_fft structure changes:
- wrt to its size, I think it is okay to waive it, rte_bbdev_fft_op objects are coming from a bbdev mempool which is created by the bbdev library itself (with the right element size if the application asked for RTE_BBDEV_OP_FFT type),
- wrt to the fields locations, an application may have been touching those fields, so moving all the added fields at the end of the structure would be better.
But on the other hand, an application will have to call an fft_ops
experimental API at some point, and the application developer is already warned that ABI is not preserved on this part of the API,
So I would waive the changes on rte_bbdev_fft_op with something like:
devtools/libabigail.abignore +0 -0
@@ -36,6 +36,8 @@ [suppress_type] type_kind = enum changed_enumerators = RTE_CRYPTO_ASYM_XFORM_ECPM,
RTE_CRYPTO_ASYM_XFORM_TYPE_LIST_END
+[suppress_type]
+ name = rte_bbdev_fft_op
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; Temporary exceptions till next major ABI version ;
Signature · 1 line
David Marchand
RE: [PATCH v1 1/1] doc: announce change in bbdev api related to operation extension
Hi David,
Quoted 27 lines
-----Original Message-----
From: David Marchand <[email protected]>
Sent: Tuesday, June 6, 2023 2:21 AM
To: Chautru, Nicolas <[email protected]>
Cc: Maxime Coquelin <[email protected]>; Stephen Hemminger <[email protected]>; [email protected]; Rix, Tom <[email protected]>; [email protected]; Vargas, Hernan <[email protected]>
Subject: Re: [PATCH v1 1/1] doc: announce change in bbdev api related to operation extensionQuoted 1 line · Nicolas
Wrt the MLD functions: these are new into the related serie but still the
break the ABI since the struct
rte_bbdevincludes these functions hence causing offset changes.Quoted 10 lines
Should I then just rephrase as:
+* bbdev: Will extend the API to support the new operation type
+``RTE_BBDEV_OP_MLDTS`` as per
+ thisv1 +<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 stuctrte_bbdev.
Quoted 7 lines
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 todev_ops?
If you can't, at least moving those new ops at the end of the structure would avoid the breakage onrte_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; };
Quoted 115 lines
Quoted 6 lines
Pasting below the ABI results for reference
[C] 'function rte_bbdev*
rte_bbdev_allocate(const char*)' atrte_bbdev.c:174:1 has some indirect sub-type changes:
Quoted 5 lines
return type changed:
in pointed to type 'structrte_bbdev' at rte_bbdev.h:498:1:
type size hasn't changed
2 data member insertions:
'rte_bbdev_enqueue_mldts_ops_trte_bbdev::enqueue_mldts_ops',at offset 640 (in bits) at rte_bbdev.h:520:1
Quoted 1 line
'
rte_bbdev_dequeue_mldts_ops_trte_bbdev::dequeue_mldts_ops',at offset 704 (in bits) at rte_bbdev.h:522:1
Quoted 2 lines
7 data member changes (9 filtered):
type of 'rte_bbdev_dequeue_fft_ops_trte_bbdev::dequeue_fft_ops'changed:
Quoted 1 line
underlying type 'typedef
uint16_t(rte_bbdev_queue_data*,rte_bbdev_fft_op**, typedef uint16_t)*' changed:
Quoted 1 line
in pointed to type 'function type typedef
uint16_t(rte_bbdev_queue_data*, rte_bbdev_fft_op**, typedef
uint16_t)':Quoted 3 lines
parameter 2 of type 'rte_bbdev_fft_op**' has sub-type changes:
in pointed to type 'rte_bbdev_fft_op*':
in pointed to type 'structrte_bbdev_fft_op' atrte_bbdev_op.h:978:1:
Quoted 6 lines
type size changed from 832 to 1664 (in bits)
1 data member change:
type of 'rte_bbdev_op_fftrte_bbdev_fft_op::fft' changed:
type size changed from 640 to 1472 (in bits) 6 data member insertions:
'rte_bbdev_op_data
rte_bbdev_op_fft::dewindowing_input', at offset 256 (in bits) at rte_bbdev_op.h:771:1Quoted 1 line
'
int8_trte_bbdev_op_fft::freq_resample_mode', at offset768 (in bits) at rte_bbdev_op.h:807:1
Quoted 1 line
'
uint16_trte_bbdev_op_fft::output_depadded_size', atoffset 784 (in bits) at rte_bbdev_op.h:809:1
Quoted 1 line
'uint16_t rte_bbdev_op_fft::cs_theta_0[12]', at offset 800(in bits) at rte_bbdev_op.h:811:1
Quoted 1 line
'uint32_t rte_bbdev_op_fft::cs_theta_d[12]', at offset 992(in bits) at rte_bbdev_op.h:813:1
Quoted 1 line
'int8_t rte_bbdev_op_fft::time_offset[12]', at offset 1376(in bits) at rte_bbdev_op.h:815:1
Quoted 2 lines
17 data member changes:
'rte_bbdev_op_data
rte_bbdev_op_fft::power_meas_output' offset changed from 256 to 384 (in bits) (by +128 bits)Quoted 1 line
'
uint32_trte_bbdev_op_fft::op_flags' offset changed from384 to 512 (in bits) (by +128 bits)
Quoted 1 line
'
uint16_trte_bbdev_op_fft::input_sequence_size' offsetchanged from 416 to 544 (in bits) (by +128 bits)
Quoted 1 line
'
uint16_trte_bbdev_op_fft::input_leading_padding'offset changed from 432 to 560 (in bits) (by +128 bits)
Quoted 1 line
'
uint16_trte_bbdev_op_fft::output_sequence_size' offsetchanged from 448 to 576 (in bits) (by +128 bits)
Quoted 1 line
'
uint16_trte_bbdev_op_fft::output_leading_depadding'offset changed from 464 to 592 (in bits) (by +128 bits)
Quoted 1 line
'uint8_t rte_bbdev_op_fft::window_index[6]' offsetchanged from 480 to 608 (in bits) (by +128 bits)
Quoted 1 line
'
uint16_trte_bbdev_op_fft::cs_bitmap' offset changedfrom 528 to 656 (in bits) (by +128 bits)
Quoted 1 line
'
uint8_trte_bbdev_op_fft::num_antennas_log2' offsetchanged from 544 to 672 (in bits) (by +128 bits)
Quoted 1 line
'
uint8_trte_bbdev_op_fft::idft_log2' offset changed from552 to 680 (in bits) (by +128 bits)
Quoted 1 line
'
uint8_trte_bbdev_op_fft::dft_log2' offset changed from560 to 688 (in bits) (by +128 bits)
Quoted 1 line
'
int8_trte_bbdev_op_fft::cs_time_adjustment' offsetchanged from 568 to 696 (in bits) (by +128 bits)
Quoted 1 line
'
int8_trte_bbdev_op_fft::idft_shift' offset changed from576 to 704 (in bits) (by +128 bits)
Quoted 1 line
'
int8_trte_bbdev_op_fft::dft_shift' offset changed from584 to 712 (in bits) (by +128 bits)
Quoted 1 line
'
uint16_trte_bbdev_op_fft::ncs_reciprocal' offsetchanged from 592 to 720 (in bits) (by +128 bits)
Quoted 1 line
'
uint16_trte_bbdev_op_fft::power_shift' offset changedfrom 608 to 736 (in bits) (by +128 bits)
Quoted 1 line
'uint16_t rte_bbdev_op_fft::fp16_exp_adjust' offsetchanged from 624 to 752 (in bits) (by +128 bits)
Quoted 1 line
'const rte_bbdev_ops*
rte_bbdev::dev_ops' offset changed from 640to 768 (in bits) (by +128 bits)
Quoted 1 line
'rte_bbdev_data*
rte_bbdev::data' offset changed from 704 to 832(in bits) (by +128 bits)
Quoted 1 line
'
rte_bbdev_staterte_bbdev::state' offset changed from 768 to 896(in bits) (by +128 bits)
Quoted 1 line
'rte_device*
rte_bbdev::device' offset changed from 832 to 960 (inbits) (by +128 bits)
Quoted 1 line
'
rte_bbdev_cb_listrte_bbdev::list_cbs' offset changed from 896 to1024 (in bits) (by +128 bits)
Quoted 2 lines
'rte_intr_handle*
rte_bbdev::intr_handle' offset changed
from 1024 to 1152 (in bits) (by +128 bits)As for the report on the
rte_bbdev_op_fftstructure changes:
- wrt to its size, I think it is okay to waive it,rte_bbdev_fft_opobjects are coming from a bbdev mempool which is created by the bbdev library itself (with the right element size if the application asked forRTE_BBDEV_OP_FFTtype),
- wrt to the fields locations, an application may have been touching those fields, so moving all the added fields at the end of the structure would be better.
But on the other hand, an application will have to call anfft_ops
experimental API at some point, and the application developer is already warned that ABI is not preserved on this part of the API,So I would waive the changes on
rte_bbdev_fft_opwith something like:devtools/libabigail.abignore index renamed from devtools/libabigail.abignore +0
-0
3ff51509de..3cdce69418100644devtools/libabigail.abignore +0
-0@@ -36,6 +36,8 @@ [suppress_type] type_kind = enum changed_enumerators = RTE_CRYPTO_ASYM_XFORM_ECPM,
Quoted 3 lines
RTE_CRYPTO_ASYM_XFORM_TYPE_LIST_END
+[suppress_type]
+ name =rte_bbdev_fft_op
OK I did not know about this method. Shouldn't this apply more generally to all experimental structures? This can be added into the serie for 23.11.
Thanks
Nic
Quoted 7 lines
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; Temporary exceptions till next major ABI version ;
--
David Marchand
Re: [PATCH v1 1/1] doc: announce change in bbdev api related to operation extension
Quoted 58 lines · Nicolas
Hi David,
Quoted 27 lines
-----Original Message-----
From: David Marchand <[email protected]>
Sent: Tuesday, June 6, 2023 2:21 AM
To: Chautru, Nicolas <[email protected]>
Cc: Maxime Coquelin <[email protected]>; Stephen Hemminger <[email protected]>; [email protected]; Rix, Tom <[email protected]>; [email protected]; Vargas, Hernan <[email protected]>
Subject: Re: [PATCH v1 1/1] doc: announce change in bbdev api related to operation extensionQuoted 1 line · Nicolas
Wrt the MLD functions: these are new into the related serie but still the
break the ABI since the struct
rte_bbdevincludes these functions hence causing offset changes.Quoted 10 lines
Should I then just rephrase as:
+* bbdev: Will extend the API to support the new operation type
+``RTE_BBDEV_OP_MLDTS`` as per
+ thisv1 +<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 stuctrte_bbdev.Quoted 7 lines
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 todev_ops?
If you can't, at least moving those new ops at the end of the structure would avoid the breakage onrte_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 therte_bbdevstructure 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;
Quoted 1 line
};
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.
Quoted 140 lines
Quoted 118 lines
Quoted 9 lines
Pasting below the ABI results for reference
[C] 'function rte_bbdev*
rte_bbdev_allocate(const char*)' atrte_bbdev.c:174:1 has some indirect sub-type changes:
Quoted 5 lines
return type changed:
in pointed to type 'structrte_bbdev' at rte_bbdev.h:498:1:
type size hasn't changed
2 data member insertions:
'rte_bbdev_enqueue_mldts_ops_trte_bbdev::enqueue_mldts_ops',at offset 640 (in bits) at rte_bbdev.h:520:1
Quoted 1 line
'
rte_bbdev_dequeue_mldts_ops_trte_bbdev::dequeue_mldts_ops',at offset 704 (in bits) at rte_bbdev.h:522:1
Quoted 2 lines
7 data member changes (9 filtered):
type of 'rte_bbdev_dequeue_fft_ops_trte_bbdev::dequeue_fft_ops'changed:
Quoted 1 line
underlying type 'typedef
uint16_t(rte_bbdev_queue_data*,rte_bbdev_fft_op**, typedef uint16_t)*' changed:
Quoted 1 line
in pointed to type 'function type typedef
uint16_t(rte_bbdev_queue_data*, rte_bbdev_fft_op**, typedef
uint16_t)':Quoted 3 lines
parameter 2 of type 'rte_bbdev_fft_op**' has sub-type changes:
in pointed to type 'rte_bbdev_fft_op*':
in pointed to type 'structrte_bbdev_fft_op' atrte_bbdev_op.h:978:1:
Quoted 6 lines
type size changed from 832 to 1664 (in bits)
1 data member change:
type of 'rte_bbdev_op_fftrte_bbdev_fft_op::fft' changed:
type size changed from 640 to 1472 (in bits) 6 data member insertions:
'rte_bbdev_op_data
rte_bbdev_op_fft::dewindowing_input', at offset 256 (in bits) at rte_bbdev_op.h:771:1Quoted 1 line
'
int8_trte_bbdev_op_fft::freq_resample_mode', at offset768 (in bits) at rte_bbdev_op.h:807:1
Quoted 1 line
'
uint16_trte_bbdev_op_fft::output_depadded_size', atoffset 784 (in bits) at rte_bbdev_op.h:809:1
Quoted 1 line
'uint16_t rte_bbdev_op_fft::cs_theta_0[12]', at offset 800(in bits) at rte_bbdev_op.h:811:1
Quoted 1 line
'uint32_t rte_bbdev_op_fft::cs_theta_d[12]', at offset 992(in bits) at rte_bbdev_op.h:813:1
Quoted 1 line
'int8_t rte_bbdev_op_fft::time_offset[12]', at offset 1376(in bits) at rte_bbdev_op.h:815:1
Quoted 2 lines
17 data member changes:
'rte_bbdev_op_data
rte_bbdev_op_fft::power_meas_output' offset changed from 256 to 384 (in bits) (by +128 bits)Quoted 1 line
'
uint32_trte_bbdev_op_fft::op_flags' offset changed from384 to 512 (in bits) (by +128 bits)
Quoted 1 line
'
uint16_trte_bbdev_op_fft::input_sequence_size' offsetchanged from 416 to 544 (in bits) (by +128 bits)
Quoted 1 line
'
uint16_trte_bbdev_op_fft::input_leading_padding'offset changed from 432 to 560 (in bits) (by +128 bits)
Quoted 1 line
'
uint16_trte_bbdev_op_fft::output_sequence_size' offsetchanged from 448 to 576 (in bits) (by +128 bits)
Quoted 1 line
'
uint16_trte_bbdev_op_fft::output_leading_depadding'offset changed from 464 to 592 (in bits) (by +128 bits)
Quoted 1 line
'uint8_t rte_bbdev_op_fft::window_index[6]' offsetchanged from 480 to 608 (in bits) (by +128 bits)
Quoted 1 line
'
uint16_trte_bbdev_op_fft::cs_bitmap' offset changedfrom 528 to 656 (in bits) (by +128 bits)
Quoted 1 line
'
uint8_trte_bbdev_op_fft::num_antennas_log2' offsetchanged from 544 to 672 (in bits) (by +128 bits)
Quoted 1 line
'
uint8_trte_bbdev_op_fft::idft_log2' offset changed from552 to 680 (in bits) (by +128 bits)
Quoted 1 line
'
uint8_trte_bbdev_op_fft::dft_log2' offset changed from560 to 688 (in bits) (by +128 bits)
Quoted 1 line
'
int8_trte_bbdev_op_fft::cs_time_adjustment' offsetchanged from 568 to 696 (in bits) (by +128 bits)
Quoted 1 line
'
int8_trte_bbdev_op_fft::idft_shift' offset changed from576 to 704 (in bits) (by +128 bits)
Quoted 1 line
'
int8_trte_bbdev_op_fft::dft_shift' offset changed from584 to 712 (in bits) (by +128 bits)
Quoted 1 line
'
uint16_trte_bbdev_op_fft::ncs_reciprocal' offsetchanged from 592 to 720 (in bits) (by +128 bits)
Quoted 1 line
'
uint16_trte_bbdev_op_fft::power_shift' offset changedfrom 608 to 736 (in bits) (by +128 bits)
Quoted 1 line
'uint16_t rte_bbdev_op_fft::fp16_exp_adjust' offsetchanged from 624 to 752 (in bits) (by +128 bits)
Quoted 1 line
'const rte_bbdev_ops*
rte_bbdev::dev_ops' offset changed from 640to 768 (in bits) (by +128 bits)
Quoted 1 line
'rte_bbdev_data*
rte_bbdev::data' offset changed from 704 to 832(in bits) (by +128 bits)
Quoted 1 line
'
rte_bbdev_staterte_bbdev::state' offset changed from 768 to 896(in bits) (by +128 bits)
Quoted 1 line
'rte_device*
rte_bbdev::device' offset changed from 832 to 960 (inbits) (by +128 bits)
Quoted 1 line
'
rte_bbdev_cb_listrte_bbdev::list_cbs' offset changed from 896 to1024 (in bits) (by +128 bits)
Quoted 2 lines
'rte_intr_handle*
rte_bbdev::intr_handle' offset changed
from 1024 to 1152 (in bits) (by +128 bits)As for the report on the
rte_bbdev_op_fftstructure changes:
- wrt to its size, I think it is okay to waive it,rte_bbdev_fft_opobjects are coming from a bbdev mempool which is created by the bbdev library itself (with the right element size if the application asked forRTE_BBDEV_OP_FFTtype),
- wrt to the fields locations, an application may have been touching those fields, so moving all the added fields at the end of the structure would be better.
But on the other hand, an application will have to call anfft_ops
experimental API at some point, and the application developer is already warned that ABI is not preserved on this part of the API,So I would waive the changes on
rte_bbdev_fft_opwith something like:devtools/libabigail.abignore index renamed from devtools/libabigail.abignore +0
-0
3ff51509de..3cdce69418100644devtools/libabigail.abignore +0
-0@@ -36,6 +36,8 @@ [suppress_type] type_kind = enum changed_enumerators = RTE_CRYPTO_ASYM_XFORM_ECPM,Quoted 3 lines
RTE_CRYPTO_ASYM_XFORM_TYPE_LIST_END
+[suppress_type]
+ name =rte_bbdev_fft_opOK I did not know about this method. Shouldn't this apply more generally to all experimental structures? This can be added into the serie for 23.11.
Thanks
NicQuoted 7 lines
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; Temporary exceptions till next major ABI version ;
--
David Marchand
RE: [PATCH v1 1/1] doc: announce change in bbdev api related to operation extension
Hi Maxime, David,
Quoted 59 lines
-----Original Message-----
From: Maxime Coquelin <[email protected]>Quoted 24 lines · Nicolas
Hi David,
Quoted 22 lines
-----Original Message-----
From: David Marchand <[email protected]>> >>Quoted 2 lines · Nicolas
Wrt the MLD functions: these are new into the related serie but still the
break the ABI since the struct
rte_bbdevincludes these functions hence causing offset changes.Quoted 10 lines
Should I then just rephrase as:
+* bbdev: Will extend the API to support the new operation type
+``RTE_BBDEV_OP_MLDTS`` as per
+ thisv1 +<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 stuctrte_bbdev.I don't think we need this deprecation notice.
Quoted 6 lines
Quoted 4 lines
Do you need to expose those new mldts ops in
rte_bbdev? Can't they go todev_ops?
If you can't, at least moving those new ops at the end of the structure would avoid the breakage onrte_bbdev.It would probably be best to move all these ops at the end of the structure
(ie. keep them together).
Quoted 1 line
In that case the deprecation notice would call out that the
rte_bbdevstructure content is more generally modified. Probably best for the longer run.
Quoted 19 lines
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;Quoted 1 line
};
Quoted 2 lines
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.
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
Quoted 167 lines
Quoted 11 lines
Quoted 11 lines
Quoted 4 lines
Pasting below the ABI results for reference
[C] 'function rte_bbdev*
rte_bbdev_allocate(const char*)' atrte_bbdev.c:174:1 has some indirect sub-type changes:
Quoted 6 lines
return type changed:
in pointed to type 'structrte_bbdev' at rte_bbdev.h:498:1:
type size hasn't changed
2 data member insertions:
'rte_bbdev_enqueue_mldts_ops_trte_bbdev::enqueue_mldts_ops',Quoted 6 lines
Quoted 6 lines
at offset 640 (in bits) at rte_bbdev.h:520:1
Quoted 2 lines
'
rte_bbdev_dequeue_mldts_ops_trte_bbdev::dequeue_mldts_ops',at offset 704 (in bits) at rte_bbdev.h:522:1
Quoted 2 lines
7 data member changes (9 filtered):
type of 'rte_bbdev_dequeue_fft_ops_t
rte_bbdev::dequeue_fft_ops'Quoted 7 lines
Quoted 7 lines
changed:
Quoted 2 lines
underlying type 'typedef
uint16_t
(rte_bbdev_queue_data*,rte_bbdev_fft_op**, typedef uint16_t)*' changed:
Quoted 1 line
in pointed to type 'function type typedef
uint16_t(rte_bbdev_queue_data*, rte_bbdev_fft_op**, typedef
uint16_t)':Quoted 1 line
parameter 2 of type 'rte_bbdev_fft_op**' has sub-type
changes:
Quoted 6 lines
Quoted 6 lines
Quoted 2 lines
in pointed to type 'rte_bbdev_fft_op*':
in pointed to type 'structrte_bbdev_fft_op' atrte_bbdev_op.h:978:1:
Quoted 3 lines
type size changed from 832 to 1664 (in bits) 1 data member change:
type of 'rte_bbdev_op_fftrte_bbdev_fft_op::fft'changed:
Quoted 30 lines
Quoted 30 lines
Quoted 3 lines
type size changed from 640 to 1472 (in bits) 6 data member insertions:
'rte_bbdev_op_data
rte_bbdev_op_fft::dewindowing_input', at offset 256 (in bits) at rte_bbdev_op.h:771:1Quoted 2 lines
'int8_t
rte_bbdev_op_fft::freq_resample_mode', at offset768 (in bits) at rte_bbdev_op.h:807:1
Quoted 2 lines
'uint16_t
rte_bbdev_op_fft::output_depadded_size', atoffset 784 (in bits) at rte_bbdev_op.h:809:1
Quoted 2 lines
'uint16_trte_bbdev_op_fft::cs_theta_0[12]', at offset 800
(in bits) at rte_bbdev_op.h:811:1
Quoted 2 lines
'uint32_trte_bbdev_op_fft::cs_theta_d[12]', at offset 992
(in bits) at rte_bbdev_op.h:813:1
Quoted 2 lines
'int8_trte_bbdev_op_fft::time_offset[12]', at offset 1376
(in bits) at rte_bbdev_op.h:815:1
Quoted 2 lines
17 data member changes:
'rte_bbdev_op_data
rte_bbdev_op_fft::power_meas_output' offset changed from 256 to 384 (in
bits) (by +128 bits)Quoted 2 lines
'uint32_t rte_bbdev_op_fft::op_flags'offset changed from
384 to 512 (in bits) (by +128 bits)
Quoted 2 lines
'uint16_t
rte_bbdev_op_fft::input_sequence_size' offsetQuoted 7 lines
Quoted 7 lines
changed from 416 to 544 (in bits) (by +128 bits)
Quoted 1 line
'
uint16_trte_bbdev_op_fft::input_leading_padding'offset changed from 432 to 560 (in bits) (by +128 bits)
Quoted 2 lines
'uint16_t
rte_bbdev_op_fft::output_sequence_size' offsetchanged from 448 to 576 (in bits) (by +128 bits)
Quoted 1 line
'uint16_t
rte_bbdev_op_fft::output_leading_depadding'Quoted 66 lines
Quoted 66 lines
offset changed from 464 to 592 (in bits) (by +128 bits)
Quoted 2 lines
'uint8_trte_bbdev_op_fft::window_index[6]' offset
changed from 480 to 608 (in bits) (by +128 bits)
Quoted 2 lines
'uint16_t rte_bbdev_op_fft::cs_bitmap'offset changed
from 528 to 656 (in bits) (by +128 bits)
Quoted 2 lines
'uint8_t
rte_bbdev_op_fft::num_antennas_log2' offsetchanged from 544 to 672 (in bits) (by +128 bits)
Quoted 2 lines
'uint8_t rte_bbdev_op_fft::idft_log2'offset changed from
552 to 680 (in bits) (by +128 bits)
Quoted 2 lines
'uint8_t rte_bbdev_op_fft::dft_log2'offset changed from
560 to 688 (in bits) (by +128 bits)
Quoted 2 lines
'int8_t
rte_bbdev_op_fft::cs_time_adjustment' offsetchanged from 568 to 696 (in bits) (by +128 bits)
Quoted 2 lines
'int8_t rte_bbdev_op_fft::idft_shift'offset changed from
576 to 704 (in bits) (by +128 bits)
Quoted 2 lines
'int8_t rte_bbdev_op_fft::dft_shift'offset changed from
584 to 712 (in bits) (by +128 bits)
Quoted 2 lines
'uint16_t
rte_bbdev_op_fft::ncs_reciprocal' offsetchanged from 592 to 720 (in bits) (by +128 bits)
Quoted 2 lines
'uint16_t
rte_bbdev_op_fft::power_shift' offset changedfrom 608 to 736 (in bits) (by +128 bits)
Quoted 2 lines
'uint16_t
rte_bbdev_op_fft::fp16_exp_adjust' offsetchanged from 624 to 752 (in bits) (by +128 bits)
Quoted 2 lines
'const rte_bbdev_ops*
rte_bbdev::dev_ops' offset changed
from 640to 768 (in bits) (by +128 bits)
Quoted 2 lines
'rte_bbdev_data*
rte_bbdev::data' offset changed from 704
to 832(in bits) (by +128 bits)
Quoted 2 lines
'
rte_bbdev_staterte_bbdev::state' offset changed from
768 to 896(in bits) (by +128 bits)
Quoted 2 lines
'rte_device*
rte_bbdev::device' offset changed from 832
to 960 (inbits) (by +128 bits)
Quoted 2 lines
'
rte_bbdev_cb_listrte_bbdev::list_cbs' offset changed
from 896 to1024 (in bits) (by +128 bits)
Quoted 2 lines
'rte_intr_handle*
rte_bbdev::intr_handle' offset changed
from 1024 to 1152 (in bits) (by +128 bits)As for the report on the
rte_bbdev_op_fftstructure changes:
- wrt to its size, I think it is okay to waive it,rte_bbdev_fft_opobjects are coming from a bbdev mempool which is created by the bbdev library itself (with the right element size if the application asked forRTE_BBDEV_OP_FFTtype),
- wrt to the fields locations, an application may have been touching those fields, so moving all the added fields at the end of the structure would be better.
But on the other hand, an application will have to call anfft_ops
experimental API at some point, and the application developer is already warned that ABI is not preserved on this part of the API,So I would waive the changes on
rte_bbdev_fft_opwith something like:Quoted 15 lines
Quoted 9 lines
(quoted diff) +0
-0b/devtools/libabigail.abignore index
3ff51509de..3cdce69418100644devtools/libabigail.abignore +0
-0@@ -36,6 +36,8 @@ [suppress_type] type_kind = enum changed_enumerators = RTE_CRYPTO_ASYM_XFORM_ECPM,Quoted 3 lines
RTE_CRYPTO_ASYM_XFORM_TYPE_LIST_END
+[suppress_type]
+ name =rte_bbdev_fft_opOK I did not know about this method. Shouldn't this apply more generally
to all experimental structures?
Quoted 14 lines
This can be added into the serie for 23.11.
Thanks
NicQuoted 6 lines
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; Temporary exceptions till next major ABI version ;
--
Re: [PATCH v1 1/1] doc: announce change in bbdev api related to operation extension
Quoted 61 lines · Nicolas
Hi Maxime, David,
Quoted 59 lines
-----Original Message-----
From: Maxime Coquelin <[email protected]>Quoted 24 lines · Nicolas
Hi David,
Quoted 22 lines
-----Original Message-----
From: David Marchand <[email protected]>> >>Quoted 2 lines · Nicolas
Wrt the MLD functions: these are new into the related serie but still the
break the ABI since the struct
rte_bbdevincludes these functions hence causing offset changes.Quoted 10 lines
Should I then just rephrase as:
+* bbdev: Will extend the API to support the new operation type
+``RTE_BBDEV_OP_MLDTS`` as per
+ thisv1 +<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 stuctrte_bbdev.I don't think we need this deprecation notice.
Quoted 6 lines
Quoted 4 lines
Do you need to expose those new mldts ops in
rte_bbdev? Can't they go todev_ops?
If you can't, at least moving those new ops at the end of the structure would avoid the breakage onrte_bbdev.It would probably be best to move all these ops at the end of the structure
(ie. keep them together).
Quoted 1 line
In that case the deprecation notice would call out that the
rte_bbdevstructure content is more generally modified. Probably best for the longer run.
Quoted 20 lines
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;};
Quoted 5 lines
Quoted 2 lines
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 ofrte_bbdevstructure 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
Quoted 5 lines
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
RE: [PATCH v1 1/1] doc: announce change in bbdev api related to operation extension
Hi Maxime,
Quoted 76 lines
-----Original Message-----
From: Maxime Coquelin <[email protected]>Quoted 10 lines · Nicolas
Hi Maxime, David,
Quoted 8 lines
-----Original Message-----
From: Maxime Coquelin <[email protected]>Quoted 4 lines · Nicolas
Hi David,
Quoted 2 lines
-----Original Message-----
From: David Marchand <[email protected]>> >> On Mon, Jun5,
Quoted 54 lines
Quoted 54 lines
Quoted 21 lines
Quoted 21 lines
2023 at 10:08 PM Chautru, Nicolas <[email protected]>
Quoted 2 lines · wrote:
Wrt the MLD functions: these are new into the related serie but still the
break the ABI since the struct
rte_bbdevincludes these functions hence causing offset changes.Quoted 11 lines
Should I then just rephrase as:
+* bbdev: Will extend the API to support the new operation type
+``RTE_BBDEV_OP_MLDTS`` as per
+ thisv1 +<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 stuctrte_bbdev.I don't think we need this deprecation notice.
Quoted 7 lines
Quoted 4 lines
Do you need to expose those new mldts ops in
rte_bbdev? Can't they go todev_ops?
If you can't, at least moving those new ops at the end of the structure would avoid the breakage onrte_bbdev.It would probably be best to move all these ops at the end of the structure
(ie. keep them together).
Quoted 2 lines
In that case the deprecation notice would call out that the
rte_bbdevstructure content is more generally modified. Probably best for the longer run.
Quoted 20 lines
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;};
Quoted 4 lines
Quoted 2 lines
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.
Quoted 7 lines
Quoted 1 line
I believe moving these function at the end of the structure is a good
compromise to avoid future breakage of
rte_bbdevstructure 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.
With the suggested change, this will not break ABI next year. Any future functions are added at the end of the structure anyway.
Quoted 10 lines
IMHO, moving these ops should be quite trivial and not much work.
Otherwise, if we just placed the
rte_bbdev_dequeue_mldts_opsandrte_bbdev_enqueue_mldts_opsat the bottom of structrte_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
- structrte_bbdevis cache-aligned, so it may work if adding these two ops do not overlap a cacheline which depends on the CPU architecture.
If you prefer to add the only 2 new functions at the end of the structure that is okay. I believe it would be cleaner to move all these enqueue/dequeue funs down together without drawback I can think of. Let me know.
Quoted 9 lines
Maxime
Quoted 1 line
What do you think Maxime, David? Based on this I can adjust the change for
23.11 and update slightly the deprecation notice accordingly.
Quoted 4 lines
Thanks
Nic
Re: [PATCH v1 1/1] doc: announce change in bbdev api related to operation extension
Hi,
Quoted 79 lines · Nicolas
Hi Maxime,
Quoted 77 lines
-----Original Message-----
From: Maxime Coquelin <[email protected]>Quoted 10 lines · Nicolas
Hi Maxime, David,
Quoted 8 lines
-----Original Message-----
From: Maxime Coquelin <[email protected]>Quoted 4 lines · Nicolas
Hi David,
Quoted 2 lines
-----Original Message-----
From: David Marchand <[email protected]>> >> On Mon, Jun5,
Quoted 54 lines
Quoted 54 lines
Quoted 21 lines
Quoted 21 lines
2023 at 10:08 PM Chautru, Nicolas <[email protected]>
Quoted 2 lines · wrote:
Wrt the MLD functions: these are new into the related serie but still the
break the ABI since the struct
rte_bbdevincludes these functions hence causing offset changes.Quoted 11 lines
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 stuctrte_bbdev.I don't think we need this deprecation notice.
Quoted 7 lines
Quoted 4 lines
Do you need to expose those new mldts ops in
rte_bbdev? Can't they go todev_ops?
If you can't, at least moving those new ops at the end of the structure would avoid the breakage onrte_bbdev.It would probably be best to move all these ops at the end of the structure
(ie. keep them together).
Quoted 2 lines
In that case the deprecation notice would call out that the
rte_bbdevstructure content is more generally modified. Probably best for the longer run.
Quoted 20 lines
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; };Quoted 4 lines
Quoted 2 lines
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.
Quoted 1 line
I believe moving these function at the end of the structure is a good
Quoted 8 lines
Quoted 6 lines
compromise to avoid future breakage of
rte_bbdevstructure 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.
With the suggested change, this will not break ABI next year. Any future functions are added at the end of the structure anyway.
I'm not so sure, it depends if adding a new field at the end cross a cacheline boundary or not:
/*
* Global array of all devices. This is not static because it's used by the
* inline enqueue and dequeue functions
*/
struct rte_bbdev rte_bbdev_devices[RTE_BBDEV_MAX_DEVS];
If the older inlined functions used by the application retrieve the dev pointer from the array directly (they do) and added new fields in new version cross a cacheline, then there will be a misalignement between the new lib version and the application using the older inlined functions.
ABI-wise, this is not really future proof.
Quoted 12 lines
Quoted 11 lines
IMHO, moving these ops should be quite trivial and not much work.
Otherwise, if we just placed the
rte_bbdev_dequeue_mldts_opsandrte_bbdev_enqueue_mldts_opsat the bottom of structrte_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
- structrte_bbdevis cache-aligned, so it may work if adding these two ops do not overlap a cacheline which depends on the CPU architecture.
Quoted 1 line
If you prefer to add the only 2 new functions at the end of the structure that is okay. I believe it would be cleaner to move all these enqueue/dequeue funs down together without drawback I can think of. Let me know.
Adding the new ones at the end is not future proof, but at least it does not break ABI just for cosmetic reasons (that's a big drawback IMHO).
I just checked using pahole:
struct rte_bbdev {
rte_bbdev_enqueue_enc_ops_t enqueue_enc_ops; /* 0 8 */ rte_bbdev_enqueue_dec_ops_t enqueue_dec_ops; /* 8 8 */ rte_bbdev_dequeue_enc_ops_t dequeue_enc_ops; /* 16 8 */ rte_bbdev_dequeue_dec_ops_t dequeue_dec_ops; /* 24 8 */ rte_bbdev_enqueue_enc_ops_t enqueue_ldpc_enc_ops; /* 32 8 */ rte_bbdev_enqueue_dec_ops_t enqueue_ldpc_dec_ops; /* 40 8 */ rte_bbdev_dequeue_enc_ops_t dequeue_ldpc_enc_ops; /* 48 8 */ rte_bbdev_dequeue_dec_ops_t dequeue_ldpc_dec_ops; /* 56 8 */
/* --- cacheline 1 boundary (64 bytes) --- */
rte_bbdev_enqueue_fft_ops_t enqueue_fft_ops; /* 64 8 */
rte_bbdev_dequeue_fft_ops_t dequeue_fft_ops; /* 72 8 */
const struct rte_bbdev_ops * dev_ops; /* 80 8 */
struct rte_bbdev_data * data; /* 88 8 */
enum rte_bbdev_state state; /* 96 4 */
/* XXX 4 bytes hole, try to pack */
struct rte_device * device; /* 104 8 */
struct rte_bbdev_cb_list list_cbs; /* 112 16 */
/* --- cacheline 2 boundary (128 bytes) --- */
struct rte_intr_handle * intr_handle; /* 128 8 */
/* size: 192, cachelines: 3, members: 16 */ /* sum members: 132, holes: 1, sum holes: 4 */ /* padding: 56 */
} __attribute__((__aligned__(64)));
We're lucky on x86, we still have 56 bytes, so we can add 7 new ops at the end before breaking the ABI if I'm not mistaken.
I checked the other architecture, and it seems we don't support any with 32B cacheline size so we're good for a while.
Maxime
Quoted 11 lines
Quoted 10 lines
Maxime
Quoted 1 line
What do you think Maxime, David? Based on this I can adjust the change for
23.11 and update slightly the deprecation notice accordingly.
Quoted 4 lines
Thanks
Nic
Re: [PATCH v1 1/1] doc: announce change in bbdev api related to operation extension
Quoted 5 lines · On Tue, 13 Jun 2023 22:00:25 +0200 Maxime Coquelin…
Quoted 5 lines
Quoted 3 lines
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.
With the suggested change, this will not break ABI next year. Any future functions are added at the end of the structure anyway.
Do it right in 23.11, break the ABI and fix the few drivers.
It is not hard to have one ops struct (and it can/should be const) that is pointed to by the bbdev. That will hide the ops from the application.
RE: [PATCH v1 1/1] doc: announce change in bbdev api related to operation extension
In reply to Maxime CoquelinHi Maxime,
Quoted 169 lines
-----Original Message-----
From: Maxime Coquelin <[email protected]> Hi,Quoted 17 lines · Nicolas
Hi Maxime,
Quoted 15 lines
-----Original Message-----
From: Maxime Coquelin <[email protected]>Quoted 10 lines · Nicolas
Hi Maxime, David,
Quoted 8 lines
-----Original Message-----
From: Maxime Coquelin <[email protected]>Quoted 4 lines · Nicolas
Hi David,
Quoted 2 lines
-----Original Message-----
From: David Marchand <[email protected]>> >> OnMon, Jun
Quoted 55 lines
Quoted 55 lines
5,
Quoted 54 lines
Quoted 54 lines
Quoted 21 lines
Quoted 21 lines
2023 at 10:08 PM Chautru, Nicolas <[email protected]>
Quoted 2 lines · wrote:
Wrt the MLD functions: these are new into the related serie but still the
break the ABI since the struct
rte_bbdevincludes these functions hence causing offset changes.Quoted 11 lines
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 stuctrte_bbdev.I don't think we need this deprecation notice.
Quoted 7 lines
Quoted 4 lines
Do you need to expose those new mldts ops in
rte_bbdev? Can't they go todev_ops?
If you can't, at least moving those new ops at the end of the structure would avoid the breakage onrte_bbdev.It would probably be best to move all these ops at the end of the structure
(ie. keep them together).
Quoted 2 lines
In that case the deprecation notice would call out that the
rte_bbdevstructure content is more generally modified. Probably best for the longer run.
Quoted 20 lines
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; };Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
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 theapplication.
Quoted 10 lines
Quoted 10 lines
Quoted 3 lines
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.
Quoted 2 lines
I believe moving these function at the end of the structure is a good
compromise to avoid future breakage of
rte_bbdevstructure 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.11really.
Quoted 5 lines
Quoted 3 lines
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.
With the suggested change, this will not break ABI next year. Any future
functions are added at the end of the structure anyway.
I'm not so sure, it depends if adding a new field at the end cross a cacheline boundary or not:
/*
* Global array of all devices. This is not static because it's used by the
* inline enqueue and dequeue functions
*/
structrte_bbdevrte_bbdev_devices[RTE_BBDEV_MAX_DEVS];If the older inlined functions used by the application retrieve the dev pointer from the array directly (they do) and added new fields in new version cross a cacheline, then there will be a misalignement between the new lib version and the application using the older inlined functions.
ABI-wise, this is not really future proof.
Quoted 12 lines
Quoted 11 lines
IMHO, moving these ops should be quite trivial and not much work.
Otherwise, if we just placed the
rte_bbdev_dequeue_mldts_opsandrte_bbdev_enqueue_mldts_opsat the bottom of structrte_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
- structrte_bbdevis cache-aligned, so it may work if adding these two ops do not overlap a cacheline which depends on the CPU architecture.Quoted 1 line
If you prefer to add the only 2 new functions at the end of the structure
that is okay. I believe it would be cleaner to move all these enqueue/dequeue funs down together without drawback I can think of. Let me know.
Adding the new ones at the end is not future proof, but at least it does not break ABI just for cosmetic reasons (that's a big drawback IMHO).
I just checked using pahole:
struct
rte_bbdev{rte_bbdev_enqueue_enc_ops_t enqueue_enc_ops; /* 0 8 */ rte_bbdev_enqueue_dec_ops_t enqueue_dec_ops; /* 8 8 */ rte_bbdev_dequeue_enc_ops_t dequeue_enc_ops; /* 16 8 */ rte_bbdev_dequeue_dec_ops_t dequeue_dec_ops; /* 24 8 */
rte_bbdev_enqueue_enc_ops_tenqueue_ldpc_enc_ops; /* 32 8
*/
rte_bbdev_enqueue_dec_ops_tenqueue_ldpc_dec_ops; /* 40 8
*/
rte_bbdev_dequeue_enc_ops_tdequeue_ldpc_enc_ops; /* 48 8
*/
rte_bbdev_dequeue_dec_ops_tdequeue_ldpc_dec_ops; /* 56 8
*/
/* --- cacheline 1 boundary (64 bytes) --- */
rte_bbdev_enqueue_fft_ops_tenqueue_fft_ops; /* 64 8 */
rte_bbdev_dequeue_fft_ops_tdequeue_fft_ops; /* 72 8 */
const structrte_bbdev_ops*dev_ops; /* 80 8 */
structrte_bbdev_data* data; /* 88 8 */
enumrte_bbdev_statestate; /* 96 4 *//* XXX 4 bytes hole, try to pack */
struct
rte_device* device; /* 104 8 */
structrte_bbdev_cb_listlist_cbs; /* 112 16 */
/* --- cacheline 2 boundary (128 bytes) --- */
structrte_intr_handle*intr_handle; /* 128 8 *//* size: 192, cachelines: 3, members: 16 */ /* sum members: 132, holes: 1, sum holes: 4 */ /* padding: 56 */
} __attribute__((__aligned__(64)));
Quoted 5 lines
We're lucky on x86, we still have 56 bytes, so we can add 7 new ops at the end before breaking the ABI if I'm not mistaken.
I checked the other architecture, and it seems we don't support any with 32B cacheline size so we're good for a while.
OK then just adding the new functions at the end, no other cosmetic changes. Will update the patch to match this. In term of deprecation notice, you are okay with latest draft?
+* 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.
Quoted 15 lines
Maxime
Quoted 12 lines
Quoted 11 lines
Maxime
Quoted 2 lines
What do you think Maxime, David? Based on this I can adjust the change for
23.11 and update slightly the deprecation notice accordingly.
Quoted 4 lines
Thanks
Nic
Re: [PATCH v1 1/1] doc: announce change in bbdev api related to operation extension
Quoted 177 lines · Nicolas
Hi Maxime,
Quoted 169 lines
-----Original Message-----
From: Maxime Coquelin <[email protected]> Hi,Quoted 17 lines · Nicolas
Hi Maxime,
Quoted 15 lines
-----Original Message-----
From: Maxime Coquelin <[email protected]>Quoted 10 lines · Nicolas
Hi Maxime, David,
Quoted 8 lines
-----Original Message-----
From: Maxime Coquelin <[email protected]>Quoted 4 lines · Nicolas
Hi David,
Quoted 2 lines
-----Original Message-----
From: David Marchand <[email protected]>> >> OnMon, Jun
Quoted 55 lines
Quoted 55 lines
5,
Quoted 54 lines
Quoted 54 lines
Quoted 21 lines
Quoted 21 lines
2023 at 10:08 PM Chautru, Nicolas <[email protected]>
Quoted 2 lines · wrote:
Wrt the MLD functions: these are new into the related serie but still the
break the ABI since the struct
rte_bbdevincludes these functions hence causing offset changes.Quoted 11 lines
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 stuctrte_bbdev.I don't think we need this deprecation notice.
Quoted 7 lines
Quoted 4 lines
Do you need to expose those new mldts ops in
rte_bbdev? Can't they go todev_ops?
If you can't, at least moving those new ops at the end of the structure would avoid the breakage onrte_bbdev.It would probably be best to move all these ops at the end of the structure
(ie. keep them together).
Quoted 2 lines
In that case the deprecation notice would call out that the
rte_bbdevstructure content is more generally modified. Probably best for the longer run.
Quoted 20 lines
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; };Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
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 theapplication.
Quoted 10 lines
Quoted 10 lines
Quoted 3 lines
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.
Quoted 2 lines
I believe moving these function at the end of the structure is a good
compromise to avoid future breakage of
rte_bbdevstructure 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.11really.
Quoted 5 lines
Quoted 3 lines
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.
With the suggested change, this will not break ABI next year. Any future
functions are added at the end of the structure anyway.
I'm not so sure, it depends if adding a new field at the end cross a cacheline boundary or not:
/*
* Global array of all devices. This is not static because it's used by the
* inline enqueue and dequeue functions
*/
structrte_bbdevrte_bbdev_devices[RTE_BBDEV_MAX_DEVS];If the older inlined functions used by the application retrieve the dev pointer from the array directly (they do) and added new fields in new version cross a cacheline, then there will be a misalignement between the new lib version and the application using the older inlined functions.
ABI-wise, this is not really future proof.
Quoted 12 lines
Quoted 11 lines
IMHO, moving these ops should be quite trivial and not much work.
Otherwise, if we just placed the
rte_bbdev_dequeue_mldts_opsandrte_bbdev_enqueue_mldts_opsat the bottom of structrte_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
- structrte_bbdevis cache-aligned, so it may work if adding these two ops do not overlap a cacheline which depends on the CPU architecture.Quoted 1 line
If you prefer to add the only 2 new functions at the end of the structure
that is okay. I believe it would be cleaner to move all these enqueue/dequeue funs down together without drawback I can think of. Let me know.
Adding the new ones at the end is not future proof, but at least it does not break ABI just for cosmetic reasons (that's a big drawback IMHO).
I just checked using pahole:
struct
rte_bbdev{rte_bbdev_enqueue_enc_ops_t enqueue_enc_ops; /* 0 8 */ rte_bbdev_enqueue_dec_ops_t enqueue_dec_ops; /* 8 8 */ rte_bbdev_dequeue_enc_ops_t dequeue_enc_ops; /* 16 8 */ rte_bbdev_dequeue_dec_ops_t dequeue_dec_ops; /* 24 8 */
rte_bbdev_enqueue_enc_ops_tenqueue_ldpc_enc_ops; /* 32 8
*/
rte_bbdev_enqueue_dec_ops_tenqueue_ldpc_dec_ops; /* 40 8
*/
rte_bbdev_dequeue_enc_ops_tdequeue_ldpc_enc_ops; /* 48 8
*/
rte_bbdev_dequeue_dec_ops_tdequeue_ldpc_dec_ops; /* 56 8
*/
/* --- cacheline 1 boundary (64 bytes) --- */
rte_bbdev_enqueue_fft_ops_tenqueue_fft_ops; /* 64 8 */
rte_bbdev_dequeue_fft_ops_tdequeue_fft_ops; /* 72 8 */
const structrte_bbdev_ops*dev_ops; /* 80 8 */
structrte_bbdev_data* data; /* 88 8 */
enumrte_bbdev_statestate; /* 96 4 *//* XXX 4 bytes hole, try to pack */
struct
rte_device* device; /* 104 8 */
structrte_bbdev_cb_listlist_cbs; /* 112 16 */
/* --- cacheline 2 boundary (128 bytes) --- */
structrte_intr_handle*intr_handle; /* 128 8 *//* size: 192, cachelines: 3, members: 16 */ /* sum members: 132, holes: 1, sum holes: 4 */ /* padding: 56 */
} __attribute__((__aligned__(64)));Quoted 5 lines
We're lucky on x86, we still have 56 bytes, so we can add 7 new ops at the end before breaking the ABI if I'm not mistaken.
I checked the other architecture, and it seems we don't support any with 32B cacheline size so we're good for a while.
Quoted 8 lines
OK then just adding the new functions at the end, no other cosmetic changes. Will update the patch to match this. In term of deprecation notice, you are okay with latest draft?
+* 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 stuctrte_bbdev.
This is not needed in the deprecation notice.
If you are willing to announce it, it could be part of the Intel roadmap.
To be on the safe side, could you try to dynamically link an application with a DPDK version before this change, then rebuild DPDK with adding these two fields. Then test with at least 2 devices with test-bbdev and see if it does not crash or fail?
Thanks,
Maxime
Quoted 17 lines
Quoted 16 lines
Maxime
Quoted 12 lines
Quoted 11 lines
Maxime
Quoted 2 lines
What do you think Maxime, David? Based on this I can adjust the change for
23.11 and update slightly the deprecation notice accordingly.
Quoted 4 lines
Thanks
Nic
RE: [PATCH v1 1/1] doc: announce change in bbdev api related to operation extension
Hi Maxime,
Quoted 198 lines
-----Original Message-----
From: Maxime Coquelin <[email protected]>Quoted 32 lines · Nicolas
Hi Maxime,
Quoted 30 lines
-----Original Message-----
From: Maxime Coquelin <[email protected]> Hi,Quoted 17 lines · Nicolas
Hi Maxime,
Quoted 15 lines
-----Original Message-----
From: Maxime Coquelin <[email protected]>Quoted 10 lines · Nicolas
Hi Maxime, David,
Quoted 8 lines
-----Original Message-----
From: Maxime Coquelin <[email protected]>Quoted 4 lines · Nicolas
Hi David,
Quoted 2 lines
-----Original Message-----
From: David Marchand <[email protected]>> >> OnMon, Jun
Quoted 8 lines
Quoted 8 lines
5,
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
2023 at 10:08 PM Chautru, Nicolas <[email protected]>
Quoted 2 lines · wrote:
Wrt the MLD functions: these are new into the related serie but still the
break the ABI since the struct
rte_bbdevincludes these functions hence causing offset changes.Quoted 1 line
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Review
Quoted 7 lines
Should I then just rephrase as:
(quoted diff) +2
-0+* 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>`.
Quoted 74 lines
Quoted 74 lines
Quoted 41 lines
Quoted 41 lines
Quoted 41 lines
Quoted 41 lines
Quoted 8 lines
Quoted 8 lines
Quoted 4 lines
This
+ will notably introduce + new symbols for ``rte_bbdev_dequeue_mldts_ops``, +``rte_bbdev_enqueue_mldts_ops`` into the stuctrte_bbdev.I don't think we need this deprecation notice.
Quoted 7 lines
Quoted 4 lines
Do you need to expose those new mldts ops in
rte_bbdev? Can't they go todev_ops?
If you can't, at least moving those new ops at the end of the structure would avoid the breakage onrte_bbdev.It would probably be best to move all these ops at the end of the structure
(ie. keep them together).
Quoted 2 lines
In that case the deprecation notice would call out that the
rte_bbdevstructure content is more generally modified. Probably best for the longer run.
Quoted 20 lines
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; };Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
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 theapplication.
Quoted 11 lines
Quoted 11 lines
Quoted 3 lines
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.
Quoted 2 lines
I believe moving these function at the end of the structure is a good
compromise to avoid future breakage of
rte_bbdevstructure 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.11really.
Quoted 6 lines
Quoted 3 lines
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.
With the suggested change, this will not break ABI next year. Any future
functions are added at the end of the structure anyway.
I'm not so sure, it depends if adding a new field at the end cross a cacheline boundary or not:
/*
* Global array of all devices. This is not static because it's used by the
* inline enqueue and dequeue functions
*/
structrte_bbdevrte_bbdev_devices[RTE_BBDEV_MAX_DEVS];Quoted 4 lines
Quoted 4 lines
If the older inlined functions used by the application retrieve the dev pointer from the array directly (they do) and added new fields in new version cross a cacheline, then there will be a misalignement between the new lib version and the application using the older inlined
functions.
Quoted 7 lines
Quoted 7 lines
ABI-wise, this is not really future proof.
Quoted 4 lines
Quoted 4 lines
IMHO, moving these ops should be quite trivial and not much work.
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Otherwise, if we just placed the
rte_bbdev_dequeue_mldts_opsandrte_bbdev_enqueue_mldts_opsat the bottom of structrte_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
- structrte_bbdevis cache-aligned, so it may work if adding these two ops do not overlap a cacheline which depends on the CPUarchitecture.
Quoted 9 lines
Quoted 9 lines
Quoted 3 lines
If you prefer to add the only 2 new functions at the end of the structure
that is okay. I believe it would be cleaner to move all these enqueue/dequeue funs down together without drawback I can think of. Let me know.
Adding the new ones at the end is not future proof, but at least it does not break ABI just for cosmetic reasons (that's a big drawback
IMHO).
Quoted 35 lines
Quoted 35 lines
I just checked using pahole:
struct
rte_bbdev{rte_bbdev_enqueue_enc_ops_t enqueue_enc_ops; /* 0 8 */ rte_bbdev_enqueue_dec_ops_t enqueue_dec_ops; /* 8 8 */ rte_bbdev_dequeue_enc_ops_t dequeue_enc_ops; /* 16 8 */ rte_bbdev_dequeue_dec_ops_t dequeue_dec_ops; /* 24 8 */
rte_bbdev_enqueue_enc_ops_tenqueue_ldpc_enc_ops; /* 32 8
*/
rte_bbdev_enqueue_dec_ops_tenqueue_ldpc_dec_ops; /* 40 8
*/
rte_bbdev_dequeue_enc_ops_tdequeue_ldpc_enc_ops; /* 48 8
*/
rte_bbdev_dequeue_dec_ops_tdequeue_ldpc_dec_ops; /* 56 8
*/
/* --- cacheline 1 boundary (64 bytes) --- */
rte_bbdev_enqueue_fft_ops_tenqueue_fft_ops; /* 64 8 */
rte_bbdev_dequeue_fft_ops_tdequeue_fft_ops; /* 72 8 */
const structrte_bbdev_ops*dev_ops; /* 80 8 */
structrte_bbdev_data* data; /* 88 8 */
enumrte_bbdev_statestate; /* 96 4 *//* XXX 4 bytes hole, try to pack */
struct
rte_device* device; /* 104 8 */
structrte_bbdev_cb_listlist_cbs; /* 112 16 */
/* --- cacheline 2 boundary (128 bytes) --- */
structrte_intr_handle*intr_handle; /* 128 8 *//* size: 192, cachelines: 3, members: 16 */ /* sum members: 132, holes: 1, sum holes: 4 */ /* padding: 56 */
} __attribute__((__aligned__(64)));Quoted 7 lines
Quoted 5 lines
We're lucky on x86, we still have 56 bytes, so we can add 7 new ops at the end before breaking the ABI if I'm not mistaken.
I checked the other architecture, and it seems we don't support any with 32B cacheline size so we're good for a while.
OK then just adding the new functions at the end, no other cosmetic
changes. Will update the patch to match this.
Quoted 7 lines
In term of deprecation notice, you are okay with latest draft?
+* 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``
Quoted 5 lines
into the stuct
rte_bbdev.This is not needed in the deprecation notice.
If you are willing to announce it, it could be part of the Intel roadmap.
I still see this abi failure as we extend the struct (see below), what is the harm in calling it out in the deprecation notice?
1 function with some indirect sub-type change:
[C] 'function rte_bbdev* rte_bbdev_allocate(const char*)' at rte_bbdev.c:174:1 has some indirect sub-type changes:
return type changed:
in pointed to type 'struct rte_bbdev' at rte_bbdev.h:498:1:
type size hasn't changed
2 data member insertions:
'rte_bbdev_enqueue_mldts_ops_t enqueue_mldts_ops', at offset 1088 (in bits) at rte_bbdev.h:527:1 'rte_bbdev_dequeue_mldts_ops_t dequeue_mldts_ops', at offset 1152 (in bits) at rte_bbdev.h:529:1
no data member changes (12 filtered);
Error: ABI issue reported for abidiff --suppr /home-local/jenkins-local/jenkins-agent/workspace/Generic-DPDK-Compile-ABI@2/dpdk/devtools/libabigail.abignore --no-added-syms --headers-dir1 reference/usr/local/include --headers-dir2 build_install/usr/local/include reference/usr/local/lib64/librte_bbdev.so.23.0 build_install/usr/local/lib64/librte_bbdev.so.23.2 ABIDIFF_ABI_CHANGE, this change requires a review (abidiff flagged this as a potential issue).
Quoted 5 lines
To be on the safe side, could you try to dynamically link an application with a DPDK version before this change, then rebuild DPDK with adding these two fields. Then test with at least 2 devices with test-bbdev and see if it does not crash or fail?
This is not something we would validate really. But I agree the chance of that ABI having an actual impact is slim based on the address alignment. Still by process, we can use the abi warning above as a litmus the ABI has some minor change.
Also we introduce this change in the new LTS version, so unsure this is controversial or impactful.
Let me know if different opinion.
Thanks
Nic
Quoted 21 lines
Thanks,
MaximeQuoted 17 lines
Quoted 16 lines
Maxime
Quoted 12 lines
Quoted 11 lines
Maxime
Quoted 2 lines
What do you think Maxime, David? Based on this I can adjust the change for
23.11 and update slightly the deprecation notice accordingly.
Quoted 4 lines
Thanks
Nic
Re: [PATCH v1 1/1] doc: announce change in bbdev api related to operation extension
Quoted 223 lines · Nicolas
Hi Maxime,
Quoted 198 lines
-----Original Message-----
From: Maxime Coquelin <[email protected]>Quoted 32 lines · Nicolas
Hi Maxime,
Quoted 30 lines
-----Original Message-----
From: Maxime Coquelin <[email protected]> Hi,Quoted 17 lines · Nicolas
Hi Maxime,
Quoted 15 lines
-----Original Message-----
From: Maxime Coquelin <[email protected]>Quoted 10 lines · Nicolas
Hi Maxime, David,
Quoted 8 lines
-----Original Message-----
From: Maxime Coquelin <[email protected]>Quoted 4 lines · Nicolas
Hi David,
Quoted 2 lines
-----Original Message-----
From: David Marchand <[email protected]>> >> OnMon, Jun
Quoted 8 lines
Quoted 8 lines
5,
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
2023 at 10:08 PM Chautru, Nicolas <[email protected]>
Quoted 2 lines · wrote:
Wrt the MLD functions: these are new into the related serie but still the
break the ABI since the struct
rte_bbdevincludes these functions hence causing offset changes.Quoted 1 line
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Review
Quoted 7 lines
Should I then just rephrase as:
(quoted diff) +2
-0+* 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>`.
Quoted 74 lines
Quoted 74 lines
Quoted 41 lines
Quoted 41 lines
Quoted 41 lines
Quoted 41 lines
Quoted 8 lines
Quoted 8 lines
Quoted 4 lines
This
+ will notably introduce + new symbols for ``rte_bbdev_dequeue_mldts_ops``, +``rte_bbdev_enqueue_mldts_ops`` into the stuctrte_bbdev.I don't think we need this deprecation notice.
Quoted 7 lines
Quoted 4 lines
Do you need to expose those new mldts ops in
rte_bbdev? Can't they go todev_ops?
If you can't, at least moving those new ops at the end of the structure would avoid the breakage onrte_bbdev.It would probably be best to move all these ops at the end of the structure
(ie. keep them together).
Quoted 2 lines
In that case the deprecation notice would call out that the
rte_bbdevstructure content is more generally modified. Probably best for the longer run.
Quoted 20 lines
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; };Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
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 theapplication.
Quoted 11 lines
Quoted 11 lines
Quoted 3 lines
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.
Quoted 2 lines
I believe moving these function at the end of the structure is a good
compromise to avoid future breakage of
rte_bbdevstructure 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.11really.
Quoted 6 lines
Quoted 3 lines
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.
With the suggested change, this will not break ABI next year. Any future
functions are added at the end of the structure anyway.
I'm not so sure, it depends if adding a new field at the end cross a cacheline boundary or not:
/*
* Global array of all devices. This is not static because it's used by the
* inline enqueue and dequeue functions
*/
structrte_bbdevrte_bbdev_devices[RTE_BBDEV_MAX_DEVS];Quoted 4 lines
Quoted 4 lines
If the older inlined functions used by the application retrieve the dev pointer from the array directly (they do) and added new fields in new version cross a cacheline, then there will be a misalignement between the new lib version and the application using the older inlined
functions.
Quoted 7 lines
Quoted 7 lines
ABI-wise, this is not really future proof.
Quoted 4 lines
Quoted 4 lines
IMHO, moving these ops should be quite trivial and not much work.
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Otherwise, if we just placed the
rte_bbdev_dequeue_mldts_opsandrte_bbdev_enqueue_mldts_opsat the bottom of structrte_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
- structrte_bbdevis cache-aligned, so it may work if adding these two ops do not overlap a cacheline which depends on the CPUarchitecture.
Quoted 9 lines
Quoted 9 lines
Quoted 3 lines
If you prefer to add the only 2 new functions at the end of the structure
that is okay. I believe it would be cleaner to move all these enqueue/dequeue funs down together without drawback I can think of. Let me know.
Adding the new ones at the end is not future proof, but at least it does not break ABI just for cosmetic reasons (that's a big drawback
IMHO).
Quoted 35 lines
Quoted 35 lines
I just checked using pahole:
struct
rte_bbdev{rte_bbdev_enqueue_enc_ops_t enqueue_enc_ops; /* 0 8 */ rte_bbdev_enqueue_dec_ops_t enqueue_dec_ops; /* 8 8 */ rte_bbdev_dequeue_enc_ops_t dequeue_enc_ops; /* 16 8 */ rte_bbdev_dequeue_dec_ops_t dequeue_dec_ops; /* 24 8 */
rte_bbdev_enqueue_enc_ops_tenqueue_ldpc_enc_ops; /* 32 8
*/
rte_bbdev_enqueue_dec_ops_tenqueue_ldpc_dec_ops; /* 40 8
*/
rte_bbdev_dequeue_enc_ops_tdequeue_ldpc_enc_ops; /* 48 8
*/
rte_bbdev_dequeue_dec_ops_tdequeue_ldpc_dec_ops; /* 56 8
*/
/* --- cacheline 1 boundary (64 bytes) --- */
rte_bbdev_enqueue_fft_ops_tenqueue_fft_ops; /* 64 8 */
rte_bbdev_dequeue_fft_ops_tdequeue_fft_ops; /* 72 8 */
const structrte_bbdev_ops*dev_ops; /* 80 8 */
structrte_bbdev_data* data; /* 88 8 */
enumrte_bbdev_statestate; /* 96 4 *//* XXX 4 bytes hole, try to pack */
struct
rte_device* device; /* 104 8 */
structrte_bbdev_cb_listlist_cbs; /* 112 16 */
/* --- cacheline 2 boundary (128 bytes) --- */
structrte_intr_handle*intr_handle; /* 128 8 *//* size: 192, cachelines: 3, members: 16 */ /* sum members: 132, holes: 1, sum holes: 4 */ /* padding: 56 */
} __attribute__((__aligned__(64)));Quoted 7 lines
Quoted 5 lines
We're lucky on x86, we still have 56 bytes, so we can add 7 new ops at the end before breaking the ABI if I'm not mistaken.
I checked the other architecture, and it seems we don't support any with 32B cacheline size so we're good for a while.
OK then just adding the new functions at the end, no other cosmetic
changes. Will update the patch to match this.
Quoted 7 lines
In term of deprecation notice, you are okay with latest draft?
+* 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``Quoted 5 lines
into the stuct
rte_bbdev.This is not needed in the deprecation notice.
If you are willing to announce it, it could be part of the Intel roadmap.I still see this abi failure as we extend the struct (see below), what is the harm in calling it out in the deprecation notice?
1 function with some indirect sub-type change:
[C] 'function rte_bbdev*
rte_bbdev_allocate(const char*)' at rte_bbdev.c:174:1 has some indirect sub-type changes:
return type changed:
in pointed to type 'structrte_bbdev' at rte_bbdev.h:498:1:
type size hasn't changed
2 data member insertions:
'rte_bbdev_enqueue_mldts_ops_tenqueue_mldts_ops', at offset 1088 (in bits) at rte_bbdev.h:527:1 'rte_bbdev_dequeue_mldts_ops_tdequeue_mldts_ops', at offset 1152 (in bits) at rte_bbdev.h:529:1
no data member changes (12 filtered);Error: ABI issue reported for abidiff --suppr /home-local/jenkins-local/jenkins-agent/workspace/Generic-DPDK-Compile-ABI@2/dpdk/devtools/libabigail.abignore --no-added-syms --headers-dir1 reference/usr/local/include --headers-dir2 build_install/usr/local/include reference/usr/local/lib64/librte_bbdev.so.23.0 build_install/usr/local/lib64/librte_bbdev.so.23.2
ABIDIFF_ABI_CHANGE, this change requires a review (abidiff flagged this as a potential issue).Quoted 1 line
Quoted 6 lines
Quoted 4 lines
To be on the safe side, could you try to dynamically link an application with a DPDK version before this change, then rebuild DPDK with adding these two fields. Then test with at least 2 devices with test-bbdev and see if it does not crash or fail?
This is not something we would validate really. But I agree the chance of that ABI having an actual impact is slim based on the address alignment.
Bbdev is not only about Intel AFAICS.
Quoted 3 lines
Still by process, we can use the abi warning above as a litmus the ABI has some minor change. Also we introduce this change in the new LTS version, so unsure this is controversial or impactful. Let me know if different opinion.
Either we are sure we can waive this warning, e.g. by testing it. Or we cannot, and in this case we have an ABI break.
If we are going to have an ABI break, let's do the right thing now and move ops in a dedicated struct as suggested by Stephen, David and myself.
Maxime
Quoted 26 lines
Thanks
NicQuoted 21 lines
Thanks,
MaximeQuoted 17 lines
Quoted 16 lines
Maxime
Quoted 12 lines
Quoted 11 lines
Maxime
Quoted 2 lines
What do you think Maxime, David? Based on this I can adjust the change for
23.11 and update slightly the deprecation notice accordingly.
Quoted 4 lines
Thanks
Nic
RE: [PATCH v1 1/1] doc: announce change in bbdev api related to operation extension
Hi Maxime, Hermant,
Hermant can I have your view on this topic below.
Quoted 244 lines
-----Original Message-----
From: Maxime Coquelin <[email protected]>Quoted 202 lines · Nicolas
Hi Maxime,
Quoted 200 lines
-----Original Message-----
From: Maxime Coquelin <[email protected]>Quoted 32 lines · Nicolas
Hi Maxime,
Quoted 30 lines
-----Original Message-----
From: Maxime Coquelin <[email protected]> Hi,Quoted 17 lines · Nicolas
Hi Maxime,
Quoted 15 lines
-----Original Message-----
From: Maxime Coquelin <[email protected]>Quoted 10 lines · Nicolas
Hi Maxime, David,
Quoted 8 lines
-----Original Message-----
From: Maxime Coquelin <[email protected]>Quoted 4 lines · Nicolas
Hi David,
Quoted 2 lines
-----Original Message-----
From: David Marchand <[email protected]>> >> OnMon, Jun
Quoted 8 lines
Quoted 8 lines
5,
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
2023 at 10:08 PM Chautru, Nicolas <[email protected]>
Quoted 2 lines · wrote:
Wrt the MLD functions: these are new into the related serie but still the
break the ABI since the struct
rte_bbdevincludes these functions hence causing offset changes.Quoted 1 line
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Review
Quoted 7 lines
Should I then just rephrase as:
(quoted diff) +2
-0+* 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>`.
Quoted 75 lines
Quoted 75 lines
Quoted 41 lines
Quoted 41 lines
Quoted 41 lines
Quoted 41 lines
Quoted 8 lines
Quoted 8 lines
Quoted 4 lines
This
+ will notably introduce + new symbols for ``rte_bbdev_dequeue_mldts_ops``, +``rte_bbdev_enqueue_mldts_ops`` into the stuctrte_bbdev.I don't think we need this deprecation notice.
Quoted 7 lines
Quoted 4 lines
Do you need to expose those new mldts ops in
rte_bbdev? Can't they go todev_ops?
If you can't, at least moving those new ops at the end of the structure would avoid the breakage onrte_bbdev.It would probably be best to move all these ops at the end of the structure
(ie. keep them together).
Quoted 2 lines
In that case the deprecation notice would call out that the
rte_bbdevstructure content is more generally modified. Probably best for the longer run.
Quoted 20 lines
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; };Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
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 theapplication.
Quoted 5 lines
Quoted 5 lines
Quoted 3 lines
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.
Quoted 7 lines
Quoted 7 lines
Quoted 2 lines
I believe moving these function at the end of the structure is a good
compromise to avoid future breakage of
rte_bbdevstructure 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.11really.
Quoted 6 lines
Quoted 3 lines
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.
With the suggested change, this will not break ABI next year. Any future
functions are added at the end of the structure anyway.
I'm not so sure, it depends if adding a new field at the end cross a cacheline boundary or not:
/*
* Global array of all devices. This is not static because it's used by the
* inline enqueue and dequeue functions
*/
structrte_bbdevrte_bbdev_devices[RTE_BBDEV_MAX_DEVS];Quoted 5 lines
Quoted 5 lines
If the older inlined functions used by the application retrieve the dev pointer from the array directly (they do) and added new fields in new version cross a cacheline, then there will be a misalignement between the new lib version and the application using the older inlined
functions.
Quoted 7 lines
Quoted 7 lines
ABI-wise, this is not really future proof.
Quoted 4 lines
Quoted 4 lines
IMHO, moving these ops should be quite trivial and not much work.
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Otherwise, if we just placed the
rte_bbdev_dequeue_mldts_opsandrte_bbdev_enqueue_mldts_opsat the bottom of structrte_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
- structrte_bbdevis cache-aligned, so it may work if adding these two ops do not overlap a cacheline which depends on the CPUarchitecture.
Quoted 9 lines
Quoted 9 lines
Quoted 3 lines
If you prefer to add the only 2 new functions at the end of the structure
that is okay. I believe it would be cleaner to move all these enqueue/dequeue funs down together without drawback I can think of. Let me know.
Adding the new ones at the end is not future proof, but at least it does not break ABI just for cosmetic reasons (that's a big drawback
IMHO).
Quoted 35 lines
Quoted 35 lines
I just checked using pahole:
struct
rte_bbdev{rte_bbdev_enqueue_enc_ops_t enqueue_enc_ops; /* 0 8 */ rte_bbdev_enqueue_dec_ops_t enqueue_dec_ops; /* 8 8 */ rte_bbdev_dequeue_enc_ops_t dequeue_enc_ops; /* 16 8 */ rte_bbdev_dequeue_dec_ops_t dequeue_dec_ops; /* 24 8 */
rte_bbdev_enqueue_enc_ops_tenqueue_ldpc_enc_ops; /* 32 8
*/
rte_bbdev_enqueue_dec_ops_tenqueue_ldpc_dec_ops; /* 40 8
*/
rte_bbdev_dequeue_enc_ops_tdequeue_ldpc_enc_ops; /* 48 8
*/
rte_bbdev_dequeue_dec_ops_tdequeue_ldpc_dec_ops; /* 56 8
*/
/* --- cacheline 1 boundary (64 bytes) --- */
rte_bbdev_enqueue_fft_ops_tenqueue_fft_ops; /* 64 8 */
rte_bbdev_dequeue_fft_ops_tdequeue_fft_ops; /* 72 8 */
const structrte_bbdev_ops*dev_ops; /* 80 8 */
structrte_bbdev_data* data; /* 88 8 */
enumrte_bbdev_statestate; /* 96 4 *//* XXX 4 bytes hole, try to pack */
struct
rte_device* device; /* 104 8 */
structrte_bbdev_cb_listlist_cbs; /* 112 16 */
/* --- cacheline 2 boundary (128 bytes) --- */
structrte_intr_handle*intr_handle; /* 128 8 *//* size: 192, cachelines: 3, members: 16 */ /* sum members: 132, holes: 1, sum holes: 4 */ /* padding: 56 */
} __attribute__((__aligned__(64)));Quoted 7 lines
Quoted 5 lines
We're lucky on x86, we still have 56 bytes, so we can add 7 new ops at the end before breaking the ABI if I'm not mistaken.
I checked the other architecture, and it seems we don't support any with 32B cacheline size so we're good for a while.
OK then just adding the new functions at the end, no other cosmetic
changes. Will update the patch to match this.
Quoted 7 lines
In term of deprecation notice, you are okay with latest draft?
+* 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``Quoted 7 lines
Quoted 5 lines
into the stuct
rte_bbdev.This is not needed in the deprecation notice.
If you are willing to announce it, it could be part of the Intel roadmap.I still see this abi failure as we extend the struct (see below), what is the harm
in calling it out in the deprecation notice?
Quoted 4 lines
1 function with some indirect sub-type change:
[C] 'function rte_bbdev*
rte_bbdev_allocate(const char*)' atrte_bbdev.c:174:1 has some indirect sub-type changes:
Quoted 5 lines
return type changed:
in pointed to type 'structrte_bbdev' at rte_bbdev.h:498:1:
type size hasn't changed
2 data member insertions:
'rte_bbdev_enqueue_mldts_ops_tenqueue_mldts_ops', at offset 1088(in bits) at rte_bbdev.h:527:1
Quoted 1 line
'
rte_bbdev_dequeue_mldts_ops_tdequeue_mldts_ops', at offset 1152(in bits) at rte_bbdev.h:529:1
Quoted 10 lines
no data member changes (12 filtered);Error: ABI issue reported for abidiff --suppr /home-local/jenkins-local/jenkins-agent/workspace/Generic-DPDK-Compile -ABI@2/dpdk/devtools/libabigail.abignore --no-added-syms --headers-dir1 reference/usr/local/include --headers-dir2 build_install/usr/local/include reference/usr/local/lib64/librte_bbdev.so.23.0 build_install/usr/local/lib64/librte_bbdev.so.23.2
ABIDIFF_ABI_CHANGE, this change requires a review (abidiff flagged this as apotential issue).
Quoted 7 lines
Quoted 6 lines
To be on the safe side, could you try to dynamically link an application with a DPDK version before this change, then rebuild DPDK with adding these two fields. Then test with at least 2 devices with test-bbdev and see if it does not crash or fail?
Quoted 4 lines
Quoted 1 line
This is not something we would validate really. But I agree the chance of that
ABI having an actual impact is slim based on the address alignment.
Bbdev is not only about Intel AFAICS.
Agreed 100% but I have no way to validate on non-Intel architecture or using non-Intel HW. All I can guarantee is that this would be fine on Intel environment based on the warning below. Hemant, can you share your view on this? Any concern on the bbdev extension for the new operation (this is similar addition to the FFT one done in 22.11) in your architecture? Thanks
Nic
Quoted 40 lines
Quoted 2 lines
Still by process, we can use the abi warning above as a litmus the ABI has some
minor change.
Quoted 1 line
Also we introduce this change in the new LTS version, so unsure this is
controversial or impactful.
Quoted 1 line
Let me know if different opinion.
Either we are sure we can waive this warning, e.g. by testing it.
Or we cannot, and in this case we have an ABI break.
If we are going to have an ABI break, let's do the right thing now and move ops in a dedicated struct as suggested by Stephen, David and myself.Maxime
Quoted 26 lines
Thanks
NicQuoted 21 lines
Thanks,
MaximeQuoted 17 lines
Quoted 16 lines
Maxime
Quoted 12 lines
Quoted 11 lines
Maxime
Quoted 2 lines
What do you think Maxime, David? Based on this I can adjust the change for
23.11 and update slightly the deprecation notice accordingly.
Quoted 4 lines
Thanks
Nic