Modify

Opened 4 years ago

Last modified 4 years ago

#14591 new defect

AR8216 VLAN Tags not being padded correctly.

Reported by: anonymous Owned by: developers
Priority: high Milestone:
Component: packages Version:
Keywords: AR2816 VLAN Cc:

Description

The AR8216 has a bug - if you enable vlan ids, then the packet gets padded totally incorrectly.

The "fix" is to add a hack to the arge and switch drivers - have the switch populate an extra couple of bytes in the ethernet header with switch information (incoming switch port, etc) and then teach arge to add that header on outbound frames and strip it on inbound frames.

It's in openwrt/linux

Attachments (0)

Change History (6)

comment:1 Changed 4 years ago by nbd

Please provide more details on the incorrect padding.

comment:2 Changed 4 years ago by nbd

Also, is the switch chip really an AR8216, or is it a different one using the ar8216.c driver?

comment:3 Changed 4 years ago by anonymous

The chip really is an AR8216 (Physically labeled as such by Atheros)

What is happening is the following..

  • swconfig setup example:

With enable_vlans = 1 [enabled 802.1q tagging)
vlan1 VID = 2
vlan1 ports = "1 4t"
port2 PVID = 2
port4 PVID = 0

  • Scenario

Sending a packet (ICMP ping request for example) ingress to Port2, monitoring on Port 4, the tag added to the frame egress of Port 4 = "0". (Should it not be "2" as this is the VLAN VID..?)

Now changing Port4 PVID = 2

Same test above, but now packet has a tag of "2" (FROM Port4)

Now changin Port4 PVID = 7

Same test again, but now packet has a tag of "0" (FROM Port4)

The problem appears to be that either no tags are being properly added on ingress of a Vlan port, or something is changing the tags on egress when it shouldn't be.

I didn't save a copy of the actual frames from the test, so I couldn't tell you the exact padding going on.. but I could repeat that later if need be.

JC

comment:4 Changed 4 years ago by anonymous

The chip really is an AR8216 (Physically labeled as such by Atheros)

What is happening is the following..

  • swconfig setup example:

With enable_vlans = 1 [enabled 802.1q tagging)
vlan1 VID = 2
vlan1 ports = "1 4t"
port2 PVID = 2
port4 PVID = 0

  • Scenario

Sending a packet (ICMP ping request for example) ingress to Port2, monitoring on Port 4, the tag added to the frame egress of Port 4 = "0". (Should it not be "2" as this is the VLAN VID..?)

Now changing Port4 PVID = 2

Same test above, but now packet has a tag of "2" (FROM Port4)

Now changin Port4 PVID = 7

Same test again, but now packet has a tag of "0" (FROM Port4)

The problem appears to be that either no tags are being properly added on ingress of a Vlan port, or something is changing the tags on egress when it shouldn't be.

I didn't save a copy of the actual frames from the test, so I couldn't tell you the exact padding going on.. but I could repeat that later if need be.

JC

comment:5 Changed 4 years ago by anonymous

* EDIT *
Sorry for repeat posts. The above are incorrect. Ignore mention of "Port2" all references to that should be "Port1" instead.

The chip really is an AR8216 (Physically labeled as such by Atheros)

What is happening is the following..

  • swconfig setup example:

With enable_vlans = 1 [enabled 802.1q tagging)
vlan1 VID = 2
vlan1 ports = "1 4t"
port1 PVID = 2
port4 PVID = 0

  • Scenario

Sending a packet (ICMP ping request for example) ingress to Port1, monitoring on Port 4, the tag added to the frame egress of Port 4 = "0". (Should it not be "2" as this is the VLAN VID..?)

Now changing Port4 PVID = 2

Same test above, but now packet has a tag of "2" (FROM Port4)

Now changin Port4 PVID = 7

Same test again, but now packet has a tag of "0" (FROM Port4)

The problem appears to be that either no tags are being properly added on ingress of a Vlan port, or something is changing the tags on egress when it shouldn't be.

I didn't save a copy of the actual frames from the test, so I couldn't tell you the exact padding going on.. but I could repeat that later if need be.

JC

comment:6 Changed 4 years ago by Nikolay Martynov <mar.kolya@…>

Judging by the ar8216 driver this behaviour might be a hardware limitation. Basically only port internally connected to SoC would work properly in tagged mode.

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.