I am writing to report an issue I am experiencing with the DPAA2 mux (DPDMUX) driver regarding the MAC address configuration of a DPNI when it is attached as a port to a DPDMUX.
Issue Description
In our setup, the MAC addresses for the DPNI objects are statically defined in a dpc.dts file. My expectation is that when a DPNI is connected as a port to a DPDMUX, it retains the MAC address assigned in the dpc.dts. However, upon connecting a DPNI to the DPDMUX (using a custom configuration), I observe that the DPNI’s MAC address is reconfigured by the MC firmware. This unexpected change causes issues downstream (e.g., when matching flows and for overall network behavior).
Our Setup
- The dpc.dts file includes static MAC addresses for all DPNI objects.
- The DPDMUX is created with the following parameters (manually emitted via restool commands):
- Method: DPDMUX_METHOD_CUSTOM
- Manipulation: DPDMUX_MANIP_NONE
- Options: DPDMUX_OPT_CLS_MASK_SUPPORT
- Number of Interfaces: 2
- Default Interface: 1
- I disconnect dpni.8 from dprc.6, create the DPDMUX, and connect:
- dpdmux.0.0 → dpmac.3 (uplink)
- dpdmux.0.1 → dpni.7
- dpdmux.0.2 → dpni.8
- After these connections, the DPDMUX object is assigned to the DPRC (dprc.6) and the DPRC is rebound to VFIO.
Observations
After these operations, the MAC address of dpni.8 (as defined in our dpc.dts) is changed by the DPDMUX configuration process. I anticipated that the DPNI’s MAC address would remain as specified in the device tree, but instead it is reprogrammed. This reconfiguration interferes with my ability to correctly match flows and manage traffic as expected.
Request for Assistance
Could you please advise if:
- This behavior is expected due to DPAA2/DPDMUX internal bridging requirements?
- There is a way to preserve the DPNI MAC address as defined in the dpc.dts (perhaps via a specific configuration flag or by altering the DPDMUX method/parameters)?
- A post-connection reprogramming step (or a workaround in the driver) might be advisable to restore the original MAC address?
Additional question regarding the static configuration of a DPDMUX in the dpl.dts file
One more question and a very important one: is there any example available, which shows how to statically configure in a dpl.dts file a dpdmux correctly?
We are trying to do it already but cannot manage it to work. The static configuration we are looking for should/can equivalent to the following sequence of restool-commands like found at https://docs.nxp.com/bundle/GUID-487B2E69-BB19-42CB-AC38-7EF18C0FE3AE/page/GUID-33CD3951-762C-4230-B...:
# Unbinding dprc.2 from VFIO
echo dprc.2 > /sys/bus/fsl-mc/drivers/vfio-fsl-mc/unbind
# Remove dpni.2 from dprc.2 so that it can be assigned to dpdmux
restool dprc disconnect dprc.2 --endpoint=dpni.1
# Create dpdmux with CUSTOM flow creation; Flows would be created
# from the Userspace (DPDK) application
restool dpdmux create --default-if=1 --num-ifs=2 --method DPDMUX_METHOD_CUSTOM --
manip=DPDMUX_MANIP_NONE --option=DPDMUX_OPT_CLS_MASK_SUPPORT --container=dprc.1
# Create DPDMUX with two DPNI connections and one DPMAC connection
restool dprc connect dprc.1 --endpoint1=dpdmux.0.0 --endpoint2=dpmac.5
restool dprc connect dprc.1 --endpoint1=dpdmux.0.1 --endpoint2=dpni.3
restool dprc connect dprc.1 --endpoint1=dpdmux.0.2 --endpoint2=dpni.1
restool dprc assign dprc.1 --object=dpdmux.0 --child=dprc.2 --plugged=1
Further, do we need to load in defconfig the "evb" driver to make thinks working? The evb-driver's specific source is located in linuq-qoriq/drivers/staging/fsl-dpaa2/evb.
Thank you very much for your time and assistance.