* [PATCH RFC net 1/1] net/bonding: add 0 to the range of arp_missed_max
@ 2025-09-12 9:16 Pradyumn Rahar
2025-09-12 11:15 ` Nikolay Aleksandrov
0 siblings, 1 reply; 3+ messages in thread
From: Pradyumn Rahar @ 2025-09-12 9:16 UTC (permalink / raw)
To: linux-kernel, linux-rdma, jv, andrew+netdev, davem, edumazet,
kuba, pabeni, netdev
Cc: pradyumn.rahar, anand.a.khoje, rama.nichanamatlu,
manjunath.b.patil, rajesh.sivaramasubramaniom
NetworkManager uses 0 to indicate that the option `arp_missed_max`
is in unset state as this option is not compatible with 802.3AD,
balance-tlb and balance-alb modes.
This causes kernel to report errors like this:
kernel: backend0: option arp_missed_max: invalid value (0)
kernel: backend0: option arp_missed_max: allowed values 1 - 255
NetworkManager[1766]: <error> [1757489103.9525] platform-linux: sysctl: failed to set 'bonding/arp_missed_max' to '0': (22) Invalid argument
NetworkManager[1766]: <warn> [1757489103.9525] device (backend0): failed to set bonding attribute 'arp_missed_max' to '0'
when NetworkManager tries to set this value to 0
Signed-off-by: Pradyumn Rahar <pradyumn.rahar@oracle.com>
---
drivers/net/bonding/bond_options.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/bonding/bond_options.c b/drivers/net/bonding/bond_options.c
index 3b6f815c55ff..243fde3caecd 100644
--- a/drivers/net/bonding/bond_options.c
+++ b/drivers/net/bonding/bond_options.c
@@ -230,7 +230,7 @@ static const struct bond_opt_value bond_ad_user_port_key_tbl[] = {
};
static const struct bond_opt_value bond_missed_max_tbl[] = {
- { "minval", 1, BOND_VALFLAG_MIN},
+ { "minval", 0, BOND_VALFLAG_MIN},
{ "maxval", 255, BOND_VALFLAG_MAX},
{ "default", 2, BOND_VALFLAG_DEFAULT},
{ NULL, -1, 0},
--
2.43.7
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH RFC net 1/1] net/bonding: add 0 to the range of arp_missed_max
2025-09-12 9:16 [PATCH RFC net 1/1] net/bonding: add 0 to the range of arp_missed_max Pradyumn Rahar
@ 2025-09-12 11:15 ` Nikolay Aleksandrov
2025-09-12 17:50 ` Jay Vosburgh
0 siblings, 1 reply; 3+ messages in thread
From: Nikolay Aleksandrov @ 2025-09-12 11:15 UTC (permalink / raw)
To: Pradyumn Rahar, linux-kernel, linux-rdma, jv, andrew+netdev,
davem, edumazet, kuba, pabeni, netdev
Cc: anand.a.khoje, rama.nichanamatlu, manjunath.b.patil,
rajesh.sivaramasubramaniom
On 9/12/25 12:16, Pradyumn Rahar wrote:
> NetworkManager uses 0 to indicate that the option `arp_missed_max`
> is in unset state as this option is not compatible with 802.3AD,
> balance-tlb and balance-alb modes.
>
> This causes kernel to report errors like this:
>
> kernel: backend0: option arp_missed_max: invalid value (0)
> kernel: backend0: option arp_missed_max: allowed values 1 - 255
> NetworkManager[1766]: <error> [1757489103.9525] platform-linux: sysctl: failed to set 'bonding/arp_missed_max' to '0': (22) Invalid argument
> NetworkManager[1766]: <warn> [1757489103.9525] device (backend0): failed to set bonding attribute 'arp_missed_max' to '0'
>
> when NetworkManager tries to set this value to 0
>
> Signed-off-by: Pradyumn Rahar <pradyumn.rahar@oracle.com>
> ---
> drivers/net/bonding/bond_options.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/net/bonding/bond_options.c b/drivers/net/bonding/bond_options.c
> index 3b6f815c55ff..243fde3caecd 100644
> --- a/drivers/net/bonding/bond_options.c
> +++ b/drivers/net/bonding/bond_options.c
> @@ -230,7 +230,7 @@ static const struct bond_opt_value bond_ad_user_port_key_tbl[] = {
> };
>
> static const struct bond_opt_value bond_missed_max_tbl[] = {
> - { "minval", 1, BOND_VALFLAG_MIN},
> + { "minval", 0, BOND_VALFLAG_MIN},
> { "maxval", 255, BOND_VALFLAG_MAX},
> { "default", 2, BOND_VALFLAG_DEFAULT},
> { NULL, -1, 0},
This sounds like a problem in NetworkManager, why not fix it?
The kernel code is correct and there are many other options which don't make sense in these
modes, we're not going to add new states to them just to accommodate broken user-space code.
The option's definition clearly states:
.unsuppmodes = BIT(BOND_MODE_8023AD) | BIT(BOND_MODE_TLB) |
BIT(BOND_MODE_ALB)
Cheers,
Nik
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH RFC net 1/1] net/bonding: add 0 to the range of arp_missed_max
2025-09-12 11:15 ` Nikolay Aleksandrov
@ 2025-09-12 17:50 ` Jay Vosburgh
0 siblings, 0 replies; 3+ messages in thread
From: Jay Vosburgh @ 2025-09-12 17:50 UTC (permalink / raw)
To: Nikolay Aleksandrov
Cc: Pradyumn Rahar, linux-kernel, linux-rdma, andrew+netdev, davem,
edumazet, kuba, pabeni, netdev, anand.a.khoje, rama.nichanamatlu,
manjunath.b.patil, rajesh.sivaramasubramaniom
Nikolay Aleksandrov <razor@blackwall.org> wrote:
>On 9/12/25 12:16, Pradyumn Rahar wrote:
>> NetworkManager uses 0 to indicate that the option `arp_missed_max`
>> is in unset state as this option is not compatible with 802.3AD,
>> balance-tlb and balance-alb modes.
>> This causes kernel to report errors like this:
>> kernel: backend0: option arp_missed_max: invalid value (0)
>> kernel: backend0: option arp_missed_max: allowed values 1 - 255
>> NetworkManager[1766]: <error> [1757489103.9525] platform-linux: sysctl: failed to set 'bonding/arp_missed_max' to '0': (22) Invalid argument
>> NetworkManager[1766]: <warn> [1757489103.9525] device (backend0): failed to set bonding attribute 'arp_missed_max' to '0'
>> when NetworkManager tries to set this value to 0
>> Signed-off-by: Pradyumn Rahar <pradyumn.rahar@oracle.com>
>> ---
>> drivers/net/bonding/bond_options.c | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>> diff --git a/drivers/net/bonding/bond_options.c
>> b/drivers/net/bonding/bond_options.c
>> index 3b6f815c55ff..243fde3caecd 100644
>> --- a/drivers/net/bonding/bond_options.c
>> +++ b/drivers/net/bonding/bond_options.c
>> @@ -230,7 +230,7 @@ static const struct bond_opt_value bond_ad_user_port_key_tbl[] = {
>> };
>> static const struct bond_opt_value bond_missed_max_tbl[] = {
>> - { "minval", 1, BOND_VALFLAG_MIN},
>> + { "minval", 0, BOND_VALFLAG_MIN},
>> { "maxval", 255, BOND_VALFLAG_MAX},
>> { "default", 2, BOND_VALFLAG_DEFAULT},
>> { NULL, -1, 0},
>
>This sounds like a problem in NetworkManager, why not fix it?
>The kernel code is correct and there are many other options which don't make sense in these
>modes, we're not going to add new states to them just to accommodate broken user-space code.
>
>The option's definition clearly states:
> .unsuppmodes = BIT(BOND_MODE_8023AD) | BIT(BOND_MODE_TLB) |
> BIT(BOND_MODE_ALB)
In addition to Nikolay's comment, permitting arp_missed_max to
be set to zero implies that zero is a valid setting for the option.
That's not the case here, as a setting of zero makes no logical sense in
the context of its documented behavior:
arp_missed_max
Specifies the number of arp_interval monitor checks that must
fail in order for an interface to be marked down by the ARP monitor.
In order to provide orderly failover semantics, backup interfaces
are permitted an extra monitor check (i.e., they must fail
arp_missed_max + 1 times before being marked down).
The default value is 2, and the allowable range is 1 - 255.
-J
---
-Jay Vosburgh, jv@jvosburgh.net
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2025-09-12 17:50 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-09-12 9:16 [PATCH RFC net 1/1] net/bonding: add 0 to the range of arp_missed_max Pradyumn Rahar
2025-09-12 11:15 ` Nikolay Aleksandrov
2025-09-12 17:50 ` Jay Vosburgh
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).