public inbox for pbs-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Christian Ebner <c.ebner@proxmox.com>
To: Christoph Heiss <c.heiss@proxmox.com>
Cc: pbs-devel@lists.proxmox.com
Subject: Re: [PATCH proxmox 1/3] fix #6121: network-api: api: add `bond-miimon` option for interfaces
Date: Mon, 9 Nov 2026 15:05:48 +0100	[thread overview]
Message-ID: <cbb56bb0-b531-410e-b6af-40f259afcf16@proxmox.com> (raw)
In-Reply-To: <3a0bc117-c324-46c7-bc68-853b7df66c1d@proxmox.com>

On 11/9/26 2:28 PM, Christoph Heiss wrote:
> Thanks for the review!
> 
> On 11/9/26 11:15, Christian Ebner wrote:
>> one question inline.
>>
>> On 9/25/26 2:35 PM, Christoph Heiss wrote:
>>> [..]
>>> --- a/proxmox-network-api/src/api_types.rs
>>> +++ b/proxmox-network-api/src/api_types.rs
>>> @@ -228,6 +228,12 @@ pub const NETWORK_INTERFACE_LIST_SCHEMA: Schema =
>>>               type: BondXmitHashPolicy,
>>>               optional: true,
>>>           },
>>> +        "bond-miimon": {
>>> +            description: "Link monitoring interval in milliseconds 
>>> for bond interfaces.",
>>> +            type: u8,
>>
>> isn't this to restrictive?
>>
>> At least the Kernel seem to accept larger values AFAICT:
>> - https://github.com/torvalds/linux/blob/master/drivers/net/bonding/ 
>> bond_options.c#L149
>> - https://github.com/torvalds/linux/blob/master/drivers/net/bonding/ 
>> bond_main.c#L6174
> 
> Good catch.
> 
> At least ifupdown2 says that the value range should be to 0-255 [0] - 
> which is what I did go off - but actually never enforces that. I.e. the 
> value is never validated against `validrange`, it's just a documentation 
> thing at the end.
> 
> The netlink interface also indeed accepts a u32 [1] FWIW, so that's the 
> right thing to do.
> 
> E.g. setting up `/etc/network/interfaces` with
> 
>    auto bond0
>    iface bond0 inet manual
>      bond-slaves nic1 foo
>      bond-miimon 5000
>      bond-mode 802.3ad
> 
> works just fine, `cat /sys/class/net/bond0/bonding/miimon` also shows 
> the correct value.
> 
> I'll quickly send a v2 with that changed.
> 
> [0] https://github.com/CumulusNetworks/ifupdown2/blob/master/ifupdown2/ 
> addons/bond.py#L80-L85
> [1] https://github.com/torvalds/linux/ 
> blob/7475ea8b58616b33c04afb976cf0fbaad9dd63fb/drivers/net/bonding/ 
> bond_netlink.c#L255
The actual limit enforced is i32::MAX afaict, so best to store as u32 
and check for i32::MAX not being exceeded?




  reply	other threads:[~2026-11-09 14:05 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-25 12:34 [PATCH proxmox{,-backup} 0/3] fix #6121: add 'bond-miimon' option for network interfaces Christoph Heiss
2026-09-25 12:34 ` [PATCH proxmox 1/3] fix #6121: network-api: api: add `bond-miimon` option for interfaces Christoph Heiss
2026-11-09 10:15   ` Christian Ebner
2026-11-09 13:28     ` Christoph Heiss
2026-11-09 14:05       ` Christian Ebner [this message]
2026-11-09 14:10         ` Christoph Heiss
2026-09-25 12:34 ` [PATCH proxmox 2/3] fix #6121: network-api: config: add support for `bond-miimon` option Christoph Heiss
2026-09-25 12:34 ` [PATCH proxmox-backup 3/3] api: network: reuse interface create/update methods from network-api Christoph Heiss
2026-11-05  9:47 ` [PATCH proxmox{,-backup} 0/3] fix #6121: add 'bond-miimon' option for network interfaces Christoph Heiss
2026-11-09 11:08 ` Christian Ebner

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=cbb56bb0-b531-410e-b6af-40f259afcf16@proxmox.com \
    --to=c.ebner@proxmox.com \
    --cc=c.heiss@proxmox.com \
    --cc=pbs-devel@lists.proxmox.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
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal