Proof of Concept
Converting NVIDIA's data-center networking technology into an ISO 26262-compliant embedded Ethernet driver
Swipe or use arrows to navigate โ
NVIDIA's high-performance network controller (mlx5 family). In Linux, it's driven by the mlx5_core loadable kernel module โ a ~200,000-line GPL driver.
BlueField-2 pairs the ConnectX-6 Dx with 8ร ARM Cortex-A72 cores. This mirrors automotive: high-performance NIC + safety-certified RTOS.
~200K lines, GPL
Data center
~5,800 lines
Apache-2.0
Automotive-grade
ISO 26262
All buffers and queues statically allocated. Zero malloc/free. Sizes via Kconfig.
Hardware accessed via byte-level big-endian helpers. No compiler padding issues.
Every function has one return point using goto cleanup pattern.
Zephyr net_if
MSI-X / k_work
SQ/RQ/CQ/EQ
FW commands
BAR/MSI-X
TX: net_pkt โ cx6_eth_send() โ linearise โ cx6_sq_post_tx() โ SQ doorbell โ HW DMA RX: HW DMA โ CQE โ cx6_cq_poll_rx() โ net_pkt_rx_alloc() โ net_recv_data() IRQ: MSI-X โ cx6_isr() โ k_work_submit() โ drain EQ/CQ โ rearm doorbells
static cx6_cmd_slot_t cmd_slot_buf
__attribute__((aligned(4096)));
static uint8_t fw_page_pool
[FW_PAGES_MAX][4096]
__attribute__((aligned(4096)));
static inline void cx6_put_be32(
uint8_t *buf, uint32_t val) {
buf[0] = (uint8_t)(val >> 24U);
buf[1] = (uint8_t)(val >> 16U);
buf[2] = (uint8_t)(val >> 8U);
buf[3] = (uint8_t)(val);
}
int32_t cx6_pcie_init(
struct cx6_dev *dev) {
int32_t ret = 0;
uint32_t pcie_id = 0U;
/* No bare int, unsigned */
}
int32_t func(args) {
int32_t ret = 0;
if (dev == NULL) {
ret = -EINVAL;
goto out;
}
/* ... */
out:
return ret;
}
| Category | File | Purpose |
|---|---|---|
| Build | CMakeLists.txt | Zephyr app build |
| Build | Kconfig | Top-level Kconfig |
| Build | prj.conf | Base configuration |
| Driver | cx6_regs.h | Register offsets & bitmasks |
| Driver | cx6_cmd_if.h | Command opcodes & BE helpers |
| Driver | cx6_desc.h | WQE/CQE/EQE formats |
| Driver | cx6_priv.h | Device struct & state machine |
| Driver | cx6_pcie.c/h | PCIe discovery, BAR, MSI-X |
| Driver | cx6_device.c/h | FW commands, HCA lifecycle |
| Driver | cx6_queue.c/h | DMA rings, WQE construction |
| Driver | cx6_interrupt.c/h | ISR + k_work bottom-half |
| Driver | cx6_eth.c/h | Zephyr Ethernet API |
| Test | tests/unit/cx6/ | 58 tests + stubs |
| Docs | docs/architecture.md | Full architecture doc |
The ConnectX-6 Dx Programmer's Reference Manual is not publicly available. Exact command layouts, steering tables, and silicon errata require NDA access.
Requires a Zephyr-supported board with PCIe host capability and IOMMU/SMMU. Zephyr's PCIe host support is currently limited.
ISO 26262 needs formal safety concepts, HSI specs from NVIDIA, dependent failure analysis, and tool qualification.
export ZEPHYR_BASE=~/zephyrproject/zephyr west build -b native_sim . \ -- -DCONFIG_ETH_CX6_DX=y
cd tests/unit/cx6 make ./cx6_unit_tests make coverage
Apache-2.0
No GPL contamination โ clean-room implementation using only public hardware knowledge.
BlueField-2 / ConnectX-6 Dx Automotive Conversion POC โ March 2026