From: Vladimir Oltean <olteanv@gmail.com>
To: Mattias Forsblad <mattias.forsblad@gmail.com>
Cc: netdev@vger.kernel.org, Andrew Lunn <andrew@lunn.ch>,
Vivien Didelot <vivien.didelot@gmail.com>,
Florian Fainelli <f.fainelli@gmail.com>,
"David S . Miller" <davem@davemloft.net>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Tobias Waldekranz <tobias@waldekranz.com>
Subject: Re: [PATCH v4 net-next 0/3] net: dsa: mv88e6xxx: Implement offload of matchall for bridged DSA ports
Date: Mon, 11 Apr 2022 15:39:08 +0300 [thread overview]
Message-ID: <20220411123908.i73i7uonbs2qyvjt@skbuf> (raw)
In-Reply-To: <20220411120633.40054-1-mattias.forsblad@gmail.com>
On Mon, Apr 11, 2022 at 02:06:30PM +0200, Mattias Forsblad wrote:
> RFC -> v1: Monitor bridge join/leave and re-evaluate offloading (Vladimir Oltean)
> v2: Fix code standard compliance (Jakub Kicinski)
> v3: Fix warning from kernel test robot (<lkp@intel.com>)
> v4: Check matchall priority (Jakub)
> Use boolean type (Vladimir)
> Use Vladimirs code for checking foreign interfaces
> Drop unused argument (Vladimir)
> Add switchdev notifier (Vladimir)
By switchdev notifier you mean SWITCHDEV_ATTR_ID_BRIDGE_LOCAL_RCV?
I'm sorry, you must have misunderstood. I said, in reference to
dp->ds->ops->bridge_local_rcv():
| Not to mention this should be a cross-chip notifier, maybe a
| cross-tree notifier.
https://patchwork.kernel.org/project/netdevbpf/patch/20220404104826.1902292-2-mattias.forsblad@gmail.com/#24805497
A cross-chip notifier is an event signaled using dsa_tree_notify() and
handled in switch.c. Its purpose is to replicate an event exactly once
towards all switches in a multi-switch topology.
You could have explained that this isn't necessary, because
dsa_slave_setup_bridge_tc_indr_block(netdev=bridge_dev) indirectly binds
dsa_slave_setup_bridge_block_cb() which calls dsa_slave_setup_tc_block_cb()
for each user port under said bridge. So replicating the ds->ops->bridge_local_rcv()
towards each switch is already taken care of in another way, although
suboptimally, because if there are 4 user ports under br0 in switch A
and 4 user ports in switch B, ds->ops->bridge_local_rcv() will be called
4 times for switch A and 4 times for switch B. 6 out of those 8 calls
are for nothing.
Or you could have said that you don't understand the request and ask me
to clarify.
But I don't understand why you've added SWITCHDEV_ATTR_ID_BRIDGE_LOCAL_RCV
which has no consumer. Initially I thought you'd go back to having the
bridge monitor flow blocks binding to its ingress chain instead of this
broken indirect stuff, then emit SWITCHDEV_ATTR_ID_BRIDGE_LOCAL_RCV on
the switchdev notifier chain which DSA catches and offloads. And initial
state would be synced/unsynced via attribute replays in
dsa_port_switchdev_sync_attrs(). At least that would have worked.
But nope. It really looks like SWITCHDEV_ATTR_ID_BRIDGE_LOCAL_RCV was
added to appease an unclear comment even if it made no sense.
> Only call ops when value have changed (Vladimir)
> Add error check (Vladimir)
>
> Mattias Forsblad (3):
> net: dsa: track whetever bridges have foreign interfaces in them
> net: dsa: Add support for offloading tc matchall with drop target
> net: dsa: mv88e6xxx: Add HW offload support for tc matchall in Marvell
> switches
>
> drivers/net/dsa/mv88e6xxx/chip.c | 17 +-
> include/net/dsa.h | 15 ++
> include/net/switchdev.h | 2 +
> net/dsa/dsa2.c | 2 +
> net/dsa/dsa_priv.h | 3 +
> net/dsa/port.c | 14 ++
> net/dsa/slave.c | 321 +++++++++++++++++++++++++++++--
> 7 files changed, 361 insertions(+), 13 deletions(-)
>
> --
> 2.25.1
>
next prev parent reply other threads:[~2022-04-11 12:39 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-11 12:06 [PATCH v4 net-next 0/3] net: dsa: mv88e6xxx: Implement offload of matchall for bridged DSA ports Mattias Forsblad
2022-04-11 12:06 ` [PATCH v4 net-next 1/3] net: dsa: track whetever bridges have foreign interfaces in them Mattias Forsblad
2022-04-12 13:50 ` Vladimir Oltean
2022-04-11 12:06 ` [PATCH v4 net-next 2/3] net: dsa: Add support for offloading tc matchall with drop target Mattias Forsblad
2022-04-11 12:06 ` [PATCH v4 net-next 3/3] net: dsa: mv88e6xxx: Add HW offload support for tc matchall in Marvell switches Mattias Forsblad
2022-04-11 12:39 ` Vladimir Oltean [this message]
2022-04-11 12:48 ` [PATCH v4 net-next 0/3] net: dsa: mv88e6xxx: Implement offload of matchall for bridged DSA ports Mattias Forsblad
2022-04-11 13:16 ` 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=20220411123908.i73i7uonbs2qyvjt@skbuf \
--to=olteanv@gmail.com \
--cc=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=f.fainelli@gmail.com \
--cc=kuba@kernel.org \
--cc=mattias.forsblad@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=tobias@waldekranz.com \
--cc=vivien.didelot@gmail.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