Hello,
We are having an issue with bridging the eth1 interface. The title explains the gist of it, but details below.
Prerequisites:
We have a system image built with yocto for iMX8MP with an applied patch: https://community.nxp.com/t5/i-MX-Processors-Knowledge-Base/Workaround-for-issue-Bridge-mode-on-EQoS...
Further details here: https://variwiki.com/index.php?title=DART-MX8M-PLUS_Release_Notes&release=mx8mp-yocto-kirkstone-5.15...
All network applications are disabled.
Problem:
Running these two commands causes the system to enter an unresposive state:
However if we do:
We get
and the following kernel output and no crash:
[ 36.072998] imx-dwmac 30bf0000.ethernet eth1: Timeout accessing MAC_VLAN_Tag_Filter [ 36.073086] imx-dwmac 30bf0000.ethernet eth1: Timeout accessing MAC_VLAN_Tag_Filter [ 36.096058] imx-dwmac 30bf0000.ethernet eth1: failed to initialize vlan filtering on this port
Furthermore:
If we connect an RJ45 to the physical port and run the same commands we receive no indication of fault and the link works fine!
Can we get assistance as to what causes these weird interactions and possibly a solution to the first issue i.e. the crash?
@magnus3point here is absolutely correct. I have done some investigation in the kernel regarding a bridge connection, and got some insights:
My kernel debugging showed me the following:
static int vlan_add_rx_filter_info(struct net_device *dev, __be16 proto, u16 vid)
{
if (!vlan_hw_filter_capable(dev, proto))
return 0;
if (netif_device_present(dev))
return dev->netdev_ops->ndo_vlan_rx_add_vid(dev, proto, vid);
else
return -ENODEV;
}
Summing up, there's something very wrong in these writes operations that's causing this weird freezing. I try to quick look at the writel implementation, but there're a bunch of different definitions in io.h
If this freezing state is not MAC driver related, then I think the driver should at least avoid performing those writes if the link is down, it's a simple check that I added, on the top of the Android patch mentioned.
Now regarding to userspace, systemd-networkd bridges the interfaces when they are down, that's why it freezes in early systemd boot. On the other hand, NetworkManager is a bit more clever, it actually doesn't bridge the interfaces right away, but it waits until the interface gets carrier (connected link) to perform the master operation.
Hi @magnus3 !
Thank you for contacting NXP Support!
The procedure that you are trying is correct when you have a physical switch layer.
The iMX8MP EVK has two independent Ethernet ports and doesn't have a switch layer between the ports.
I think is possible to do a bridge layer with software, but we don't have the program or examples.
I have tried the commands that are you using and if you are connecting with the board using ssh the communication hangs because the board is trying to connect the ethernet ports, but if you connect the board via USB doesn't hangs for ethernet configurations first use the debug port and then you can use the ssh server to connect the board.
Best Regards!
Chavira
Hello @Chavira,
Are you saying that you managed to get it working while connected on the debug port? Because that is what we have been using across all these tests.
When I looked elsewhere on the forum, I saw patches advertised as a solution for those issues. Could that be a solution for us as well?
E.g. https://community.nxp.com/t5/Processor-Expert-Software/iMX8MP-Bridge-on-eth1-not-supported/m-p/15992...
Thank you for your assistance!
Best regards,
Magnus
Hi @magnus3 !
That patch is only for Android bsp if you need that patch, I can send you that patch via email.
Best Regards.
Chavira
Hi @Chavira,
I would appreciate that, and if you have any other suggestions on how to resolve our issue, I would love to hear them.
Best regards,
Magnus
Hi @magnus3 !
If you want to use the evk you have to implement the switch layer with software, if you are developing a custom board, I recommend reviewing the Layerscape Reference Design Boards, you can find a compatible part to iMX8MP and do the switch layer via hardware without complications.