From: Jay Vosburgh <jv@jvosburgh.net>
To: David Wilder <wilder@us.ibm.com>
Cc: netdev@vger.kernel.org, pradeeps@linux.vnet.ibm.com,
pradeep@us.ibm.com, i.maximets@ovn.org, amorenoz@redhat.com,
haliu@redhat.com
Subject: Re: [PATCH net-next v4 6/7] bonding: Update to bond's sysfs and procfs for extended arp_ip_target format.
Date: Wed, 02 Jul 2025 11:32:16 -0700 [thread overview]
Message-ID: <2140656.1751481136@vermin> (raw)
In-Reply-To: <20250627201914.1791186-7-wilder@us.ibm.com>
David Wilder <wilder@us.ibm.com> wrote:
>/sys/class/net/<bond>/bonding/arp_ip_target and
>/proc/net/bonding/<bond> will display vlan tags if
>they have been configured by the user
I don't think we need to do any of this, the sysfs and proc APIs
to bonding should not be updated to support new functionality. Netlink
and /sbin/ip must do the right thing, but the other APIs are more or
less frozen in the past.
-J
>Signed-off-by: David Wilder <wilder@us.ibm.com>
>---
> drivers/net/bonding/bond_procfs.c | 5 ++++-
> drivers/net/bonding/bond_sysfs.c | 9 ++++++---
> 2 files changed, 10 insertions(+), 4 deletions(-)
>
>diff --git a/drivers/net/bonding/bond_procfs.c b/drivers/net/bonding/bond_procfs.c
>index 94e6fd7041ee..b07944396912 100644
>--- a/drivers/net/bonding/bond_procfs.c
>+++ b/drivers/net/bonding/bond_procfs.c
>@@ -111,6 +111,7 @@ static void bond_info_show_master(struct seq_file *seq)
>
> /* ARP information */
> if (bond->params.arp_interval > 0) {
>+ char pbuf[BOND_OPTION_STRING_MAX_SIZE];
> int printed = 0;
>
> seq_printf(seq, "ARP Polling Interval (ms): %d\n",
>@@ -125,7 +126,9 @@ static void bond_info_show_master(struct seq_file *seq)
> break;
> if (printed)
> seq_printf(seq, ",");
>- seq_printf(seq, " %pI4", &bond->params.arp_targets[i].target_ip);
>+ bond_arp_target_to_string(&bond->params.arp_targets[i],
>+ pbuf, sizeof(pbuf));
>+ seq_printf(seq, " %s", pbuf);
> printed = 1;
> }
> seq_printf(seq, "\n");
>diff --git a/drivers/net/bonding/bond_sysfs.c b/drivers/net/bonding/bond_sysfs.c
>index d7c09e0a14dd..870e0d90b77c 100644
>--- a/drivers/net/bonding/bond_sysfs.c
>+++ b/drivers/net/bonding/bond_sysfs.c
>@@ -286,13 +286,16 @@ static ssize_t bonding_show_arp_targets(struct device *d,
> struct device_attribute *attr,
> char *buf)
> {
>+ char pbuf[BOND_OPTION_STRING_MAX_SIZE];
> struct bonding *bond = to_bond(d);
> int i, res = 0;
>
> for (i = 0; i < BOND_MAX_ARP_TARGETS; i++) {
>- if (bond->params.arp_targets[i].target_ip)
>- res += sysfs_emit_at(buf, res, "%pI4 ",
>- &bond->params.arp_targets[i].target_ip);
>+ if (bond->params.arp_targets[i].target_ip) {
>+ bond_arp_target_to_string(&bond->params.arp_targets[i],
>+ pbuf, sizeof(pbuf));
>+ res += sysfs_emit_at(buf, res, "%s ", pbuf);
>+ }
> }
> if (res)
> buf[res-1] = '\n'; /* eat the leftover space */
>--
>2.43.5
>
---
-Jay Vosburgh, jv@jvosburgh.net
next prev parent reply other threads:[~2025-07-02 18:32 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-27 20:17 [PATCH net-next v4 0/7] bonding: Extend arp_ip_target format to allow for a list of vlan tags David Wilder
2025-06-27 20:17 ` [PATCH net-next v4 1/7] bonding: Adding struct bond_arp_target David Wilder
2025-06-27 20:17 ` [PATCH net-next v4 2/7] bonding: Adding extra_len field to struct bond_opt_value David Wilder
2025-06-27 20:17 ` [PATCH net-next v4 3/7] bonding: arp_ip_target helpers David Wilder
2025-06-27 20:17 ` [PATCH net-next v4 4/7] bonding: Processing extended arp_ip_target from user space David Wilder
2025-06-27 20:17 ` [PATCH net-next v4 5/7] bonding: Update to bond_arp_send_all() to use supplied vlan tags David Wilder
2025-06-27 20:17 ` [PATCH net-next v4 6/7] bonding: Update to bond's sysfs and procfs for extended arp_ip_target format David Wilder
2025-07-02 18:32 ` Jay Vosburgh [this message]
2025-07-03 18:07 ` David Wilder
2025-06-27 20:17 ` [PATCH net-next v4 7/7] bonding: Selftest and documentation for the arp_ip_target parameter David Wilder
2025-06-28 1:03 ` [PATCH net-next v4 0/7] bonding: Extend arp_ip_target format to allow for a list of vlan tags Jakub Kicinski
2025-06-30 10:18 ` Hangbin Liu
2025-06-30 16:19 ` David Wilder
2025-07-01 7:13 ` Hangbin Liu
2025-08-07 4:38 ` Hangbin Liu
2025-08-07 16:24 ` David Wilder
2025-08-07 18:10 ` Jay Vosburgh
2025-08-08 10:17 ` Hangbin Liu
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=2140656.1751481136@vermin \
--to=jv@jvosburgh.net \
--cc=amorenoz@redhat.com \
--cc=haliu@redhat.com \
--cc=i.maximets@ovn.org \
--cc=netdev@vger.kernel.org \
--cc=pradeep@us.ibm.com \
--cc=pradeeps@linux.vnet.ibm.com \
--cc=wilder@us.ibm.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.