All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCHv3 net] bonding: show NS IPv6 targets in proc master info
@ 2022-05-30  6:26 Hangbin Liu
  2022-05-31  9:20 ` patchwork-bot+netdevbpf
  0 siblings, 1 reply; 2+ messages in thread
From: Hangbin Liu @ 2022-05-30  6:26 UTC (permalink / raw)
  To: netdev
  Cc: Jay Vosburgh, Veaceslav Falico, Andy Gospodarek,
	David S . Miller, Jakub Kicinski, Jonathan Toppins, Eric Dumazet,
	Paolo Abeni, Hangbin Liu, Li Liang

When adding bond new parameter ns_targets. I forgot to print this
in bond master proc info. After updating, the bond master info will look
like:

ARP IP target/s (n.n.n.n form): 192.168.1.254
NS IPv6 target/s (XX::XX form): 2022::1, 2022::2

Fixes: 4e24be018eb9 ("bonding: add new parameter ns_targets")
Reported-by: Li Liang <liali@redhat.com>
Signed-off-by: Hangbin Liu <liuhangbin@gmail.com>
---
v3: fix description typo as Jon pointed.
v2: add CONFIG_IPV6 gating
---
 drivers/net/bonding/bond_procfs.c | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/drivers/net/bonding/bond_procfs.c b/drivers/net/bonding/bond_procfs.c
index cfe37be42be4..43be458422b3 100644
--- a/drivers/net/bonding/bond_procfs.c
+++ b/drivers/net/bonding/bond_procfs.c
@@ -129,6 +129,21 @@ static void bond_info_show_master(struct seq_file *seq)
 			printed = 1;
 		}
 		seq_printf(seq, "\n");
+
+#if IS_ENABLED(CONFIG_IPV6)
+		printed = 0;
+		seq_printf(seq, "NS IPv6 target/s (xx::xx form):");
+
+		for (i = 0; (i < BOND_MAX_NS_TARGETS); i++) {
+			if (ipv6_addr_any(&bond->params.ns_targets[i]))
+				break;
+			if (printed)
+				seq_printf(seq, ",");
+			seq_printf(seq, " %pI6c", &bond->params.ns_targets[i]);
+			printed = 1;
+		}
+		seq_printf(seq, "\n");
+#endif
 	}
 
 	if (BOND_MODE(bond) == BOND_MODE_8023AD) {
-- 
2.35.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCHv3 net] bonding: show NS IPv6 targets in proc master info
  2022-05-30  6:26 [PATCHv3 net] bonding: show NS IPv6 targets in proc master info Hangbin Liu
@ 2022-05-31  9:20 ` patchwork-bot+netdevbpf
  0 siblings, 0 replies; 2+ messages in thread
From: patchwork-bot+netdevbpf @ 2022-05-31  9:20 UTC (permalink / raw)
  To: Hangbin Liu
  Cc: netdev, j.vosburgh, vfalico, andy, davem, kuba, jtoppins,
	eric.dumazet, pabeni, liali

Hello:

This patch was applied to netdev/net.git (master)
by Paolo Abeni <pabeni@redhat.com>:

On Mon, 30 May 2022 14:26:39 +0800 you wrote:
> When adding bond new parameter ns_targets. I forgot to print this
> in bond master proc info. After updating, the bond master info will look
> like:
> 
> ARP IP target/s (n.n.n.n form): 192.168.1.254
> NS IPv6 target/s (XX::XX form): 2022::1, 2022::2
> 
> [...]

Here is the summary with links:
  - [PATCHv3,net] bonding: show NS IPv6 targets in proc master info
    https://git.kernel.org/netdev/net/c/4a1f14df55d1

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-05-31  9:20 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-30  6:26 [PATCHv3 net] bonding: show NS IPv6 targets in proc master info Hangbin Liu
2022-05-31  9:20 ` patchwork-bot+netdevbpf

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.