Upstream DPAA driver
Upstream Linux kernel already contains a driver allowing to use the DPAA architecture out of the box. It assumes a default Frame Queues configuration (no custom FMC configuration can be used), which performs decently in most networking scenarios. This section aims to describe it in detail.
Replication
To use the upstream DPAA driver (sometimes called “standard driver“ or “kernel driver“), as it was done for the purpose of this article, flash a WHLE-LS1046A board with a recent Ubuntu image from the package registry. For the flashing procedure please refer to Installing Ubuntu image.
After flashing make sure the system boots from the whle-ls1
kernel version (not whle-ls1-sdk
). To verify this consult the /boot/extlinux/extlinux.conf
file. In case the kernel is missing it can always be installed with
root@whle-ls1046a:~# apt-get install -q0 linux-image-whle-ls1
The DPAA drivers should be statically compiled into the kernel. This can be verified with
root@whle-ls1046a:~# cat /boot/config-$(uname -r) | grep -F \
-e CONFIG_FSL_DPAA= \
-e CONFIG_FSL_FMAN= \
-e CONFIG_FSL_DPAA_ETH= \
-e CONFIG_FSL_XGMAC_MDIO=
CONFIG_FSL_FMAN=y
CONFIG_FSL_XGMAC_MDIO=y
CONFIG_FSL_DPAA_ETH=y
CONFIG_FSL_DPAA=y
Listing Frame Queues
The upstream DPAA driver exports information about the Frame Queue IDs used, for each network interface ‹if›, under the path /sys/class/net/‹if›/fqids
. For example
The ID numbers are given in decimals. The values don’t have any meaning outside of FMan initialization done during the ethernet device probe where the FQ IDs are assigned to Work Queues in Channels. How they are assigned to the Channels can only be known upon inspecting the driver’s source code, which can be found in the directories
drivers/net/ethernet/freescale/dpaa/
drivers/net/ethernet/freescale/fman/
include/soc/fsl/
of the Linux kernel repository. The Frame Queue types on which the frames breakdown above was based is defined in enum dpaa_fq_type
in drivers/net/ethernet/freescale/dpaa/dpaa_eth.h
.
fqids | # | dpaa_fq_type | Comment |
---|---|---|---|
Rx error | 1 | FQ_TYPE_RX_ERROR | Rx Error FQs |
Rx default | 1 | FQ_TYPE_RX_DEFAULT | Rx Default FQs |
Rx PCD | 128 | FQ_TYPE_RX_PCD | Rx Parse Classify Distribute FQs |
Tx confirmation (mq) | 1024 | FQ_TYPE_TX_CONF_MQ | Tx conf FQs (one for each Tx FQ) |
Tx error | 1 | FQ_TYPE_TX_ERROR | Tx Error FQs (these are actually Rx FQs) |
Tx default confirmation | 1 | FQ_TYPE_TX_CONFIRM | Tx default Conf FQ (actually an Rx FQ) |
Tx | 1024 | FQ_TYPE_TX | "Real" Tx FQs |
The Frame Queues are composed according to the following diagram
Consult the diagram DPAA Map of WHLE-LS1046A to see how the Channels are connected to ports and CPUs.