Re: [Bridge] [PATCH net-next v2 9/9] bridge: mcast: Constify 'group' argument in br_multicast_new_port_group()

2022-12-06 Thread Nikolay Aleksandrov
On 06/12/2022 12:58, Ido Schimmel wrote: > The 'group' argument is not modified, so mark it as 'const'. It will > allow us to constify arguments of the callers of this function in future > patches. > > Signed-off-by: Ido Schimmel > --- > > Notes: > v2: > * New patch. > > net/bridge/br_

Re: [Bridge] [PATCH net-next v2 1/9] bridge: mcast: Centralize netlink attribute parsing

2022-12-06 Thread Nikolay Aleksandrov
On 06/12/2022 12:58, Ido Schimmel wrote: > Netlink attributes are currently passed deep in the MDB creation call > chain, making it difficult to add new attributes. In addition, some > validity checks are performed under the multicast lock although they can > be performed before it is ever acquired

[Bridge] [PATCH net-next v2 9/9] bridge: mcast: Constify 'group' argument in br_multicast_new_port_group()

2022-12-06 Thread Ido Schimmel
The 'group' argument is not modified, so mark it as 'const'. It will allow us to constify arguments of the callers of this function in future patches. Signed-off-by: Ido Schimmel --- Notes: v2: * New patch. net/bridge/br_multicast.c | 2 +- net/bridge/br_private.h | 3 ++- 2 files ch

[Bridge] [PATCH net-next v2 8/9] bridge: mcast: Remove redundant function arguments

2022-12-06 Thread Ido Schimmel via Bridge
Drop the first three arguments and instead extract them from the MDB configuration structure. Signed-off-by: Ido Schimmel Acked-by: Nikolay Aleksandrov --- net/bridge/br_mdb.c | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/net/bridge/br_mdb.c b/net/bridge/br_mdb.c

[Bridge] [PATCH net-next v2 7/9] bridge: mcast: Move checks out of critical section

2022-12-06 Thread Ido Schimmel
The checks only require information parsed from the RTM_NEWMDB netlink message and do not rely on any state stored in the bridge driver. Therefore, there is no need to perform the checks in the critical section under the multicast lock. Move the checks out of the critical section. Signed-off-by:

[Bridge] [PATCH net-next v2 6/9] bridge: mcast: Remove br_mdb_parse()

2022-12-06 Thread Ido Schimmel
The parsing of the netlink messages and the validity checks are now performed in br_mdb_config_init() so we can remove br_mdb_parse(). This finally allows us to stop passing netlink attributes deep in the MDB control path and only use the MDB configuration structure. Signed-off-by: Ido Schimmel

[Bridge] [PATCH net-next v2 5/9] bridge: mcast: Use MDB group key from configuration structure

2022-12-06 Thread Ido Schimmel
The MDB group key (i.e., {source, destination, protocol, VID}) is currently determined under the multicast lock from the netlink attributes. Instead, use the group key from the MDB configuration structure that was prepared before acquiring the lock. No functional changes intended. Signed-off-by:

[Bridge] [PATCH net-next v2 4/9] bridge: mcast: Propagate MDB configuration structure further

2022-12-06 Thread Ido Schimmel via Bridge
As an intermediate step towards only using the new MDB configuration structure, pass it further in the control path instead of passing individual attributes. No functional changes intended. Signed-off-by: Ido Schimmel Acked-by: Nikolay Aleksandrov --- Notes: v2: * Pass 'cfg' as 'const'

[Bridge] [PATCH net-next v2 3/9] bridge: mcast: Use MDB configuration structure where possible

2022-12-06 Thread Ido Schimmel via Bridge
The MDB configuration structure (i.e., struct br_mdb_config) now includes all the necessary information from the parsed RTM_{NEW,DEL}MDB netlink messages, so use it. This will later allow us to delete the calls to br_mdb_parse() from br_mdb_add() and br_mdb_del(). No functional changes intended.

[Bridge] [PATCH net-next v2 2/9] bridge: mcast: Remove redundant checks

2022-12-06 Thread Ido Schimmel via Bridge
These checks are now redundant as they are performed by br_mdb_config_init() while parsing the RTM_{NEW,DEL}MDB messages. Remove them. Signed-off-by: Ido Schimmel Acked-by: Nikolay Aleksandrov --- net/bridge/br_mdb.c | 63 +++-- 1 file changed, 9 inserti

[Bridge] [PATCH net-next v2 0/9] bridge: mcast: Preparations for EVPN extensions

2022-12-06 Thread Ido Schimmel via Bridge
This patchset was split from [1] and includes non-functional changes aimed at making it easier to add additional netlink attributes later on. Future extensions are available here [2]. The idea behind these patches is to create an MDB configuration structure into which netlink messages are parsed i

[Bridge] [PATCH net-next v2 1/9] bridge: mcast: Centralize netlink attribute parsing

2022-12-06 Thread Ido Schimmel via Bridge
Netlink attributes are currently passed deep in the MDB creation call chain, making it difficult to add new attributes. In addition, some validity checks are performed under the multicast lock although they can be performed before it is ever acquired. As a first step towards solving these issues,

Re: [Bridge] [PATCH net-next 0/8] bridge: mcast: Preparations for EVPN extensions

2022-12-06 Thread Ido Schimmel
On Mon, Dec 05, 2022 at 01:55:05PM +0200, Nikolay Aleksandrov wrote: > One thought (not a big deal) but it would've been ideal if we could > initialize the config > struct once when parsing and then pass it around as a const argument. I know > that its > arguments are currently passed to function

Re: [Bridge] [PATCH net-next 1/8] bridge: mcast: Centralize netlink attribute parsing

2022-12-06 Thread Ido Schimmel via Bridge
On Mon, Dec 05, 2022 at 01:34:08PM +0200, Nikolay Aleksandrov wrote: > I just noticed the skb argument is unused. Does it get used in a future > change? Nope :) > Also a minor nit - I think nlh can be a const, nlmsg_parse_deprecated already > uses a const nlh. Removed the 'skb' argument and ma