How it works
ODP consists of three separate but related component parts. First, ODP is an abstract API specification that describes a functional model for data plane applications. This specification covers many common data plane application programming needs, such as the ability to receive, manipulate, and transmit packet data, without specifying how these functions are performed. This is quite intentional. It is precisely because ODP APIs do not have a preferred embodiment that they permit innovation in how these functions can be realized on various platforms that offer implementations of ODP. To achieve this goal, ODP APIs are described using abstract data types whose definition is left up to the ODP implementer. For example, in ODP packets are referenced by abstract handles of type odp_packet_t, and packet-related APIs take arguments of this type. What an odp_packet_t actually is is not part of the ODP API specification—that is the responsibility of each ODP implementation.
The ODP API specification is designed to permit wide latitude on the part of implementations while at the same time supporting highly efficient processing, especially for APIs that are executed frequently.
ODP consists of multiple implementations of this API specification, each tailored to a specific target platform. ODP implementations determine how each ODP abstract type is represented on that platform and how each ODP API is realized. On some platforms, ODP APIs will be realized using specialized instructions that accelerate the functional behavior specified by the API. On others, hardware co-processing engines may completely offload the API so that again it can be performed with little or no involvement by a CPU. In all cases, the application sees the same functional behavior independent of how a given platform has chosen to realize it. By allowing each platform the freedom to determine how best to realize each API’s specified functional behavior in an optimal manner, ODP permits applications written to its APIs to take full advantage of the unique capabilities of each platform without the application programmer needing to have specialist knowledge of that platform or to be concerned with how best to tune the application to a particular platform. This latter consideration is particularly important in Network Function Virtualization (NFV) environments where the application will run on a target platform chosen by someone else.
To make it easy to get started with implementing ODP on a new platform, ODP supplies two reference implementations that can serve as a starting point. The two primary references implementations supplied by ODP are ODP-LINUX and ODP-DPDK.
The ODP-LINUX reference implementation is a pure SW implementation of the ODP API that relies on the Linux programming APIs. As a functional model for ODP, it enables ODP to be bootstrapped easily to any platform that supports a Linux kernel.
ODP-DPDK is derived from ODP-LINUX, but it is optimized using the full DPDK SDK, and tries to connect as many DPDK APIs to ODP as possible. In particular, ODP-DPDK offers improved I/O performance for systems that use DPDK supported NICs, allowing ODP applications to take immediate full advantage of the various NIC device drivers supported by DPDK.
VALIDATION TEST SUITE
To ensure consistency between different ODP implementations, ODP consists of a validation suite that verifies that any given implementation of ODP faithfully provides the specified functional behavior of each ODP API. As a separate open source component, the validation suite may be used by application writers, system integrators, and platform providers alike to confirm that any purported implementation of ODP does indeed conform to the ODP API specification.