summaryrefslogtreecommitdiff
path: root/include/scsi/libfc.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/scsi/libfc.h')
-rw-r--r--include/scsi/libfc.h24
1 files changed, 15 insertions, 9 deletions
diff --git a/include/scsi/libfc.h b/include/scsi/libfc.h
index 8f9dfba3fcf0..399162b50a8d 100644
--- a/include/scsi/libfc.h
+++ b/include/scsi/libfc.h
@@ -224,7 +224,7 @@ struct fc_rport_priv {
};
/**
- * struct fcoe_dev_stats - fcoe stats structure
+ * struct fc_stats - fc stats structure
* @SecondsSinceLastReset: Seconds since the last reset
* @TxFrames: Number of transmitted frames
* @TxWords: Number of transmitted words
@@ -232,6 +232,9 @@ struct fc_rport_priv {
* @RxWords: Number of received words
* @ErrorFrames: Number of received error frames
* @DumpedFrames: Number of dumped frames
+ * @FcpPktAllocFails: Number of fcp packet allocation failures
+ * @FcpPktAborts: Number of fcp packet aborts
+ * @FcpFrameAllocFails: Number of fcp frame allocation failures
* @LinkFailureCount: Number of link failures
* @LossOfSignalCount: Number for signal losses
* @InvalidTxWordCount: Number of invalid transmitted words
@@ -244,7 +247,7 @@ struct fc_rport_priv {
* @VLinkFailureCount: Number of virtual link failures
* @MissDiscAdvCount: Number of missing FIP discovery advertisement
*/
-struct fcoe_dev_stats {
+struct fc_stats {
u64 SecondsSinceLastReset;
u64 TxFrames;
u64 TxWords;
@@ -252,6 +255,9 @@ struct fcoe_dev_stats {
u64 RxWords;
u64 ErrorFrames;
u64 DumpedFrames;
+ u64 FcpPktAllocFails;
+ u64 FcpPktAborts;
+ u64 FcpFrameAllocFails;
u64 LinkFailureCount;
u64 LossOfSignalCount;
u64 InvalidTxWordCount;
@@ -510,7 +516,7 @@ struct libfc_function_template {
int (*ddp_done)(struct fc_lport *, u16);
/*
* Sets up the DDP context for a given exchange id on the given
- * scatterlist if LLD supports DDP for FCoE target.
+ * scatterlist if LLD supports DDP for target.
*
* STATUS: OPTIONAL
*/
@@ -817,8 +823,7 @@ enum fc_lport_event {
* @state: Identifies the state
* @boot_time: Timestamp indicating when the local port came online
* @host_stats: SCSI host statistics
- * @dev_stats: FCoE device stats (TODO: libfc should not be
- * FCoE aware)
+ * @stats: FC local port stats (TODO separate libfc LLD stats)
* @retry_count: Number of retries in the current state
* @port_id: FC Port ID
* @wwpn: World Wide Port Name
@@ -867,7 +872,7 @@ struct fc_lport {
enum fc_lport_state state;
unsigned long boot_time;
struct fc_host_statistics host_stats;
- struct fcoe_dev_stats __percpu *dev_stats;
+ struct fc_stats __percpu *stats;
u8 retry_count;
/* Fabric information */
@@ -980,8 +985,8 @@ static inline void fc_lport_state_enter(struct fc_lport *lport,
*/
static inline int fc_lport_init_stats(struct fc_lport *lport)
{
- lport->dev_stats = alloc_percpu(struct fcoe_dev_stats);
- if (!lport->dev_stats)
+ lport->stats = alloc_percpu(struct fc_stats);
+ if (!lport->stats)
return -ENOMEM;
return 0;
}
@@ -992,7 +997,7 @@ static inline int fc_lport_init_stats(struct fc_lport *lport)
*/
static inline void fc_lport_free_stats(struct fc_lport *lport)
{
- free_percpu(lport->dev_stats);
+ free_percpu(lport->stats);
}
/**
@@ -1116,6 +1121,7 @@ void fc_fill_hdr(struct fc_frame *, const struct fc_frame *,
* EXCHANGE MANAGER LAYER
*****************************/
int fc_exch_init(struct fc_lport *);
+void fc_exch_update_stats(struct fc_lport *lport);
struct fc_exch_mgr_anchor *fc_exch_mgr_add(struct fc_lport *,
struct fc_exch_mgr *,
bool (*match)(struct fc_frame *));