diff options
author | Aurelien Aptel <aaptel@suse.com> | 2018-06-14 09:43:20 -0400 |
---|---|---|
committer | Steve French <stfrench@microsoft.com> | 2018-06-15 03:38:08 -0400 |
commit | bc0fe8b207a14a6d7ecf8812edb92c8bdd5c9b2d (patch) | |
tree | 68302986d792bc5d5a8c35520f2b5ea58c01e3bb | |
parent | fe856be475f7cf5ffcde57341d175ce9fd09434b (diff) |
CIFS: dump every session iface info
Signed-off-by: Aurelien Aptel <aaptel@suse.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
-rw-r--r-- | fs/cifs/cifs_debug.c | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/fs/cifs/cifs_debug.c b/fs/cifs/cifs_debug.c index 116146022aa1..e8db245194e7 100644 --- a/fs/cifs/cifs_debug.c +++ b/fs/cifs/cifs_debug.c | |||
@@ -126,6 +126,25 @@ static void cifs_debug_tcon(struct seq_file *m, struct cifs_tcon *tcon) | |||
126 | seq_putc(m, '\n'); | 126 | seq_putc(m, '\n'); |
127 | } | 127 | } |
128 | 128 | ||
129 | static void | ||
130 | cifs_dump_iface(struct seq_file *m, struct cifs_server_iface *iface) | ||
131 | { | ||
132 | struct sockaddr_in *ipv4 = (struct sockaddr_in *)&iface->sockaddr; | ||
133 | struct sockaddr_in6 *ipv6 = (struct sockaddr_in6 *)&iface->sockaddr; | ||
134 | |||
135 | seq_printf(m, "\t\tSpeed: %zu bps\n", iface->speed); | ||
136 | seq_puts(m, "\t\tCapabilities: "); | ||
137 | if (iface->rdma_capable) | ||
138 | seq_puts(m, "rdma "); | ||
139 | if (iface->rss_capable) | ||
140 | seq_puts(m, "rss "); | ||
141 | seq_putc(m, '\n'); | ||
142 | if (iface->sockaddr.ss_family == AF_INET) | ||
143 | seq_printf(m, "\t\tIPv4: %pI4\n", &ipv4->sin_addr); | ||
144 | else if (iface->sockaddr.ss_family == AF_INET6) | ||
145 | seq_printf(m, "\t\tIPv6: %pI6\n", &ipv6->sin6_addr); | ||
146 | } | ||
147 | |||
129 | static int cifs_debug_data_proc_show(struct seq_file *m, void *v) | 148 | static int cifs_debug_data_proc_show(struct seq_file *m, void *v) |
130 | { | 149 | { |
131 | struct list_head *tmp1, *tmp2, *tmp3; | 150 | struct list_head *tmp1, *tmp2, *tmp3; |
@@ -312,6 +331,14 @@ skip_rdma: | |||
312 | mid_entry->mid); | 331 | mid_entry->mid); |
313 | } | 332 | } |
314 | spin_unlock(&GlobalMid_Lock); | 333 | spin_unlock(&GlobalMid_Lock); |
334 | |||
335 | spin_lock(&ses->iface_lock); | ||
336 | seq_printf(m, "\n\tServer interfaces: %zu\n", ses->iface_count); | ||
337 | for (j = 0; j < ses->iface_count; j++) { | ||
338 | seq_printf(m, "\t%d)\n", j); | ||
339 | cifs_dump_iface(m, &ses->iface_list[j]); | ||
340 | } | ||
341 | spin_unlock(&ses->iface_lock); | ||
315 | } | 342 | } |
316 | } | 343 | } |
317 | spin_unlock(&cifs_tcp_ses_lock); | 344 | spin_unlock(&cifs_tcp_ses_lock); |