From: Vladimir Oltean <olteanv@gmail.com>
To: Frank Wunderlich <frank-w@public-files.de>
Cc: "Arınç ÜNAL" <arinc.unal@arinc9.com>,
"Felix Fietkau" <nbd@nbd.name>, netdev <netdev@vger.kernel.org>,
erkin.bozoglu@xeront.com, "Andrew Lunn" <andrew@lunn.ch>,
"Florian Fainelli" <f.fainelli@gmail.com>,
"John Crispin" <john@phrozen.org>,
"Mark Lee" <Mark-MC.Lee@mediatek.com>,
"Lorenzo Bianconi" <lorenzo@kernel.org>,
"Matthias Brugger" <matthias.bgg@gmail.com>,
"Landen Chao" <Landen.Chao@mediatek.com>,
"Sean Wang" <sean.wang@mediatek.com>,
"DENG Qingfang" <dqfext@gmail.com>
Subject: Re: Choose a default DSA CPU port
Date: Tue, 28 Feb 2023 13:58:46 +0200 [thread overview]
Message-ID: <20230228115846.4r2wuyhsccmrpdfh@skbuf> (raw)
In-Reply-To: <trinity-6ad483d2-5c50-4f38-b386-f4941c85c1fd-1677413524438@3c-app-gmx-bs15>
On Sun, Feb 26, 2023 at 01:12:04PM +0100, Frank Wunderlich wrote:
> but back to topic...we have a patch from vladuimir which allows
> setting the preferred cpu-port...how do we handle mt7531 here
> correctly (which still sets port5 if defined and then break)?
>
> https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next.git/tree/drivers/net/dsa/mt7530.c#n2383
>
> /* BPDU to CPU port */
> dsa_switch_for_each_cpu_port(cpu_dp, ds) {
> mt7530_rmw(priv, MT7531_CFC, MT7531_CPU_PMAP_MASK,
> BIT(cpu_dp->index));
> break; //<<< should we drop this break only to set all "cpu-bits"? what happens then (flooding both ports with packets?)
> }
>
> as dsa only handles only 1 cpu-port we want the real cpu-port
> (preferred | first). is this bit set also if the master is changed
> with your follow-up patch?
Could you please make a best-effort attempt at describing what does the
MT7531_CFC[MT7531_CPU_PMAP_MASK] register affect? From the comment, if
affects the trapping of control packets. Does the MT7530 not have this
register? Do they behave differently? Does the register affect anything
else? If that logic is commented out, does DSA-tagged traffic still work
on MT7531? How about a bridge created with stp_state 1? I don't
understand at the moment why the hardware allows specifying a port mask
rather than a single port. Intuitively I'd say that if this field
contains more than one bit set, then control packets would be delivered
to all CPU ports that are up, effectively resulting in double processing
in Linux. So that doesn't seem to be useful. But I don't have enough data.
next prev parent reply other threads:[~2023-02-28 11:58 UTC|newest]
Thread overview: 38+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-24 20:44 Aw: Re: Choose a default DSA CPU port Frank Wunderlich
2023-02-24 21:08 ` Vladimir Oltean
2023-02-25 11:14 ` Aw: " Frank Wunderlich
2023-02-25 13:50 ` Frank Wunderlich
2023-02-25 16:11 ` Arınç ÜNAL
2023-02-25 19:56 ` Arınç ÜNAL
2023-02-26 12:12 ` Aw: " Frank Wunderlich
2023-02-28 9:54 ` Arınç ÜNAL
2023-02-28 11:58 ` Vladimir Oltean [this message]
2023-02-28 13:48 ` Frank Wunderlich
2023-02-28 22:56 ` Vladimir Oltean
2023-03-01 6:38 ` Frank Wunderlich
2023-03-01 12:37 ` Vladimir Oltean
2023-03-06 18:20 ` Aw: " Frank Wunderlich
2023-03-07 17:43 ` Vladimir Oltean
2023-04-13 18:09 ` Aw: " Frank Wunderlich
2023-04-13 21:30 ` Frank Wunderlich
2023-05-16 19:29 ` Arınç ÜNAL
2023-05-17 16:10 ` Vladimir Oltean
2023-05-17 16:14 ` Arınç ÜNAL
2023-05-17 16:16 ` Vladimir Oltean
2023-05-18 10:36 ` Arınç ÜNAL
2023-05-18 14:24 ` Vladimir Oltean
2023-05-19 9:00 ` Arınç ÜNAL
2023-05-19 23:54 ` Vladimir Oltean
-- strict thread matches above, loose matches on Subject: below --
2023-02-18 17:07 Arınç ÜNAL
2023-02-18 20:17 ` Frank Wunderlich
2023-02-18 20:17 ` Florian Fainelli
2023-02-18 20:52 ` Vladimir Oltean
2023-02-19 7:35 ` Arınç ÜNAL
2023-02-19 9:49 ` Aw: " Frank Wunderlich
2023-02-21 0:27 ` Vladimir Oltean
2023-02-22 17:17 ` Aw: " Frank Wunderlich
2023-02-22 18:06 ` Vladimir Oltean
2023-02-22 18:08 ` Arınç ÜNAL
2023-02-22 19:34 ` Vladimir Oltean
2023-02-22 19:42 ` Arınç ÜNAL
2023-02-24 18:07 ` Aw: " Frank Wunderlich
2023-02-24 18:13 ` Vladimir Oltean
2023-02-24 18:16 ` Vladimir Oltean
2023-02-22 19:39 ` 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=20230228115846.4r2wuyhsccmrpdfh@skbuf \
--to=olteanv@gmail.com \
--cc=Landen.Chao@mediatek.com \
--cc=Mark-MC.Lee@mediatek.com \
--cc=andrew@lunn.ch \
--cc=arinc.unal@arinc9.com \
--cc=dqfext@gmail.com \
--cc=erkin.bozoglu@xeront.com \
--cc=f.fainelli@gmail.com \
--cc=frank-w@public-files.de \
--cc=john@phrozen.org \
--cc=lorenzo@kernel.org \
--cc=matthias.bgg@gmail.com \
--cc=nbd@nbd.name \
--cc=netdev@vger.kernel.org \
--cc=sean.wang@mediatek.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