From patchwork Tue Apr 9 16:50:43 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benjamin Block X-Patchwork-Id: 10891747 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 5290E139A for ; Tue, 9 Apr 2019 16:51:05 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4033926242 for ; Tue, 9 Apr 2019 16:51:05 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 348AF287B5; Tue, 9 Apr 2019 16:51:05 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BA08F26242 for ; Tue, 9 Apr 2019 16:51:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726577AbfDIQvE (ORCPT ); Tue, 9 Apr 2019 12:51:04 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:56504 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726529AbfDIQvC (ORCPT ); Tue, 9 Apr 2019 12:51:02 -0400 Received: from pps.filterd (m0098419.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x39Gojsx097925 for ; Tue, 9 Apr 2019 12:51:00 -0400 Received: from e06smtp04.uk.ibm.com (e06smtp04.uk.ibm.com [195.75.94.100]) by mx0b-001b2d01.pphosted.com with ESMTP id 2rrwqrn3tm-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Tue, 09 Apr 2019 12:51:00 -0400 Received: from localhost by e06smtp04.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 9 Apr 2019 17:50:58 +0100 Received: from b06cxnps4076.portsmouth.uk.ibm.com (9.149.109.198) by e06smtp04.uk.ibm.com (192.168.101.134) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Tue, 9 Apr 2019 17:50:56 +0100 Received: from b06wcsmtp001.portsmouth.uk.ibm.com (b06wcsmtp001.portsmouth.uk.ibm.com [9.149.105.160]) by b06cxnps4076.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id x39Gos8h51839144 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 9 Apr 2019 16:50:54 GMT Received: from b06wcsmtp001.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 5A1D8A405F; Tue, 9 Apr 2019 16:50:54 +0000 (GMT) Received: from b06wcsmtp001.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 47D5EA405B; Tue, 9 Apr 2019 16:50:54 +0000 (GMT) Received: from t480-pf1aa2c2 (unknown [9.152.212.30]) by b06wcsmtp001.portsmouth.uk.ibm.com (Postfix) with ESMTPS; Tue, 9 Apr 2019 16:50:54 +0000 (GMT) Received: from bblock by t480-pf1aa2c2 with local (Exim 4.92) (envelope-from ) id 1hDtxV-0006G0-WA; Tue, 09 Apr 2019 18:50:54 +0200 From: Benjamin Block To: "James E . J . Bottomley" , "Martin K . Petersen" Cc: Benjamin Block , Steffen Maier , Martin Schwidefsky , Heiko Carstens , Fedor Loshakov , Jens Remus , linux-scsi@vger.kernel.org, linux-s390@vger.kernel.org Subject: [PATCH 00/10] zfcp: support retrieval of local RDP data Date: Tue, 9 Apr 2019 18:50:43 +0200 X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 X-TM-AS-GCONF: 00 x-cbid: 19040916-0016-0000-0000-0000026D0167 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 19040916-0017-0000-0000-000032C92C25 Message-Id: X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2019-04-09_08:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1904090107 Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Hello all, with FC-LS-3 Fibre Channel got support for the RDP Extended Link Service, which we can use to gather diagnostics data (health values from the optics and such). To gather those data from our local link, the FCP Channel firmware added some new fields in our Exchange Port Data firmware command (primarily SFP data). This patchset adds a new sysfs-directory below our adapter-object and several files in that to read those new fields. Additionally this also adds a file to read the buffer-to-buffer credit value from our local port (also something that can be gathered using the RDP ELS). The main purpose of the data from RDP requests (at least in my mind) are to catch some otherwise hard to track down errors, like dirt on the fibre and such (I would expect optics data to degraded with such conditions). These things are a pain to track down because it doesn't cause the link to go away, just some sporadic errors that can result in incomplete exchanges and such. The patchset is somewhat big because I don't want to issue a single Exchange Port/Config Data command for each read of those files, which would generate unnecessary traffic (and possibly inconsistent data) on our command-queue (we don't have an admin-queue or some such). So it also adds a (time-based) mechanism to cache data from Exchange Config/Port Data. We also want to prevent our adapter-structure from growing, which would further grow Scsi_Host, which is already too damn big, so these data are decoupled. More details are in the patches themselves. If there are no objections, It would be nice to consider this for 5.2. FYI: I also plan to/am in the middle of writing a simple command-line tool to send RDP to all/certain available remote/local FC-Ports in the System and present them in a sane format (sane to me ;-) ). This could be used for logging, or while gathering debug-data from a system. The RDP ELS' to remote ports will be send using BSG. Local data (for zFCP) would be read using this new interface). If anyone is interested, I can point it out on the list once I have something that has at least a minimum set of functionality. Benjamin Block (10): zfcp: signal incomplete or error for sync exchange config/port data zfcp: remove option to pass NULL to sync exchange config/port data zfcp: diagnostics buffer caching and use for exchange port data zfcp: add diagnostics buffer for exchange config data zfcp: support retrieval of SFP Data via Exchange Port Data zfcp: introduce SysFS interface for diagnostics of local SFP transceiver zfcp: implicitly refresh port-data diagnostics when reading SysFS zfcp: move maximum age of diagnostic buffers into a module-parameter zfcp: introduce SysFS interface to read the local B2B-Credit zfcp: implicitly refresh config-data diagnostics when reading SysFS drivers/s390/scsi/Makefile | 2 +- drivers/s390/scsi/zfcp_aux.c | 12 +- drivers/s390/scsi/zfcp_def.h | 4 +- drivers/s390/scsi/zfcp_diag.c | 321 +++++++++++++++++++++++++++++++++++++++++ drivers/s390/scsi/zfcp_diag.h | 97 +++++++++++++ drivers/s390/scsi/zfcp_ext.h | 1 + drivers/s390/scsi/zfcp_fsf.c | 87 +++++++++-- drivers/s390/scsi/zfcp_fsf.h | 21 ++- drivers/s390/scsi/zfcp_scsi.c | 4 +- drivers/s390/scsi/zfcp_sysfs.c | 125 +++++++++++++++- 10 files changed, 651 insertions(+), 23 deletions(-) create mode 100644 drivers/s390/scsi/zfcp_diag.c create mode 100644 drivers/s390/scsi/zfcp_diag.h --- 2.16.4