From: Christian Ebner <c.ebner@proxmox.com>
To: Christoph Heiss <c.heiss@proxmox.com>, 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 11:15:30 +0100 [thread overview]
Message-ID: <37db266f-b721-4f04-b6d8-4e4add78badc@proxmox.com> (raw)
In-Reply-To: <20260925123459.424903-2-c.heiss@proxmox.com>
one question inline.
On 9/25/26 2:35 PM, Christoph Heiss wrote:
> Partially fixes #6121 [0].
>
> Adds a new 'bond-miimon' option to the network interface API for
> specifying the link monitoring interval.
>
> [0] https://bugzilla.proxmox.com/show_bug.cgi?id=6121
>
> Signed-off-by: Christoph Heiss <c.heiss@proxmox.com>
> ---
> proxmox-network-api/src/api_impl.rs | 9 +++++++++
> proxmox-network-api/src/api_types.rs | 18 ++++++++++++++++++
> 2 files changed, 27 insertions(+)
>
> diff --git a/proxmox-network-api/src/api_impl.rs b/proxmox-network-api/src/api_impl.rs
> index 78f499c5..0a603017 100644
> --- a/proxmox-network-api/src/api_impl.rs
> +++ b/proxmox-network-api/src/api_impl.rs
> @@ -162,6 +162,9 @@ pub fn create_interface(iface: String, config: InterfaceUpdater) -> Result<(), E
> interface.bond_xmit_hash_policy = config.bond_xmit_hash_policy;
> }
> }
> + if config.bond_miimon.is_some() {
> + interface.bond_miimon = config.bond_miimon;
> + }
> if let Some(slaves) = &config.slaves {
> interface.set_bond_slave_list(slaves)?;
> }
> @@ -295,6 +298,9 @@ pub fn update_interface(
> DeletableInterfaceProperty::BondXmitHashPolicy => {
> interface.bond_xmit_hash_policy = None
> }
> + DeletableInterfaceProperty::BondMiimon => {
> + interface.bond_miimon = None;
> + }
> }
> }
> }
> @@ -335,6 +341,9 @@ pub fn update_interface(
> }
> interface.bond_xmit_hash_policy = update.bond_xmit_hash_policy;
> }
> + if update.bond_miimon.is_some() {
> + interface.bond_miimon = update.bond_miimon;
> + }
> }
>
> if let Some(cidr) = update.cidr {
> diff --git a/proxmox-network-api/src/api_types.rs b/proxmox-network-api/src/api_types.rs
> index f2467f1e..471f20e8 100644
> --- 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
> + optional: true,
> + default: 100,
> + },
> altnames: {
> description: "List of altnames for this interface",
> type: Array,
> @@ -302,6 +308,8 @@ pub struct Interface {
> pub bond_primary: Option<String>,
> #[serde(skip_serializing_if = "Option::is_none")]
> pub bond_xmit_hash_policy: Option<BondXmitHashPolicy>,
> + #[serde(rename = "bond-miimon", skip_serializing_if = "Option::is_none")]
> + pub bond_miimon: Option<u8>,
>
> #[serde(default, skip_serializing_if = "Vec::is_empty")]
> pub altnames: Vec<String>,
> @@ -333,6 +341,7 @@ impl Interface {
> bond_mode: None,
> bond_primary: None,
> bond_xmit_hash_policy: None,
> + bond_miimon: None,
> altnames: Vec::new(),
> }
> }
> @@ -425,6 +434,8 @@ pub enum DeletableInterfaceProperty {
> /// Delete bond transmit hash policy
> #[serde(rename = "bond_xmit_hash_policy")]
> BondXmitHashPolicy,
> + /// Delete bond miimon (set to default 100)
> + BondMiimon,
> }
>
> #[api(
> @@ -509,6 +520,12 @@ pub enum DeletableInterfaceProperty {
> type: BondXmitHashPolicy,
> optional: true,
> },
> + "bond-miimon": {
> + description: "Link monitoring interval in milliseconds for bond interfaces.",
> + type: u8,
> + optional: true,
> + default: 100,
> + },
> slaves: {
> schema: NETWORK_INTERFACE_LIST_SCHEMA,
> optional: true,
> @@ -542,5 +559,6 @@ pub struct InterfaceUpdater {
> pub bond_primary: Option<String>,
> #[serde(rename = "bond_xmit_hash_policy")]
> pub bond_xmit_hash_policy: Option<BondXmitHashPolicy>,
> + pub bond_miimon: Option<u8>,
> pub slaves: Option<String>,
> }
next prev parent reply other threads:[~2026-11-09 10:15 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 [this message]
2026-11-09 13:28 ` Christoph Heiss
2026-11-09 14:05 ` Christian Ebner
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=37db266f-b721-4f04-b6d8-4e4add78badc@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