* [PATCH iproute2-next v2 0/6] bridge: support for controlling broadcast flooding per port
@ 2022-03-09 7:17 Joachim Wiberg
2022-03-09 7:17 ` [PATCH iproute2-next v2 1/6] bridge: support for controlling flooding of broadcast " Joachim Wiberg
` (5 more replies)
0 siblings, 6 replies; 9+ messages in thread
From: Joachim Wiberg @ 2022-03-09 7:17 UTC (permalink / raw)
To: netdev; +Cc: David Ahern, Stephen Hemminger, Nikolay Aleksandrov,
Joachim Wiberg
Hi,
this v2 of the patch set expands on the original by also updating the
ip/link_bridge_slave.c, and its corresponding manual page. Both this
and the original address a slight omission in controlling broadcast
flooding per bridge port, which the bridge has had support for a good
while now.
I've grouped the setting alongside it's cousin mcast_flood, maybe we
should move unicast flooding to the same group of settings, to make
it easier to locate them in manuals and usage text?
v2:
- Add bcast_flood also to ip/iplink_bridge_slave.c
- Update man page for ip-link(8) with new bcast_flood flag
- Update mcast_flood in same man page slightly
- Fix minor weird whitespace issues causing sudden line breaks
v1:
- Add bcast_flood to bridge/link.c
- Update man page for bridge(8) with bcast_flood for brports
Best regards
/Joachim
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH iproute2-next v2 1/6] bridge: support for controlling flooding of broadcast per port
2022-03-09 7:17 [PATCH iproute2-next v2 0/6] bridge: support for controlling broadcast flooding per port Joachim Wiberg
@ 2022-03-09 7:17 ` Joachim Wiberg
2022-03-09 7:17 ` [PATCH iproute2-next v2 2/6] man: bridge: document new bcast_flood flag for bridge ports Joachim Wiberg
` (4 subsequent siblings)
5 siblings, 0 replies; 9+ messages in thread
From: Joachim Wiberg @ 2022-03-09 7:17 UTC (permalink / raw)
To: netdev; +Cc: David Ahern, Stephen Hemminger, Nikolay Aleksandrov,
Joachim Wiberg
Add per-port support for controlling flooding of broadcast traffic.
Similar to unicast and multcast flooding that already exist.
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
---
bridge/link.c | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/bridge/link.c b/bridge/link.c
index bc7837a9..407dc8ea 100644
--- a/bridge/link.c
+++ b/bridge/link.c
@@ -153,6 +153,9 @@ static void print_protinfo(FILE *fp, struct rtattr *attr)
if (prtb[IFLA_BRPORT_MCAST_FLOOD])
print_on_off(PRINT_ANY, "mcast_flood", "mcast_flood %s ",
rta_getattr_u8(prtb[IFLA_BRPORT_MCAST_FLOOD]));
+ 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_MCAST_TO_UCAST])
print_on_off(PRINT_ANY, "mcast_to_unicast", "mcast_to_unicast %s ",
rta_getattr_u8(prtb[IFLA_BRPORT_MCAST_TO_UCAST]));
@@ -265,6 +268,7 @@ static void usage(void)
" [ learning_sync {on | off} ]\n"
" [ flood {on | off} ]\n"
" [ mcast_flood {on | off} ]\n"
+ " [ bcast_flood {on | off} ]\n"
" [ mcast_to_unicast {on | off} ]\n"
" [ neigh_suppress {on | off} ]\n"
" [ vlan_tunnel {on | off} ]\n"
@@ -296,6 +300,7 @@ static int brlink_modify(int argc, char **argv)
__s8 flood = -1;
__s8 vlan_tunnel = -1;
__s8 mcast_flood = -1;
+ __s8 bcast_flood = -1;
__s8 mcast_to_unicast = -1;
__s8 isolated = -1;
__s8 hairpin = -1;
@@ -354,6 +359,11 @@ static int brlink_modify(int argc, char **argv)
mcast_flood = parse_on_off("mcast_flood", *argv, &ret);
if (ret)
return ret;
+ } else if (strcmp(*argv, "bcast_flood") == 0) {
+ NEXT_ARG();
+ bcast_flood = parse_on_off("bcast_flood", *argv, &ret);
+ if (ret)
+ return ret;
} else if (strcmp(*argv, "mcast_to_unicast") == 0) {
NEXT_ARG();
mcast_to_unicast = parse_on_off("mcast_to_unicast", *argv, &ret);
@@ -456,6 +466,9 @@ static int brlink_modify(int argc, char **argv)
if (mcast_flood >= 0)
addattr8(&req.n, sizeof(req), IFLA_BRPORT_MCAST_FLOOD,
mcast_flood);
+ if (bcast_flood >= 0)
+ addattr8(&req.n, sizeof(req), IFLA_BRPORT_BCAST_FLOOD,
+ bcast_flood);
if (mcast_to_unicast >= 0)
addattr8(&req.n, sizeof(req), IFLA_BRPORT_MCAST_TO_UCAST,
mcast_to_unicast);
--
2.25.1
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH iproute2-next v2 2/6] man: bridge: document new bcast_flood flag for bridge ports
2022-03-09 7:17 [PATCH iproute2-next v2 0/6] bridge: support for controlling broadcast flooding per port Joachim Wiberg
2022-03-09 7:17 ` [PATCH iproute2-next v2 1/6] bridge: support for controlling flooding of broadcast " Joachim Wiberg
@ 2022-03-09 7:17 ` Joachim Wiberg
2022-03-09 7:17 ` [PATCH iproute2-next v2 3/6] ip: iplink_bridge_slave: support for broadcast flooding Joachim Wiberg
` (3 subsequent siblings)
5 siblings, 0 replies; 9+ messages in thread
From: Joachim Wiberg @ 2022-03-09 7:17 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 | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/man/man8/bridge.8 b/man/man8/bridge.8
index 81ce9e6f..1d03eef1 100644
--- a/man/man8/bridge.8
+++ b/man/man8/bridge.8
@@ -46,6 +46,7 @@ bridge \- show / manipulate bridge addresses and devices
.BR flood " { " on " | " off " } ] [ "
.BR hwmode " { " vepa " | " veb " } ] [ "
.BR mcast_flood " { " on " | " off " } ] [ "
+.BR bcast_flood " { " on " | " off " } ] [ "
.BR mcast_to_unicast " { " on " | " off " } ] [ "
.BR neigh_suppress " { " on " | " off " } ] [ "
.BR vlan_tunnel " { " on " | " off " } ] [ "
@@ -466,6 +467,11 @@ switch.
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
+.BR "bcast_flood on " or " bcast_flood off "
+Controls flooding of broadcast traffic on the given port.
+By default this flag is on.
+
.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] 9+ messages in thread
* [PATCH iproute2-next v2 3/6] ip: iplink_bridge_slave: support for broadcast flooding
2022-03-09 7:17 [PATCH iproute2-next v2 0/6] bridge: support for controlling broadcast flooding per port Joachim Wiberg
2022-03-09 7:17 ` [PATCH iproute2-next v2 1/6] bridge: support for controlling flooding of broadcast " Joachim Wiberg
2022-03-09 7:17 ` [PATCH iproute2-next v2 2/6] man: bridge: document new bcast_flood flag for bridge ports Joachim Wiberg
@ 2022-03-09 7:17 ` Joachim Wiberg
2022-03-09 7:17 ` [PATCH iproute2-next v2 4/6] man: ip-link: document new bcast_flood flag on bridge ports Joachim Wiberg
` (2 subsequent siblings)
5 siblings, 0 replies; 9+ messages in thread
From: Joachim Wiberg @ 2022-03-09 7:17 UTC (permalink / raw)
To: netdev; +Cc: David Ahern, Stephen Hemminger, Nikolay Aleksandrov,
Joachim Wiberg
Add per-port support for controlling flooding of broadcast traffic.
Similar to unicast and multcast flooding that already exist.
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
---
ip/iplink_bridge_slave.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/ip/iplink_bridge_slave.c b/ip/iplink_bridge_slave.c
index 71787586..0cf3422d 100644
--- a/ip/iplink_bridge_slave.c
+++ b/ip/iplink_bridge_slave.c
@@ -37,6 +37,7 @@ static void print_explain(FILE *f)
" [ mcast_router MULTICAST_ROUTER ]\n"
" [ mcast_fast_leave {on | off} ]\n"
" [ mcast_flood {on | off} ]\n"
+ " [ bcast_flood {on | off} ]\n"
" [ mcast_to_unicast {on | off} ]\n"
" [ group_fwd_mask MASK ]\n"
" [ neigh_suppress {on | off} ]\n"
@@ -250,6 +251,10 @@ static void bridge_slave_print_opt(struct link_util *lu, FILE *f,
print_on_off(PRINT_ANY, "mcast_flood", "mcast_flood %s ",
rta_getattr_u8(tb[IFLA_BRPORT_MCAST_FLOOD]));
+ if (tb[IFLA_BRPORT_BCAST_FLOOD])
+ print_on_off(PRINT_ANY, "bcast_flood", "bcast_flood %s ",
+ rta_getattr_u8(tb[IFLA_BRPORT_BCAST_FLOOD]));
+
if (tb[IFLA_BRPORT_MCAST_TO_UCAST])
print_on_off(PRINT_ANY, "mcast_to_unicast", "mcast_to_unicast %s ",
rta_getattr_u8(tb[IFLA_BRPORT_MCAST_TO_UCAST]));
@@ -350,6 +355,10 @@ static int bridge_slave_parse_opt(struct link_util *lu, int argc, char **argv,
NEXT_ARG();
bridge_slave_parse_on_off("mcast_flood", *argv, n,
IFLA_BRPORT_MCAST_FLOOD);
+ } else if (matches(*argv, "bcast_flood") == 0) {
+ NEXT_ARG();
+ bridge_slave_parse_on_off("bcast_flood", *argv, n,
+ IFLA_BRPORT_BCAST_FLOOD);
} else if (matches(*argv, "mcast_to_unicast") == 0) {
NEXT_ARG();
bridge_slave_parse_on_off("mcast_to_unicast", *argv, n,
--
2.25.1
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH iproute2-next v2 4/6] man: ip-link: document new bcast_flood flag on bridge ports
2022-03-09 7:17 [PATCH iproute2-next v2 0/6] bridge: support for controlling broadcast flooding per port Joachim Wiberg
` (2 preceding siblings ...)
2022-03-09 7:17 ` [PATCH iproute2-next v2 3/6] ip: iplink_bridge_slave: support for broadcast flooding Joachim Wiberg
@ 2022-03-09 7:17 ` Joachim Wiberg
2022-03-09 7:28 ` Stephen Hemminger
2022-03-09 7:17 ` [PATCH iproute2-next v2 5/6] man: ip-link: mention bridge port's default mcast_flood state Joachim Wiberg
2022-03-09 7:17 ` [PATCH iproute2-next v2 6/6] man: ip-link: whitespace fixes to odd line breaks mid sentence Joachim Wiberg
5 siblings, 1 reply; 9+ messages in thread
From: Joachim Wiberg @ 2022-03-09 7:17 UTC (permalink / raw)
To: netdev; +Cc: David Ahern, Stephen Hemminger, Nikolay Aleksandrov,
Joachim Wiberg
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
---
man/man8/ip-link.8.in | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/man/man8/ip-link.8.in b/man/man8/ip-link.8.in
index 19a0c9ca..6dd18f7b 100644
--- a/man/man8/ip-link.8.in
+++ b/man/man8/ip-link.8.in
@@ -2366,6 +2366,8 @@ the following additional arguments are supported:
] [
.BR mcast_flood " { " on " | " off " }"
] [
+.BR bcast_flood " { " on " | " off " }"
+] [
.BR mcast_to_unicast " { " on " | " off " }"
] [
.BR group_fwd_mask " MASK"
@@ -2454,6 +2456,10 @@ option above.
- controls whether a given port will flood multicast traffic for which
there is no MDB entry.
+.BR bcast_flood " { " on " | " off " }"
+- controls flooding of broadcast traffic on the given port. By default
+this flag is on.
+
.BR mcast_to_unicast " { " on " | " off " }"
- controls whether a given port will replicate packets using unicast
instead of multicast. By default this flag is off.
--
2.25.1
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH iproute2-next v2 5/6] man: ip-link: mention bridge port's default mcast_flood state
2022-03-09 7:17 [PATCH iproute2-next v2 0/6] bridge: support for controlling broadcast flooding per port Joachim Wiberg
` (3 preceding siblings ...)
2022-03-09 7:17 ` [PATCH iproute2-next v2 4/6] man: ip-link: document new bcast_flood flag on bridge ports Joachim Wiberg
@ 2022-03-09 7:17 ` Joachim Wiberg
2022-03-09 7:17 ` [PATCH iproute2-next v2 6/6] man: ip-link: whitespace fixes to odd line breaks mid sentence Joachim Wiberg
5 siblings, 0 replies; 9+ messages in thread
From: Joachim Wiberg @ 2022-03-09 7:17 UTC (permalink / raw)
To: netdev; +Cc: David Ahern, Stephen Hemminger, Nikolay Aleksandrov,
Joachim Wiberg
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
---
man/man8/ip-link.8.in | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/man/man8/ip-link.8.in b/man/man8/ip-link.8.in
index 6dd18f7b..11a02331 100644
--- a/man/man8/ip-link.8.in
+++ b/man/man8/ip-link.8.in
@@ -2454,7 +2454,7 @@ option above.
.BR mcast_flood " { " on " | " off " }"
- controls whether a given port will flood multicast traffic for which
- there is no MDB entry.
+ there is no MDB entry. By default this flag is on.
.BR bcast_flood " { " on " | " off " }"
- controls flooding of broadcast traffic on the given port. By default
--
2.25.1
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH iproute2-next v2 6/6] man: ip-link: whitespace fixes to odd line breaks mid sentence
2022-03-09 7:17 [PATCH iproute2-next v2 0/6] bridge: support for controlling broadcast flooding per port Joachim Wiberg
` (4 preceding siblings ...)
2022-03-09 7:17 ` [PATCH iproute2-next v2 5/6] man: ip-link: mention bridge port's default mcast_flood state Joachim Wiberg
@ 2022-03-09 7:17 ` Joachim Wiberg
5 siblings, 0 replies; 9+ messages in thread
From: Joachim Wiberg @ 2022-03-09 7:17 UTC (permalink / raw)
To: netdev; +Cc: David Ahern, Stephen Hemminger, Nikolay Aleksandrov,
Joachim Wiberg
Some options, spread across the man page, were accidentally (?) space
indented (possible bullet list auto-indent in editors), causing odd line
breaks in presentation mode (emacs, nroff, etc.). This patch aligns the
multi-line descriptions to column zero, in line with other such option
descriptions.
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
---
man/man8/ip-link.8.in | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/man/man8/ip-link.8.in b/man/man8/ip-link.8.in
index 11a02331..870e8c43 100644
--- a/man/man8/ip-link.8.in
+++ b/man/man8/ip-link.8.in
@@ -481,11 +481,11 @@ where <phy_dev> is the physical device to which VLAN device is bound.
.BR gvrp " { " on " | " off " } "
- specifies whether this VLAN should be registered using GARP VLAN
- Registration Protocol.
+Registration Protocol.
.BR mvrp " { " on " | " off " } "
- specifies whether this VLAN should be registered using Multiple VLAN
- Registration Protocol.
+Registration Protocol.
.BR loose_binding " { " on " | " off " } "
- specifies whether the VLAN device state is bound to the physical device state.
@@ -2189,9 +2189,9 @@ parameter must be specified.
.sp
.BI query_rss " on|off"
- toggle the ability of querying the RSS configuration of a specific
- VF. VF RSS information like RSS hash key may be considered sensitive
- on some devices where this information is shared between VF and PF
- and thus its querying may be prohibited by default.
+VF. VF RSS information like RSS hash key may be considered sensitive
+on some devices where this information is shared between VF and PF
+and thus its querying may be prohibited by default.
.sp
.BI state " auto|enable|disable"
- set the virtual link state as seen by the specified VF. Setting to
@@ -2454,7 +2454,7 @@ option above.
.BR mcast_flood " { " on " | " off " }"
- controls whether a given port will flood multicast traffic for which
- there is no MDB entry. By default this flag is on.
+there is no MDB entry. By default this flag is on.
.BR bcast_flood " { " on " | " off " }"
- controls flooding of broadcast traffic on the given port. By default
@@ -2462,7 +2462,7 @@ this flag is on.
.BR mcast_to_unicast " { " on " | " off " }"
- controls whether a given port will replicate packets using unicast
- instead of multicast. By default this flag is off.
+instead of multicast. By default this flag is off.
.BI group_fwd_mask " MASK "
- set the group forward mask. This is the bitmask that is applied to
--
2.25.1
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [PATCH iproute2-next v2 4/6] man: ip-link: document new bcast_flood flag on bridge ports
2022-03-09 7:17 ` [PATCH iproute2-next v2 4/6] man: ip-link: document new bcast_flood flag on bridge ports Joachim Wiberg
@ 2022-03-09 7:28 ` Stephen Hemminger
2022-03-09 12:34 ` Joachim Wiberg
0 siblings, 1 reply; 9+ messages in thread
From: Stephen Hemminger @ 2022-03-09 7:28 UTC (permalink / raw)
To: Joachim Wiberg; +Cc: netdev, David Ahern, Nikolay Aleksandrov
On Wed, 9 Mar 2022 08:17:14 +0100
Joachim Wiberg <troglobit@gmail.com> wrote:
> Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
> ---
> man/man8/ip-link.8.in | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/man/man8/ip-link.8.in b/man/man8/ip-link.8.in
> index 19a0c9ca..6dd18f7b 100644
> --- a/man/man8/ip-link.8.in
> +++ b/man/man8/ip-link.8.in
> @@ -2366,6 +2366,8 @@ the following additional arguments are supported:
> ] [
> .BR mcast_flood " { " on " | " off " }"
> ] [
> +.BR bcast_flood " { " on " | " off " }"
> +] [
> .BR mcast_to_unicast " { " on " | " off " }"
> ] [
> .BR group_fwd_mask " MASK"
> @@ -2454,6 +2456,10 @@ option above.
> - controls whether a given port will flood multicast traffic for which
> there is no MDB entry.
>
> +.BR bcast_flood " { " on " | " off " }"
> +- controls flooding of broadcast traffic on the given port. By default
> +this flag is on.
> +
> .BR mcast_to_unicast " { " on " | " off " }"
> - controls whether a given port will replicate packets using unicast
> instead of multicast. By default this flag is off.
Minor nit, would be better to put options in alphabetical order in document.
Certainly not splitting the two mcast options.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH iproute2-next v2 4/6] man: ip-link: document new bcast_flood flag on bridge ports
2022-03-09 7:28 ` Stephen Hemminger
@ 2022-03-09 12:34 ` Joachim Wiberg
0 siblings, 0 replies; 9+ messages in thread
From: Joachim Wiberg @ 2022-03-09 12:34 UTC (permalink / raw)
To: Stephen Hemminger; +Cc: netdev, David Ahern, Nikolay Aleksandrov
On Tue, Mar 08, 2022 at 23:28, Stephen Hemminger <stephen@networkplumber.org> wrote:
> Minor nit, would be better to put options in alphabetical order in document.
> Certainly not splitting the two mcast options.
Ah, of course! I'll fix it up in a v3 later today, thanks!
/J
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2022-03-09 12:34 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-03-09 7:17 [PATCH iproute2-next v2 0/6] bridge: support for controlling broadcast flooding per port Joachim Wiberg
2022-03-09 7:17 ` [PATCH iproute2-next v2 1/6] bridge: support for controlling flooding of broadcast " Joachim Wiberg
2022-03-09 7:17 ` [PATCH iproute2-next v2 2/6] man: bridge: document new bcast_flood flag for bridge ports Joachim Wiberg
2022-03-09 7:17 ` [PATCH iproute2-next v2 3/6] ip: iplink_bridge_slave: support for broadcast flooding Joachim Wiberg
2022-03-09 7:17 ` [PATCH iproute2-next v2 4/6] man: ip-link: document new bcast_flood flag on bridge ports Joachim Wiberg
2022-03-09 7:28 ` Stephen Hemminger
2022-03-09 12:34 ` Joachim Wiberg
2022-03-09 7:17 ` [PATCH iproute2-next v2 5/6] man: ip-link: mention bridge port's default mcast_flood state Joachim Wiberg
2022-03-09 7:17 ` [PATCH iproute2-next v2 6/6] man: ip-link: whitespace fixes to odd line breaks mid sentence Joachim Wiberg
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).