This document details the management policy that ensures the long-term stability of the DPDK ABI and API.
Note
In 2019, the DPDK community stated its intention to move to ABI stable releases, over a number of release cycles. This change begins with maintaining ABI stability through one year of DPDK releases starting from DPDK 19.11. This policy will be reviewed in 2020, with intention of lengthening the stability period.
An ABI (Application Binary Interface) is the set of runtime interfaces exposed by a library. It is similar to an API (Application Programming Interface) but is the result of compilation. It is also effectively cloned when applications link to dynamic libraries. That is to say when an application is compiled to link against dynamic libraries, it is assumed that the ABI remains constant between the time the application is compiled/linked, and the time that it runs. Therefore, in the case of dynamic linking, it is critical that an ABI is preserved, or (when modified), done in such a way that the application is unable to behave improperly or in an unexpected fashion.
Illustration of DPDK API and ABI.
An ABI version is an instance of a library’s ABI at a specific release. Certain releases are considered to be milestone releases, the yearly LTS release for example. The ABI of a milestone release may be declared as a ‘major ABI version’, where this ABI version is then supported for some number of subsequent releases and is annotated in the library’s soname.
ABI version support in subsequent releases facilitates application upgrades, by enabling applications built against the milestone release to upgrade to subsequent releases of a library without a rebuild.
More details on major ABI version can be found in the ABI versioning guide.
A new major ABI version is declared no more frequently than yearly, with declarations usually aligning with a LTS release, e.g. ABI 20 for DPDK 19.11. Compatibility with the major ABI version is then mandatory in subsequent releases until the next major ABI version is declared, e.g. ABI 21 for DPDK 20.11.
At the declaration of a major ABI version, major version numbers encoded in libraries’ sonames are bumped to indicate the new version, with the minor version reset to 0. An example would be librte_eal.so.20.3 would become librte_eal.so.21.0.
The ABI may then change multiple times, without warning, between the last major ABI version increment and the HEAD label of the git tree, with the condition that ABI compatibility with the major ABI version is preserved and therefore sonames do not change.
Minor versions are incremented to indicate the release of a new ABI compatible DPDK release, typically the DPDK quarterly releases. An example of this, might be that librte_eal.so.20.1 would indicate the first ABI compatible DPDK release, following the declaration of the new major ABI version 20.
An ABI version is supported in all new releases until the next major ABI version is declared. When changing the major ABI version, the release notes will detail all ABI changes.
Mapping of new ABI versions and ABI version compatibility to DPDK releases.
The ABI may still change after the declaration of a major ABI version, that is new APIs may be still added or existing APIs may be modified.
Warning
Note that, this policy details the method by which the ABI may be changed, with due regard to preserving compatibility and observing deprecation notices. This process however should not be undertaken lightly, as a general rule ABI stability is extremely important for downstream consumers of DPDK. The API should only be changed for significant reasons, such as performance enhancements. API breakages due to changes such as reorganizing public structure fields for aesthetic or readability purposes should be avoided.
The requirements for changing the ABI are:
At least 3 acknowledgments of the need to do so must be made on the dpdk.org mailing list.
Backward compatibility with the major ABI version must be maintained through ABI Versioning, with forward-only compatibility offered for any ABI changes that are indicated to be part of the next ABI version.
If a newly proposed API functionally replaces an existing one, when the new API becomes non-experimental, then the old one is marked with __rte_deprecated.
- The depreciated API should follow the notification process to be removed, see Examples of Deprecation Notices.
- At the declaration of the next major ABI version, those ABI changes then become a formal part of the new ABI and the requirement to preserve ABI compatibility with the last major ABI version is then dropped.
- The responsibility for removing redundant ABI compatibility code rests with the original contributor of the ABI changes, failing that, then with the contributor’s company and then finally with the maintainer.
Note
Note that forward-only compatibility is offered for those changes made between major ABI versions. As a library’s soname can only describe compatibility with the last major ABI version, until the next major ABI version is declared, these changes therefore cannot be resolved as a runtime dependency through the soname. Therefore any application wishing to make use of these ABI changes can only ensure that its runtime dependencies are met through Operating System package versioning.
Note
Updates to the minimum hardware requirements, which drop support for hardware which was previously supported, should be treated as an ABI change, and follow the relevant deprecation policy procedures as above: 3 acks, technical board approval and announcement at least one release in advance.
For those ABI changes that are too significant to reasonably maintain multiple symbol versions, there is an amended process. In these cases, ABIs may be updated without the requirement of backward compatibility being provided. These changes must follow the same process described above as non-breaking changes, however with the following additional requirements:
The following are examples of allowable ABI changes occurring between declarations of major ABI versions.
The following are some examples of ABI deprecation notices which would be added to the Release Notes:
APIs marked as experimental are not considered part of an ABI version and may change without warning at any time. Since changes to APIs are most likely immediately after their introduction, as users begin to take advantage of those new APIs and start finding issues with them, new DPDK APIs will be automatically marked as experimental to allow for a period of stabilization before they become part of a tracked ABI version.
Note that marking an API as experimental is a multi step process. To mark an API as experimental, the symbols which are desired to be exported must be placed in an EXPERIMENTAL version block in the corresponding libraries’ version map script. Secondly, the corresponding prototypes of those exported functions (in the development header files), must be marked with the __rte_experimental tag (see rte_compat.h). The DPDK build makefiles perform a check to ensure that the map file and the C code reflect the same list of symbols. This check can be circumvented by defining ALLOW_EXPERIMENTAL_API during compilation in the corresponding library Makefile.
In addition to tagging the code with __rte_experimental, the doxygen markup must also contain the EXPERIMENTAL string, and the MAINTAINERS file should note the EXPERIMENTAL libraries.
For removing the experimental tag associated with an API, deprecation notice is not required. Though, an API should remain in experimental state for at least one release. Thereafter, the normal process of posting patch for review to mailing list can be followed.
Libraries marked as experimental are entirely not considered part of an ABI version, and may change without warning at any time. Experimental libraries always have a major version of 0 to indicate they exist outside of ABI Versioning , with the minor version incremented with each ABI change to library.