All of lore.kernel.org
 help / color / mirror / Atom feed
From: Florian Fainelli <f.fainelli@gmail.com>
To: "Gaube, Marvin (THSE-TL1)" <Marvin.Gaube@tesat.de>,
	Woojung Huh <woojung.huh@microchip.com>,
	Microchip Linux Driver Support <UNGLinuxDriver@microchip.com>
Cc: "netdev@vger.kernel.org" <netdev@vger.kernel.org>
Subject: Re: PROBLEM: (DSA/Microchip): 802.1Q-Header lost on KSZ9477-DSA ingress without bridge
Date: Wed, 29 Jul 2020 06:48:15 -0700	[thread overview]
Message-ID: <c531bf92-dd7e-0e69-8307-4c4f37cb2d02@gmail.com> (raw)
In-Reply-To: <ad09e947263c44c48a1d2c01bcb4d90a@BK99MAIL02.bk.local>



On 7/28/2020 11:05 PM, Gaube, Marvin (THSE-TL1) wrote:
> Summary: 802.1Q-Header lost on KSZ9477-DSA ingress without bridge
> Keywords: networking, dsa, microchip, 802.1q, vlan
> Full description:
> 
> Hello,
> we're trying to get 802.1Q-Tagged Ethernet Frames through an KSZ9477 DSA-enabled switch without creating a bridge on the kernel side.

Does it work if you have a bridge that is VLAN aware though? If it does,
this would suggest that the default VLAN behavior without a bridge is
too restrictive and needs changing.

> Following setup:
> Switchport 1 <-- KSZ9477 --> eth1 (CPU-Port) <---> lan1

This representation is confusing, is switchport 1 a network device or is
this meant to be physical switch port number of 1 of the KSZ9477?

> 
> No bridge is configured, only the interface directly. Untagged packets are working without problems. The Switch uses the ksz9477-DSA-Driver with Tail-Tagging ("DSA_TAG_PROTO_KSZ9477").
> When sending packets with 802.1Q-Header (tagged VLAN) into the Switchport, I see them including the 802.1Q-Header on eth1.
> They also appear on lan1, but with the 802.1Q-Header missing.
> When I create an VLAN-Interface over lan1 (e.g. lan1.21), nothing arrives there.
> The other way around, everything works fine: Packets transmitted into lan1.21 are appearing in 802.1Q-VLAN 21 on the Switchport 1.
> 
> I assume that is not the intended behavior.
> I haven't found an obvious reason for this behavior yet, but I suspect the VLAN-Header gets stripped of anywhere around "dsa_switch_rcv" in net/dsa/dsa.c or "ksz9477_rcv" in net/dsa/tag_ksz.c.

Not sure how though, ksz9477_rcv() only removes the trail tag, this
should leave any header intact. It seems to me that the switch is
incorrectly configured and is not VLAN aware at all, nor passing VLAN
tagged frames through on ingress to CPU when it should.
-- 
Florian

  reply	other threads:[~2020-07-29 13:48 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-29  6:05 PROBLEM: (DSA/Microchip): 802.1Q-Header lost on KSZ9477-DSA ingress without bridge Gaube, Marvin (THSE-TL1)
2020-07-29 13:48 ` Florian Fainelli [this message]
2020-07-29 14:49   ` AW: " Gaube, Marvin (THSE-TL1)
2020-07-29 15:02     ` Florian Fainelli
2020-07-30  9:34       ` AW: " Gaube, Marvin (THSE-TL1)
2020-08-04 14:14       ` Gaube, Marvin (THSE-TL1)
2020-08-04 14:27         ` Vladimir Oltean
2020-08-04 14:54           ` Eric Dumazet
2020-08-04 19:29             ` Vladimir Oltean
2020-08-04 19:40               ` Eric Dumazet
2020-08-04 19:43                 ` Vladimir Oltean
2020-08-04 20:36                   ` Eric Dumazet
2020-08-04 21:24                     ` Vladimir Oltean
2020-08-04 22:29                       ` Eric Dumazet
2020-08-04 22:39                         ` Vladimir Oltean
2020-08-04 22:44                           ` Vladimir Oltean
2020-08-04 23:02                             ` Steinar H. Gunderson
2020-08-04 15:51         ` AW: AW: " Florian Fainelli
2020-08-04 19:54           ` Vladimir Oltean
2020-08-04 20:20             ` Florian Fainelli
2020-08-05  5:45               ` AW: " Gaube, Marvin (THSE-TL1)
2020-09-15  0:02                 ` Vladimir Oltean

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=c531bf92-dd7e-0e69-8307-4c4f37cb2d02@gmail.com \
    --to=f.fainelli@gmail.com \
    --cc=Marvin.Gaube@tesat.de \
    --cc=UNGLinuxDriver@microchip.com \
    --cc=netdev@vger.kernel.org \
    --cc=woojung.huh@microchip.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.