All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stefan Eichenberger <stefan.eichenberger@netmodule.com>
To: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
Cc: Andrew Lunn <andrew@lunn.ch>,
	Stefan Eichenberger <eichest@gmail.com>, <f.fainelli@gmail.com>,
	<netdev@vger.kernel.org>
Subject: Re: [PATCH] net: dsa: mv88e6xxx: egress all frames
Date: Wed, 23 Nov 2016 17:50:23 +0100	[thread overview]
Message-ID: <20161123165022.GD12698@gruene.netmodule.intranet> (raw)
In-Reply-To: <87shqi89wu.fsf@ketchup.i-did-not-set--mail-host-address--so-tickle-me>

Hi Vivien

On Wed, Nov 23, 2016 at 10:59:13AM -0500, Vivien Didelot wrote:
> Hi Stefan,
> 
> Stefan Eichenberger <stefan.eichenberger@netmodule.com> writes:
> 
> >> Now, the different families are not 100% compatible with each
> >> other. We never had access to a 6097, so it has not been tested
> >> recently, and we have probably broken it... My guess would be,
> >> anywhere mv88e6xxx_6095_family(chip) is used, there also needs to be
> >> an mv88e6xxx_6097_family(chip). But i could be wrong.
> >
> > I think I probably found the problem. For EDSA type switches the bit
> > PORT_CONTROL_FORWARD_UNKNOWN_MC is set on the cpu port but not for DSA 
> > type switches. Broadcast addresses are threaded as multicast addresses, 
> > so unknown frames will never leave the switch.
> 
> The Port Control Register (0x04) is one of these registers which changes
> almost completely among chip models.
> 
> Are you able to give us the layout of the port register 0x04 on your
> 88E6097? I don't have access to its datasheet.

Yes sure, the layout of the Port Control Register for the 88E6097 is the same
as for the 88E6352:

15:14: SA Filtering: 00 -> SA filtering disabled
                     01 -> Drop on lock
                     10 -> Drop on Unlock
                     11 -> Drop to CPU
13:12: Egress Mode:  00 -> default unmodified mode
                     01 -> default to transmit all frames untagged
                     10 -> default to transmit all frames tagged
                     11 -> reserved for future use
11:    Header:       Ingress&Egress header mode (PORT_CONTROL_HEADER)
10:    IGMP Snoop:   IGMP/MLD Snooping (PORT_CONTROL_IGMP_MLD_SNOOP)
9:8    Frame Mode:   00 -> Normal Network
                     01 -> DSA (FRAME_MODE_DSA)
                     10 -> Provider (FRAME_MODE_PROVIDER)
                     11 -> Ether Type DSA (FRAME_ETHER_TYPE_DSA)
7:     VLAN Tunnel:  VLAN Tunnel (VLAN_TUNNEL)
6:     TagIfBoth:    Use tag info for QPri
5:4:   InitialPri:   00 -> Use Port defaults for FPri and QPri
                     01 -> Use Tag Priority
                     10 -> Use IP Priority
                     11 -> Use Tag & IP Priority
3:2:   Egress Floods:00 -> Do not egress any frame with unknown DA
                     01 -> Do not egress any frame with an unknown mc DA
                     10 -> Do not egress any frame with an unknown DA
                     11 -> Egress all frames with an unknown DA
                     Broadcasts are threaded as multicast if FloodBC in
                     global2 register is not set.
1:0:   PortState:    00 -> Disabled
                     01 -> Blocking/Listening
                     10 -> Learning
                     11 -> Forwarding

I hope this helps, feel free to ask for more infos.

> 
> For instance on 88E6185 bit 3 is reserved, on 88E6352 and 88E6390 bit
> 3:2 are "Egress Floods" and 0x2 means "Do not egress any frame with an
> unknown unicast DA".
> 
> > Do you know if there is a reason why this bit isn't set for DSA type
> > switches too? The patch would be extremely simple and it seems to work
> > perfectly with this bit set on the CPU port.
> 
> All these family checks for bit masking are quite messy and ideally need
> proper abstraction...
> 
> Can you give us the chunk of patch you are refering to?

I will send the patch in a few minutes.

Regards,
Stefan

  reply	other threads:[~2016-11-23 16:51 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-22 10:39 [PATCH] net: dsa: mv88e6xxx: egress all frames Stefan Eichenberger
2016-11-22 15:03 ` Andrew Lunn
2016-11-22 18:37   ` Stefan Eichenberger
2016-11-22 19:02     ` Andrew Lunn
2016-11-22 22:15       ` Vivien Didelot
2016-11-23  9:56         ` Stefan Eichenberger
2016-11-23 12:00       ` Stefan Eichenberger
2016-11-23 15:59         ` Vivien Didelot
2016-11-23 16:50           ` Stefan Eichenberger [this message]
2016-11-23 16:54             ` [PATCH v2] net: dsa: mv88e6xxx: forward unknown mc packets on mv88e6097 Stefan Eichenberger
2016-11-23 16:59               ` Andrew Lunn
2016-11-23 17:11                 ` [PATCH v3] net: dsa: mv88e6xxx: enable EDSA " Stefan Eichenberger
2016-11-23 17:13                   ` Andrew Lunn
2016-11-23 17:14                 ` [PATCH v2] net: dsa: mv88e6xxx: forward unknown mc packets " Stefan Eichenberger
2016-11-23 17:32                   ` Andrew Lunn
2016-11-23 17:49                     ` Stefan Eichenberger
2016-11-23 17:40                   ` Andrew Lunn
2016-11-23 17:52                     ` Vivien Didelot
2016-11-23 18:01                       ` Andrew Lunn
2016-11-23 18:18                         ` Vivien Didelot
2016-11-23 16:58             ` [PATCH] net: dsa: mv88e6xxx: egress all frames Andrew Lunn

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=20161123165022.GD12698@gruene.netmodule.intranet \
    --to=stefan.eichenberger@netmodule.com \
    --cc=andrew@lunn.ch \
    --cc=eichest@gmail.com \
    --cc=f.fainelli@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=vivien.didelot@savoirfairelinux.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.