Netdev Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Vladimir Oltean <olteanv@gmail.com>
To: Vladimir Oltean <vladimir.oltean@nxp.com>
Cc: netdev@vger.kernel.org, Jakub Kicinski <kuba@kernel.org>,
	"David S. Miller" <davem@davemloft.net>,
	Florian Fainelli <f.fainelli@gmail.com>,
	Andrew Lunn <andrew@lunn.ch>,
	Vivien Didelot <vivien.didelot@gmail.com>,
	Kurt Kanzenbach <kurt@linutronix.de>,
	Woojung Huh <woojung.huh@microchip.com>,
	UNGLinuxDriver@microchip.com, Sean Wang <sean.wang@mediatek.com>,
	Landen Chao <Landen.Chao@mediatek.com>,
	DENG Qingfang <dqfext@gmail.com>,
	Matthias Brugger <matthias.bgg@gmail.com>,
	Claudiu Manoil <claudiu.manoil@nxp.com>,
	Alexandre Belloni <alexandre.belloni@bootlin.com>,
	George McCollister <george.mccollister@gmail.com>
Subject: Re: [RFC PATCH net-next 0/4] Remove the "dsa_to_port in a loop" antipattern
Date: Mon, 9 Aug 2021 22:31:05 +0300	[thread overview]
Message-ID: <20210809193105.ijzvvkdwvtgkihun@skbuf> (raw)
In-Reply-To: <20210809190320.1058373-1-vladimir.oltean@nxp.com>

FWIW, I also have a small test: on my Turris MOX with 25 mv88e6xxx user
ports, I have a script which sets up the bridge for my network:

-----------------------------[ cut here ]-----------------------------
# cat /etc/init.d/S50bridge
#!/bin/bash

ip link del br0
ip link add br0 type bridge vlan_filtering 1
for eth in lan1 lan2 lan3 lan4 lan5 lan6 lan7 lan8 lan9 lan10 lan11 lan12 lan13 lan14 lan15 lan16 lan17 lan18 lan19 lan20 lan21 lan22 lan23 lan24 sfp; do
        ip link set ${eth} master br0
done

# For TFTP, the server is connected to sfp
# bridge vlan add dev sfp vid 100
bridge vlan add dev lan19 vid 100

# lan1-lan24 are the for board access to TFTP. Use VLAN 100.
# FIXME: I removed lan19 from this list and now use it for TFTP server
for eth in lan1 lan2 lan3 lan4 lan5 lan6 lan7 lan8 lan9 lan10 lan11 lan12 lan13 lan14 lan15 lan16 lan17 lan18 lan20 lan21 lan22 lan23 lan24; do
        bridge vlan del dev ${eth} vid 1
        bridge vlan add dev ${eth} vid 100 pvid untagged
done

ip link set br0 up
-----------------------------[ cut here ]-----------------------------

Before this series:

time /etc/init.d/S50bridge
real    0m8.809s
user    0m0.253s
sys     0m2.614s

time ip link del br0
real    0m4.509s
user    0m0.006s
sys     0m1.184s

After:

time /etc/init.d/S50bridge
real    0m8.270s
user    0m0.199s
sys     0m2.468s

time ip link del br0
real    0m3.964s
user    0m0.000s
sys     0m1.024s

So there is a (small, but still visible) improvement - note that
mv88e6xxx is heavily limited by MDIO access anyway, and that would be
the predominant latency.

Also, I noticed that I forgot an unused "int port" variable in
felix_vsc9959.c variable, that I'm sure the kernel test robot will
complain about. So this is just RFC for now.

      parent reply	other threads:[~2021-08-09 19:31 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-09 19:03 Vladimir Oltean
2021-08-09 19:03 ` [RFC PATCH net-next 1/4] net: dsa: introduce a dsa_port_is_unused helper Vladimir Oltean
2021-08-10  9:34   ` Florian Fainelli
2021-08-09 19:03 ` [RFC PATCH net-next 2/4] net: dsa: remove the "dsa_to_port in a loop" antipattern from the core Vladimir Oltean
2021-08-10  3:33   ` DENG Qingfang
2021-08-10  9:41     ` Florian Fainelli
2021-08-10 11:35       ` Vladimir Oltean
2021-08-10 16:35         ` Vladimir Oltean
2021-08-10 17:04           ` DENG Qingfang
2021-08-11 17:32             ` Vladimir Oltean
2021-08-10  9:37   ` Florian Fainelli
2021-08-09 19:03 ` [RFC PATCH net-next 3/4] net: dsa: remove the "dsa_to_port in a loop" antipattern from drivers Vladimir Oltean
2021-08-09 19:03 ` [RFC PATCH net-next 4/4] net: dsa: b53: express b53_for_each_port in terms of dsa_switch_for_each_port Vladimir Oltean
2021-08-10  9:39   ` Florian Fainelli
2021-08-10 13:14     ` Vladimir Oltean
2021-08-09 19:31 ` Vladimir Oltean [this message]

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=20210809193105.ijzvvkdwvtgkihun@skbuf \
    --to=olteanv@gmail.com \
    --cc=Landen.Chao@mediatek.com \
    --cc=UNGLinuxDriver@microchip.com \
    --cc=alexandre.belloni@bootlin.com \
    --cc=andrew@lunn.ch \
    --cc=claudiu.manoil@nxp.com \
    --cc=davem@davemloft.net \
    --cc=dqfext@gmail.com \
    --cc=f.fainelli@gmail.com \
    --cc=george.mccollister@gmail.com \
    --cc=kuba@kernel.org \
    --cc=kurt@linutronix.de \
    --cc=matthias.bgg@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=sean.wang@mediatek.com \
    --cc=vivien.didelot@gmail.com \
    --cc=vladimir.oltean@nxp.com \
    --cc=woojung.huh@microchip.com \
    --subject='Re: [RFC PATCH net-next 0/4] Remove the "dsa_to_port in a loop" antipattern' \
    /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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).