Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753341AbdHBUOV (ORCPT ); Wed, 2 Aug 2017 16:14:21 -0400 Received: from a2nlsmtp01-03.prod.iad2.secureserver.net ([198.71.225.37]:50926 "EHLO a2nlsmtp01-03.prod.iad2.secureserver.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753073AbdHBUM1 (ORCPT ); Wed, 2 Aug 2017 16:12:27 -0400 x-originating-ip: 107.180.71.197 From: Long Li To: Steve French , linux-cifs@vger.kernel.org, samba-technical@lists.samba.org, linux-kernel@vger.kernel.org Cc: Long Li Subject: [[PATCH v1] 32/37] [CIFS] Add SMBD debug couters to CIFS debug exports Date: Wed, 2 Aug 2017 13:10:43 -0700 Message-Id: <1501704648-20159-33-git-send-email-longli@exchange.microsoft.com> X-Mailer: git-send-email 1.7.1 In-Reply-To: <1501704648-20159-1-git-send-email-longli@exchange.microsoft.com> References: <1501704648-20159-1-git-send-email-longli@exchange.microsoft.com> X-CMAE-Envelope: MS4wfOjh68108qLqo+6gY3rOsYajMHGPqKjunFOf4JL8JxuedE7IX02pItilZHrG0n3Kb8+YfsDYTg37gWzPU23UcWMOIJe7jgFNdfVKsosKZ+iVPkuf+vGQ 43HyYt0c0+ZxKNsRkpO6evIJeytvJs8CDC/YVQiuBUW3qZiDA5AYa7H3tWSw99Ej7Nvc602YIHps6J5tSt8RUzsCfYo69mVSIMley6hI6qJH/gM+Pb81qVbi 7KszU+8AmQKA2U939Lx69ZejiXC36pMSzeNx98jOm714lvL6ka9TSCdDg0ssZWYXBawEmLhGiIBVEZP1rC0wdCgZs/uLJUA6etC/VbFUAoQ= Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2043 Lines: 52 From: Long Li SMBD tranport defines several debug counters. Add them to common CIFS to export those under /proc. Signed-off-by: Long Li --- fs/cifs/cifs_debug.c | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/fs/cifs/cifs_debug.c b/fs/cifs/cifs_debug.c index ba0870d..aed17ee 100644 --- a/fs/cifs/cifs_debug.c +++ b/fs/cifs/cifs_debug.c @@ -30,6 +30,7 @@ #include "cifsproto.h" #include "cifs_debug.h" #include "cifsfs.h" +#include "cifsrdma.h" void cifs_dump_mem(char *label, void *data, int length) @@ -152,6 +153,28 @@ static int cifs_debug_data_proc_show(struct seq_file *m, void *v) list_for_each(tmp1, &cifs_tcp_ses_list) { server = list_entry(tmp1, struct TCP_Server_Info, tcp_ses_list); + + if (!server->rdma_ses) + goto skip_rdma; + + //RDMA counters + seq_printf(m, "\nrdma receive buffer: count, get, put send_empty: %u %u %u %u", + server->rdma_ses->count_receive_buffer, + server->rdma_ses->count_get_receive_buffer, + server->rdma_ses->count_put_receive_buffer, + server->rdma_ses->count_send_empty); + + seq_printf(m, "\nrdma reassembly queue: count, enqueue, dequeue: %u %u %u", + server->rdma_ses->count_reassembly_queue, + server->rdma_ses->count_enqueue_reassembly_queue, + server->rdma_ses->count_dequeue_reassembly_queue); + + seq_printf(m, "\nrdma credits: send receive receive_target: %u %u %u", + atomic_read(&server->rdma_ses->send_credits), + atomic_read(&server->rdma_ses->receive_credits), + atomic_read(&server->rdma_ses->receive_credit_target)); + +skip_rdma: seq_printf(m, "\nNumber of credits: %d", server->credits); i++; list_for_each(tmp2, &server->smb_ses_list) { -- 2.7.4