> For the complete documentation index, see [llms.txt](https://dev.solid-run.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://dev.solid-run.com/marvell/cn913x/sbc-platform/cn913x-software/dpdk-on-cn913x.md).

# DPDK on CN913X

### Running DPDK

DPDK is supported in our CN913X platforms since commit #77cd41e in our [cn913x\_build](https://github.com/SolidRun/cn913x_build) repository.

Notes -

1. DPDK has been tested only on ClearFog-Base CN9130 based product.
2. Please notice that the support is for ethernet ports that are directly connected to the SoC (i.e. no L2 DSA switch support).

The images include test-pmd, but any DPDK application can be copied and used.

Before running a DPDK application, the following steps should be followed:

* Mount and allocate hugepages, for example:

```
mkdir -p /mnt/huge
mount -t hugetlbfs nodev /mnt/huge
echo 512 > /sys/kernel/mm/hugepages/hugepages-2048kB/nr_hugepages
```

* insert MUSDK kernel modules, which are used by the MVPP2 PMD:

```
insmod /root/musdk_modules/mv_pp_uio.ko
insmod /root/musdk_modules/musdk_cma.ko
```

Now, the DPDK application can be used.

In order to set testpmd to transmit 64B packets from all 3 interfaces, the following command can be used:

```
/root/dpdk/dpdk-testpmd --vdev=eth_mvpp2,iface=eth0,iface=eth1,iface=eth2 \
-- --txd=1024 --txpkts=1500 --tx-first --auto-start --forward-mode=txonly \
--nb-cores=1 --stats-period=1
```

At the moment, switching back from DPDK to the Linux kernel is not supported (but possible), so once a DPDK application runs, the Linux kernel won’t be able to use the network interfaces.

Although not recommended, In order to switch back to the Linux kernel, the MTU size can be changed for the interface (and then, changed back to the original size).

```
ifconfig ethX mtu 1499
ifconfig ethX mtu 1500
```

changing the MTU size will re-associate the RXQ pools.

This hack is not stable, and will lead to error messages from the kernel.

More details can be found in the cn913x\_build repository.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://dev.solid-run.com/marvell/cn913x/sbc-platform/cn913x-software/dpdk-on-cn913x.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
