[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <2212b070-a0a7-21c6-e157-573c432fbf3f@nvidia.com>
Date: Thu, 28 Oct 2021 11:50:01 +0300
From: Nikolay Aleksandrov <nikolay@...dia.com>
To: Vladimir Oltean <vladimir.oltean@....com>, netdev@...r.kernel.org
Cc: Jakub Kicinski <kuba@...nel.org>,
"David S. Miller" <davem@...emloft.net>,
Roopa Prabhu <roopa@...dia.com>, Jiri Pirko <jiri@...dia.com>,
Ido Schimmel <idosch@...dia.com>
Subject: Re: [PATCH net-next 4/5] net: bridge: mdb: move all switchdev logic
to br_switchdev.c
On 27/10/2021 19:21, Vladimir Oltean wrote:
> The following functions:
>
> br_mdb_complete
> br_switchdev_mdb_populate
> br_mdb_replay_one
> br_mdb_queue_one
> br_mdb_replay
> br_mdb_switchdev_host_port
> br_mdb_switchdev_host
> br_switchdev_mdb_notify
>
> are only accessible from code paths where CONFIG_NET_SWITCHDEV is
> enabled. So move them to br_switchdev.c, in order for that code to be
> compiled out if that config option is disabled.
>
> Note that br_switchdev.c gets build regardless of whether
> CONFIG_BRIDGE_IGMP_SNOOPING is enabled or not, whereas br_mdb.c only got
> built when CONFIG_BRIDGE_IGMP_SNOOPING was enabled. So to preserve
> correct compilation with CONFIG_BRIDGE_IGMP_SNOOPING being disabled, we
> must now place an #ifdef around these functions in br_switchdev.c.
> The offending bridge data structures that need this are
> br->multicast_lock and br->mdb_list, these are also compiled out of
> struct net_bridge when CONFIG_BRIDGE_IGMP_SNOOPING is turned off.
>
> Signed-off-by: Vladimir Oltean <vladimir.oltean@....com>
> ---
> net/bridge/br_mdb.c | 244 ------------------------------------
> net/bridge/br_private.h | 17 +--
> net/bridge/br_switchdev.c | 253 ++++++++++++++++++++++++++++++++++++++
> 3 files changed, 262 insertions(+), 252 deletions(-)
>
Acked-by: Nikolay Aleksandrov <nikolay@...dia.com>
Powered by blists - more mailing lists