]> asedeno.scripts.mit.edu Git - linux.git/commit
scsi: zfcp: diagnostics buffer caching and use for exchange port data
authorBenjamin Block <bblock@linux.ibm.com>
Fri, 25 Oct 2019 16:12:44 +0000 (18:12 +0200)
committerMartin K. Petersen <martin.petersen@oracle.com>
Tue, 29 Oct 2019 02:16:14 +0000 (22:16 -0400)
commit7e418833e68948cb9ed15262889173b7db2960cb
tree7a61e483bb7f76d6564a9fbfe6e18d6707af8133
parent92953c6e0aa77d4febcca6dd691e8192910c8a28
scsi: zfcp: diagnostics buffer caching and use for exchange port data

The FCP channel exposes two central interfaces to receive information about
the local FCP-Adapter/-Port: Exchange Port and Exchange Config Data. Using
these commands can negatively impact the adapter if we allow them to be
sent at a very high rate.

The later parts of this patchset will introduce new user-interfaces to
receive more diagnostics from the adapter. To prevent any negative impact
from using those, this patch adds a simple caching-mechanism that will
prevent a malicious/faulty userspace-application from generating an
abnormal high amount of Exchange Port/Config Data traffic.

Relevant diagnostic data that is received via Exchange Config/Port Data is
cached in buffers associated with the corresponding adapter-struct.  Each
buffer is associated with a timestamp that signals how old the data is,
and, added via a following patch in this series, lets userspace-interfaces
determine when the data is too old and needs to be updated.

Buffer-updates are made during the normal response path of the
corresponding command. With this patch only the output of the Exchange Port
Data command is captured.

Link: https://lore.kernel.org/r/054ca020ce0a53dc0d9176428bea373898944e6a.1572018130.git.bblock@linux.ibm.com
Reviewed-by: Steffen Maier <maier@linux.ibm.com>
Signed-off-by: Benjamin Block <bblock@linux.ibm.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/s390/scsi/Makefile
drivers/s390/scsi/zfcp_aux.c
drivers/s390/scsi/zfcp_def.h
drivers/s390/scsi/zfcp_diag.c [new file with mode: 0644]
drivers/s390/scsi/zfcp_diag.h [new file with mode: 0644]
drivers/s390/scsi/zfcp_fsf.c