[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <2140656.1751481136@vermin>
Date: Wed, 02 Jul 2025 11:32:16 -0700
From: Jay Vosburgh <jv@...sburgh.net>
To: David Wilder <wilder@...ibm.com>
cc: netdev@...r.kernel.org, pradeeps@...ux.vnet.ibm.com,
pradeep@...ibm.com, i.maximets@....org, amorenoz@...hat.com,
haliu@...hat.com
Subject: Re: [PATCH net-next v4 6/7] bonding: Update to bond's sysfs and procfs for extended arp_ip_target format.
David Wilder <wilder@...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@...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@...sburgh.net
Powered by blists - more mailing lists