lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CANn89iLoVexJpUbZzwAYtGpLiTZ36tFh5GpJU=mYH6YazJeTPQ@mail.gmail.com>
Date: Mon, 23 Sep 2024 09:45:23 +0200
From: Eric Dumazet <edumazet@...gle.com>
To: Hangbin Liu <liuhangbin@...il.com>
Cc: netdev@...r.kernel.org, Jay Vosburgh <jv@...sburgh.net>, 
	Andy Gospodarek <andy@...yhouse.net>, "David S. Miller" <davem@...emloft.net>, 
	Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>, 
	Nikolay Aleksandrov <razor@...ckwall.org>, Simon Horman <horms@...nel.org>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH net] bonding: show slave priority in proc info

On Mon, Sep 23, 2024 at 9:29 AM Hangbin Liu <liuhangbin@...il.com> wrote:
>
> The slave priority is currently not shown in the proc filesystem, which
> prevents users from retrieving this information via proc. This patch fixes
> the issue by printing the slave priority in the proc filesystem, making it
> accessible to users.
>
> Fixes: 0a2ff7cc8ad4 ("Bonding: add per-port priority for failover re-selection")
> Signed-off-by: Hangbin Liu <liuhangbin@...il.com>
> ---
>  drivers/net/bonding/bond_procfs.c | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/drivers/net/bonding/bond_procfs.c b/drivers/net/bonding/bond_procfs.c
> index 7edf72ec816a..8b8580956edd 100644
> --- a/drivers/net/bonding/bond_procfs.c
> +++ b/drivers/net/bonding/bond_procfs.c
> @@ -210,6 +210,7 @@ static void bond_info_show_slave(struct seq_file *seq,
>         seq_printf(seq, "Permanent HW addr: %*phC\n",
>                    slave->dev->addr_len, slave->perm_hwaddr);
>         seq_printf(seq, "Slave queue ID: %d\n", READ_ONCE(slave->queue_id));
> +       seq_printf(seq, "Slave prio: %d\n", READ_ONCE(slave->prio));
>
>         if (BOND_MODE(bond) == BOND_MODE_8023AD) {
>                 const struct port *port = &SLAVE_AD_INFO(slave)->port;
> --
> 2.46.0
>

proc interface is deprecated in favor of rtnl.

slave->prio is correctly reported in IFLA_BOND_SLAVE_PRIO attribute.

No further kernel change is needed.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ