Re: [Bridge] [PATCH net-next v2 00/15] net: bridge: mcast: initial IGMPv3 support (part 1)

2020-09-02 Thread David Miller
From: Nikolay Aleksandrov Date: Wed, 2 Sep 2020 23:17:46 +0300 > i. e. this doesn't exclude IPv6 or makes it worse for it, on the > contrary the ops needed to > implement MLDv2 state transitions are in this set, they just need to > be extended for v6. > The new br_ip src group field contains

Re: [Bridge] [PATCH net-next v2 00/15] net: bridge: mcast: initial IGMPv3 support (part 1)

2020-09-02 Thread David Miller
From: Nikolay Aleksandrov Date: Wed, 2 Sep 2020 23:08:40 +0300 > Once all the infra (with fast-path) for IGMPv3 is in, MLDv2 should > be a much easier change, but I must admit given the amount of work > this required I haven't yet looked into MLDv2 in details. The > majority of the changes would

Re: [Bridge] [PATCH net-next v2 00/15] net: bridge: mcast: initial IGMPv3 support (part 1)

2020-09-02 Thread Nikolay Aleksandrov
On 9/2/20 11:08 PM, Nikolay Aleksandrov wrote: On 9/2/20 10:58 PM, David Miller wrote: From: Nikolay Aleksandrov Date: Wed,  2 Sep 2020 14:25:14 +0300 Here're the sets that will come next (in order):   - Fast path patch-set which adds support for (S, G) mdb entries needed     for IGMPv3

Re: [Bridge] [PATCH net-next v2 00/15] net: bridge: mcast: initial IGMPv3 support (part 1)

2020-09-02 Thread Nikolay Aleksandrov
On 9/2/20 10:58 PM, David Miller wrote: From: Nikolay Aleksandrov Date: Wed, 2 Sep 2020 14:25:14 +0300 Here're the sets that will come next (in order): - Fast path patch-set which adds support for (S, G) mdb entries needed for IGMPv3 forwarding, entry add source (kernel, user-space

Re: [Bridge] [PATCH net-next v2 00/15] net: bridge: mcast: initial IGMPv3 support (part 1)

2020-09-02 Thread David Miller
From: Nikolay Aleksandrov Date: Wed, 2 Sep 2020 14:25:14 +0300 > Here're the sets that will come next (in order): > - Fast path patch-set which adds support for (S, G) mdb entries needed >for IGMPv3 forwarding, entry add source (kernel, user-space etc) >needed for IGMPv3 entry

[Bridge] [PATCH net-next v2 10/15] net: bridge: mcast: support for IGMPv3 IGMPV3_ALLOW_NEW_SOURCES report

2020-09-02 Thread Nikolay Aleksandrov
This patch adds handling for the IGMPV3_ALLOW_NEW_SOURCES IGMPv3 report type and limits it only when multicast_igmp_version == 3. Now that IGMPv3 handling functions will be managing timers we need to delay their activation, thus a new argument is added which controls if the timer should be

[Bridge] [PATCH net-next v2 12/15] net: bridge: mcast: support for IGMPV3_CHANGE_TO_INCLUDE/EXCLUDE report

2020-09-02 Thread Nikolay Aleksandrov
In order to process IGMPV3_CHANGE_TO_INCLUDE/EXCLUDE report types we need new helpers which allow us to mark entries based on their timer state and to query only marked entries. v2: directly do flag bit operations Signed-off-by: Nikolay Aleksandrov --- net/bridge/br_multicast.c | 267

[Bridge] [PATCH net-next v2 04/15] net: bridge: mcast: add support for group-and-source specific queries

2020-09-02 Thread Nikolay Aleksandrov
Allows br_ip4_multicast_alloc_query to build queries with the port group's source lists and sends a query for sources over and under lmqt when necessary as per RFC 3376 with the suppress flag set appropriately. Signed-off-by: Nikolay Aleksandrov --- net/bridge/br_multicast.c | 126

[Bridge] [PATCH net-next v2 03/15] net: bridge: mcast: add support for src list and filter mode dumping

2020-09-02 Thread Nikolay Aleksandrov
Support per port group src list (address and timer) and filter mode dumping. Protected by either multicast_lock or rcu and currently limited only to IPv4. v2: require RCU or multicast_lock to traverse src groups Signed-off-by: Nikolay Aleksandrov --- include/uapi/linux/if_bridge.h | 21

[Bridge] [PATCH net-next v2 11/15] net: bridge: mcast: support for IGMPV3_MODE_IS_INCLUDE/EXCLUDE report

2020-09-02 Thread Nikolay Aleksandrov
In order to process IGMPV3_MODE_IS_INCLUDE/EXCLUDE report types we need some new helpers which allow us to set/clear flags for all current entries and later delete marked entries after the report sources have been processed. v2: drop flag helpers and directly do flag bit operations

[Bridge] [PATCH net-next v2 06/15] net: bridge: mcast: add support for group query retransmit

2020-09-02 Thread Nikolay Aleksandrov
We need to be able to retransmit group-specific and group-and-source specific queries. The new timer takes care of those. Signed-off-by: Nikolay Aleksandrov --- net/bridge/br_multicast.c | 65 ++- net/bridge/br_private.h | 8 + 2 files changed, 65

[Bridge] [PATCH net-next v2 14/15] net: bridge: mcast: improve v3 query processing

2020-09-02 Thread Nikolay Aleksandrov
When an IGMPv3 query is received and we're operating in v3 mode then we need to avoid updating group timers if the suppress flag is set. Also we should update only timers for groups in exclude mode. Signed-off-by: Nikolay Aleksandrov --- net/bridge/br_multicast.c | 7 +-- 1 file changed, 5

[Bridge] [PATCH net-next v2 05/15] net: bridge: mcast: factor out port group del

2020-09-02 Thread Nikolay Aleksandrov
In order to avoid future errors and reduce code duplication we should factor out the port group del sequence. This allows us to have one function which takes care of all details when removing a port group. Signed-off-by: Nikolay Aleksandrov --- net/bridge/br_mdb.c | 15 +-

[Bridge] [PATCH net-next v2 15/15] net: bridge: mcast: destroy all entries via gc

2020-09-02 Thread Nikolay Aleksandrov
Since each entry type has timers that can be running simultaneously we need to make sure that entries are not freed before their timers have finished. In order to do that generalize the src gc work to mcast gc work and use a callback to free the entries (mdb, port group or src). Signed-off-by:

[Bridge] [PATCH net-next v2 01/15] net: bridge: mdb: arrange internal structs so fast-path fields are close

2020-09-02 Thread Nikolay Aleksandrov
Before this patch we'd need 2 cache lines for fast-path, now all used fields are in the first cache line. Signed-off-by: Nikolay Aleksandrov --- net/bridge/br_private.h | 14 +- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/net/bridge/br_private.h

[Bridge] [PATCH net-next v2 00/15] net: bridge: mcast: initial IGMPv3 support (part 1)

2020-09-02 Thread Nikolay Aleksandrov
Hi all, This patch-set implements the control plane for initial IGMPv3 support which takes care of include/exclude sets and state transitions based on the different report types. Patch 01 arranges the structure better by moving the frequently used fields together, patches 02 and 03 add support for

[Bridge] [PATCH net-next v2 07/15] net: bridge: mdb: push notifications in __br_mdb_add/del

2020-09-02 Thread Nikolay Aleksandrov
This change is in preparation for using the mdb port group entries when sending a notification, so their full state and additional attributes can be filled in. Signed-off-by: Nikolay Aleksandrov --- net/bridge/br_mdb.c | 20 1 file changed, 8 insertions(+), 12 deletions(-)

[Bridge] [PATCH net-next v2 09/15] net: bridge: mcast: delete expired port groups without srcs

2020-09-02 Thread Nikolay Aleksandrov
If an expired port group is in EXCLUDE mode, then we have to turn it into INCLUDE mode, remove all srcs with zero timer and finally remove the group itself if there are no more srcs with an active timer. For IGMPv2 use there would be no sources, so this will reduce to just removing the group as

[Bridge] [PATCH net-next v2 13/15] net: bridge: mcast: support for IGMPV3_BLOCK_OLD_SOURCES report

2020-09-02 Thread Nikolay Aleksandrov
We already have all necessary helpers, so process IGMPV3_BLOCK_OLD_SOURCES as per the RFC. v2: directly do flag bit operations Signed-off-by: Nikolay Aleksandrov --- net/bridge/br_multicast.c | 90 +++ 1 file changed, 90 insertions(+) diff --git

[Bridge] [PATCH net-next v2 02/15] net: bridge: mcast: add support for group source list

2020-09-02 Thread Nikolay Aleksandrov
Initial functions for group source lists which are needed for IGMPv3 include/exclude lists. Currently only IPv4 sources are supported. User-added mdb entries are created with exclude filter mode, we can extend that later to allow user-supplied mode. When group src entries are deleted, they're