* [PATCH 1/1] fnic: Adding Check Condition counter to misc fnicstats
@ 2017-03-01 0:15 Satish Kharat
2017-03-02 3:03 ` Martin K. Petersen
0 siblings, 1 reply; 4+ messages in thread
From: Satish Kharat @ 2017-03-01 0:15 UTC (permalink / raw)
To: linux-scsi; +Cc: satishkh, sebaddel
Just a simple counter of number of check conditions encountered on
that host.
Signed-off-by: Satish Kharat <satishkh@cisco.com>
Signed-off-by: Sesidhar Baddela <sebaddel@cisco.com>
---
drivers/scsi/fnic/fnic_scsi.c | 3 +++
drivers/scsi/fnic/fnic_stats.h | 1 +
drivers/scsi/fnic/fnic_trace.c | 2 ++
3 files changed, 6 insertions(+)
diff --git a/drivers/scsi/fnic/fnic_scsi.c b/drivers/scsi/fnic/fnic_scsi.c
index 2544a37..d3b32da 100644
--- a/drivers/scsi/fnic/fnic_scsi.c
+++ b/drivers/scsi/fnic/fnic_scsi.c
@@ -919,6 +919,9 @@ static void fnic_fcpio_icmnd_cmpl_handler(struct fnic *fnic,
if (icmnd_cmpl->flags & FCPIO_ICMND_CMPL_RESID_UNDER)
xfer_len -= icmnd_cmpl->residual;
+ if (icmnd_cmpl->scsi_status == SAM_STAT_CHECK_CONDITION)
+ atomic64_inc(&fnic_stats->misc_stats.check_condition);
+
if (icmnd_cmpl->scsi_status == SAM_STAT_TASK_SET_FULL)
atomic64_inc(&fnic_stats->misc_stats.queue_fulls);
break;
diff --git a/drivers/scsi/fnic/fnic_stats.h b/drivers/scsi/fnic/fnic_stats.h
index 540cceb8..69acdac 100644
--- a/drivers/scsi/fnic/fnic_stats.h
+++ b/drivers/scsi/fnic/fnic_stats.h
@@ -88,6 +88,7 @@ struct misc_stats {
atomic64_t devrst_cpwq_alloc_failures;
atomic64_t io_cpwq_alloc_failures;
atomic64_t no_icmnd_itmf_cmpls;
+ atomic64_t check_condition;
atomic64_t queue_fulls;
atomic64_t rport_not_ready;
atomic64_t frame_errors;
diff --git a/drivers/scsi/fnic/fnic_trace.c b/drivers/scsi/fnic/fnic_trace.c
index 5a5fa01..ec20b3e 100644
--- a/drivers/scsi/fnic/fnic_trace.c
+++ b/drivers/scsi/fnic/fnic_trace.c
@@ -357,6 +357,7 @@ int fnic_get_stats_data(struct stats_debug_info *debug,
"Number of Copy WQ Alloc Failures for Device Reset: %lld\n"
"Number of Copy WQ Alloc Failures for IOs: %lld\n"
"Number of no icmnd itmf Completions: %lld\n"
+ "Number of Check Conditions encountered: %lld\n"
"Number of QUEUE Fulls: %lld\n"
"Number of rport not ready: %lld\n"
"Number of receive frame errors: %lld\n",
@@ -377,6 +378,7 @@ int fnic_get_stats_data(struct stats_debug_info *debug,
&stats->misc_stats.devrst_cpwq_alloc_failures),
(u64)atomic64_read(&stats->misc_stats.io_cpwq_alloc_failures),
(u64)atomic64_read(&stats->misc_stats.no_icmnd_itmf_cmpls),
+ (u64)atomic64_read(&stats->misc_stats.check_condition),
(u64)atomic64_read(&stats->misc_stats.queue_fulls),
(u64)atomic64_read(&stats->misc_stats.rport_not_ready),
(u64)atomic64_read(&stats->misc_stats.frame_errors));
--
2.5.5
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH 1/1] fnic: Adding Check Condition counter to misc fnicstats
2017-03-01 0:15 [PATCH 1/1] fnic: Adding Check Condition counter to misc fnicstats Satish Kharat
@ 2017-03-02 3:03 ` Martin K. Petersen
2017-03-23 0:03 ` Satish Kharat (satishkh)
0 siblings, 1 reply; 4+ messages in thread
From: Martin K. Petersen @ 2017-03-02 3:03 UTC (permalink / raw)
To: Satish Kharat; +Cc: linux-scsi, sebaddel
>>>>> "Satish" == Satish Kharat <satishkh@cisco.com> writes:
Satish,
Satish> Just a simple counter of number of check conditions encountered
Satish> on that host.
Please test and review the following:
https://patchwork.kernel.org/patch/9549777/
Thank you!
--
Martin K. Petersen Oracle Linux Engineering
^ permalink raw reply [flat|nested] 4+ messages in thread
* RE: [PATCH 1/1] fnic: Adding Check Condition counter to misc fnicstats
2017-03-02 3:03 ` Martin K. Petersen
@ 2017-03-23 0:03 ` Satish Kharat (satishkh)
2017-03-23 13:59 ` Martin K. Petersen
0 siblings, 1 reply; 4+ messages in thread
From: Satish Kharat (satishkh) @ 2017-03-23 0:03 UTC (permalink / raw)
To: Martin K. Petersen; +Cc: linux-scsi, Sesidhar Baddela (sebaddel)
Hi Martin,
Apologies for the delay. I was not able to verify this because of another fnic issue blocking this test. Just now submitted a fix for that 'fnic issue' (in the patch => [PATCH 1/1] fnic: bug fix for fip.fip_subcode in fnic_fcoe_send_vlan_req)
Did some quick verification and basic IO test, this patch looks good.
Thanks,
Satish Kharat
-----Original Message-----
From: Martin K. Petersen [mailto:martin.petersen@oracle.com]
Sent: Wednesday, March 01, 2017 7:04 PM
To: Satish Kharat (satishkh) <satishkh@cisco.com>
Cc: linux-scsi@vger.kernel.org; Sesidhar Baddela (sebaddel) <sebaddel@cisco.com>
Subject: Re: [PATCH 1/1] fnic: Adding Check Condition counter to misc fnicstats
>>>>> "Satish" == Satish Kharat <satishkh@cisco.com> writes:
Satish,
Satish> Just a simple counter of number of check conditions encountered
Satish> on that host.
Please test and review the following:
https://patchwork.kernel.org/patch/9549777/
Thank you!
--
Martin K. Petersen Oracle Linux Engineering
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 1/1] fnic: Adding Check Condition counter to misc fnicstats
2017-03-23 0:03 ` Satish Kharat (satishkh)
@ 2017-03-23 13:59 ` Martin K. Petersen
0 siblings, 0 replies; 4+ messages in thread
From: Martin K. Petersen @ 2017-03-23 13:59 UTC (permalink / raw)
To: Satish Kharat (satishkh)
Cc: Martin K. Petersen, linux-scsi, Sesidhar Baddela (sebaddel),
Christoph Hellwig
"Satish Kharat (satishkh)" <satishkh@cisco.com> writes:
Satish,
> Apologies for the delay. I was not able to verify this because of
> another fnic issue blocking this test. Just now submitted a fix for
> that 'fnic issue' (in the patch => [PATCH 1/1] fnic: bug fix for
> fip.fip_subcode in fnic_fcoe_send_vlan_req)
>
> Did some quick verification and basic IO test, this patch looks good.
OK, I have applied your patches as well as Christoph's
pci_alloc_irq_vectors() change to 4.12/scsi-queue.
Thank you!
--
Martin K. Petersen Oracle Linux Engineering
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2017-03-23 14:00 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-03-01 0:15 [PATCH 1/1] fnic: Adding Check Condition counter to misc fnicstats Satish Kharat
2017-03-02 3:03 ` Martin K. Petersen
2017-03-23 0:03 ` Satish Kharat (satishkh)
2017-03-23 13:59 ` Martin K. Petersen
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.