From: Jay Vosburgh <jv@jvosburgh.net>
To: Wanchuan Li <gnblao@gmail.com>
Cc: andrew+netdev@lunn.ch, davem@davemloft.net, edumazet@google.com,
kuba@kernel.org, pabeni@redhat.com, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org, Wanchuan Li <liwanchuan@xiaomi.com>
Subject: Re: [PATCH 1/2] bonding: exposure option coupled_control via sysfs
Date: Mon, 07 Jul 2025 08:11:42 -0700 [thread overview]
Message-ID: <73002.1751901102@famine> (raw)
In-Reply-To: <20250707091549.3995140-1-liwanchuan@xiaomi.com>
Wanchuan Li <gnblao@gmail.com> wrote:
>Allow get/set of bonding parameter coupled_control
>via sysfs.
>
>Signed-off-by: Wanchuan Li <liwanchuan@xiaomi.com>
No to both of these patches.
For patch 1, the bonding sysfs API is deprecated, and should not
be extended to add new functionality. All bonding functionality is
available via netlink and iproute2 (/sbin/ip).
For patch 2, new module parameters are disallowed in general.
-J
>---
> drivers/net/bonding/bond_sysfs.c | 13 +++++++++++++
> 1 file changed, 13 insertions(+)
>
>diff --git a/drivers/net/bonding/bond_sysfs.c b/drivers/net/bonding/bond_sysfs.c
>index 1e13bb170515..5a8450b2269d 100644
>--- a/drivers/net/bonding/bond_sysfs.c
>+++ b/drivers/net/bonding/bond_sysfs.c
>@@ -479,6 +479,18 @@ static ssize_t bonding_show_carrier(struct device *d,
> static DEVICE_ATTR(use_carrier, 0644,
> bonding_show_carrier, bonding_sysfs_store_option);
>
>+/* Show the coupled_control flag. */
>+static ssize_t bonding_show_coupled_control(struct device *d,
>+ struct device_attribute *attr,
>+ char *buf)
>+{
>+ struct bonding *bond = to_bond(d);
>+
>+ return sysfs_emit(buf, "%d\n", bond->params.coupled_control);
>+}
>+static DEVICE_ATTR(coupled_control, 0644,
>+ bonding_show_coupled_control, bonding_sysfs_store_option);
>+
>
> /* Show currently active_slave. */
> static ssize_t bonding_show_active_slave(struct device *d,
>@@ -791,6 +803,7 @@ static struct attribute *per_bond_attrs[] = {
> &dev_attr_ad_actor_system.attr,
> &dev_attr_ad_user_port_key.attr,
> &dev_attr_arp_missed_max.attr,
>+ &dev_attr_coupled_control.attr,
> NULL,
> };
>
>--
>2.49.0
>
---
-Jay Vosburgh, jv@jvosburgh.net
prev parent reply other threads:[~2025-07-07 15:11 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-07 9:15 [PATCH 1/2] bonding: exposure option coupled_control via sysfs Wanchuan Li
2025-07-07 9:15 ` [PATCH 2/2] bonding: add module param coupled_control Wanchuan Li
2025-07-07 15:11 ` Jay Vosburgh [this message]
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=73002.1751901102@famine \
--to=jv@jvosburgh.net \
--cc=andrew+netdev@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=gnblao@gmail.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=liwanchuan@xiaomi.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.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