* [PATCH RESEND] ip/bond: add broadcast_neighbor support
@ 2025-09-23 8:39 Tonghao Zhang
2025-09-24 0:52 ` Hangbin Liu
2025-09-29 16:00 ` patchwork-bot+netdevbpf
0 siblings, 2 replies; 3+ messages in thread
From: Tonghao Zhang @ 2025-09-23 8:39 UTC (permalink / raw)
To: netdev; +Cc: Tonghao Zhang, Stephen Hemminger, David Ahern, Hangbin Liu
This option has no effect in modes other than 802.3ad mode.
When this option enabled, the bond device will broadcast ARP/ND
packets to all active slaves.
Signed-off-by: Tonghao Zhang <tonghao@bamaicloud.com>
Cc: Stephen Hemminger <stephen@networkplumber.org>
Cc: David Ahern <dsahern@gmail.com>
Cc: Hangbin Liu <liuhangbin@gmail.com>
---
1. no update uapi header.
2. the kernel patch is accpted, https://patchwork.kernel.org/project/netdevbpf/patch/84d0a044514157bb856a10b6d03a1028c4883561.1751031306.git.tonghao@bamaicloud.com/
---
ip/iplink_bond.c | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
diff --git a/ip/iplink_bond.c b/ip/iplink_bond.c
index 3ae626a0..714fe7bd 100644
--- a/ip/iplink_bond.c
+++ b/ip/iplink_bond.c
@@ -150,6 +150,7 @@ static void print_explain(FILE *f)
" [ lacp_rate LACP_RATE ]\n"
" [ lacp_active LACP_ACTIVE]\n"
" [ coupled_control COUPLED_CONTROL ]\n"
+ " [ broadcast_neighbor BROADCAST_NEIGHBOR ]\n"
" [ ad_select AD_SELECT ]\n"
" [ ad_user_port_key PORTKEY ]\n"
" [ ad_actor_sys_prio SYSPRIO ]\n"
@@ -166,6 +167,7 @@ static void print_explain(FILE *f)
"LACP_RATE := slow|fast\n"
"AD_SELECT := stable|bandwidth|count\n"
"COUPLED_CONTROL := off|on\n"
+ "BROADCAST_NEIGHBOR := off|on\n"
);
}
@@ -185,6 +187,7 @@ static int bond_parse_opt(struct link_util *lu, int argc, char **argv,
__u32 arp_all_targets, resend_igmp, min_links, lp_interval;
__u32 packets_per_slave;
__u8 missed_max;
+ __u8 broadcast_neighbor;
unsigned int ifindex;
int ret;
@@ -377,6 +380,12 @@ static int bond_parse_opt(struct link_util *lu, int argc, char **argv,
if (ret)
return ret;
addattr8(n, 1024, IFLA_BOND_COUPLED_CONTROL, coupled_control);
+ } else if (strcmp(*argv, "broadcast_neighbor") == 0) {
+ NEXT_ARG();
+ broadcast_neighbor = parse_on_off("broadcast_neighbor", *argv, &ret);
+ if (ret)
+ return ret;
+ addattr8(n, 1024, IFLA_BOND_BROADCAST_NEIGH, broadcast_neighbor);
} else if (matches(*argv, "ad_select") == 0) {
NEXT_ARG();
if (get_index(ad_select_tbl, *argv) < 0)
@@ -676,6 +685,13 @@ static void bond_print_opt(struct link_util *lu, FILE *f, struct rtattr *tb[])
rta_getattr_u8(tb[IFLA_BOND_COUPLED_CONTROL]));
}
+ if (tb[IFLA_BOND_BROADCAST_NEIGH]) {
+ print_on_off(PRINT_ANY,
+ "broadcast_neighbor",
+ "broadcast_neighbor %s ",
+ rta_getattr_u8(tb[IFLA_BOND_BROADCAST_NEIGH]));
+ }
+
if (tb[IFLA_BOND_AD_SELECT]) {
const char *ad_select = get_name(ad_select_tbl,
rta_getattr_u8(tb[IFLA_BOND_AD_SELECT]));
--
2.34.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH RESEND] ip/bond: add broadcast_neighbor support
2025-09-23 8:39 [PATCH RESEND] ip/bond: add broadcast_neighbor support Tonghao Zhang
@ 2025-09-24 0:52 ` Hangbin Liu
2025-09-29 16:00 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 3+ messages in thread
From: Hangbin Liu @ 2025-09-24 0:52 UTC (permalink / raw)
To: Tonghao Zhang; +Cc: netdev, Stephen Hemminger, David Ahern
On Tue, Sep 23, 2025 at 04:39:53PM +0800, Tonghao Zhang wrote:
> This option has no effect in modes other than 802.3ad mode.
> When this option enabled, the bond device will broadcast ARP/ND
> packets to all active slaves.
>
> Signed-off-by: Tonghao Zhang <tonghao@bamaicloud.com>
> Cc: Stephen Hemminger <stephen@networkplumber.org>
> Cc: David Ahern <dsahern@gmail.com>
> Cc: Hangbin Liu <liuhangbin@gmail.com>
> ---
> 1. no update uapi header.
> 2. the kernel patch is accpted, https://patchwork.kernel.org/project/netdevbpf/patch/84d0a044514157bb856a10b6d03a1028c4883561.1751031306.git.tonghao@bamaicloud.com/
> ---
> ip/iplink_bond.c | 16 ++++++++++++++++
> 1 file changed, 16 insertions(+)
>
> diff --git a/ip/iplink_bond.c b/ip/iplink_bond.c
> index 3ae626a0..714fe7bd 100644
> --- a/ip/iplink_bond.c
> +++ b/ip/iplink_bond.c
> @@ -150,6 +150,7 @@ static void print_explain(FILE *f)
> " [ lacp_rate LACP_RATE ]\n"
> " [ lacp_active LACP_ACTIVE]\n"
> " [ coupled_control COUPLED_CONTROL ]\n"
> + " [ broadcast_neighbor BROADCAST_NEIGHBOR ]\n"
> " [ ad_select AD_SELECT ]\n"
> " [ ad_user_port_key PORTKEY ]\n"
> " [ ad_actor_sys_prio SYSPRIO ]\n"
> @@ -166,6 +167,7 @@ static void print_explain(FILE *f)
> "LACP_RATE := slow|fast\n"
> "AD_SELECT := stable|bandwidth|count\n"
> "COUPLED_CONTROL := off|on\n"
> + "BROADCAST_NEIGHBOR := off|on\n"
> );
> }
>
> @@ -185,6 +187,7 @@ static int bond_parse_opt(struct link_util *lu, int argc, char **argv,
> __u32 arp_all_targets, resend_igmp, min_links, lp_interval;
> __u32 packets_per_slave;
> __u8 missed_max;
> + __u8 broadcast_neighbor;
> unsigned int ifindex;
> int ret;
>
> @@ -377,6 +380,12 @@ static int bond_parse_opt(struct link_util *lu, int argc, char **argv,
> if (ret)
> return ret;
> addattr8(n, 1024, IFLA_BOND_COUPLED_CONTROL, coupled_control);
> + } else if (strcmp(*argv, "broadcast_neighbor") == 0) {
> + NEXT_ARG();
> + broadcast_neighbor = parse_on_off("broadcast_neighbor", *argv, &ret);
> + if (ret)
> + return ret;
> + addattr8(n, 1024, IFLA_BOND_BROADCAST_NEIGH, broadcast_neighbor);
> } else if (matches(*argv, "ad_select") == 0) {
> NEXT_ARG();
> if (get_index(ad_select_tbl, *argv) < 0)
> @@ -676,6 +685,13 @@ static void bond_print_opt(struct link_util *lu, FILE *f, struct rtattr *tb[])
> rta_getattr_u8(tb[IFLA_BOND_COUPLED_CONTROL]));
> }
>
> + if (tb[IFLA_BOND_BROADCAST_NEIGH]) {
> + print_on_off(PRINT_ANY,
> + "broadcast_neighbor",
> + "broadcast_neighbor %s ",
> + rta_getattr_u8(tb[IFLA_BOND_BROADCAST_NEIGH]));
> + }
> +
> if (tb[IFLA_BOND_AD_SELECT]) {
> const char *ad_select = get_name(ad_select_tbl,
> rta_getattr_u8(tb[IFLA_BOND_AD_SELECT]));
> --
> 2.34.1
>
Reviewed-by: Hangbin Liu <liuhangbin@gmail.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH RESEND] ip/bond: add broadcast_neighbor support
2025-09-23 8:39 [PATCH RESEND] ip/bond: add broadcast_neighbor support Tonghao Zhang
2025-09-24 0:52 ` Hangbin Liu
@ 2025-09-29 16:00 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+netdevbpf @ 2025-09-29 16:00 UTC (permalink / raw)
To: Tonghao Zhang; +Cc: netdev, stephen, dsahern, liuhangbin
Hello:
This patch was applied to iproute2/iproute2-next.git (main)
by David Ahern <dsahern@kernel.org>:
On Tue, 23 Sep 2025 16:39:53 +0800 you wrote:
> This option has no effect in modes other than 802.3ad mode.
> When this option enabled, the bond device will broadcast ARP/ND
> packets to all active slaves.
>
> Signed-off-by: Tonghao Zhang <tonghao@bamaicloud.com>
> Cc: Stephen Hemminger <stephen@networkplumber.org>
> Cc: David Ahern <dsahern@gmail.com>
> Cc: Hangbin Liu <liuhangbin@gmail.com>
>
> [...]
Here is the summary with links:
- [RESEND] ip/bond: add broadcast_neighbor support
https://git.kernel.org/pub/scm/network/iproute2/iproute2-next.git/commit/?id=1f7924938884
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] 3+ messages in thread
end of thread, other threads:[~2025-09-29 16:00 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-09-23 8:39 [PATCH RESEND] ip/bond: add broadcast_neighbor support Tonghao Zhang
2025-09-24 0:52 ` Hangbin Liu
2025-09-29 16:00 ` 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