netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Vladimir Oltean <olteanv@gmail.com>
To: Nikolay Aleksandrov <nikolay@nvidia.com>
Cc: netdev@vger.kernel.org, Andrew Lunn <andrew@lunn.ch>,
	Florian Fainelli <f.fainelli@gmail.com>,
	Vivien Didelot <vivien.didelot@gmail.com>,
	Jiri Pirko <jiri@resnulli.us>, Ido Schimmel <idosch@idosch.org>,
	Tobias Waldekranz <tobias@waldekranz.com>,
	Roopa Prabhu <roopa@nvidia.com>,
	Vladimir Oltean <vladimir.oltean@nxp.com>
Subject: Re: [PATCH v4 net-next 01/14] net: bridge: switchdev: send FDB notifications for host addresses
Date: Tue, 29 Jun 2021 14:35:57 +0300	[thread overview]
Message-ID: <20210629113557.eu5it6lfsnnaioej@skbuf> (raw)
In-Reply-To: <984a649e-38fb-9962-e7dd-3cd441a83ec9@nvidia.com>

On Tue, Jun 29, 2021 at 01:40:20PM +0300, Nikolay Aleksandrov wrote:
> > @@ -117,18 +118,16 @@ br_switchdev_fdb_notify(const struct net_bridge_fdb_entry *fdb, int type)
> >  		.is_local = test_bit(BR_FDB_LOCAL, &fdb->flags),
> >  		.offloaded = test_bit(BR_FDB_OFFLOADED, &fdb->flags),
> >  	};
> > -
> > -	if (!fdb->dst)
> > -		return;
> > +	struct net_device *dev = fdb->dst ? fdb->dst->dev : br->dev;
> 
> you should use READ_ONCE() for fdb->dst here to make sure it's read only once,
> to be fair the old code had the same issue :)

Thanks for the comment. I still have budget for one patch until I hit
the 15 limit, so I guess I'll do that separately before this one.
Just trying to make sure I get it right. You want me to annotate
fdb_create(), br_fdb_update(), fdb_add_entry() and
br_fdb_external_learn_add() with WRITE_ONCE() too, right?
Can I resend right away or did you notice other issues in the other
patches?

  reply	other threads:[~2021-06-29 11:36 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-28 21:59 [PATCH v4 net-next 00/14] RX filtering in DSA Vladimir Oltean
2021-06-28 21:59 ` [PATCH v4 net-next 01/14] net: bridge: switchdev: send FDB notifications for host addresses Vladimir Oltean
2021-06-29 10:40   ` Nikolay Aleksandrov
2021-06-29 11:35     ` Vladimir Oltean [this message]
2021-06-29 11:51       ` Nikolay Aleksandrov
2021-06-28 21:59 ` [PATCH v4 net-next 02/14] net: bridge: allow br_fdb_replay to be called for the bridge device Vladimir Oltean
2021-06-28 22:00 ` [PATCH v4 net-next 03/14] net: dsa: delete dsa_legacy_fdb_add and dsa_legacy_fdb_del Vladimir Oltean
2021-06-28 22:00 ` [PATCH v4 net-next 04/14] net: dsa: introduce dsa_is_upstream_port and dsa_switch_is_upstream_of Vladimir Oltean
2021-06-28 22:00 ` [PATCH v4 net-next 05/14] net: dsa: introduce a separate cross-chip notifier type for host MDBs Vladimir Oltean
2021-06-28 22:00 ` [PATCH v4 net-next 06/14] net: dsa: reference count the MDB entries at the cross-chip notifier level Vladimir Oltean
2021-06-28 22:00 ` [PATCH v4 net-next 07/14] net: dsa: introduce a separate cross-chip notifier type for host FDBs Vladimir Oltean
2021-06-28 22:00 ` [PATCH v4 net-next 08/14] net: dsa: reference count the FDB addresses at the cross-chip notifier level Vladimir Oltean
2021-06-28 22:00 ` [PATCH v4 net-next 09/14] net: dsa: install the host MDB and FDB entries in the master's RX filter Vladimir Oltean
2021-06-28 22:00 ` [PATCH v4 net-next 10/14] net: dsa: sync static FDB entries on foreign interfaces to hardware Vladimir Oltean
2021-06-28 22:00 ` [PATCH v4 net-next 11/14] net: dsa: include bridge addresses which are local in the host fdb list Vladimir Oltean
2021-06-28 22:00 ` [PATCH v4 net-next 12/14] net: dsa: include fdb entries pointing to bridge " Vladimir Oltean
2021-06-28 22:00 ` [PATCH v4 net-next 13/14] net: dsa: ensure during dsa_fdb_offload_notify that dev_hold and dev_put are on the same dev Vladimir Oltean
2021-06-28 22:00 ` [PATCH v4 net-next 14/14] net: dsa: replay the local bridge FDB entries pointing to the bridge dev too 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=20210629113557.eu5it6lfsnnaioej@skbuf \
    --to=olteanv@gmail.com \
    --cc=andrew@lunn.ch \
    --cc=f.fainelli@gmail.com \
    --cc=idosch@idosch.org \
    --cc=jiri@resnulli.us \
    --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 \
    /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).