<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>Processor Expert Software中的主题 Re: iMX8MP- bridging eth1 causes unresponsive state</title>
    <link>https://community.nxp.com/t5/Processor-Expert-Software/iMX8MP-bridging-eth1-causes-unresponsive-state/m-p/1656703#M5589</link>
    <description>&lt;P&gt;Hi &lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/206761"&gt;@Chavira&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;I would appreciate that, and if you have any other suggestions on how to resolve our issue, I would love to hear them.&lt;/P&gt;&lt;P&gt;Best regards,&lt;BR /&gt;Magnus&lt;/P&gt;</description>
    <pubDate>Wed, 24 May 2023 13:34:28 GMT</pubDate>
    <dc:creator>magnus3</dc:creator>
    <dc:date>2023-05-24T13:34:28Z</dc:date>
    <item>
      <title>iMX8MP- bridging eth1 causes unresponsive state</title>
      <link>https://community.nxp.com/t5/Processor-Expert-Software/iMX8MP-bridging-eth1-causes-unresponsive-state/m-p/1654751#M5580</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;We are having an issue with bridging the eth1 interface. The title explains the gist of it, but details below.&lt;/P&gt;&lt;P&gt;&lt;U&gt;Prerequisites&lt;/U&gt;:&lt;/P&gt;&lt;P&gt;We have a system image built with yocto for iMX8MP with an applied patch: &lt;A href="https://community.nxp.com/t5/i-MX-Processors-Knowledge-Base/Workaround-for-issue-Bridge-mode-on-EQoS-module-will-not-work/ta-p/1559302" target="_blank" rel="noopener"&gt;https://community.nxp.com/t5/i-MX-Processors-Knowledge-Base/Workaround-for-issue-Bridge-mode-on-EQoS-module-will-not-work/ta-p/1559302&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Further details here: &lt;A href="https://variwiki.com/index.php?title=DART-MX8M-PLUS_Release_Notes&amp;amp;release=mx8mp-yocto-kirkstone-5.15-2.0.x-v1.2" target="_blank" rel="noopener"&gt;https://variwiki.com/index.php?title=DART-MX8M-PLUS_Release_Notes&amp;amp;release=mx8mp-yocto-kirkstone-5.15-2.0.x-v1.2&lt;/A&gt;&lt;/P&gt;&lt;P&gt;All network applications are disabled.&lt;/P&gt;&lt;P&gt;&lt;U&gt;Problem:&lt;/U&gt;&lt;/P&gt;&lt;P&gt;Running these two commands causes the system to enter an unresposive state:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;ip link add br0 type bridge&lt;/LI&gt;&lt;LI&gt;ip link set eth1 master br0&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;However if we do:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;ip link set eth1 up&lt;/LI&gt;&lt;LI&gt;ip link add br0 type bridge&lt;/LI&gt;&lt;LI&gt;ip link set eth1 master br0&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&amp;nbsp;We get&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;RTNETLINK answers: Device or resource busy&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;and the following kernel output and no &lt;EM&gt;crash&lt;/EM&gt;:&lt;/P&gt;&lt;PRE&gt;&lt;SPAN class=""&gt;[   36.072998] imx-dwmac 30bf0000.ethernet eth1: Timeout accessing MAC_VLAN_Tag_Filter&lt;/SPAN&gt;
&lt;SPAN class=""&gt;[   36.073086] imx-dwmac 30bf0000.ethernet eth1: Timeout accessing MAC_VLAN_Tag_Filter&lt;/SPAN&gt;
&lt;SPAN class=""&gt;[   36.096058] imx-dwmac 30bf0000.ethernet eth1: failed to initialize vlan filtering on this port&lt;/SPAN&gt;
&lt;/PRE&gt;&lt;P&gt;Furthermore:&lt;/P&gt;&lt;P&gt;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!&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;eth1: &amp;lt;NO-CARRIER,BROADCAST,MULTICAST,UP&amp;gt; mtu 1500 qdisc mq master br0 state DOWN group default qlen 1000&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;Can we get assistance as to what causes these weird interactions and possibly a solution to the first issue i.e. the crash?&lt;/P&gt;&lt;P&gt;&lt;LI-PRODUCT title="IMX8MPLUS" id="IMX8MPLUS"&gt;&lt;/LI-PRODUCT&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 22 May 2023 10:43:23 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Processor-Expert-Software/iMX8MP-bridging-eth1-causes-unresponsive-state/m-p/1654751#M5580</guid>
      <dc:creator>magnus3</dc:creator>
      <dc:date>2023-05-22T10:43:23Z</dc:date>
    </item>
    <item>
      <title>Re: iMX8MP- bridging eth1 causes unresponsive state</title>
      <link>https://community.nxp.com/t5/Processor-Expert-Software/iMX8MP-bridging-eth1-causes-unresponsive-state/m-p/1655881#M5585</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/215748"&gt;@magnus3&lt;/a&gt;&amp;nbsp;!&lt;/P&gt;
&lt;P&gt;Thank you for contacting NXP Support!&lt;/P&gt;
&lt;P&gt;The procedure that you are trying is correct when you have a physical switch layer.&lt;/P&gt;
&lt;P&gt;The iMX8MP EVK has two independent Ethernet ports and doesn't have a switch layer between the ports.&lt;/P&gt;
&lt;P&gt;I think is possible to do a bridge layer with software, but we don't have the program or examples.&lt;/P&gt;
&lt;P&gt;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.&lt;/P&gt;
&lt;P&gt;Best Regards!&lt;/P&gt;
&lt;P&gt;Chavira&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Chavira_0-1684855255436.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/224512i1B6C1A2165CB6315/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Chavira_0-1684855255436.png" alt="Chavira_0-1684855255436.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 23 May 2023 15:36:26 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Processor-Expert-Software/iMX8MP-bridging-eth1-causes-unresponsive-state/m-p/1655881#M5585</guid>
      <dc:creator>Chavira</dc:creator>
      <dc:date>2023-05-23T15:36:26Z</dc:date>
    </item>
    <item>
      <title>Re: iMX8MP- bridging eth1 causes unresponsive state</title>
      <link>https://community.nxp.com/t5/Processor-Expert-Software/iMX8MP-bridging-eth1-causes-unresponsive-state/m-p/1656364#M5587</link>
      <description>&lt;P&gt;Hello &lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/206761"&gt;@Chavira&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;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.&lt;BR /&gt;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?&lt;BR /&gt;E.g. &lt;A href="https://community.nxp.com/t5/Processor-Expert-Software/iMX8MP-Bridge-on-eth1-not-supported/m-p/1599252/highlight/true#M5472" target="_blank"&gt;https://community.nxp.com/t5/Processor-Expert-Software/iMX8MP-Bridge-on-eth1-not-supported/m-p/1599252/highlight/true#M5472&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Thank you for your assistance!&lt;/P&gt;&lt;P&gt;Best regards,&lt;BR /&gt;Magnus&lt;/P&gt;</description>
      <pubDate>Wed, 24 May 2023 07:14:56 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Processor-Expert-Software/iMX8MP-bridging-eth1-causes-unresponsive-state/m-p/1656364#M5587</guid>
      <dc:creator>magnus3</dc:creator>
      <dc:date>2023-05-24T07:14:56Z</dc:date>
    </item>
    <item>
      <title>Re: iMX8MP- bridging eth1 causes unresponsive state</title>
      <link>https://community.nxp.com/t5/Processor-Expert-Software/iMX8MP-bridging-eth1-causes-unresponsive-state/m-p/1656662#M5588</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/215748"&gt;@magnus3&lt;/a&gt;&amp;nbsp;!&lt;/P&gt;
&lt;P&gt;That patch is only for Android bsp if you need that patch, I can send you that patch via email.&lt;/P&gt;
&lt;P&gt;Best Regards.&lt;/P&gt;
&lt;P&gt;Chavira&lt;/P&gt;</description>
      <pubDate>Wed, 24 May 2023 12:46:10 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Processor-Expert-Software/iMX8MP-bridging-eth1-causes-unresponsive-state/m-p/1656662#M5588</guid>
      <dc:creator>Chavira</dc:creator>
      <dc:date>2023-05-24T12:46:10Z</dc:date>
    </item>
    <item>
      <title>Re: iMX8MP- bridging eth1 causes unresponsive state</title>
      <link>https://community.nxp.com/t5/Processor-Expert-Software/iMX8MP-bridging-eth1-causes-unresponsive-state/m-p/1656703#M5589</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/206761"&gt;@Chavira&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;I would appreciate that, and if you have any other suggestions on how to resolve our issue, I would love to hear them.&lt;/P&gt;&lt;P&gt;Best regards,&lt;BR /&gt;Magnus&lt;/P&gt;</description>
      <pubDate>Wed, 24 May 2023 13:34:28 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Processor-Expert-Software/iMX8MP-bridging-eth1-causes-unresponsive-state/m-p/1656703#M5589</guid>
      <dc:creator>magnus3</dc:creator>
      <dc:date>2023-05-24T13:34:28Z</dc:date>
    </item>
    <item>
      <title>Re: iMX8MP- bridging eth1 causes unresponsive state</title>
      <link>https://community.nxp.com/t5/Processor-Expert-Software/iMX8MP-bridging-eth1-causes-unresponsive-state/m-p/1656761#M5590</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/215748"&gt;@magnus3&lt;/a&gt;&amp;nbsp;!&lt;/P&gt;&lt;P&gt;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.&lt;/P&gt;</description>
      <pubDate>Wed, 24 May 2023 15:00:21 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Processor-Expert-Software/iMX8MP-bridging-eth1-causes-unresponsive-state/m-p/1656761#M5590</guid>
      <dc:creator>Chavira</dc:creator>
      <dc:date>2023-05-24T15:00:21Z</dc:date>
    </item>
    <item>
      <title>Re: iMX8MP- bridging eth1 causes unresponsive state</title>
      <link>https://community.nxp.com/t5/Processor-Expert-Software/iMX8MP-bridging-eth1-causes-unresponsive-state/m-p/1747622#M5728</link>
      <description>&lt;P&gt;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/215748"&gt;@magnus3&lt;/a&gt;point here is absolutely correct. I have done some investigation in the kernel regarding a bridge connection, and got some insights:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Yes, all the bridging / vlan implementation is purely software, not really hardware dependent&lt;/LI&gt;&lt;LI&gt;However, at some point during the bridging, the MAC driver (hardware dependent) can be called to do a certain &lt;EM&gt;vlan&lt;/EM&gt; configuration. And that's exactly where the error is happening, the EQoS eth1 MAC driver is messed up.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;My kernel debugging showed me the following:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;When running &lt;EM&gt;ip link set eth1 master br0&lt;/EM&gt;&lt;/LI&gt;&lt;LI&gt;&lt;EM&gt;net/bridge/br_vlan.c&lt;/EM&gt; calls &lt;EM&gt;net/8021q/vlan_core.c:vlan_vid_add&lt;/EM&gt; which internally calls &lt;EM&gt;vlan_add_rx_filter_info&lt;/EM&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;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-&amp;gt;netdev_ops-&amp;gt;ndo_vlan_rx_add_vid(dev, proto, vid);
	else
		return -ENODEV;
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;For the case of &lt;EM&gt;eth0&lt;/EM&gt; the first &lt;EM&gt;if&lt;/EM&gt; matches (eth0 doesn't have vlan hw filter) and so the function returns successfully.&lt;/LI&gt;&lt;LI&gt;For the case of &lt;EM&gt;eth1 QoS&lt;/EM&gt;, the MAC driver implementation of &lt;EM&gt;ndo_vlan_rx_add_vid&lt;/EM&gt; gets called, which is &lt;EM&gt;drivers/net/ethernet/stmicro/stmmac/stmmac_main.c:stmmac_vlan_rx_add_vid()&lt;/EM&gt;&lt;/LI&gt;&lt;LI&gt;That's when it gets interesting, within this function another internal call is made until the driver dwmac4 gets called, specifically&lt;EM&gt; drivers/net/ethernet/stmicro/stmmac/dwmac4_core.c:dwmac4_update_vlan_hash() -&amp;nbsp;&lt;/EM&gt;this function does a bunch of &lt;EM&gt;writel&lt;/EM&gt; (I believe that is writing to the Chip's MAC register addresses, but I might be wrong)&lt;/LI&gt;&lt;LI&gt;Now here, there are 3 possibilities:&lt;BR /&gt;&lt;UL&gt;&lt;LI&gt;If the interface is down (&lt;EM&gt;ip l set eth1 down&lt;/EM&gt;&lt;LI-EMOJI id="lia_disappointed-face" title=":disappointed_face:"&gt;&lt;/LI-EMOJI&gt; the kernel hangs on the first &lt;EM&gt;writel&lt;/EM&gt; call, just hangs there forever, &lt;STRONG&gt;the whole system is frozen&lt;/STRONG&gt;&lt;/LI&gt;&lt;LI&gt;If the interface is up (but no link carrier): the &lt;EM&gt;writel &lt;/EM&gt;operations go through, and the dw4mac eventually writes the hw filtering things - in &lt;EM&gt;dwmac4_write_vlan_filter&lt;/EM&gt; - but it doesn't read back the just written values, and so it prints the line &lt;EM&gt;"Timeout accessing MAC_VLAN_Tag_Filter"&lt;/EM&gt;, and returns -EBUSY&lt;/LI&gt;&lt;LI&gt;If the interface is up and there's link carrier: everything succeeds!&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;Summing up, there's something very wrong in these writes operations that's causing this weird freezing. I try to quick look at the &lt;EM&gt;writel&lt;/EM&gt; implementation, but there're a bunch of different definitions in &lt;EM&gt;io.h&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;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.&lt;/P&gt;&lt;P&gt;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.&lt;/P&gt;</description>
      <pubDate>Fri, 27 Oct 2023 07:42:56 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Processor-Expert-Software/iMX8MP-bridging-eth1-causes-unresponsive-state/m-p/1747622#M5728</guid>
      <dc:creator>btessele</dc:creator>
      <dc:date>2023-10-27T07:42:56Z</dc:date>
    </item>
  </channel>
</rss>

