doc: plan splitting the ethdev ops struct
PATCH 1/1 doc: plan splitting the ethdev ops struct
For the ABI compatibility it is better to hide internal data structures from the application as much as possible. But because of some inline functions 'struct eth_dev_ops' can't be hidden completely.
Plan is to split the 'struct eth_dev_ops' into two as ones used by inline functions and ones not used, and hide the second part that not used by inline functions completely to the application.
---
Cc: David Marchand <[email protected]>
Cc: Thomas Monjalon <[email protected]>
Cc: Andrew Rybchenko <[email protected]>
--- doc/guides/rel_notes/deprecation.rst | 6 ++++++ 1 file changed, 6 insertions(+)
doc/guides/rel_notes/deprecation.rst +6 -0
@@ -72,6 +72,12 @@ Deprecation Notices In 19.11 PMDs will still update the field even when the offload is not enabled. +* ethdev: Split the ``struct eth_dev_ops`` struct to hide it as much as possible. + Currently the ``struct eth_dev_ops`` struct is accessible by the application + because some inline functions, like ``rte_eth_tx_descriptor_status()``, + access the struct directly. The struct will be separate in two, the ops used + by inline functions still will be accessible to user but rest will be hidden. + * cryptodev: support for using IV with all sizes is added, J0 still can be used but only when IV length in following structs ``rte_crypto_auth_xform``, ``rte_crypto_aead_xform`` is set to zero. When IV length is greater or equal
Signature · 1 line
2.24.1
Quoted 8 lines · Ferruh Yigit
For the ABI compatibility it is better to hide internal data structures from the application as much as possible. But because of some inline functions 'struct
eth_dev_ops' can't be hidden completely.Plan is to split the 'struct
eth_dev_ops' into two as ones used by inline functions and ones not used, and hide the second part that not used by inline functions completely to the application.
It is a good improvement. IMO, If anything used in fast-path it should be in ``struct rte_eth_dev``
and rest can completely be moved to internal. In this case, if rte_eth_tx_descriptor_status
not used on fastpath, Maybe we don't need to maintain the inline status and move completely
to .c file.
Those may be specifics of the work. In general, this change looks good to me.
Quoted 30 lines
Signed-off-by Ferruh Yigit <[email protected]>---
Cc: David Marchand <[email protected]>
Cc: Thomas Monjalon <[email protected]>
Cc: Andrew Rybchenko <[email protected]>--- doc/guides/rel_notes/deprecation.rst | 6 ++++++ 1 file changed, 6 insertions(+)doc/guides/rel_notes/deprecation.rst +6
-1@@ -72,6 +72,12 @@ Deprecation Notices In 19.11 PMDs will still update the field even when the offload is not enabled. +* ethdev: Split the ``struct eth_dev_ops`` struct to hide it as much as possible. + Currently the ``struct eth_dev_ops`` struct is accessible by the application + because some inline functions, like ``rte_eth_tx_descriptor_status()``, + access the struct directly. The struct will be separate in two, the ops used + by inline functions still will be accessible to user but rest will be hidden. + * cryptodev: support for using IV with all sizes is added, J0 still can be used but only when IV length in following structs ``rte_crypto_auth_xform``, ``rte_crypto_aead_xform`` is set to zero. When IV length is greater or equal --2.24.1
Quoted 10 lines · Jerin Jacob
Quoted 8 lines · Ferruh Yigit
For the ABI compatibility it is better to hide internal data structures from the application as much as possible. But because of some inline functions 'struct
eth_dev_ops' can't be hidden completely.Plan is to split the 'struct
eth_dev_ops' into two as ones used by inline functions and ones not used, and hide the second part that not used by inline functions completely to the application.
Quoted 7 lines
It is a good improvement. IMO, If anything used in fast-path it should be in ``struct rte_eth_dev``
and rest can completely be moved to internal. In this case, ifrte_eth_tx_descriptor_status
not used on fastpath, Maybe we don't need to maintain the inline status and move completely
to .c file.
Moving fast-past dev_ops to ``struct rte_eth_dev`` makes sense, also suggested by Andrew, and will hide the rest.
Those inline dev_ops are datapath related so may be better to keep them as inline, but not really sure about their users and how much they care about minor performance impact if we chose to convert them into regular functions.
Quoted 39 lines
Those may be specifics of the work. In general, this change looks good to me.
Acked-by Jerin Jacob <[email protected]>Quoted 30 lines
Signed-off-by Ferruh Yigit <[email protected]>---
Cc: David Marchand <[email protected]>
Cc: Thomas Monjalon <[email protected]>
Cc: Andrew Rybchenko <[email protected]>--- doc/guides/rel_notes/deprecation.rst | 6 ++++++ 1 file changed, 6 insertions(+)doc/guides/rel_notes/deprecation.rst +6
-1@@ -72,6 +72,12 @@ Deprecation Notices In 19.11 PMDs will still update the field even when the offload is not enabled. +* ethdev: Split the ``struct eth_dev_ops`` struct to hide it as much as possible. + Currently the ``struct eth_dev_ops`` struct is accessible by the application + because some inline functions, like ``rte_eth_tx_descriptor_status()``, + access the struct directly. The struct will be separate in two, the ops used + by inline functions still will be accessible to user but rest will be hidden. + * cryptodev: support for using IV with all sizes is added, J0 still can be used but only when IV length in following structs ``rte_crypto_auth_xform``, ``rte_crypto_aead_xform`` is set to zero. When IV length is greater or equal --2.24.1
18/02/2020 06:07, Jerin Jacob:
Quoted 18 lines · Ferruh Yigit
Quoted 8 lines
For the ABI compatibility it is better to hide internal data structures from the application as much as possible. But because of some inline functions 'struct
eth_dev_ops' can't be hidden completely.Plan is to split the 'struct
eth_dev_ops' into two as ones used by inline functions and ones not used, and hide the second part that not used by inline functions completely to the application.It is a good improvement. IMO, If anything used in fast-path it should be in ``struct rte_eth_dev``
and rest can completely be moved to internal. In this case, ifrte_eth_tx_descriptor_status
not used on fastpath, Maybe we don't need to maintain the inline status and move completely
to .c file.
Quoted 3 lines
Those may be specifics of the work. In general, this change looks good to me.
Acked-by Jerin Jacob <[email protected]>
This ack is missing from v3.
Jerin, please could you confirm on v3?
Quoted 24 lines · On Mon, 17 Feb 2020 15:38:05 +0000 Ferruh Yigit <[email protected]> wrote:
For the ABI compatibility it is better to hide internal data structures from the application as much as possible. But because of some inline functions 'struct
eth_dev_ops' can't be hidden completely.Plan is to split the 'struct
eth_dev_ops' into two as ones used by inline functions and ones not used, and hide the second part that not used by inline functions completely to the application.Signed-off-by Ferruh Yigit <[email protected]>---
Cc: David Marchand <[email protected]>
Cc: Thomas Monjalon <[email protected]>
Cc: Andrew Rybchenko <[email protected]>--- doc/guides/rel_notes/deprecation.rst | 6 ++++++ 1 file changed, 6 insertions(+)doc/guides/rel_notes/deprecation.rst +0
-0@@ -72,6 +72,12 @@ Deprecation Notices In 19.11 PMDs will still update the field even when the offload is not enabled.
doc/guides/rel_notes/deprecation.rst Deprecation Notices · line 83
Quoted 10 lines
doc/guides/rel_notes/deprecation.rst +6
-0+* ethdev: Split the ``struct eth_dev_ops`` struct to hide it as much as possible. + Currently the ``struct eth_dev_ops`` struct is accessible by the application + because some inline functions, like ``rte_eth_tx_descriptor_status()``, + access the struct directly. The struct will be separate in two, the ops used + by inline functions still will be accessible to user but rest will be hidden. + * cryptodev: support for using IV with all sizes is added, J0 still can be used but only when IV length in following structs ``rte_crypto_auth_xform``, ``rte_crypto_aead_xform`` is set to zero. When IV length is greater or equal
Good luck, truely hiding internals is hard. The mbuf structure is already split but not really hidden at all (just look at dwarf output). It doesn't make sense to do it unless you can really hide it.
I would attack the rte_device stuff first. Make rte_device opaque to the application that would help for future versions. Then work backwards to rte_tehtdev.
Quoted 28 lines · Stephen Hemminger
Quoted 25 lines · On Mon, 17 Feb 2020 15:38:05 +0000 Ferruh Yigit <[email protected]> wrote:
For the ABI compatibility it is better to hide internal data structures from the application as much as possible. But because of some inline functions 'struct
eth_dev_ops' can't be hidden completely.Plan is to split the 'struct
eth_dev_ops' into two as ones used by inline functions and ones not used, and hide the second part that not used by inline functions completely to the application.Signed-off-by Ferruh Yigit <[email protected]>---
Cc: David Marchand <[email protected]>
Cc: Thomas Monjalon <[email protected]>
Cc: Andrew Rybchenko <[email protected]>--- doc/guides/rel_notes/deprecation.rst | 6 ++++++ 1 file changed, 6 insertions(+)doc/guides/rel_notes/deprecation.rst +0
-0@@ -72,6 +72,12 @@ Deprecation Notices In 19.11 PMDs will still update the field even when the offload is not enabled.
Quoted 13 lines
doc/guides/rel_notes/deprecation.rst Deprecation Notices · line 83
Quoted 9 lines
doc/guides/rel_notes/deprecation.rst +6
-0+* ethdev: Split the ``struct eth_dev_ops`` struct to hide it as much as possible. + Currently the ``struct eth_dev_ops`` struct is accessible by the application + because some inline functions, like ``rte_eth_tx_descriptor_status()``, + access the struct directly. The struct will be separate in two, the ops used + by inline functions still will be accessible to user but rest will be hidden. + * cryptodev: support for using IV with all sizes is added, J0 still can be used but only when IV length in following structs ``rte_crypto_auth_xform``, ``rte_crypto_aead_xform`` is set to zero. When IV length is greater or equalGood luck, truely hiding internals is hard. The mbuf structure is already split but not really hidden at all (just look at dwarf output). It doesn't make sense to do it unless you can really hide it.
I believe this can be done, only following [1] dev_ops are used by inline functions, rest can be moved into separate struct and moved into ethdev driver looking header.
[1]rx_queue_countrx_descriptor_donerx_descriptor_statustx_descriptor_status
Quoted 4 lines
I would attack the
rte_devicestuff first. Makerte_deviceopaque to the application that would help for future versions. Then work backwards torte_tehtdev.
Quoted 47 lines · Ferruh Yigit
Quoted 28 lines · Stephen Hemminger
Quoted 25 lines · On Mon, 17 Feb 2020 15:38:05 +0000 Ferruh Yigit <[email protected]> wrote:
For the ABI compatibility it is better to hide internal data structures from the application as much as possible. But because of some inline functions 'struct
eth_dev_ops' can't be hidden completely.Plan is to split the 'struct
eth_dev_ops' into two as ones used by inline functions and ones not used, and hide the second part that not used by inline functions completely to the application.Signed-off-by Ferruh Yigit <[email protected]>---
Cc: David Marchand <[email protected]>
Cc: Thomas Monjalon <[email protected]>
Cc: Andrew Rybchenko <[email protected]>--- doc/guides/rel_notes/deprecation.rst | 6 ++++++ 1 file changed, 6 insertions(+)doc/guides/rel_notes/deprecation.rst +0
-0@@ -72,6 +72,12 @@ Deprecation Notices In 19.11 PMDs will still update the field even when the offload is not enabled.Quoted 13 lines
doc/guides/rel_notes/deprecation.rst Deprecation Notices · line 83
Quoted 9 lines
doc/guides/rel_notes/deprecation.rst +6
-0+* ethdev: Split the ``struct eth_dev_ops`` struct to hide it as much as possible. + Currently the ``struct eth_dev_ops`` struct is accessible by the application + because some inline functions, like ``rte_eth_tx_descriptor_status()``, + access the struct directly. The struct will be separate in two, the ops used + by inline functions still will be accessible to user but rest will be hidden. + * cryptodev: support for using IV with all sizes is added, J0 still can be used but only when IV length in following structs ``rte_crypto_auth_xform``, ``rte_crypto_aead_xform`` is set to zero. When IV length is greater or equalGood luck, truely hiding internals is hard. The mbuf structure is already split but not really hidden at all (just look at dwarf output). It doesn't make sense to do it unless you can really hide it.
I believe this can be done, only following [1]
dev_opsare used by inline functions, rest can be moved into separate struct and moved into ethdev driver looking header.
Quoted 5 lines
[1]
rx_queue_countrx_descriptor_donerx_descriptor_statustx_descriptor_status
I think having 3 places (if I understand the intention correctly) with ethdev callbacks is too much. So, I think that these ops should be simply moved to nearby Tx/Rx burst and Tx prepare callbacks (e.g. move into inline_ops structure which is located at the beginning of rte_eth_dev in order to preserve 3 existing callback location).
Also I'd consider to deprecate and remove rx_queue_count and rx_descriptor_done.
Quoted 4 lines
Quoted 4 lines
I would attack the
rte_devicestuff first. Makerte_deviceopaque to the application that would help for future versions. Then work backwards torte_tehtdev.
Hi Andew,
Quoted 54 lines · Ferruh Yigit
Quoted 47 lines · Stephen Hemminger
Quoted 28 lines
Quoted 25 lines · On Mon, 17 Feb 2020 15:38:05 +0000 Ferruh Yigit <[email protected]> wrote:
For the ABI compatibility it is better to hide internal data structures from the application as much as possible. But because of some inline functions 'struct
eth_dev_ops' can't be hidden completely.Plan is to split the 'struct
eth_dev_ops' into two as ones used by inline functions and ones not used, and hide the second part that not used by inline functions completely to the application.Signed-off-by Ferruh Yigit <[email protected]>---
Cc: David Marchand <[email protected]>
Cc: Thomas Monjalon <[email protected]>
Cc: Andrew Rybchenko <[email protected]>--- doc/guides/rel_notes/deprecation.rst | 6 ++++++ 1 file changed, 6 insertions(+)doc/guides/rel_notes/deprecation.rst +0
-0@@ -72,6 +72,12 @@ Deprecation Notices In 19.11 PMDs will still update the field even when the offload is not enabled.Quoted 13 lines
doc/guides/rel_notes/deprecation.rst Deprecation Notices · line 83
Quoted 9 lines
doc/guides/rel_notes/deprecation.rst +6
-0+* ethdev: Split the ``struct eth_dev_ops`` struct to hide it as much as possible. + Currently the ``struct eth_dev_ops`` struct is accessible by the application + because some inline functions, like ``rte_eth_tx_descriptor_status()``, + access the struct directly. The struct will be separate in two, the ops used + by inline functions still will be accessible to user but rest will be hidden. + * cryptodev: support for using IV with all sizes is added, J0 still can be used but only when IV length in following structs ``rte_crypto_auth_xform``, ``rte_crypto_aead_xform`` is set to zero. When IV length is greater or equalGood luck, truely hiding internals is hard. The mbuf structure is already split but not really hidden at all (just look at dwarf output). It doesn't make sense to do it unless you can really hide it.
I believe this can be done, only following [1]
dev_opsare used by inline functions, rest can be moved into separate struct and moved into ethdev driver looking header.Quoted 5 lines
[1]
rx_queue_countrx_descriptor_donerx_descriptor_statustx_descriptor_status
Quoted 6 lines
I think having 3 places (if I understand the intention correctly) with ethdev callbacks is too much. So, I think that these ops should be simply moved to nearby Tx/Rx burst and Tx prepare callbacks (e.g. move into
inline_opsstructure which is located at the beginning ofrte_eth_devin order to preserve 3 existing callback location).
If you are going to change ABI anyway, would it be worth to consider moving rx/tx burst/prepare functions to be per queue, instead of per device?
Quoted 8 lines
Also I'd consider to deprecate and remove
rx_queue_countandrx_descriptor_done.Quoted 4 lines
Quoted 4 lines
I would attack the
rte_devicestuff first. Makerte_deviceopaque to the application that would help for future versions. Then work backwards torte_tehtdev.
Hi Konstantin,
Quoted 59 lines · Konstantin
Hi Andew,
Quoted 51 lines · Ferruh Yigit
Quoted 45 lines · Stephen Hemminger
Quoted 28 lines
Quoted 25 lines · On Mon, 17 Feb 2020 15:38:05 +0000 Ferruh Yigit <[email protected]> wrote:
For the ABI compatibility it is better to hide internal data structures from the application as much as possible. But because of some inline functions 'struct
eth_dev_ops' can't be hidden completely.Plan is to split the 'struct
eth_dev_ops' into two as ones used by inline functions and ones not used, and hide the second part that not used by inline functions completely to the application.Signed-off-by Ferruh Yigit <[email protected]>---
Cc: David Marchand <[email protected]>
Cc: Thomas Monjalon <[email protected]>
Cc: Andrew Rybchenko <[email protected]>--- doc/guides/rel_notes/deprecation.rst | 6 ++++++ 1 file changed, 6 insertions(+)doc/guides/rel_notes/deprecation.rst +0
-0@@ -72,6 +72,12 @@ Deprecation Notices In 19.11 PMDs will still update the field even when the offload is not enabled.Quoted 12 lines
doc/guides/rel_notes/deprecation.rst Deprecation Notices · line 83
Quoted 9 lines
doc/guides/rel_notes/deprecation.rst +6
-0+* ethdev: Split the ``struct eth_dev_ops`` struct to hide it as much as possible. + Currently the ``struct eth_dev_ops`` struct is accessible by the application + because some inline functions, like ``rte_eth_tx_descriptor_status()``, + access the struct directly. The struct will be separate in two, the ops used + by inline functions still will be accessible to user but rest will be hidden. + * cryptodev: support for using IV with all sizes is added, J0 still can be used but only when IV length in following structs ``rte_crypto_auth_xform``, ``rte_crypto_aead_xform`` is set to zero. When IV length is greater or equalGood luck, truely hiding internals is hard. The mbuf structure is already split but not really hidden at all (just look at dwarf output). It doesn't make sense to do it unless you can really hide it.
I believe this can be done, only following [1]
dev_opsare used by inline functions, rest can be moved into separate struct and moved into ethdev driver looking header.Quoted 5 lines
[1]
rx_queue_countrx_descriptor_donerx_descriptor_statustx_descriptor_statusQuoted 6 lines
I think having 3 places (if I understand the intention correctly) with ethdev callbacks is too much. So, I think that these ops should be simply moved to nearby Tx/Rx burst and Tx prepare callbacks (e.g. move into
inline_opsstructure which is located at the beginning ofrte_eth_devin order to preserve 3 existing callback location).
Quoted 3 lines
If you are going to change ABI anyway, would it be worth to consider moving rx/tx burst/prepare functions to be per queue, instead of per device?
I'm thinking about it from time to time. In general I like the idea. The only question I have if there is a demand for queues with different offloads which could result in different Rx/Tx callbacks. Also I'm not sure that it is doable without performance degradation at all, but hopefully it will be tiny.
Quoted 6 lines
Quoted 6 lines
Also I'd consider to deprecate and remove
rx_queue_countandrx_descriptor_done.Quoted 3 lines
Quoted 3 lines
I would attack the
rte_devicestuff first. Makerte_deviceopaque to the application that would help for future versions. Then work backwards torte_tehtdev.
Quoted 48 lines · Andrew Rybchenko
Quoted 47 lines · Ferruh Yigit
Quoted 28 lines · Stephen Hemminger
Quoted 25 lines · On Mon, 17 Feb 2020 15:38:05 +0000 Ferruh Yigit <[email protected]> wrote:
For the ABI compatibility it is better to hide internal data structures from the application as much as possible. But because of some inline functions 'struct
eth_dev_ops' can't be hidden completely.Plan is to split the 'struct
eth_dev_ops' into two as ones used by inline functions and ones not used, and hide the second part that not used by inline functions completely to the application.Signed-off-by Ferruh Yigit <[email protected]>---
Cc: David Marchand <[email protected]>
Cc: Thomas Monjalon <[email protected]>
Cc: Andrew Rybchenko <[email protected]>--- doc/guides/rel_notes/deprecation.rst | 6 ++++++ 1 file changed, 6 insertions(+)doc/guides/rel_notes/deprecation.rst +0
-0@@ -72,6 +72,12 @@ Deprecation Notices In 19.11 PMDs will still update the field even when the offload is not enabled.Quoted 13 lines
doc/guides/rel_notes/deprecation.rst Deprecation Notices · line 83
Quoted 9 lines
doc/guides/rel_notes/deprecation.rst +6
-0+* ethdev: Split the ``struct eth_dev_ops`` struct to hide it as much as possible. + Currently the ``struct eth_dev_ops`` struct is accessible by the application + because some inline functions, like ``rte_eth_tx_descriptor_status()``, + access the struct directly. The struct will be separate in two, the ops used + by inline functions still will be accessible to user but rest will be hidden. + * cryptodev: support for using IV with all sizes is added, J0 still can be used but only when IV length in following structs ``rte_crypto_auth_xform``, ``rte_crypto_aead_xform`` is set to zero. When IV length is greater or equalGood luck, truely hiding internals is hard. The mbuf structure is already split but not really hidden at all (just look at dwarf output). It doesn't make sense to do it unless you can really hide it.
I believe this can be done, only following [1]
dev_opsare used by inline functions, rest can be moved into separate struct and moved into ethdev driver looking header.
Quoted 8 lines
Quoted 5 lines
[1]
rx_queue_countrx_descriptor_donerx_descriptor_statustx_descriptor_statusI think having 3 places (if I understand the intention correctly) with ethdev callbacks is too much.
Yes, this is the intention.
Quoted 5 lines
So, I think
that these ops should be simply moved to nearby Tx/Rx burst and Tx prepare callbacks (e.g. move intoinline_opsstructure which is located at the beginning ofrte_eth_devin order to preserve 3 existing callback location).
I think this is reasonable, but this can be done only in 20.11 with ABI break.
What do you think doing the initial hide in 20.05 with three places and do proper splitting in 20.11 as suggested above.
Or it is possible to drop the interim work and do the all changes in 20.11, not sure.
Quoted 3 lines
Also I'd consider to deprecate and remove
rx_queue_countandrx_descriptor_done.
+1 to deprecate the 'rx_descriptor_done', we have already 'rx_descriptor_status' & 'tx_descriptor_status' to replace the functionality.
@Thomas, @Ray, can you please remind how deprecation was done, is it marking API, 'rte_eth_rx_descriptor_done', as deprecated in 20.11 and removing it in 21.11? If so I guess deprecation notice should be send before 20.11? (And make sure all PMDs did the switch before 20.11)
Not sure about 'rx_queue_count', if any application may need it or not.
Quoted 6 lines
Quoted 5 lines
Quoted 5 lines
I would attack the
rte_devicestuff first. Makerte_deviceopaque to the application that would help for future versions. Then work backwards torte_tehtdev.
PATCH v2 1/1 doc: plan splitting the ethdev ops struct
In reply to Ferruh YigitFor the ABI compatibility it is better to hide internal data structures from the application as much as possible. But because of some inline functions 'struct eth_dev_ops' can't be hidden completely.
Plan is to split the 'struct eth_dev_ops' into two as ones used by inline functions and ones not used, and hide the second part that not used by inline functions completely to the application.
---
Cc: David Marchand <[email protected]>
Cc: Thomas Monjalon <[email protected]>
Cc: Andrew Rybchenko <[email protected]>
v2:
* Add target date for the work
* Give more detail on what will be done
--- doc/guides/rel_notes/deprecation.rst | 11 +++++++++++ 1 file changed, 11 insertions(+)
doc/guides/rel_notes/deprecation.rst +11 -0
@@ -86,6 +86,17 @@ Deprecation Notices In 19.11 PMDs will still update the field even when the offload is not enabled. +* ethdev: Split the ``struct eth_dev_ops`` struct to hide it as much as possible. + Currently the ``struct eth_dev_ops`` struct is accessible by the application + because some inline functions, like ``rte_eth_tx_descriptor_status()``, + access the struct directly. The struct will be separate in two, the ops used + by inline functions still will be accessible to user but rest will be hidden. + Initial split will be done in 20.05 with adding reserved fields for the struct + used by inline functions, and by putting new struct reference into public one + to not increase the size of ``struct rte_eth_dev``, proper split will be done + in 20.11 by moving inline dev_ops function to next to Rx/Tx burst functions and + hiding rest. + * cryptodev: support for using IV with all sizes is added, J0 still can be used but only when IV length in following structs ``rte_crypto_auth_xform``, ``rte_crypto_aead_xform`` is set to zero. When IV length is greater or equal
Signature · 1 line
2.24.1
Quoted 34 lines · Ferruh Yigit
For the ABI compatibility it is better to hide internal data structures from the application as much as possible. But because of some inline functions 'struct
eth_dev_ops' can't be hidden completely.Plan is to split the 'struct
eth_dev_ops' into two as ones used by inline functions and ones not used, and hide the second part that not used by inline functions completely to the application.Signed-off-by Ferruh Yigit <[email protected]>Acked-by Jerin Jacob <[email protected]>---
Cc: David Marchand <[email protected]>
Cc: Thomas Monjalon <[email protected]>
Cc: Andrew Rybchenko <[email protected]>v2:
* Add target date for the work
* Give more detail on what will be done--- doc/guides/rel_notes/deprecation.rst | 11 +++++++++++ 1 file changed, 11 insertions(+)doc/guides/rel_notes/deprecation.rst +4
-0@@ -86,6 +86,17 @@ Deprecation Notices In 19.11 PMDs will still update the field even when the offload is not enabled. +* ethdev: Split the ``struct eth_dev_ops`` struct to hide it as much as possible. + Currently the ``struct eth_dev_ops`` struct is accessible by the application + because some inline functions, like ``rte_eth_tx_descriptor_status()``, + access the struct directly. The struct will be separate in two, the ops used
doc/guides/rel_notes/deprecation.rst Deprecation Notices · line 102
Quoted 10 lines
doc/guides/rel_notes/deprecation.rst +7
-0+ by inline functions still will be accessible to user but rest will be hidden. + Initial split will be done in 20.05 with adding reserved fields for the struct + used by inline functions, and by putting new struct reference into public one + to not increase the size of ``struct rte_eth_dev``, proper split will be done + in 20.11 by moving inline dev_ops function to next to Rx/Tx burst functions and + hiding rest. + * cryptodev: support for using IV with all sizes is added, J0 still can be used but only when IV length in following structs ``rte_crypto_auth_xform``, ``rte_crypto_aead_xform`` is set to zero. When IV length is greater or equal
I'd like to understand why do we need an intermediate solution first. Also rereading above few times I've failed to fully understand what will be done and why it does not break API/ABI.
Quoted 31 lines · Andrew Rybchenko
Quoted 30 lines · Ferruh Yigit
For the ABI compatibility it is better to hide internal data structures from the application as much as possible. But because of some inline functions 'struct
eth_dev_ops' can't be hidden completely.Plan is to split the 'struct
eth_dev_ops' into two as ones used by inline functions and ones not used, and hide the second part that not used by inline functions completely to the application.Signed-off-by Ferruh Yigit <[email protected]>Acked-by Jerin Jacob <[email protected]>---
Cc: David Marchand <[email protected]>
Cc: Thomas Monjalon <[email protected]>
Cc: Andrew Rybchenko <[email protected]>v2:
* Add target date for the work
* Give more detail on what will be done--- doc/guides/rel_notes/deprecation.rst | 11 +++++++++++ 1 file changed, 11 insertions(+)doc/guides/rel_notes/deprecation.rst +0
-0@@ -86,6 +86,17 @@ Deprecation Notices In 19.11 PMDs will still update the field even when the offload is not enabled.
Quoted 16 lines
Quoted 4 lines
doc/guides/rel_notes/deprecation.rst +4
-0+* ethdev: Split the ``struct eth_dev_ops`` struct to hide it as much as possible. + Currently the ``struct eth_dev_ops`` struct is accessible by the application + because some inline functions, like ``rte_eth_tx_descriptor_status()``, + access the struct directly. The struct will be separate in two, the ops useddoc/guides/rel_notes/deprecation.rst Deprecation Notices · line 102
Quoted 10 lines
doc/guides/rel_notes/deprecation.rst +7
-0+ by inline functions still will be accessible to user but rest will be hidden. + Initial split will be done in 20.05 with adding reserved fields for the struct + used by inline functions, and by putting new struct reference into public one + to not increase the size of ``struct rte_eth_dev``, proper split will be done + in 20.11 by moving inline dev_ops function to next to Rx/Tx burst functions and + hiding rest. + * cryptodev: support for using IV with all sizes is added, J0 still can be used but only when IV length in following structs ``rte_crypto_auth_xform``, ``rte_crypto_aead_xform`` is set to zero. When IV length is greater or equalI'd like to understand why do we need an intermediate solution first.
We don't need it really, we may prefer to postpone the update to 20.11.
Quoted 3 lines
Also rereading above few times I've failed to fully understand what will be done and why it does not break API/ABI.
Agree it wasn't very clear, but I mean something like below, I hope it clarifies:
Previously:
struct rte_eth_dev
+--------+
| | *dev_ops struct eth_dev_ops
| |
| +-------------->+--------+
| | | |
| | | |
| | | |
| | | |
+--------+ | |
| |
| |
| |
+--------+Proposed:
struct rte_eth_dev
+--------+
| | struct eth_dev_ops
| |
|*dev_ops+-------------->+--------+
| | | |
| | | Reserv |
| | | |
| | | |
+--------+ | |
+--------+
| inline |
| de^_ops| struct eth_dev_ops
+--------+
| *priv +------------->+--------+
+--------+ | |
| |
| |
| |
| |
| |
| |
| |
+--------+This is only to keep ABI compatibility [1] while separating the struct.
[1]
- The offset of some functions in the dev_ops struct should be same
- The size of the "struct rte_eth_dev" should be same
Quoted 104 lines · Ferruh Yigit
Quoted 31 lines · Andrew Rybchenko
Quoted 30 lines · Ferruh Yigit
For the ABI compatibility it is better to hide internal data structures from the application as much as possible. But because of some inline functions 'struct
eth_dev_ops' can't be hidden completely.Plan is to split the 'struct
eth_dev_ops' into two as ones used by inline functions and ones not used, and hide the second part that not used by inline functions completely to the application.Signed-off-by Ferruh Yigit <[email protected]>Acked-by Jerin Jacob <[email protected]>---
Cc: David Marchand <[email protected]>
Cc: Thomas Monjalon <[email protected]>
Cc: Andrew Rybchenko <[email protected]>v2:
* Add target date for the work
* Give more detail on what will be done--- doc/guides/rel_notes/deprecation.rst | 11 +++++++++++ 1 file changed, 11 insertions(+)doc/guides/rel_notes/deprecation.rst +0
-0@@ -86,6 +86,17 @@ Deprecation Notices In 19.11 PMDs will still update the field even when the offload is not enabled.Quoted 16 lines
Quoted 4 lines
doc/guides/rel_notes/deprecation.rst +4
-0+* ethdev: Split the ``struct eth_dev_ops`` struct to hide it as much as possible. + Currently the ``struct eth_dev_ops`` struct is accessible by the application + because some inline functions, like ``rte_eth_tx_descriptor_status()``, + access the struct directly. The struct will be separate in two, the ops useddoc/guides/rel_notes/deprecation.rst Deprecation Notices · line 102
Quoted 10 lines
doc/guides/rel_notes/deprecation.rst +7
-0+ by inline functions still will be accessible to user but rest will be hidden. + Initial split will be done in 20.05 with adding reserved fields for the struct + used by inline functions, and by putting new struct reference into public one + to not increase the size of ``struct rte_eth_dev``, proper split will be done + in 20.11 by moving inline dev_ops function to next to Rx/Tx burst functions and + hiding rest. + * cryptodev: support for using IV with all sizes is added, J0 still can be used but only when IV length in following structs ``rte_crypto_auth_xform``, ``rte_crypto_aead_xform`` is set to zero. When IV length is greater or equalI'd like to understand why do we need an intermediate solution first.
We don't need it really, we may prefer to postpone the update to 20.11.
Quoted 3 lines
Also rereading above few times I've failed to fully understand what will be done and why it does not break API/ABI.
Agree it wasn't very clear, but I mean something like below, I hope it clarifies:
Previously:
struct
rte_eth_dev+--------+ | | *dev_ops struct eth_dev_ops | | | +-------------->+--------+ | | | | | | | | | | | | | | | | +--------+ | | | | | | | | +--------+Proposed:
struct
rte_eth_dev+--------+ | | struct eth_dev_ops | | |*dev_ops+-------------->+--------+ | | | | | | | Reserv | | | | | | | | | +--------+ | | +--------+ | inline | | de^_ops| struct eth_dev_ops +--------+ | *priv +------------->+--------+ +--------+ | | | | | | | | | | | | | | | | +--------+
Quoted 6 lines
This is only to keep ABI compatibility [1] while separating the struct.
[1]
- The offset of some functions in thedev_opsstruct should be same
- The size of the "structrte_eth_dev" should be same
OK, got it. Many thanks for explanations.
Quoted 11 lines · Ferruh Yigit
For the ABI compatibility it is better to hide internal data structures from the application as much as possible. But because of some inline functions 'struct
eth_dev_ops' can't be hidden completely.Plan is to split the 'struct
eth_dev_ops' into two as ones used by inline functions and ones not used, and hide the second part that not used by inline functions completely to the application.Signed-off-by Ferruh Yigit <[email protected]>Acked-by Jerin Jacob <[email protected]>
Sorry, this patch is missing the necessary acks for merging. This change can still be announced for 20.11 in the next releases and the details can be discussed again since a conclusion was not reached.
Thanks.
Signature · 1 line
David Marchand
Quoted 10 lines · David Marchand
Quoted 9 lines · Ferruh Yigit
For the ABI compatibility it is better to hide internal data structures from the application as much as possible. But because of some inline functions 'struct
eth_dev_ops' can't be hidden completely.Plan is to split the 'struct
eth_dev_ops' into two as ones used by inline functions and ones not used, and hide the second part that not used by inline functions completely to the application.
Quoted 8 lines
Quoted 2 lines
Signed-off-by Ferruh Yigit <[email protected]>Acked-by Jerin Jacob <[email protected]>Sorry, this patch is missing the necessary acks for merging. This change can still be announced for 20.11 in the next releases and the details can be discussed again since a conclusion was not reached.
That is OK, we can drop for 20.02, I can send a new version to target the 20.11 change only removing interim change.
PATCH v3 1/1 doc: plan splitting the ethdev ops struct
In reply to Ferruh YigitFor the ABI compatibility it is better to hide internal data structures from the application as much as possible. But because of some inline functions 'struct eth_dev_ops' can't be hidden completely.
Plan is to split the 'struct eth_dev_ops' into two as ones used by inline functions and ones not used, and hide the second part that not used by inline functions completely to the application.
Because of ABI break the work will be done in 20.11
---
Cc: David Marchand <[email protected]>
Cc: Thomas Monjalon <[email protected]>
Cc: Andrew Rybchenko <[email protected]>
v2:
* Add target date for the work
* Give more detail on what will be done
v3:
* Drop the interim implementation, and target 20.11 with ABI break.
--- doc/guides/rel_notes/deprecation.rst | 9 +++++++++ 1 file changed, 9 insertions(+)
doc/guides/rel_notes/deprecation.rst +9 -0
@@ -93,6 +93,15 @@ Deprecation Notices In 19.11 PMDs will still update the field even when the offload is not enabled. +* ethdev: Split the ``struct eth_dev_ops`` struct to hide it as much as possible + will be done in 20.11. + Currently the ``struct eth_dev_ops`` struct is accessible by the application + because some inline functions, like ``rte_eth_tx_descriptor_status()``, + access the struct directly. + The struct will be separate in two, the ops used by inline functions will be moved + next to Rx/Tx burst functions, rest of the ``struct eth_dev_ops`` struct will be + moved to header file for drivers to hide it from applications. + * cryptodev: support for using IV with all sizes is added, J0 still can be used but only when IV length in following structs ``rte_crypto_auth_xform``, ``rte_crypto_aead_xform`` is set to zero. When IV length is greater or equal
Signature · 1 line
2.24.1
04/03/2020 10:57, Ferruh Yigit:
Quoted 12 lines
For the ABI compatibility it is better to hide internal data structures from the application as much as possible. But because of some inline functions 'struct
eth_dev_ops' can't be hidden completely.Plan is to split the 'struct
eth_dev_ops' into two as ones used by inline functions and ones not used, and hide the second part that not used by inline functions completely to the application.Because of ABI break the work will be done in 20.11
Signed-off-by Ferruh Yigit <[email protected]>---
doc/guides/rel_notes/deprecation.rst Deprecation Notices · line 103
Quoted 8 lines
doc/guides/rel_notes/deprecation.rst +8
-0+* ethdev: Split the ``struct eth_dev_ops`` struct to hide it as much as possible + will be done in 20.11. + Currently the ``struct eth_dev_ops`` struct is accessible by the application + because some inline functions, like ``rte_eth_tx_descriptor_status()``, + access the struct directly. + The struct will be separate in two, the ops used by inline functions will be moved + next to Rx/Tx burst functions, rest of the ``struct eth_dev_ops`` struct will be + moved to header file for drivers to hide it from applications.
Andrew Rybchenko
Acked-byQuoted 21 lines · Thomas Monjalon
04/03/2020 10:57, Ferruh Yigit:
Quoted 12 lines
For the ABI compatibility it is better to hide internal data structures from the application as much as possible. But because of some inline functions 'struct
eth_dev_ops' can't be hidden completely.Plan is to split the 'struct
eth_dev_ops' into two as ones used by inline functions and ones not used, and hide the second part that not used by inline functions completely to the application.Because of ABI break the work will be done in 20.11
Signed-off-by Ferruh Yigit <[email protected]>---
doc/guides/rel_notes/deprecation.rst Deprecation Notices · line 103
Quoted 8 lines
doc/guides/rel_notes/deprecation.rst +8
-0+* ethdev: Split the ``struct eth_dev_ops`` struct to hide it as much as possible + will be done in 20.11. + Currently the ``struct eth_dev_ops`` struct is accessible by the application + because some inline functions, like ``rte_eth_tx_descriptor_status()``, + access the struct directly. + The struct will be separate in two, the ops used by inline functions will be moved + next to Rx/Tx burst functions, rest of the ``struct eth_dev_ops`` struct will be + moved to header file for drivers to hide it from applications.
Quoted 1 line
Acked-by Thomas Monjalon <[email protected]>
25/05/2020 11:11, Andrew Rybchenko:
Quoted 22 lines · Thomas Monjalon
Quoted 21 lines
04/03/2020 10:57, Ferruh Yigit:
Quoted 20 lines
For the ABI compatibility it is better to hide internal data structures from the application as much as possible. But because of some inline functions 'struct
eth_dev_ops' can't be hidden completely.Plan is to split the 'struct
eth_dev_ops' into two as ones used by inline functions and ones not used, and hide the second part that not used by inline functions completely to the application.Because of ABI break the work will be done in 20.11
Signed-off-by Ferruh Yigit <[email protected]>---
doc/guides/rel_notes/deprecation.rst +8
-0+* ethdev: Split the ``struct eth_dev_ops`` struct to hide it as much as possible + will be done in 20.11. + Currently the ``struct eth_dev_ops`` struct is accessible by the application + because some inline functions, like ``rte_eth_tx_descriptor_status()``, + access the struct directly. + The struct will be separate in two, the ops used by inline functions will be moved + next to Rx/Tx burst functions, rest of the ``struct eth_dev_ops`` struct will be + moved to header file for drivers to hide it from applications.
Quoted 3 lines
Quoted 1 line
Acked-by Thomas Monjalon <[email protected]>Acked-by Andrew Rybchenko <[email protected]>
Applied, thanks
Quoted 5 lines · Ferruh Yigit
For the ABI compatibility it is better to hide internal data structures from the application as much as possible. But because of some inline functions 'struct
eth_dev_ops' can't be hidden completely.
Quoted 7 lines
Plan is to split the 'struct
eth_dev_ops' into two as ones used by inline functions and ones not used, and hide the second part that not used by inline functions completely to the application.Because of ABI break the work will be done in 20.11
Signed-off-by Ferruh Yigit <[email protected]>
Signature · 1 line
David Marchand