public inbox for linux-rdma@vger.kernel.org
 help / color / mirror / Atom feed
From: Nikolay Aleksandrov <razor@blackwall.org>
To: Pradyumn Rahar <pradyumn.rahar@oracle.com>,
	linux-kernel@vger.kernel.org, linux-rdma@vger.kernel.org,
	jv@jvosburgh.net, andrew+netdev@lunn.ch, davem@davemloft.net,
	edumazet@google.com, kuba@kernel.org, pabeni@redhat.com,
	netdev@vger.kernel.org
Cc: anand.a.khoje@oracle.com, rama.nichanamatlu@oracle.com,
	manjunath.b.patil@oracle.com,
	rajesh.sivaramasubramaniom@oracle.com
Subject: Re: [PATCH RFC net 1/1] net/bonding: add 0 to the range of arp_missed_max
Date: Fri, 12 Sep 2025 14:15:06 +0300	[thread overview]
Message-ID: <4daaaa7e-7a02-4e4c-be3e-c390d7f6e612@blackwall.org> (raw)
In-Reply-To: <20250912091635.3577586-1-pradyumn.rahar@oracle.com>

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

  reply	other threads:[~2025-09-12 11:15 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
2025-09-12 17:50   ` Jay Vosburgh

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4daaaa7e-7a02-4e4c-be3e-c390d7f6e612@blackwall.org \
    --to=razor@blackwall.org \
    --cc=anand.a.khoje@oracle.com \
    --cc=andrew+netdev@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=jv@jvosburgh.net \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rdma@vger.kernel.org \
    --cc=manjunath.b.patil@oracle.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=pradyumn.rahar@oracle.com \
    --cc=rajesh.sivaramasubramaniom@oracle.com \
    --cc=rama.nichanamatlu@oracle.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox