Understanding When To Use DOCA Drivers and DOCA Libraries

Libraries and drivers are not one and the same. This blog explains which is the best for your need to clear up any confusion.

Scott Ciccone
6 min readintermediate
--
View Original

Overview

The article discusses the NVIDIA DOCA Software framework, which facilitates programming for the NVIDIA BlueField data processing unit (DPU). It highlights the differences between DOCA drivers and DOCA libraries, emphasizing their respective use cases, complexities, and performance optimizations.

What You'll Learn

1

How to choose between DOCA drivers and DOCA libraries for your application development

2

Why using DOCA libraries can lead to faster development times and improved performance

3

When to utilize the DOCA runtime for applications not ported to Arm architecture

Key Questions Answered

What are the main differences between DOCA drivers and DOCA libraries?
DOCA drivers provide fine-grained control and are more complex, suitable for developers needing customization. In contrast, DOCA libraries offer simplified APIs with built-in optimizations for specific use cases, making them easier to use and faster to develop with.
How can DOCA libraries improve application performance?
DOCA libraries are pre-accelerated and designed for specific use cases, which allows developers to achieve significant performance gains with less coding complexity. They include built-in logic that optimizes operations like deep packet inspection, which is not available in lower-level APIs.
When is it appropriate to use the DOCA runtime?
The DOCA runtime is suitable for applications that are not ready to be ported to the Arm architecture, allowing developers to run applications on x86 systems while still accessing DPU capabilities through a gRPC client.
What resources does NVIDIA provide for DOCA development?
NVIDIA offers a DOCA SDK, a developer program, and extensive documentation, including API references and programmer's guides, to support developers in building applications for BlueField DPUs.

Key Statistics & Figures

Number of DOCA APIs available
over 120
These APIs are utilized by more than 2500 DOCA developers worldwide.

Technologies & Tools

Software Framework
Doca
Facilitates programming for NVIDIA BlueField DPUs.
Software Library
Dpdk
Used in conjunction with DOCA libraries for enhanced functionality.

Key Actionable Insights

1
Leverage DOCA libraries for rapid application development to take advantage of built-in optimizations.
Using DOCA libraries can significantly reduce development time and complexity, allowing you to focus on application logic rather than low-level programming.
2
Consider using DOCA drivers when you need customized solutions that require fine-grained control over hardware acceleration.
While more complex, DOCA drivers allow for tailored solutions that can meet specific performance and functionality requirements.
3
Utilize the DOCA runtime if your application is not yet compatible with Arm architecture, ensuring continued access to DPU features.
This approach allows for a smoother transition to Arm-based applications without sacrificing performance or functionality.

Common Pitfalls

1
Assuming that DOCA libraries will support all features available in DOCA drivers can lead to limitations in application functionality.
While libraries simplify development, they may not cover every use case, so understanding their scope is crucial for successful application design.

Related Concepts

Nvidia Bluefield Dpu
Doca SDK
Deep Packet Inspection (dpi)
Zero-trust Security Framework