All of lore.kernel.org
 help / color / mirror / Atom feed
From: Florian Fainelli <f.fainelli@gmail.com>
To: Vladimir Oltean <olteanv@gmail.com>,
	Jakub Kicinski <kuba@kernel.org>,
	"David S. Miller" <davem@davemloft.net>,
	netdev@vger.kernel.org
Cc: Andrew Lunn <andrew@lunn.ch>,
	Vivien Didelot <vivien.didelot@gmail.com>,
	Tobias Waldekranz <tobias@waldekranz.com>,
	Jiri Pirko <jiri@resnulli.us>, Ido Schimmel <idosch@idosch.org>,
	Roopa Prabhu <roopa@nvidia.com>,
	Nikolay Aleksandrov <nikolay@nvidia.com>,
	Vladimir Oltean <vladimir.oltean@nxp.com>
Subject: Re: [PATCH net-next 3/7] net: switchdev: add a context void pointer to struct switchdev_notifier_info
Date: Sat, 26 Jun 2021 19:58:02 -0700	[thread overview]
Message-ID: <30f7a2a2-5ac9-3c91-67e4-b4f624262ec9@gmail.com> (raw)
In-Reply-To: <20210625185321.626325-4-olteanv@gmail.com>



On 6/25/2021 11:53 AM, Vladimir Oltean wrote:
> From: Vladimir Oltean <vladimir.oltean@nxp.com>
> 
> In the case where the driver asks for a replay of a certain type of
> event (port object or attribute) for a bridge port that is a LAG, it may
> do so because this port has just joined the LAG.
> 
> But there might already be other switchdev ports in that LAG, and it is
> preferable that those preexisting switchdev ports do not act upon the
> replayed event.
> 
> The solution is to add a context to switchdev events, which is NULL most
> of the time (when the bridge layer initiates the call) but which can be
> set to a value controlled by the switchdev driver when a replay is
> requested. The driver can then check the context to figure out if all
> ports within the LAG should act upon the switchdev event, or just the
> ones that match the context.
> 
> We have to modify all switchdev_handle_* helper functions as well as the
> prototypes in the drivers that use these helpers too, because these
> helpers hide the underlying struct switchdev_notifier_info from us and
> there is no way to retrieve the context otherwise.
> 
> The context structure will be populated and used in later patches.
> 
> Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>

Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
-- 
Florian

  reply	other threads:[~2021-06-27  2:58 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-25 18:53 [PATCH net-next 0/7] Cleanup for the bridge replay helpers Vladimir Oltean
2021-06-25 18:53 ` [PATCH net-next 1/7] net: bridge: include the is_local bit in br_fdb_replay Vladimir Oltean
2021-06-27  2:55   ` Florian Fainelli
2021-06-25 18:53 ` [PATCH net-next 2/7] net: ocelot: delete call to br_fdb_replay Vladimir Oltean
2021-06-27  2:55   ` Florian Fainelli
2021-06-25 18:53 ` [PATCH net-next 3/7] net: switchdev: add a context void pointer to struct switchdev_notifier_info Vladimir Oltean
2021-06-27  2:58   ` Florian Fainelli [this message]
2021-06-25 18:53 ` [PATCH net-next 4/7] net: bridge: ignore switchdev events for LAG ports which didn't request replay Vladimir Oltean
2021-06-25 21:48   ` Vladimir Oltean
2021-06-27  2:59   ` Florian Fainelli
2021-06-25 18:53 ` [PATCH net-next 5/7] net: bridge: constify variables in the replay helpers Vladimir Oltean
2021-06-27  2:56   ` Florian Fainelli
2021-06-25 18:53 ` [PATCH net-next 6/7] net: bridge: allow the switchdev replay functions to be called for deletion Vladimir Oltean
2021-06-27  3:01   ` Florian Fainelli
2021-06-25 18:53 ` [PATCH net-next 7/7] net: dsa: replay a deletion of switchdev objects for ports leaving a bridged LAG Vladimir Oltean
2021-06-27  3:01   ` 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=30f7a2a2-5ac9-3c91-67e4-b4f624262ec9@gmail.com \
    --to=f.fainelli@gmail.com \
    --cc=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=idosch@idosch.org \
    --cc=jiri@resnulli.us \
    --cc=kuba@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=nikolay@nvidia.com \
    --cc=olteanv@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.