1ced6b2d1SRay Kinsella.. SPDX-License-Identifier: BSD-3-Clause 2fdf7471cSRay Kinsella Copyright 2019 The DPDK contributors 3ced6b2d1SRay Kinsella 4fdf7471cSRay KinsellaABI Policy 5fdf7471cSRay Kinsella========== 6ced6b2d1SRay Kinsella 7ced6b2d1SRay KinsellaDescription 8ced6b2d1SRay Kinsella----------- 9ced6b2d1SRay Kinsella 10fdf7471cSRay KinsellaThis document details the management policy that ensures the long-term stability 11fdf7471cSRay Kinsellaof the DPDK ABI and API. 12ced6b2d1SRay Kinsella 13ced6b2d1SRay KinsellaGeneral Guidelines 14ced6b2d1SRay Kinsella------------------ 15ced6b2d1SRay Kinsella 16fdf7471cSRay Kinsella#. Major ABI versions are declared no more frequently than yearly. Compatibility 173eecaba9SRay Kinsella with the major ABI version is mandatory in subsequent releases until a 183eecaba9SRay Kinsella :ref:`new major ABI version <new_abi_version>` is declared. 19fdf7471cSRay Kinsella#. Major ABI versions are usually but not always declared aligned with a 20fdf7471cSRay Kinsella :ref:`LTS release <stable_lts_releases>`. 21fdf7471cSRay Kinsella#. The ABI version is managed at a project level in DPDK, and is reflected in 22144beafcSRay Kinsella all non-experimental :ref:`library's soname <what_is_soname>`. 23fdf7471cSRay Kinsella#. The ABI should be preserved and not changed lightly. ABI changes must follow 24fdf7471cSRay Kinsella the outlined :ref:`deprecation process <abi_changes>`. 25fdf7471cSRay Kinsella#. The addition of symbols is generally not problematic. The modification of 26144beafcSRay Kinsella symbols is managed with :ref:`ABI Versioning <abi_versioning>`. 27fdf7471cSRay Kinsella#. The removal of symbols is considered an :ref:`ABI breakage <abi_breakages>`, 28fdf7471cSRay Kinsella once approved these will form part of the next ABI version. 2922545454SRay Kinsella#. Libraries or APIs marked as :ref:`experimental <experimental_apis>` 3022545454SRay Kinsella may be changed or removed without prior notice, 3122545454SRay Kinsella as they are not considered part of an ABI version. 3222545454SRay Kinsella The :ref:`experimental <experimental_apis>` status of an API 3322545454SRay Kinsella is not an indefinite state. 34fdf7471cSRay Kinsella#. Updates to the :ref:`minimum hardware requirements <hw_rqmts>`, which drop 35fdf7471cSRay Kinsella support for hardware which was previously supported, should be treated as an 36fdf7471cSRay Kinsella ABI change. 37ced6b2d1SRay Kinsella 38fdf7471cSRay Kinsella.. note:: 39fdf7471cSRay Kinsella 402bfd75a6SRay Kinsella Please note that this policy does not currently apply to the 412bfd75a6SRay Kinsella :doc:`Windows build <../windows_gsg/intro>`. 42fdf7471cSRay Kinsella 43fdf7471cSRay KinsellaWhat is an ABI? 44fdf7471cSRay Kinsella~~~~~~~~~~~~~~~ 45ced6b2d1SRay Kinsella 46ced6b2d1SRay KinsellaAn ABI (Application Binary Interface) is the set of runtime interfaces exposed 47ced6b2d1SRay Kinsellaby a library. It is similar to an API (Application Programming Interface) but 48ced6b2d1SRay Kinsellais the result of compilation. It is also effectively cloned when applications 49ced6b2d1SRay Kinsellalink to dynamic libraries. That is to say when an application is compiled to 50ced6b2d1SRay Kinsellalink against dynamic libraries, it is assumed that the ABI remains constant 51ced6b2d1SRay Kinsellabetween the time the application is compiled/linked, and the time that it runs. 52ced6b2d1SRay KinsellaTherefore, in the case of dynamic linking, it is critical that an ABI is 53ced6b2d1SRay Kinsellapreserved, or (when modified), done in such a way that the application is unable 54ced6b2d1SRay Kinsellato behave improperly or in an unexpected fashion. 55ced6b2d1SRay Kinsella 56fdf7471cSRay Kinsella.. _figure_what_is_an_abi: 57ced6b2d1SRay Kinsella 58fdf7471cSRay Kinsella.. figure:: img/what_is_an_abi.* 59fdf7471cSRay Kinsella 60fdf7471cSRay Kinsella Illustration of DPDK API and ABI. 61fdf7471cSRay Kinsella 62fdf7471cSRay Kinsella 63fdf7471cSRay KinsellaWhat is an ABI version? 64fdf7471cSRay Kinsella~~~~~~~~~~~~~~~~~~~~~~~ 65fdf7471cSRay Kinsella 66fdf7471cSRay KinsellaAn ABI version is an instance of a library's ABI at a specific release. Certain 67fdf7471cSRay Kinsellareleases are considered to be milestone releases, the yearly LTS release for 68fdf7471cSRay Kinsellaexample. The ABI of a milestone release may be declared as a 'major ABI 69fdf7471cSRay Kinsellaversion', where this ABI version is then supported for some number of subsequent 70144beafcSRay Kinsellareleases and is annotated in the library's :ref:`soname<what_is_soname>`. 71fdf7471cSRay Kinsella 72fdf7471cSRay KinsellaABI version support in subsequent releases facilitates application upgrades, by 73fdf7471cSRay Kinsellaenabling applications built against the milestone release to upgrade to 74fdf7471cSRay Kinsellasubsequent releases of a library without a rebuild. 75fdf7471cSRay Kinsella 76144beafcSRay KinsellaMore details on major ABI version can be found in the :ref:`ABI versioning 77144beafcSRay Kinsella<major_abi_versions>` guide. 78ced6b2d1SRay Kinsella 79ced6b2d1SRay KinsellaThe DPDK ABI policy 80fdf7471cSRay Kinsella------------------- 81ced6b2d1SRay Kinsella 82fdf7471cSRay KinsellaA new major ABI version is declared no more frequently than yearly, with 8323b4fd82SRay Kinselladeclarations usually aligning with a LTS release, e.g. ABI 21 for DPDK 20.11. 84fdf7471cSRay KinsellaCompatibility with the major ABI version is then mandatory in subsequent 8523b4fd82SRay Kinsellareleases until the next major ABI version is declared, e.g. ABI 22 for DPDK 8623b4fd82SRay Kinsella21.11. 87ced6b2d1SRay Kinsella 88fdf7471cSRay KinsellaAt the declaration of a major ABI version, major version numbers encoded in 89fdf7471cSRay Kinsellalibraries' sonames are bumped to indicate the new version, with the minor 9023b4fd82SRay Kinsellaversion reset to ``0``. An example would be ``librte_eal.so.21.3`` would become 9123b4fd82SRay Kinsella``librte_eal.so.22.0``. 92ced6b2d1SRay Kinsella 93fdf7471cSRay KinsellaThe ABI may then change multiple times, without warning, between the last major 94fdf7471cSRay KinsellaABI version increment and the HEAD label of the git tree, with the condition 95fdf7471cSRay Kinsellathat ABI compatibility with the major ABI version is preserved and therefore 96fdf7471cSRay Kinsellasonames do not change. 97ced6b2d1SRay Kinsella 98fdf7471cSRay KinsellaMinor versions are incremented to indicate the release of a new ABI compatible 99fdf7471cSRay KinsellaDPDK release, typically the DPDK quarterly releases. An example of this, might 10023b4fd82SRay Kinsellabe that ``librte_eal.so.21.1`` would indicate the first ABI compatible DPDK 10123b4fd82SRay Kinsellarelease, following the declaration of the new major ABI version ``21``. 102fdf7471cSRay Kinsella 103fdf7471cSRay KinsellaAn ABI version is supported in all new releases until the next major ABI version 104fdf7471cSRay Kinsellais declared. When changing the major ABI version, the release notes will detail 105fdf7471cSRay Kinsellaall ABI changes. 106fdf7471cSRay Kinsella 107fdf7471cSRay Kinsella.. _figure_abi_stability_policy: 108fdf7471cSRay Kinsella 109fdf7471cSRay Kinsella.. figure:: img/abi_stability_policy.* 110fdf7471cSRay Kinsella 111fdf7471cSRay Kinsella Mapping of new ABI versions and ABI version compatibility to DPDK 112fdf7471cSRay Kinsella releases. 113fdf7471cSRay Kinsella 114fdf7471cSRay Kinsella.. _abi_changes: 115fdf7471cSRay Kinsella 116fdf7471cSRay KinsellaABI Changes 117fdf7471cSRay Kinsella~~~~~~~~~~~ 118fdf7471cSRay Kinsella 119fdf7471cSRay KinsellaThe ABI may still change after the declaration of a major ABI version, that is 120fdf7471cSRay Kinsellanew APIs may be still added or existing APIs may be modified. 121fdf7471cSRay Kinsella 122fdf7471cSRay Kinsella.. Warning:: 123fdf7471cSRay Kinsella 124fdf7471cSRay Kinsella Note that, this policy details the method by which the ABI may be changed, 125fdf7471cSRay Kinsella with due regard to preserving compatibility and observing deprecation 126fdf7471cSRay Kinsella notices. This process however should not be undertaken lightly, as a general 127fdf7471cSRay Kinsella rule ABI stability is extremely important for downstream consumers of DPDK. 128fdf7471cSRay Kinsella The API should only be changed for significant reasons, such as performance 129fdf7471cSRay Kinsella enhancements. API breakages due to changes such as reorganizing public 130fdf7471cSRay Kinsella structure fields for aesthetic or readability purposes should be avoided. 131fdf7471cSRay Kinsella 132fdf7471cSRay KinsellaThe requirements for changing the ABI are: 133ced6b2d1SRay Kinsella 134ced6b2d1SRay Kinsella#. At least 3 acknowledgments of the need to do so must be made on the 135ced6b2d1SRay Kinsella dpdk.org mailing list. 136ced6b2d1SRay Kinsella 137ced6b2d1SRay Kinsella - The acknowledgment of the maintainer of the component is mandatory, or if 138ced6b2d1SRay Kinsella no maintainer is available for the component, the tree/sub-tree maintainer 139ced6b2d1SRay Kinsella for that component must acknowledge the ABI change instead. 140ced6b2d1SRay Kinsella 141fdf7471cSRay Kinsella - The acknowledgment of three members of the technical board, as delegates 142fdf7471cSRay Kinsella of the `technical board <https://core.dpdk.org/techboard/>`_ acknowledging 143fdf7471cSRay Kinsella the need for the ABI change, is also mandatory. 144fdf7471cSRay Kinsella 145ced6b2d1SRay Kinsella - It is also recommended that acknowledgments from different "areas of 146ced6b2d1SRay Kinsella interest" be sought for each deprecation, for example: from NIC vendors, 147ced6b2d1SRay Kinsella CPU vendors, end-users, etc. 148ced6b2d1SRay Kinsella 149fdf7471cSRay Kinsella#. Backward compatibility with the major ABI version must be maintained through 150144beafcSRay Kinsella :ref:`abi_versioning`, with :ref:`forward-only <forward-only>` compatibility 151fdf7471cSRay Kinsella offered for any ABI changes that are indicated to be part of the next ABI 152fdf7471cSRay Kinsella version. 153ced6b2d1SRay Kinsella 154fdf7471cSRay Kinsella - In situations where backward compatibility is not possible, read the 155fdf7471cSRay Kinsella section on :ref:`abi_breakages`. 156ced6b2d1SRay Kinsella 157fdf7471cSRay Kinsella - No backward or forward compatibility is offered for API changes marked as 158fdf7471cSRay Kinsella ``experimental``, as described in the section on :ref:`Experimental APIs 159fdf7471cSRay Kinsella and Libraries <experimental_apis>`. 160ced6b2d1SRay Kinsella 16105a38d7cSFerruh Yigit - In situations in which an ``experimental`` symbol has been stable for some 16205a38d7cSFerruh Yigit time. When promoting the symbol to become part of the next ABI version, the 16305a38d7cSFerruh Yigit maintainer may choose to provide an alias to the ``experimental`` tag, so 16405a38d7cSFerruh Yigit as not to break consuming applications. 16505a38d7cSFerruh Yigit 166fdf7471cSRay Kinsella#. If a newly proposed API functionally replaces an existing one, when the new 167fdf7471cSRay Kinsella API becomes non-experimental, then the old one is marked with 168fdf7471cSRay Kinsella ``__rte_deprecated``. 169fdf7471cSRay Kinsella 17098afdb15SStephen Coleman - The deprecated API should follow the notification process to be removed, 171fdf7471cSRay Kinsella see :ref:`deprecation_notices`. 172fdf7471cSRay Kinsella 173fdf7471cSRay Kinsella - At the declaration of the next major ABI version, those ABI changes then 174fdf7471cSRay Kinsella become a formal part of the new ABI and the requirement to preserve ABI 175fdf7471cSRay Kinsella compatibility with the last major ABI version is then dropped. 176fdf7471cSRay Kinsella 177fdf7471cSRay Kinsella - The responsibility for removing redundant ABI compatibility code rests 178fdf7471cSRay Kinsella with the original contributor of the ABI changes, failing that, then with 179fdf7471cSRay Kinsella the contributor's company and then finally with the maintainer. 180fdf7471cSRay Kinsella 181fdf7471cSRay Kinsella.. _forward-only: 182fdf7471cSRay Kinsella 183fdf7471cSRay Kinsella.. Note:: 184fdf7471cSRay Kinsella 185fdf7471cSRay Kinsella Note that forward-only compatibility is offered for those changes made 186fdf7471cSRay Kinsella between major ABI versions. As a library's soname can only describe 187fdf7471cSRay Kinsella compatibility with the last major ABI version, until the next major ABI 188fdf7471cSRay Kinsella version is declared, these changes therefore cannot be resolved as a runtime 189fdf7471cSRay Kinsella dependency through the soname. Therefore any application wishing to make use 190fdf7471cSRay Kinsella of these ABI changes can only ensure that its runtime dependencies are met 191fdf7471cSRay Kinsella through Operating System package versioning. 192fdf7471cSRay Kinsella 193fdf7471cSRay Kinsella.. _hw_rqmts: 194fdf7471cSRay Kinsella 195fdf7471cSRay Kinsella.. Note:: 196ced6b2d1SRay Kinsella 197ced6b2d1SRay Kinsella Updates to the minimum hardware requirements, which drop support for hardware 198ced6b2d1SRay Kinsella which was previously supported, should be treated as an ABI change, and 199fdf7471cSRay Kinsella follow the relevant deprecation policy procedures as above: 3 acks, technical 200fdf7471cSRay Kinsella board approval and announcement at least one release in advance. 201fdf7471cSRay Kinsella 202fdf7471cSRay Kinsella.. _abi_breakages: 203fdf7471cSRay Kinsella 204fdf7471cSRay KinsellaABI Breakages 205fdf7471cSRay Kinsella~~~~~~~~~~~~~ 206fdf7471cSRay Kinsella 207fdf7471cSRay KinsellaFor those ABI changes that are too significant to reasonably maintain multiple 208fdf7471cSRay Kinsellasymbol versions, there is an amended process. In these cases, ABIs may be 209fdf7471cSRay Kinsellaupdated without the requirement of backward compatibility being provided. These 210fdf7471cSRay Kinsellachanges must follow the same process :ref:`described above <abi_changes>` as non-breaking 211fdf7471cSRay Kinsellachanges, however with the following additional requirements: 212fdf7471cSRay Kinsella 213fdf7471cSRay Kinsella#. ABI breaking changes (including an alternative map file) can be included with 214fdf7471cSRay Kinsella deprecation notice, in wrapped way by the ``RTE_NEXT_ABI`` option, to provide 215fdf7471cSRay Kinsella more details about oncoming changes. ``RTE_NEXT_ABI`` wrapper will be removed 216fdf7471cSRay Kinsella at the declaration of the next major ABI version. 217fdf7471cSRay Kinsella 218fdf7471cSRay Kinsella#. Once approved, and after the deprecation notice has been observed these 219fdf7471cSRay Kinsella changes will form part of the next declared major ABI version. 220fdf7471cSRay Kinsella 221fdf7471cSRay KinsellaExamples of ABI Changes 222fdf7471cSRay Kinsella~~~~~~~~~~~~~~~~~~~~~~~ 223fdf7471cSRay Kinsella 224fdf7471cSRay KinsellaThe following are examples of allowable ABI changes occurring between 225fdf7471cSRay Kinselladeclarations of major ABI versions. 226fdf7471cSRay Kinsella 22723b4fd82SRay Kinsella* DPDK 20.11 release defines the function ``rte_foo()`` ; ``rte_foo()`` 22823b4fd82SRay Kinsella is part of the major ABI version ``21``. 229fdf7471cSRay Kinsella 23023b4fd82SRay Kinsella* DPDK 21.02 release defines a new function ``rte_foo(uint8_t bar)``. 23123b4fd82SRay Kinsella This is not a problem as long as the symbol ``rte_foo@DPDK_21`` is 232144beafcSRay Kinsella preserved through :ref:`abi_versioning`. 233fdf7471cSRay Kinsella 234fdf7471cSRay Kinsella - The new function may be marked with the ``__rte_experimental`` tag for a 235fdf7471cSRay Kinsella number of releases, as described in the section :ref:`experimental_apis`. 236fdf7471cSRay Kinsella 237ec5c0f80SGaetan Rivet - Once ``rte_foo(uint8_t bar)`` becomes non-experimental, ``rte_foo()`` is 238ec5c0f80SGaetan Rivet declared as ``__rte_deprecated`` and an deprecation notice is provided. 239fdf7471cSRay Kinsella 24023b4fd82SRay Kinsella* DPDK 20.11 is not re-released to include ``rte_foo(uint8_t bar)``, the new 24123b4fd82SRay Kinsella version of ``rte_foo`` only exists from DPDK 21.02 onwards as described in the 242fdf7471cSRay Kinsella :ref:`note on forward-only compatibility<forward-only>`. 243fdf7471cSRay Kinsella 24423b4fd82SRay Kinsella* DPDK 21.02 release defines the experimental function ``__rte_experimental 24523b4fd82SRay Kinsella rte_baz()``. This function may or may not exist in the DPDK 21.05 release. 246fdf7471cSRay Kinsella 247fdf7471cSRay Kinsella* An application ``dPacket`` wishes to use ``rte_foo(uint8_t bar)``, before the 24823b4fd82SRay Kinsella declaration of the DPDK ``22`` major ABI version. The application can only 24923b4fd82SRay Kinsella ensure its runtime dependencies are met by specifying ``DPDK (>= 21.2)`` as 250ec5c0f80SGaetan Rivet an explicit package dependency, as the soname can only indicate the 251fdf7471cSRay Kinsella supported major ABI version. 252fdf7471cSRay Kinsella 25323b4fd82SRay Kinsella* At the release of DPDK 21.11, the function ``rte_foo(uint8_t bar)`` becomes 25423b4fd82SRay Kinsella formally part of then new major ABI version DPDK ``22`` and ``rte_foo()`` may be 255fdf7471cSRay Kinsella removed. 256fdf7471cSRay Kinsella 257fdf7471cSRay Kinsella.. _deprecation_notices: 258ced6b2d1SRay Kinsella 259ced6b2d1SRay KinsellaExamples of Deprecation Notices 260ced6b2d1SRay Kinsella~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 261ced6b2d1SRay Kinsella 262ced6b2d1SRay KinsellaThe following are some examples of ABI deprecation notices which would be 263ced6b2d1SRay Kinsellaadded to the Release Notes: 264ced6b2d1SRay Kinsella 265fdf7471cSRay Kinsella* The Macro ``#RTE_FOO`` is deprecated and will be removed with ABI version 26623b4fd82SRay Kinsella 22, to be replaced with the inline function ``rte_foo()``. 267ced6b2d1SRay Kinsella 268ced6b2d1SRay Kinsella* The function ``rte_mbuf_grok()`` has been updated to include a new parameter 26923b4fd82SRay Kinsella in version 21.2. Backwards compatibility will be maintained for this function 27023b4fd82SRay Kinsella until the release of the new DPDK major ABI version 22, in DPDK version 27123b4fd82SRay Kinsella 21.11. 272ced6b2d1SRay Kinsella 27323b4fd82SRay Kinsella* The members of ``struct rte_foo`` have been reorganized in DPDK 21.02 for 274ced6b2d1SRay Kinsella performance reasons. Existing binary applications will have backwards 27523b4fd82SRay Kinsella compatibility in release 21.02, while newly built binaries will need to 276fdf7471cSRay Kinsella reference the new structure variant ``struct rte_foo2``. Compatibility will be 27723b4fd82SRay Kinsella removed in release 21.11, and all applications will require updating and 278ced6b2d1SRay Kinsella rebuilding to the new structure at that time, which will be renamed to the 279ced6b2d1SRay Kinsella original ``struct rte_foo``. 280ced6b2d1SRay Kinsella 281ced6b2d1SRay Kinsella* Significant ABI changes are planned for the ``librte_dostuff`` library. The 28223b4fd82SRay Kinsella upcoming release 21.02 will not contain these changes, but release 21.11 will, 283ced6b2d1SRay Kinsella and no backwards compatibility is planned due to the extensive nature of 28423b4fd82SRay Kinsella these changes. Binaries using this library built prior to ABI version 22 will 285ced6b2d1SRay Kinsella require updating and recompilation. 286ced6b2d1SRay Kinsella 2873eecaba9SRay Kinsella 2883eecaba9SRay Kinsella.. _new_abi_version: 2893eecaba9SRay Kinsella 2903eecaba9SRay KinsellaNew ABI versions 2913eecaba9SRay Kinsella------------------ 2923eecaba9SRay Kinsella 2933eecaba9SRay KinsellaA new ABI version may be declared aligned with a given release. 2943eecaba9SRay KinsellaThe requirement to preserve compatibility with the previous major ABI version 2953eecaba9SRay Kinsellais then dropped for the duration of this release cycle. 2963eecaba9SRay KinsellaThis is commonly known as the *ABI breakage window*, 2973eecaba9SRay Kinsellaand some amended rules apply during this cycle: 2983eecaba9SRay Kinsella 2993eecaba9SRay Kinsella * The requirement to preserve compatibility with the previous major ABI 3003eecaba9SRay Kinsella version, as described in the section :ref:`abi_changes` does not apply. 3013eecaba9SRay Kinsella * Contributors of compatibility preserving code in previous releases, 3023eecaba9SRay Kinsella are now required to remove this compatibility code, 3033eecaba9SRay Kinsella as described in the section :ref:`abi_changes`. 3043eecaba9SRay Kinsella * Symbol versioning references to the old ABI version are updated 3053eecaba9SRay Kinsella to reference the new ABI version, 3063eecaba9SRay Kinsella as described in the section :ref:`deprecating_entire_abi`. 3073eecaba9SRay Kinsella * Contributors of aliases to experimental in previous releases, 3083eecaba9SRay Kinsella as described in section :ref:`aliasing_experimental_symbols`, 3093eecaba9SRay Kinsella are now required to remove these aliases. 3103eecaba9SRay Kinsella * Finally, the *ABI breakage window* is *not* permission to circumvent 3113eecaba9SRay Kinsella the other aspects of the procedures to make ABI changes 3123eecaba9SRay Kinsella described in :ref:`abi_changes`, that is, 3 ACKs of the requirement 3133eecaba9SRay Kinsella to break the ABI and the observance of a deprecation notice 3143eecaba9SRay Kinsella are still considered mandatory. 3153eecaba9SRay Kinsella 316fdf7471cSRay Kinsella.. _experimental_apis: 317ced6b2d1SRay Kinsella 318fdf7471cSRay KinsellaExperimental 319fdf7471cSRay Kinsella------------ 320ced6b2d1SRay Kinsella 321fdf7471cSRay KinsellaAPIs 322fdf7471cSRay Kinsella~~~~ 323ced6b2d1SRay Kinsella 324fdf7471cSRay KinsellaAPIs marked as ``experimental`` are not considered part of an ABI version and 32574f4d642SDavid Marchandmay be changed or removed without prior notice. Since changes to APIs are most likely 326fdf7471cSRay Kinsellaimmediately after their introduction, as users begin to take advantage of those 327fdf7471cSRay Kinsellanew APIs and start finding issues with them, new DPDK APIs will be automatically 328fdf7471cSRay Kinsellamarked as ``experimental`` to allow for a period of stabilization before they 329fdf7471cSRay Kinsellabecome part of a tracked ABI version. 330ced6b2d1SRay Kinsella 331ced6b2d1SRay KinsellaNote that marking an API as experimental is a multi step process. 332ced6b2d1SRay KinsellaTo mark an API as experimental, the symbols which are desired to be exported 333ced6b2d1SRay Kinsellamust be placed in an EXPERIMENTAL version block in the corresponding libraries' 334ced6b2d1SRay Kinsellaversion map script. 335*1fbb3977SDavid MarchandExperimental symbols must be commented so that it is clear in which DPDK 336*1fbb3977SDavid Marchandversion they were introduced. 337*1fbb3977SDavid Marchand 338*1fbb3977SDavid Marchand.. code-block:: none 339*1fbb3977SDavid Marchand 340*1fbb3977SDavid Marchand EXPERIMENTAL { 341*1fbb3977SDavid Marchand global: 342*1fbb3977SDavid Marchand 343*1fbb3977SDavid Marchand # added in 20.11 344*1fbb3977SDavid Marchand rte_foo_init; 345*1fbb3977SDavid Marchand rte_foo_configure; 346*1fbb3977SDavid Marchand 347*1fbb3977SDavid Marchand # added in 21.02 348*1fbb3977SDavid Marchand rte_foo_cleanup; 349*1fbb3977SDavid Marchand ... 350*1fbb3977SDavid Marchand 351ced6b2d1SRay KinsellaSecondly, the corresponding prototypes of those exported functions (in the 352ced6b2d1SRay Kinselladevelopment header files), must be marked with the ``__rte_experimental`` tag 353ced6b2d1SRay Kinsella(see ``rte_compat.h``). 354ced6b2d1SRay KinsellaThe DPDK build makefiles perform a check to ensure that the map file and the 355ced6b2d1SRay KinsellaC code reflect the same list of symbols. 356ced6b2d1SRay KinsellaThis check can be circumvented by defining ``ALLOW_EXPERIMENTAL_API`` 357ced6b2d1SRay Kinselladuring compilation in the corresponding library Makefile. 358ced6b2d1SRay Kinsella 359ced6b2d1SRay KinsellaIn addition to tagging the code with ``__rte_experimental``, 360ced6b2d1SRay Kinsellathe doxygen markup must also contain the EXPERIMENTAL string, 361ced6b2d1SRay Kinsellaand the MAINTAINERS file should note the EXPERIMENTAL libraries. 362ced6b2d1SRay Kinsella 363fdf7471cSRay KinsellaFor removing the experimental tag associated with an API, deprecation notice is 364fdf7471cSRay Kinsellanot required. Though, an API should remain in experimental state for at least 365fdf7471cSRay Kinsellaone release. Thereafter, the normal process of posting patch for review to 366fdf7471cSRay Kinsellamailing list can be followed. 367fdf7471cSRay Kinsella 36805a38d7cSFerruh YigitAfter the experimental tag has been formally removed, a tree/sub-tree maintainer 36905a38d7cSFerruh Yigitmay choose to offer an alias to the experimental tag so as not to break 37005a38d7cSFerruh Yigitapplications using the symbol. The alias is then dropped at the declaration of 37105a38d7cSFerruh Yigitnext major ABI version. 37205a38d7cSFerruh Yigit 373fdf7471cSRay KinsellaLibraries 374fdf7471cSRay Kinsella~~~~~~~~~ 375fdf7471cSRay Kinsella 376fdf7471cSRay KinsellaLibraries marked as ``experimental`` are entirely not considered part of an ABI 37774f4d642SDavid Marchandversion. 37874f4d642SDavid MarchandAll functions in such libraries may be changed or removed without prior notice. 37922545454SRay Kinsella 38022545454SRay KinsellaPromotion to stable 38122545454SRay Kinsella~~~~~~~~~~~~~~~~~~~ 38222545454SRay Kinsella 38322545454SRay KinsellaAn API's ``experimental`` status should be reviewed annually, 38422545454SRay Kinsellaby both the maintainer and/or the original contributor. 38522545454SRay KinsellaOrdinarily APIs marked as ``experimental`` will be promoted to the stable ABI 38622545454SRay Kinsellaonce a maintainer has become satisfied that the API is mature 38722545454SRay Kinsellaand is unlikely to change. 38822545454SRay Kinsella 38922545454SRay KinsellaIn exceptional circumstances, should an API still be classified 39022545454SRay Kinsellaas ``experimental`` after two years 39122545454SRay Kinsellaand is without any prospect of becoming part of the stable API. 39222545454SRay KinsellaThe API will then become a candidate for removal, 39322545454SRay Kinsellato avoid the accumulation of abandoned symbols. 39422545454SRay Kinsella 39522545454SRay KinsellaShould an ABI change, usually due to a direct change to the API's signature, 39622545454SRay Kinsellait is reasonable for the review and expiry clocks to reset. 39722545454SRay KinsellaThe promotion or removal of symbols will typically form part of a conversation 39822545454SRay Kinsellabetween the maintainer and the original contributor. 399