public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
From: Vladimir Oltean <olteanv@gmail.com>
To: Tim Harvey <tharvey@gateworks.com>
Cc: Tristram.Ha@microchip.com, Arun.Ramadoss@microchip.com,
	andrew@lunn.ch, davem@davemloft.net, Woojung.Huh@microchip.com,
	linux-kernel@vger.kernel.org, pabeni@redhat.com,
	netdev@vger.kernel.org, edumazet@google.com,
	UNGLinuxDriver@microchip.com, kuba@kernel.org
Subject: Re: [PATCH net] net: dsa: microchip: ksz9477: fix multicast filtering
Date: Fri, 17 Jan 2025 18:13:34 +0200	[thread overview]
Message-ID: <20250117161334.ail2fyjuq75ef5to@skbuf> (raw)
In-Reply-To: <CAJ+vNU2BZ2oMy2Gj7xwwsO8EQJcCq9GP-BkaMjEpLUkkmBQVeg@mail.gmail.com>

On Thu, Jan 16, 2025 at 05:25:49PM -0800, Tim Harvey wrote:
> On Thu, Jan 16, 2025 at 5:09 PM <Tristram.Ha@microchip.com> wrote:
> >
> > > Hi Tim,
> > >
> > > > Hi Arun,
> > > >
> > > > Ok, that makes sense to me and falls in line with what my patch here
> > > > was trying to do. When you enable the reserved multicast table it
> > > > makes sense to update the entire table right? You are only updating
> > > > one address/group. Can you please review and comment on my patch
> > > > here?
> > >
> > >
> > > During my testing of STP protocol, I found that Group 0 of reserved
> > > multicast table needs to be updated. Since I have not worked on other
> > > groups in the multicast table, I didn't update it.
> > >
> > > I could not find the original patch to review, it shows "not found" in
> > > lore.kernel.org.
> > >
> > > Below are my comments,
> > >
> > > - Why override bit is not set in REG_SW_ALU_VAL_B register.
> > > - ksz9477_enable_stp_addr() can be renamed since it updates all the
> > > table entries.
> >
> > The reserved multicast table has only 8 entries that apply to 48
> > multicast addresses, so some addresses share one entry.
> >
> > Some entries that are supposed to forward only to the host port or skip
> > should be updated when that host port is not the default one.
> >
> > The override bit should be set for the STP address as that is required
> > for receiving when the port is closed.
> >
> > Some entries for MVRP/MSRP should forward to the host port when the host
> > can process those messages and broadcast to all ports when the host does
> > not process those messages, but that is not controllable by the switch
> > driver so I do not know how to handle in this situation.
> >
> 
> Hi Tristram,
> 
> Thanks for your feedback.
> 
> What is the behavior when the reserved multicast table is not enabled
> (does it forward to all ports, drop all mcast, something else?)
> 
> > The default reserved multicast table forwards to host port on entries 0,
> > 2, and 6; skips host port on entries 4, 5, and 7; forwards to all ports
> > on entry 3; and drops on entry 1.
> >
> 
> Is this behavior the desired behavior as far as the Linux DSA folks would want?
> 
> commit 331d64f752bb ("net: dsa: microchip: add the enable_stp_addr
> pointer in ksz_dev_ops") enables the reserved multicast table and
> adjusts the cpu port for entry 0 leaving the rest the same (and wrong
> if the cpu port is not the highest port in the switch).
> 
> My patch adjusts the entries but keeps the rules the same and the
> question that is posed is that the right thing to do with respect to
> Linux DSA?
> 
> Best Regard,
> 
> Tim

Not sure if that's a question for the DSA maintainers or for Tristram,
because I've expressed already earlier in this thread what is the
current way in which the Linux bridge expects this mechanism to work.
This is not the Microchip KSZ SDK, and thus, following the network stack
rules is not optional, and inventing local conventions when there
already exist global ones is a no-go. If you don't like the conventions
you are of course free to challenge them, but this is not the right
audience to do that.

  reply	other threads:[~2025-01-17 16:13 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20241212215132.3111392-1-tharvey@gateworks.com>
2024-12-13  0:00 ` [PATCH net] net: dsa: microchip: ksz9477: fix multicast filtering Vladimir Oltean
2024-12-13  0:32   ` Tim Harvey
2024-12-13  1:14     ` Vladimir Oltean
2024-12-27 19:06       ` Tim Harvey
2025-01-03  3:29         ` Arun.Ramadoss
2025-01-14 18:27           ` Tim Harvey
2025-01-16  9:06             ` Arun.Ramadoss
2025-01-17  1:09               ` Tristram.Ha
2025-01-17  1:25                 ` Tim Harvey
2025-01-17 16:13                   ` Vladimir Oltean [this message]
2025-01-17 21:02                     ` Tim Harvey
2025-01-18  1:18                       ` Vladimir Oltean
2025-01-23  1:48                         ` Tim Harvey
2025-01-27 12:54                           ` Vladimir Oltean
2025-01-18  0:49                   ` Tristram.Ha

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=20250117161334.ail2fyjuq75ef5to@skbuf \
    --to=olteanv@gmail.com \
    --cc=Arun.Ramadoss@microchip.com \
    --cc=Tristram.Ha@microchip.com \
    --cc=UNGLinuxDriver@microchip.com \
    --cc=Woojung.Huh@microchip.com \
    --cc=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=tharvey@gateworks.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox