net: bridge: multicast: add EHT allow/block handling
authorNikolay Aleksandrov <nikolay@nvidia.com>
Wed, 20 Jan 2021 14:51:58 +0000 (16:51 +0200)
committerJakub Kicinski <kuba@kernel.org>
Sat, 23 Jan 2021 03:39:56 +0000 (19:39 -0800)
commit474ddb37fa3ad0454f8d07bb9fb53ceab190b667
tree9d449130b74d9a82e14f527bfb11e0f486e49941
parentdba6b0a5ca21c7c270977879f5670c78823e0da2
net: bridge: multicast: add EHT allow/block handling

Add support for IGMPv3/MLDv2 allow/block EHT handling. Similar to how
the reports are processed we have 2 cases when the group is in include
or exclude mode, these are processed as follows:
 - group include
  - allow: create missing entries
  - block: remove existing matching entries and remove the corresponding
    S,G entries if there are no more set host entries, then possibly
    delete the whole group if there are no more S,G entries

 - group exclude
  - allow
    - host include: create missing entries
    - host exclude: remove existing matching entries and remove the
      corresponding S,G entries if there are no more set host entries
  - block
    - host include: remove existing matching entries and remove the
      corresponding S,G entries if there are no more set host entries,
      then possibly delete the whole group if there are no more S,G entries
    - host exclude: create missing entries

Signed-off-by: Nikolay Aleksandrov <nikolay@nvidia.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
net/bridge/br_multicast.c
net/bridge/br_multicast_eht.c
net/bridge/br_private.h
net/bridge/br_private_mcast_eht.h