bridge: support for controlling broadcast flooding per port
Subsystems (2)
v3 cover bridge: support for controlling broadcast flooding per port
Hi,
this patch set address a slight omission in controlling broadcast flooding per bridge port, which the bridge has had support for a good while now.
v3:
- Move bcast_flood option in manual files to before the mcast_flood option, instead of breaking the two mcast options. Unfortunately the other options are not alphabetically sorted, so this was the least worst option. (Stephen)
- Add missing closing " for 'bridge mdb show' in bridge(8) SYNOPSIS
v2:
- Add bcast_flood also to ip/iplink_bridge_slave.c (Nik)
- 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
Joachim Wiberg (7):
bridge: support for controlling flooding of broadcast per port
man: bridge: document new bcast_flood flag for bridge ports
man: bridge: add missing closing " in bridge show mdb
ip: iplink_bridge_slave: support for broadcast flooding
man: ip-link: document new bcast_flood flag on bridge ports
man: ip-link: mention bridge port's default mcast_flood state
man: ip-link: whitespace fixes to odd line breaks mid sentence
bridge/link.c | 13 +++++++++++++ ip/iplink_bridge_slave.c | 9 +++++++++ man/man8/bridge.8 | 8 +++++++- man/man8/ip-link.8.in | 20 +++++++++++++------- 4 files changed, 42 insertions(+), 8 deletions(-)
Signature · 1 line
2.25.1
PATCH v3 1/7 bridge: support for controlling flooding of broadcast per port
Add per-port support for controlling flooding of broadcast traffic. Similar to unicast and multcast flooding that already exist.
--- bridge/link.c | 13 +++++++++++++ 1 file changed, 13 insertions(+)
bridge/link.c +13 -0
@@ -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);
Signature · 1 line
2.25.1
PATCH v3 2/7 man: bridge: document new bcast_flood flag for bridge ports
In reply to Joachim WibergThe bridge link options are not alphabetically sorted, so placing bcast_flood right before mcast_flood for now.
--- man/man8/bridge.8 | 6 ++++++ 1 file changed, 6 insertions(+)
man/man8/bridge.8 +6 -0
@@ -45,6 +45,7 @@ bridge \- show / manipulate bridge addresses and devices .BR learning_sync " { " on " | " off " } ] [ " .BR flood " { " on " | " off " } ] [ " .BR hwmode " { " vepa " | " veb " } ] [ " +.BR bcast_flood " { " on " | " off " } ] [ " .BR mcast_flood " { " on " | " off " } ] [ " .BR mcast_to_unicast " { " on " | " off " } ] [ " .BR neigh_suppress " { " on " | " off " } ] [ "
@@ -461,6 +462,11 @@ switch. .B veb - bridging happens in hardware. +.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_flood on " or " mcast_flood off " Controls whether multicast traffic for which there is no MDB entry will be
Signature · 1 line
2.25.1
PATCH v3 3/7 man: bridge: add missing closing " in bridge show mdb
In reply to Joachim Wiberg--- man/man8/bridge.8 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
man/man8/bridge.8 +1 -1
@@ -124,7 +124,7 @@ bridge \- show / manipulate bridge addresses and devices .IR VID " ] " .ti -8 -.BR "bridge mdb show " [ " +.BR "bridge mdb show" " [ " .B dev .IR DEV " ]"
Signature · 1 line
2.25.1
PATCH v3 4/7 ip: iplink_bridge_slave: support for broadcast flooding
In reply to Joachim WibergAdd per-port support for controlling flooding of broadcast traffic. Similar to unicast and multcast flooding that already exist.
--- ip/iplink_bridge_slave.c | 9 +++++++++ 1 file changed, 9 insertions(+)
ip/iplink_bridge_slave.c +9 -0
@@ -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,
Signature · 1 line
2.25.1
PATCH v3 5/7 man: ip-link: document new bcast_flood flag on bridge ports
In reply to Joachim WibergThe options are not alphabetically sorted, so placing bcast_flood right before mcast_flood for now.
--- man/man8/ip-link.8.in | 6 ++++++ 1 file changed, 6 insertions(+)
man/man8/ip-link.8.in +6 -0
@@ -2364,6 +2364,8 @@ the following additional arguments are supported: ] [ .BR mcast_fast_leave " { " on " | " off "}" ] [ +.BR bcast_flood " { " on " | " off " }" +] [ .BR mcast_flood " { " on " | " off " }" ] [ .BR mcast_to_unicast " { " on " | " off " }"
@@ -2450,6 +2452,10 @@ queries. .B fastleave option above. +.BR bcast_flood " { " on " | " off " }" +- controls flooding of broadcast traffic on the given port. By default +this flag is on. + .BR mcast_flood " { " on " | " off " }" - controls whether a given port will flood multicast traffic for which there is no MDB entry.
Signature · 1 line
2.25.1
PATCH v3 6/7 man: ip-link: mention bridge port's default mcast_flood state
In reply to Joachim Wiberg--- man/man8/ip-link.8.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
man/man8/ip-link.8.in +1 -1
@@ -2458,7 +2458,7 @@ this flag is on. .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 mcast_to_unicast " { " on " | " off " }" - controls whether a given port will replicate packets using unicast
Signature · 1 line
2.25.1
PATCH v3 7/7 man: ip-link: whitespace fixes to odd line breaks mid sentence
In reply to Joachim WibergSome 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.
--- man/man8/ip-link.8.in | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-)
man/man8/ip-link.8.in +7 -7
@@ -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
@@ -2458,11 +2458,11 @@ this flag is on. .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 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
Signature · 1 line
2.25.1
Quoted 33 lines · Joachim Wiberg
Hi,
this patch set address a slight omission in controlling broadcast flooding per bridge port, which the bridge has had support for a good while now.
v3:
- Movebcast_floodoption in manual files to before themcast_floodoption, instead of breaking the two mcast options. Unfortunately the other options are not alphabetically sorted, so this was the least worst option. (Stephen)
- Add missing closing " for 'bridge mdb show' in bridge(8) SYNOPSIS
v2:
- Addbcast_floodalso toip/iplink_bridge_slave.c(Nik)
- Update man page for ip-link(8) with newbcast_floodflag
- Updatemcast_floodin same man page slightly
- Fix minor weird whitespace issues causing sudden line breaks
v1:
- Addbcast_floodtobridge/link.c
- Update man page for bridge(8) withbcast_floodfor brportsBest regards
/JoachimJoachim Wiberg (7):
bridge: support for controlling flooding of broadcast per port
man: bridge: document newbcast_floodflag for bridge ports
man: bridge: add missing closing " in bridge show mdb
ip:iplink_bridge_slave: support for broadcast flooding
man: ip-link: document newbcast_floodflag on bridge ports
man: ip-link: mention bridge port's defaultmcast_floodstate
man: ip-link: whitespace fixes to odd line breaks mid sentence
Quoted 6 lines
bridge/link.c | 13 +++++++++++++ ip/iplink_bridge_slave.c | 9 +++++++++ man/man8/bridge.8 | 8 +++++++- man/man8/ip-link.8.in | 20 +++++++++++++------- 4 files changed, 42 insertions(+), 8 deletions(-)
Thank you, the patches look good to me.
For the set:
This series was applied to iproute2/iproute2-next.git (main) by David Ahern <[email protected]>:
Hello:
This series was applied to iproute2/iproute2-next.git (main) by David Ahern <[email protected]>:
Quoted 21 lines · On Wed, 9 Mar 2022 20:23:09 +0100 you wrote:
Hi,
this patch set address a slight omission in controlling broadcast flooding per bridge port, which the bridge has had support for a good while now.
v3:
- Movebcast_floodoption in manual files to before themcast_floodoption, instead of breaking the two mcast options. Unfortunately the other options are not alphabetically sorted, so this was the least worst option. (Stephen)
- Add missing closing " for 'bridge mdb show' in bridge(8) SYNOPSIS
v2:
- Addbcast_floodalso toip/iplink_bridge_slave.c(Nik)
- Update man page for ip-link(8) with newbcast_floodflag
- Updatemcast_floodin same man page slightly
- Fix minor weird whitespace issues causing sudden line breaks
v1:
- Addbcast_floodtobridge/link.c
- Update man page for bridge(8) withbcast_floodfor brports
Quoted 1 line
[...]
Here is the summary with links:
- [iproute2-next,v3,1/7] bridge: support for controlling flooding of broadcast per port (no matching commit)
- [iproute2-next,v3,2/7] man: bridge: document new bcast_flood flag for bridge ports
https://git.kernel.org/pub/scm/network/iproute2/iproute2-next.git/commit/?id=3b681cf9c75e - [iproute2-next,v3,3/7] man: bridge: add missing closing " in bridge show mdb https://git.kernel.org/pub/scm/network/iproute2/iproute2-next.git/commit/?id=909f0d510153 - [iproute2-next,v3,4/7] ip: iplink_bridge_slave: support for broadcast flooding https://git.kernel.org/pub/scm/network/iproute2/iproute2-next.git/commit/?id=c354a434b1bf - [iproute2-next,v3,5/7] man: ip-link: document new bcast_flood flag on bridge ports https://git.kernel.org/pub/scm/network/iproute2/iproute2-next.git/commit/?id=b1c3ad848c1c - [iproute2-next,v3,6/7] man: ip-link: mention bridge port's default mcast_flood state https://git.kernel.org/pub/scm/network/iproute2/iproute2-next.git/commit/?id=609b90aa3fb1 - [iproute2-next,v3,7/7] man: ip-link: whitespace fixes to odd line breaks mid sentence https://git.kernel.org/pub/scm/network/iproute2/iproute2-next.git/commit/?id=2dee2101f6e9
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html