FC-BB-5 Rev2.0, Clause 7.10 extends the FC-LS-3 LESB for FC-BB_E. We are
already tracking Link Failure Count so add the rest in this patch.

For VLinkFailureCount and MissDiscAdvCount, they are part of the per-cpu
fcoe_dev_stats. For SymbolErrorCount, ErroredBlockCount, and FCSErrorCount,
they are defined in IEEE 802.3-2008 and are per LLD. They are kept in
in the fcoe_lld_stats struct.

Signed-off-by: Yi Zou <[email protected]>
---

 include/scsi/libfc.h |   17 +++++++++++++++++
 1 files changed, 17 insertions(+), 0 deletions(-)

diff --git a/include/scsi/libfc.h b/include/scsi/libfc.h
index 2936fba..3d9b49f 100644
--- a/include/scsi/libfc.h
+++ b/include/scsi/libfc.h
@@ -231,6 +231,8 @@ struct fc_rport_priv {
  * @ControlRequests:       Number of control requests
  * @InputMegabytes:        Number of received megabytes
  * @OutputMegabytes:       Number of transmitted megabytes
+ * @VLinkFailureCount:     Number of virtual link failures
+ * @MissDiscAdvCount:      Number of missing FIP discovery advertisement
  */
 struct fcoe_dev_stats {
        u64             SecondsSinceLastReset;
@@ -249,6 +251,20 @@ struct fcoe_dev_stats {
        u64             ControlRequests;
        u64             InputMegabytes;
        u64             OutputMegabytes;
+       u64             VLinkFailureCount;
+       u64             MissDiscAdvCount;
+};
+
+/**
+ * struct fcoe_lld_stats - fcoe LLD stats structure
+ * @SymbolErrorCount:      Number of symbol err during carrier (IEEE 802.3)
+ * @ErroredBlockCount:     Number of errored blocks (IEEE 802.3)
+ * @FCSErrorCount:         Number of frame check sequence errors (IEEE 802.3)
+ */
+struct fcoe_lld_stats {
+       u64             SymbolErrorCount;
+       u64             ErroredBlockCount;
+       u64             FCSErrorCount;
 };
 
 /**
@@ -808,6 +824,7 @@ struct fc_lport {
        unsigned long                  boot_time;
        struct fc_host_statistics      host_stats;
        struct fcoe_dev_stats          *dev_stats;
+       struct fcoe_lld_stats          lld_stats;
        u8                             retry_count;
 
        /* Fabric information */

_______________________________________________
devel mailing list
[email protected]
http://www.open-fcoe.org/mailman/listinfo/devel

Reply via email to