Modify

Opened 7 years ago

Last modified 4 years ago

#7945 new defect

can not receive vlan packets on eth1 of gateworks cambria

Reported by: David Acker <dacker@…> Owned by: developers
Priority: normal Milestone: Chaos Calmer 15.05
Component: kernel Version: Backfire 10.03
Keywords: Cc:

Description

I have tried Kamikaze (8.09, r13787) and Backfire (10.03, r20728) builds on a gateworks cambria, gw2358-4 . If I use vconfig to create a vlan interface connected to eth1 and then send vlan tagged frames into this interface, the packet counts increase but no data is actually written into the buffers. If no data was ever sent to the ethernet port, the ifconfig counters show rx packets increasing but rx bytes at 0. If non-vlan tagged data had been received earlier, the system sees parts of the old packets again. Everything works fine if the vlan is created with eth0. I have tried a few different vlan numbers.

root@OpenWrt:/# ifconfig br-lan down                                                                                                      
root@OpenWrt:/# brctl delbr br-lan                                                                                                        
device eth0 left promiscuous mode                                                                                                         
br-lan: port 1(eth0) entering disabled state  

root@OpenWrt:/# vconfig add eth1 2 
root@OpenWrt:/# ifconfig eth1.2 10.0.0.41
root@OpenWrt:/# ifconfig eth1 0.0.0.0                                                                                                     
net eth1: firmware: requesting NPE-A                                                                                                      
NPE-A: firmware's license can be found in /usr/share/doc/LICENSE.IPL                                                                      
NPE-A: firmware functionality 0x82, revision 0x2:0                                                                                       
eth1: link up, speed 100 Mb/s, full duplex

# go to remote machine with a vlan interface setup
$ ping 10.0.0.41
PING 10.0.0.41 (10.0.0.41) 56(84) bytes of data.
From 10.0.0.40 icmp_seq=1 Destination Host Unreachable
From 10.0.0.40 icmp_seq=2 Destination Host Unreachable

# get no response, run ifconfig on openwrt box
root@OpenWrt:/# ifconfig eth1.2                                                                                                           
eth1.2    Link encap:Ethernet  HWaddr 00:D0:12:9D:EC:C8                                                                                   
          inet addr:10.0.0.41  Bcast:10.255.255.255  Mask:255.0.0.0                                                                       
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1                                                                              
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0                                                                              
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0                                                                            
          collisions:0 txqueuelen:0                                                                                                       
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)                                                                                          
                                                                                                                                          
root@OpenWrt:/# ifconfig eth1                                                                                                             
eth1      Link encap:Ethernet  HWaddr 00:D0:12:9D:EC:C8                                                                                   
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1                                                                              
          RX packets:18 errors:0 dropped:0 overruns:0 frame:0                                                                             
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0                                                                            
          collisions:0 txqueuelen:100                                                                                                     
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B) 

Note: rx packets increases but rx bytes do not.

See attachment:vlanTest.pcap for some of the packets being sent. They are ARPs in VLAN 2.

I have also seen a similar problem on the single miniPCI slot gateworks cambria gw2350.

http://www.gateworks.com/products/cambria.php

The router has a default configuration. I simply remove the bridge and then add the vlan manually to the second ethernet interface.

Attachments (1)

vlanTest.pcap (396 bytes) - added by David Acker <dacker@…> 7 years ago.
wireshark capture of VLAN 2 ARP packets being sent

Download all attachments as: .zip

Change History (7)

Changed 7 years ago by David Acker <dacker@…>

wireshark capture of VLAN 2 ARP packets being sent

comment:1 Changed 6 years ago by anonymous

This was fixed by a patch to the IxNpeMicrocode.h file.

Index: package/ixp4xx-microcode/src/IxNpeMicrocode.h
===================================================================
--- package/ixp4xx-microcode/src/IxNpeMicrocode.h	(revision 23070)
+++ package/ixp4xx-microcode/src/IxNpeMicrocode.h	(working copy)
@@ -24,9 +24,9 @@
 // #define IX_NPEDL_NPEIMAGE_NPEA_ETH_SPAN_VLAN_QOS_HDR_CONV_EXTMIB
 // #define IX_NPEDL_NPEIMAGE_NPEA_ETH_LEARN_FILTER_SPAN_MASK_FIREWALL_VLAN_QOS_EXTMIB
 // #define IX_NPEDL_NPEIMAGE_NPEA_HSS_TSLOT_SWITCH
-#define IX_NPEDL_NPEIMAGE_NPEA_ETH_SPAN_FIREWALL_VLAN_QOS_HDR_CONV
+// #define IX_NPEDL_NPEIMAGE_NPEA_ETH_SPAN_FIREWALL_VLAN_QOS_HDR_CONV
 // #define IX_NPEDL_NPEIMAGE_NPEA_ETH_LEARN_FILTER_SPAN_FIREWALL_VLAN_QOS
-// #define IX_NPEDL_NPEIMAGE_NPEA_ETH_LEARN_FILTER_SPAN_FIREWALL
+#define IX_NPEDL_NPEIMAGE_NPEA_ETH_LEARN_FILTER_SPAN_FIREWALL
 // #define IX_NPEDL_NPEIMAGE_NPEA_HSS_2_PORT
 // #define IX_NPEDL_NPEIMAGE_NPEA_DMA
 // #define IX_NPEDL_NPEIMAGE_NPEA_ATM_MPHY_12_PORT

comment:2 Changed 6 years ago by David Acker <dacker@…>

Sorry, thought I was logged in. This was fixed by a patch to the IxNpeMicrocode.h file.

Index: package/ixp4xx-microcode/src/IxNpeMicrocode.h
===================================================================
--- package/ixp4xx-microcode/src/IxNpeMicrocode.h	(revision 23070)
+++ package/ixp4xx-microcode/src/IxNpeMicrocode.h	(working copy)
@@ -24,9 +24,9 @@
 // #define IX_NPEDL_NPEIMAGE_NPEA_ETH_SPAN_VLAN_QOS_HDR_CONV_EXTMIB
 // #define IX_NPEDL_NPEIMAGE_NPEA_ETH_LEARN_FILTER_SPAN_MASK_FIREWALL_VLAN_QOS_EXTMIB
 // #define IX_NPEDL_NPEIMAGE_NPEA_HSS_TSLOT_SWITCH
-#define IX_NPEDL_NPEIMAGE_NPEA_ETH_SPAN_FIREWALL_VLAN_QOS_HDR_CONV
+// #define IX_NPEDL_NPEIMAGE_NPEA_ETH_SPAN_FIREWALL_VLAN_QOS_HDR_CONV
 // #define IX_NPEDL_NPEIMAGE_NPEA_ETH_LEARN_FILTER_SPAN_FIREWALL_VLAN_QOS
-// #define IX_NPEDL_NPEIMAGE_NPEA_ETH_LEARN_FILTER_SPAN_FIREWALL
+#define IX_NPEDL_NPEIMAGE_NPEA_ETH_LEARN_FILTER_SPAN_FIREWALL
 // #define IX_NPEDL_NPEIMAGE_NPEA_HSS_2_PORT
 // #define IX_NPEDL_NPEIMAGE_NPEA_DMA
 // #define IX_NPEDL_NPEIMAGE_NPEA_ATM_MPHY_12_PORT

comment:3 Changed 6 years ago by nbd

We can't switch to the ETH_LEARN_* firmware because that one is causing issues with bridging and STP.
Maybe we just need to figure out how to tell the firmware to add/remove the VLAN headers properly and change the driver accordingly.

comment:4 Changed 4 years ago by anonymous

I can confirm that this is still an issue using Attitude Adjustment (12.09, r36088)

tcpdump -i eth0.2
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on eth0.2, link-type EN10MB (Ethernet), capture size 65535 bytes
01:39:49.009553 IP truncated-ip - 36 bytes missing! 192.168.1.2 > 192.168.1.1: ICMP echo request, id 24836, seq 188, length 64
01:39:50.009609 IP truncated-ip - 36 bytes missing! 192.168.1.2 > 192.168.1.1: ICMP echo request, id 24836, seq 189, length 64

I was testing on an nslu2. The nslu2 uses NPEB, not A but after making that change the fix suggested above worked for me. I'm not using STP so can't comment on whether it would break that.

comment:5 Changed 4 years ago by dacker@…

This also happens on the gateworks avila based platforms. They need a similar patch but for NPEB. The firmware blob that gateworks originally shipped in the early days of the avila platform worked fine but the firmware blob produced by openwrt needs this adjustment.

comment:6 Changed 4 years ago by jow

  • Milestone changed from Backfire 10.03.2 to Chaos Calmer (trunk)

Milestone Backfire 10.03.2 deleted

Add Comment

Modify Ticket

Action
as new .
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.