* [PATCH iproute2-next 0/2] bridge: support for per-port mcast_router options
@ 2022-03-16 9:02 Joachim Wiberg
2022-03-16 9:02 ` [PATCH iproute2-next 1/2] bridge: support for controlling mcast_router per port Joachim Wiberg
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Joachim Wiberg @ 2022-03-16 9:02 UTC (permalink / raw)
To: netdev
Cc: David Ahern, Stephen Hemminger, Nikolay Aleksandrov, Joachim Wiberg
Hi,
this patch set adds per bridge port mcast_router option. I.e., the
ability to control how IGMP/MLD snooping learns of external routers
where both known and unknown multicast should be flooded. Similar
functionality per-port and per-vlan setting already exist.
Best regards
/Joachim
Joachim Wiberg (2):
bridge: support for controlling mcast_router per port
man: bridge: document per-port mcast_router settings
bridge/link.c | 15 +++++++++++++++
man/man8/bridge.8 | 15 +++++++++++++++
2 files changed, 30 insertions(+)
--
2.25.1
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH iproute2-next 1/2] bridge: support for controlling mcast_router per port
2022-03-16 9:02 [PATCH iproute2-next 0/2] bridge: support for per-port mcast_router options Joachim Wiberg
@ 2022-03-16 9:02 ` Joachim Wiberg
2022-03-16 9:02 ` [PATCH iproute2-next 2/2] man: bridge: document per-port mcast_router settings Joachim Wiberg
2022-03-20 23:40 ` [PATCH iproute2-next 0/2] bridge: support for per-port mcast_router options patchwork-bot+netdevbpf
2 siblings, 0 replies; 4+ messages in thread
From: Joachim Wiberg @ 2022-03-16 9:02 UTC (permalink / raw)
To: netdev
Cc: David Ahern, Stephen Hemminger, Nikolay Aleksandrov, Joachim Wiberg
The bridge vlan command supports setting mcast_router per-port and
per-vlan, what's however missing is the ability to set the per-port
mcast_router options, e.g. when VLAN filtering is disabled.
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
---
bridge/link.c | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/bridge/link.c b/bridge/link.c
index 80b01f56..3810fa04 100644
--- a/bridge/link.c
+++ b/bridge/link.c
@@ -156,6 +156,9 @@ static void print_protinfo(FILE *fp, struct rtattr *attr)
if (prtb[IFLA_BRPORT_BCAST_FLOOD])
print_on_off(PRINT_ANY, "bcast_flood", "bcast_flood %s ",
rta_getattr_u8(prtb[IFLA_BRPORT_BCAST_FLOOD]));
+ if (prtb[IFLA_BRPORT_MULTICAST_ROUTER])
+ print_uint(PRINT_ANY, "mcast_router", "mcast_router %u ",
+ rta_getattr_u8(prtb[IFLA_BRPORT_MULTICAST_ROUTER]));
if (prtb[IFLA_BRPORT_MCAST_TO_UCAST])
print_on_off(PRINT_ANY, "mcast_to_unicast", "mcast_to_unicast %s ",
rta_getattr_u8(prtb[IFLA_BRPORT_MCAST_TO_UCAST]));
@@ -270,6 +273,7 @@ static void usage(void)
" [ learning {on | off} ]\n"
" [ learning_sync {on | off} ]\n"
" [ flood {on | off} ]\n"
+ " [ mcast_router MULTICAST_ROUTER ]\n"
" [ mcast_flood {on | off} ]\n"
" [ bcast_flood {on | off} ]\n"
" [ mcast_to_unicast {on | off} ]\n"
@@ -303,6 +307,7 @@ static int brlink_modify(int argc, char **argv)
__s8 learning_sync = -1;
__s8 flood = -1;
__s8 vlan_tunnel = -1;
+ __s8 mcast_router = -1;
__s8 mcast_flood = -1;
__s8 bcast_flood = -1;
__s8 mcast_to_unicast = -1;
@@ -359,6 +364,9 @@ static int brlink_modify(int argc, char **argv)
flood = parse_on_off("flood", *argv, &ret);
if (ret)
return ret;
+ } else if (strcmp(*argv, "mcast_router") == 0) {
+ NEXT_ARG();
+ mcast_router = atoi(*argv);
} else if (strcmp(*argv, "mcast_flood") == 0) {
NEXT_ARG();
mcast_flood = parse_on_off("mcast_flood", *argv, &ret);
@@ -473,6 +481,9 @@ static int brlink_modify(int argc, char **argv)
addattr8(&req.n, sizeof(req), IFLA_BRPORT_PROTECT, root_block);
if (flood >= 0)
addattr8(&req.n, sizeof(req), IFLA_BRPORT_UNICAST_FLOOD, flood);
+ if (mcast_router >= 0)
+ addattr8(&req.n, sizeof(req), IFLA_BRPORT_MULTICAST_ROUTER,
+ mcast_router);
if (mcast_flood >= 0)
addattr8(&req.n, sizeof(req), IFLA_BRPORT_MCAST_FLOOD,
mcast_flood);
--
2.25.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH iproute2-next 2/2] man: bridge: document per-port mcast_router settings
2022-03-16 9:02 [PATCH iproute2-next 0/2] bridge: support for per-port mcast_router options Joachim Wiberg
2022-03-16 9:02 ` [PATCH iproute2-next 1/2] bridge: support for controlling mcast_router per port Joachim Wiberg
@ 2022-03-16 9:02 ` Joachim Wiberg
2022-03-20 23:40 ` [PATCH iproute2-next 0/2] bridge: support for per-port mcast_router options patchwork-bot+netdevbpf
2 siblings, 0 replies; 4+ messages in thread
From: Joachim Wiberg @ 2022-03-16 9:02 UTC (permalink / raw)
To: netdev
Cc: David Ahern, Stephen Hemminger, Nikolay Aleksandrov, Joachim Wiberg
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
---
man/man8/bridge.8 | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/man/man8/bridge.8 b/man/man8/bridge.8
index 93852ed8..2fa4f3d6 100644
--- a/man/man8/bridge.8
+++ b/man/man8/bridge.8
@@ -47,6 +47,8 @@ bridge \- show / manipulate bridge addresses and devices
.BR hwmode " { " vepa " | " veb " } ] [ "
.BR bcast_flood " { " on " | " off " } ] [ "
.BR mcast_flood " { " on " | " off " } ] [ "
+.BR mcast_router
+.IR MULTICAST_ROUTER " ] ["
.BR mcast_to_unicast " { " on " | " off " } ] [ "
.BR neigh_suppress " { " on " | " off " } ] [ "
.BR vlan_tunnel " { " on " | " off " } ] [ "
@@ -473,6 +475,19 @@ By default this flag is on.
Controls whether multicast traffic for which there is no MDB entry will be
flooded towards this given port. By default this flag is on.
+.TP
+.BI mcast_router " MULTICAST_ROUTER "
+This flag is almost the same as the per-VLAN flag, see below, except its
+value can only be set in the range 0-2. The default is
+.B 1
+where the bridge figures out automatically where an IGMP/MLD querier,
+MRDISC capable device, or PIM router, is located. Setting this flag to
+.B 2
+is useful in cases where the multicast router does not indicate its
+presence in any meaningful way (e.g. older versions of SMCRoute, or
+mrouted), or when there is a need for forwarding both known and unknown
+IP multicast to a secondary/backup router.
+
.TP
.BR "mcast_to_unicast on " or " mcast_to_unicast off "
Controls whether a given port will replicate packets using unicast
--
2.25.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH iproute2-next 0/2] bridge: support for per-port mcast_router options
2022-03-16 9:02 [PATCH iproute2-next 0/2] bridge: support for per-port mcast_router options Joachim Wiberg
2022-03-16 9:02 ` [PATCH iproute2-next 1/2] bridge: support for controlling mcast_router per port Joachim Wiberg
2022-03-16 9:02 ` [PATCH iproute2-next 2/2] man: bridge: document per-port mcast_router settings Joachim Wiberg
@ 2022-03-20 23:40 ` patchwork-bot+netdevbpf
2 siblings, 0 replies; 4+ messages in thread
From: patchwork-bot+netdevbpf @ 2022-03-20 23:40 UTC (permalink / raw)
To: Joachim Wiberg; +Cc: netdev, dsahern, stephen, razor
Hello:
This series was applied to iproute2/iproute2-next.git (main)
by David Ahern <dsahern@kernel.org>:
On Wed, 16 Mar 2022 10:02:55 +0100 you wrote:
> Hi,
>
> this patch set adds per bridge port mcast_router option. I.e., the
> ability to control how IGMP/MLD snooping learns of external routers
> where both known and unknown multicast should be flooded. Similar
> functionality per-port and per-vlan setting already exist.
>
> [...]
Here is the summary with links:
- [iproute2-next,1/2] bridge: support for controlling mcast_router per port
https://git.kernel.org/pub/scm/network/iproute2/iproute2-next.git/commit/?id=9e82e828764a
- [iproute2-next,2/2] man: bridge: document per-port mcast_router settings
https://git.kernel.org/pub/scm/network/iproute2/iproute2-next.git/commit/?id=e48808692b6d
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2022-03-20 23:40 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-16 9:02 [PATCH iproute2-next 0/2] bridge: support for per-port mcast_router options Joachim Wiberg
2022-03-16 9:02 ` [PATCH iproute2-next 1/2] bridge: support for controlling mcast_router per port Joachim Wiberg
2022-03-16 9:02 ` [PATCH iproute2-next 2/2] man: bridge: document per-port mcast_router settings Joachim Wiberg
2022-03-20 23:40 ` [PATCH iproute2-next 0/2] bridge: support for per-port mcast_router options patchwork-bot+netdevbpf
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).