Message ID | 20221208152839.1016350-9-idosch@nvidia.com (mailing list archive) |
---|---|
State | Superseded |
Delegated to: | Netdev Maintainers |
Headers | show |
Series | bridge: mcast: Extensions for EVPN | expand |
Context | Check | Description |
---|---|---|
netdev/tree_selection | success | Clearly marked for net-next |
netdev/fixes_present | success | Fixes tag not required for -next series |
netdev/subject_prefix | success | Link |
netdev/cover_letter | success | Series has a cover letter |
netdev/patch_count | success | Link |
netdev/header_inline | success | No static functions without inline keyword in header files |
netdev/build_32bit | success | Errors and warnings before: 7 this patch: 7 |
netdev/cc_maintainers | success | CCed 8 of 8 maintainers |
netdev/build_clang | success | Errors and warnings before: 7 this patch: 7 |
netdev/module_param | success | Was 0 now: 0 |
netdev/verify_signedoff | success | Signed-off-by tag matches author and committer |
netdev/check_selftest | success | No net selftest shell script |
netdev/verify_fixes | success | No Fixes tag |
netdev/build_allmodconfig_warn | success | Errors and warnings before: 8 this patch: 8 |
netdev/checkpatch | success | total: 0 errors, 0 warnings, 0 checks, 15 lines checked |
netdev/kdoc | success | Errors and warnings before: 3 this patch: 3 |
netdev/source_inline | success | Was 0 now: 0 |
On 08/12/2022 17:28, Ido Schimmel wrote: > User space will soon be able to install a (*, G) with a source list, > prompting the creation of a (S, G) entry for each source. > > In this case, the group timer of the (S, G) entry should never be set. > > Solve this by adding a new field to the MDB configuration structure that > denotes whether the (S, G) corresponds to a source or not. > > The field will be set in a subsequent patch where br_mdb_add_group_sg() > is called in order to create a (S, G) entry for each user provided > source. > > Signed-off-by: Ido Schimmel <idosch@nvidia.com> > --- > net/bridge/br_mdb.c | 2 +- > net/bridge/br_private.h | 1 + > 2 files changed, 2 insertions(+), 1 deletion(-) > > diff --git a/net/bridge/br_mdb.c b/net/bridge/br_mdb.c > index 95780652cdbf..7cda9d1c5c93 100644 > --- a/net/bridge/br_mdb.c > +++ b/net/bridge/br_mdb.c > @@ -814,7 +814,7 @@ static int br_mdb_add_group_sg(const struct br_mdb_config *cfg, > return -ENOMEM; > } > rcu_assign_pointer(*pp, p); > - if (!(flags & MDB_PG_FLAGS_PERMANENT)) > + if (!(flags & MDB_PG_FLAGS_PERMANENT) && !cfg->src_entry) > mod_timer(&p->timer, > now + brmctx->multicast_membership_interval); > br_mdb_notify(cfg->br->dev, mp, p, RTM_NEWMDB); > diff --git a/net/bridge/br_private.h b/net/bridge/br_private.h > index 74f17b56c9eb..e98bfe3c02e1 100644 > --- a/net/bridge/br_private.h > +++ b/net/bridge/br_private.h > @@ -98,6 +98,7 @@ struct br_mdb_config { > struct net_bridge_port *p; > struct br_mdb_entry *entry; > struct br_ip group; > + bool src_entry; > }; > #endif > Acked-by: Nikolay Aleksandrov <razor@blackwall.org>
diff --git a/net/bridge/br_mdb.c b/net/bridge/br_mdb.c index 95780652cdbf..7cda9d1c5c93 100644 --- a/net/bridge/br_mdb.c +++ b/net/bridge/br_mdb.c @@ -814,7 +814,7 @@ static int br_mdb_add_group_sg(const struct br_mdb_config *cfg, return -ENOMEM; } rcu_assign_pointer(*pp, p); - if (!(flags & MDB_PG_FLAGS_PERMANENT)) + if (!(flags & MDB_PG_FLAGS_PERMANENT) && !cfg->src_entry) mod_timer(&p->timer, now + brmctx->multicast_membership_interval); br_mdb_notify(cfg->br->dev, mp, p, RTM_NEWMDB); diff --git a/net/bridge/br_private.h b/net/bridge/br_private.h index 74f17b56c9eb..e98bfe3c02e1 100644 --- a/net/bridge/br_private.h +++ b/net/bridge/br_private.h @@ -98,6 +98,7 @@ struct br_mdb_config { struct net_bridge_port *p; struct br_mdb_entry *entry; struct br_ip group; + bool src_entry; }; #endif
User space will soon be able to install a (*, G) with a source list, prompting the creation of a (S, G) entry for each source. In this case, the group timer of the (S, G) entry should never be set. Solve this by adding a new field to the MDB configuration structure that denotes whether the (S, G) corresponds to a source or not. The field will be set in a subsequent patch where br_mdb_add_group_sg() is called in order to create a (S, G) entry for each user provided source. Signed-off-by: Ido Schimmel <idosch@nvidia.com> --- net/bridge/br_mdb.c | 2 +- net/bridge/br_private.h | 1 + 2 files changed, 2 insertions(+), 1 deletion(-)