From: Florian Fainelli <f.fainelli@gmail.com>
To: Vladimir Oltean <vladimir.oltean@nxp.com>,
Andrew Lunn <andrew@lunn.ch>,
Vivien Didelot <vivien.didelot@gmail.com>,
Jakub Kicinski <kuba@kernel.org>,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
bridge@lists.linux-foundation.org,
Roopa Prabhu <roopa@nvidia.com>,
Nikolay Aleksandrov <nikolay@nvidia.com>,
"David S. Miller" <davem@davemloft.net>
Cc: DENG Qingfang <dqfext@gmail.com>,
Tobias Waldekranz <tobias@waldekranz.com>,
Marek Behun <marek.behun@nic.cz>,
Russell King - ARM Linux admin <linux@armlinux.org.uk>,
Alexandra Winter <wintera@linux.ibm.com>,
Jiri Pirko <jiri@resnulli.us>, Ido Schimmel <idosch@idosch.org>,
Claudiu Manoil <claudiu.manoil@nxp.com>
Subject: Re: [PATCH v2 net-next 4/6] net: dsa: exit early in dsa_slave_switchdev_event if we can't program the FDB
Date: Sat, 12 Dec 2020 19:29:34 -0800 [thread overview]
Message-ID: <972b7427-0efe-118b-5e11-88ea10c2d217@gmail.com> (raw)
In-Reply-To: <20201213024018.772586-5-vladimir.oltean@nxp.com>
On 12/12/2020 6:40 PM, Vladimir Oltean wrote:
> Right now, the following would happen for a switch driver that does not
> implement .port_fdb_add or .port_fdb_del.
>
> dsa_slave_switchdev_event returns NOTIFY_OK and schedules:
> -> dsa_slave_switchdev_event_work
> -> dsa_port_fdb_add
> -> dsa_port_notify(DSA_NOTIFIER_FDB_ADD)
> -> dsa_switch_fdb_add
> -> if (!ds->ops->port_fdb_add) return -EOPNOTSUPP;
> -> an error is printed with dev_dbg, and
> dsa_fdb_offload_notify(switchdev_work) is not called.
>
> We can avoid scheduling the worker for nothing and say NOTIFY_OK.
Not sure if this comment is intended to describe what is being added,
only if you have to respin, should this be NOTIFY_DONE?
> Because we don't call dsa_fdb_offload_notify, the static FDB entry will
> remain just in the software bridge.
>
> Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
--
Florian
next prev parent reply other threads:[~2020-12-13 3:30 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-13 2:40 [PATCH v2 net-next 0/6] Offload software learnt bridge addresses to DSA Vladimir Oltean
2020-12-13 2:40 ` [PATCH v2 net-next 1/6] net: bridge: notify switchdev of disappearance of old FDB entry upon migration Vladimir Oltean
2020-12-13 13:22 ` Nikolay Aleksandrov
2020-12-13 13:36 ` Nikolay Aleksandrov
2020-12-13 13:57 ` Vladimir Oltean
2020-12-13 13:55 ` Vladimir Oltean
2020-12-13 14:01 ` Nikolay Aleksandrov
2020-12-13 2:40 ` [PATCH v2 net-next 2/6] net: dsa: don't use switchdev_notifier_fdb_info in dsa_switchdev_event_work Vladimir Oltean
2020-12-13 3:43 ` Florian Fainelli
2020-12-13 2:40 ` [PATCH v2 net-next 3/6] net: dsa: move switchdev event implementation under the same switch/case statement Vladimir Oltean
2020-12-13 3:31 ` Florian Fainelli
2020-12-13 2:40 ` [PATCH v2 net-next 4/6] net: dsa: exit early in dsa_slave_switchdev_event if we can't program the FDB Vladimir Oltean
2020-12-13 3:29 ` Florian Fainelli [this message]
2020-12-13 2:40 ` [PATCH v2 net-next 5/6] net: dsa: listen for SWITCHDEV_{FDB,DEL}_ADD_TO_DEVICE on foreign bridge neighbors Vladimir Oltean
2020-12-13 3:48 ` Florian Fainelli
2020-12-13 2:40 ` [PATCH v2 net-next 6/6] net: dsa: ocelot: request DSA to fix up lack of address learning on CPU port Vladimir Oltean
2020-12-13 3:49 ` Florian Fainelli
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=972b7427-0efe-118b-5e11-88ea10c2d217@gmail.com \
--to=f.fainelli@gmail.com \
--cc=andrew@lunn.ch \
--cc=bridge@lists.linux-foundation.org \
--cc=claudiu.manoil@nxp.com \
--cc=davem@davemloft.net \
--cc=dqfext@gmail.com \
--cc=idosch@idosch.org \
--cc=jiri@resnulli.us \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=marek.behun@nic.cz \
--cc=netdev@vger.kernel.org \
--cc=nikolay@nvidia.com \
--cc=roopa@nvidia.com \
--cc=tobias@waldekranz.com \
--cc=vivien.didelot@gmail.com \
--cc=vladimir.oltean@nxp.com \
--cc=wintera@linux.ibm.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;
as well as URLs for NNTP newsgroup(s).