diff mbox series

[2/2] CIFS: adds min_offload and other params to cifs_debug

Message ID 20250214124306.498808-2-aman1cifs@gmail.com (mailing list archive)
State New
Headers show
Series [1/2] CIFS: Propagate min offload along with other parameters from primary to secondary channels. | expand

Commit Message

aman1cifs@gmail.com Feb. 14, 2025, 12:43 p.m. UTC
From: Aman <aman1@microsoft.com>

This change adds more parameters for debugging into the status of all
channels. It adds the following TCP server parameters to cifs_debug.c

        - min_offload
        - compression.requested
        - dfs_conn
        - ignore_signature
        - leaf_fullpath
        - retrans
        - noblockcnt
        - noblocksnd
        - sign
        - max_credits

This is a logical follow up to a previous patch titled:
"[PATCH] CIFS: Propagate min offload along with other parameters from
primary to secondary channels",
however this has been tested and applies independently.

Signed-off-by: Aman <aman1@microsoft.com>
---
 fs/smb/client/cifs_debug.c | 47 +++++++++++++++++++++++++++++++++++---
 1 file changed, 44 insertions(+), 3 deletions(-)

Comments

Steve French Feb. 14, 2025, 5:55 p.m. UTC | #1
If these parameters are the same for all channels with your patch,
would it make sense to print them only once (rather than once per
channel) to save debug output?

On Fri, Feb 14, 2025 at 6:43 AM <aman1cifs@gmail.com> wrote:
>
> From: Aman <aman1@microsoft.com>
>
> This change adds more parameters for debugging into the status of all
> channels. It adds the following TCP server parameters to cifs_debug.c
>
>         - min_offload
>         - compression.requested
>         - dfs_conn
>         - ignore_signature
>         - leaf_fullpath
>         - retrans
>         - noblockcnt
>         - noblocksnd
>         - sign
>         - max_credits
>
> This is a logical follow up to a previous patch titled:
> "[PATCH] CIFS: Propagate min offload along with other parameters from
> primary to secondary channels",
> however this has been tested and applies independently.
>
> Signed-off-by: Aman <aman1@microsoft.com>
> ---
>  fs/smb/client/cifs_debug.c | 47 +++++++++++++++++++++++++++++++++++---
>  1 file changed, 44 insertions(+), 3 deletions(-)
>
> diff --git a/fs/smb/client/cifs_debug.c b/fs/smb/client/cifs_debug.c
> index e03c890de..64a565c46 100644
> --- a/fs/smb/client/cifs_debug.c
> +++ b/fs/smb/client/cifs_debug.c
> @@ -147,8 +147,16 @@ cifs_dump_channel(struct seq_file *m, int i, struct cifs_chan *chan)
>                    "\n\t\tNumber of credits: %d,%d,%d Dialect 0x%x"
>                    "\n\t\tTCP status: %d Instance: %d"
>                    "\n\t\tLocal Users To Server: %d SecMode: 0x%x Req On Wire: %d"
> -                  "\n\t\tIn Send: %d In MaxReq Wait: %d",
> -                  i+1, server->conn_id,
> +                  "\n\t\tIn Send: %d In MaxReq Wait: %d"
> +                  "\n\t\tCompression Requested: %s"
> +                  "\n\t\tdfs_conn: %s"
> +                  "\n\t\tIgnore Signature: %s"
> +                  "\n\t\tretrans: %d"
> +                  "\n\t\tUse non-blocking connect: %s"
> +                  "\n\t\tUse non-blocking sendmsg: %s"
> +                  "\n\t\tSigning Enabled: %s"
> +                  "\n\t\tMin Offload: %d Max Credits: %d",
> +                  i, server->conn_id,
>                    server->credits,
>                    server->echo_credits,
>                    server->oplock_credits,
> @@ -159,7 +167,22 @@ cifs_dump_channel(struct seq_file *m, int i, struct cifs_chan *chan)
>                    server->sec_mode,
>                    in_flight(server),
>                    atomic_read(&server->in_send),
> -                  atomic_read(&server->num_waiters));
> +                  atomic_read(&server->num_waiters),
> +                  str_yes_no(server->compression.requested),
> +                  str_yes_no(server->dfs_conn),
> +                  str_yes_no(server->ignore_signature),
> +                  server->retrans,
> +                  str_yes_no(server->noblockcnt),
> +                  str_yes_no(server->noblocksnd),
> +                  str_yes_no(server->sign),
> +                  server->min_offload,
> +                  server->max_credits);
> +
> +       if (server->leaf_fullpath) {
> +               seq_printf(m, "\n\t\tDFS leaf full path: %s",
> +                          server->leaf_fullpath);
> +       }
> +
>  #ifdef CONFIG_NET_NS
>         if (server->net)
>                 seq_printf(m, " Net namespace: %u ", server->net->ns.inum);
> @@ -487,6 +510,24 @@ static int cifs_debug_data_proc_show(struct seq_file *m, void *v)
>                 else
>                         seq_puts(m, "disabled (not supported by this server)");
>
> +               seq_printf(m, "\nCompression Requested: %s"
> +                  "\ndfs_conn: %s"
> +                  "\nIgnore Signature: %s"
> +                  "\nretrans: %d"
> +                  "\nUse non-blocking connect: %s"
> +                  "\nUse non-blocking sendmsg: %s"
> +                  "\nSigning Enabled: %s"
> +                  "\nMin Offload: %d Max Credits: %d",
> +                  str_yes_no(server->compression.requested),
> +                  str_yes_no(server->dfs_conn),
> +                  str_yes_no(server->ignore_signature),
> +                  server->retrans,
> +                  str_yes_no(server->noblockcnt),
> +                  str_yes_no(server->noblocksnd),
> +                  str_yes_no(server->sign),
> +                  server->min_offload,
> +                  server->max_credits);
> +
>                 seq_printf(m, "\n\n\tSessions: ");
>                 i = 0;
>                 list_for_each_entry(ses, &server->smb_ses_list, smb_ses_list) {
> --
> 2.43.0
>
>
diff mbox series

Patch

diff --git a/fs/smb/client/cifs_debug.c b/fs/smb/client/cifs_debug.c
index e03c890de..64a565c46 100644
--- a/fs/smb/client/cifs_debug.c
+++ b/fs/smb/client/cifs_debug.c
@@ -147,8 +147,16 @@  cifs_dump_channel(struct seq_file *m, int i, struct cifs_chan *chan)
 		   "\n\t\tNumber of credits: %d,%d,%d Dialect 0x%x"
 		   "\n\t\tTCP status: %d Instance: %d"
 		   "\n\t\tLocal Users To Server: %d SecMode: 0x%x Req On Wire: %d"
-		   "\n\t\tIn Send: %d In MaxReq Wait: %d",
-		   i+1, server->conn_id,
+		   "\n\t\tIn Send: %d In MaxReq Wait: %d"
+		   "\n\t\tCompression Requested: %s"
+		   "\n\t\tdfs_conn: %s"
+		   "\n\t\tIgnore Signature: %s"
+		   "\n\t\tretrans: %d"
+		   "\n\t\tUse non-blocking connect: %s"
+		   "\n\t\tUse non-blocking sendmsg: %s"
+		   "\n\t\tSigning Enabled: %s"
+		   "\n\t\tMin Offload: %d Max Credits: %d",
+		   i, server->conn_id,
 		   server->credits,
 		   server->echo_credits,
 		   server->oplock_credits,
@@ -159,7 +167,22 @@  cifs_dump_channel(struct seq_file *m, int i, struct cifs_chan *chan)
 		   server->sec_mode,
 		   in_flight(server),
 		   atomic_read(&server->in_send),
-		   atomic_read(&server->num_waiters));
+		   atomic_read(&server->num_waiters),
+		   str_yes_no(server->compression.requested),
+		   str_yes_no(server->dfs_conn),
+		   str_yes_no(server->ignore_signature),
+		   server->retrans,
+		   str_yes_no(server->noblockcnt),
+		   str_yes_no(server->noblocksnd),
+		   str_yes_no(server->sign),
+		   server->min_offload,
+		   server->max_credits);
+
+	if (server->leaf_fullpath) {
+		seq_printf(m, "\n\t\tDFS leaf full path: %s",
+			   server->leaf_fullpath);
+	}
+
 #ifdef CONFIG_NET_NS
 	if (server->net)
 		seq_printf(m, " Net namespace: %u ", server->net->ns.inum);
@@ -487,6 +510,24 @@  static int cifs_debug_data_proc_show(struct seq_file *m, void *v)
 		else
 			seq_puts(m, "disabled (not supported by this server)");
 
+		seq_printf(m, "\nCompression Requested: %s"
+		   "\ndfs_conn: %s"
+		   "\nIgnore Signature: %s"
+		   "\nretrans: %d"
+		   "\nUse non-blocking connect: %s"
+		   "\nUse non-blocking sendmsg: %s"
+		   "\nSigning Enabled: %s"
+		   "\nMin Offload: %d Max Credits: %d",
+		   str_yes_no(server->compression.requested),
+		   str_yes_no(server->dfs_conn),
+		   str_yes_no(server->ignore_signature),
+		   server->retrans,
+		   str_yes_no(server->noblockcnt),
+		   str_yes_no(server->noblocksnd),
+		   str_yes_no(server->sign),
+		   server->min_offload,
+		   server->max_credits);
+
 		seq_printf(m, "\n\n\tSessions: ");
 		i = 0;
 		list_for_each_entry(ses, &server->smb_ses_list, smb_ses_list) {