diff options
Diffstat (limited to 'include/scsi/libfc.h')
-rw-r--r-- | include/scsi/libfc.h | 24 |
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 { | |||
224 | }; | 224 | }; |
225 | 225 | ||
226 | /** | 226 | /** |
227 | * struct fcoe_dev_stats - fcoe stats structure | 227 | * struct fc_stats - fc stats structure |
228 | * @SecondsSinceLastReset: Seconds since the last reset | 228 | * @SecondsSinceLastReset: Seconds since the last reset |
229 | * @TxFrames: Number of transmitted frames | 229 | * @TxFrames: Number of transmitted frames |
230 | * @TxWords: Number of transmitted words | 230 | * @TxWords: Number of transmitted words |
@@ -232,6 +232,9 @@ struct fc_rport_priv { | |||
232 | * @RxWords: Number of received words | 232 | * @RxWords: Number of received words |
233 | * @ErrorFrames: Number of received error frames | 233 | * @ErrorFrames: Number of received error frames |
234 | * @DumpedFrames: Number of dumped frames | 234 | * @DumpedFrames: Number of dumped frames |
235 | * @FcpPktAllocFails: Number of fcp packet allocation failures | ||
236 | * @FcpPktAborts: Number of fcp packet aborts | ||
237 | * @FcpFrameAllocFails: Number of fcp frame allocation failures | ||
235 | * @LinkFailureCount: Number of link failures | 238 | * @LinkFailureCount: Number of link failures |
236 | * @LossOfSignalCount: Number for signal losses | 239 | * @LossOfSignalCount: Number for signal losses |
237 | * @InvalidTxWordCount: Number of invalid transmitted words | 240 | * @InvalidTxWordCount: Number of invalid transmitted words |
@@ -244,7 +247,7 @@ struct fc_rport_priv { | |||
244 | * @VLinkFailureCount: Number of virtual link failures | 247 | * @VLinkFailureCount: Number of virtual link failures |
245 | * @MissDiscAdvCount: Number of missing FIP discovery advertisement | 248 | * @MissDiscAdvCount: Number of missing FIP discovery advertisement |
246 | */ | 249 | */ |
247 | struct fcoe_dev_stats { | 250 | struct fc_stats { |
248 | u64 SecondsSinceLastReset; | 251 | u64 SecondsSinceLastReset; |
249 | u64 TxFrames; | 252 | u64 TxFrames; |
250 | u64 TxWords; | 253 | u64 TxWords; |
@@ -252,6 +255,9 @@ struct fcoe_dev_stats { | |||
252 | u64 RxWords; | 255 | u64 RxWords; |
253 | u64 ErrorFrames; | 256 | u64 ErrorFrames; |
254 | u64 DumpedFrames; | 257 | u64 DumpedFrames; |
258 | u64 FcpPktAllocFails; | ||
259 | u64 FcpPktAborts; | ||
260 | u64 FcpFrameAllocFails; | ||
255 | u64 LinkFailureCount; | 261 | u64 LinkFailureCount; |
256 | u64 LossOfSignalCount; | 262 | u64 LossOfSignalCount; |
257 | u64 InvalidTxWordCount; | 263 | u64 InvalidTxWordCount; |
@@ -510,7 +516,7 @@ struct libfc_function_template { | |||
510 | int (*ddp_done)(struct fc_lport *, u16); | 516 | int (*ddp_done)(struct fc_lport *, u16); |
511 | /* | 517 | /* |
512 | * Sets up the DDP context for a given exchange id on the given | 518 | * Sets up the DDP context for a given exchange id on the given |
513 | * scatterlist if LLD supports DDP for FCoE target. | 519 | * scatterlist if LLD supports DDP for target. |
514 | * | 520 | * |
515 | * STATUS: OPTIONAL | 521 | * STATUS: OPTIONAL |
516 | */ | 522 | */ |
@@ -817,8 +823,7 @@ enum fc_lport_event { | |||
817 | * @state: Identifies the state | 823 | * @state: Identifies the state |
818 | * @boot_time: Timestamp indicating when the local port came online | 824 | * @boot_time: Timestamp indicating when the local port came online |
819 | * @host_stats: SCSI host statistics | 825 | * @host_stats: SCSI host statistics |
820 | * @dev_stats: FCoE device stats (TODO: libfc should not be | 826 | * @stats: FC local port stats (TODO separate libfc LLD stats) |
821 | * FCoE aware) | ||
822 | * @retry_count: Number of retries in the current state | 827 | * @retry_count: Number of retries in the current state |
823 | * @port_id: FC Port ID | 828 | * @port_id: FC Port ID |
824 | * @wwpn: World Wide Port Name | 829 | * @wwpn: World Wide Port Name |
@@ -867,7 +872,7 @@ struct fc_lport { | |||
867 | enum fc_lport_state state; | 872 | enum fc_lport_state state; |
868 | unsigned long boot_time; | 873 | unsigned long boot_time; |
869 | struct fc_host_statistics host_stats; | 874 | struct fc_host_statistics host_stats; |
870 | struct fcoe_dev_stats __percpu *dev_stats; | 875 | struct fc_stats __percpu *stats; |
871 | u8 retry_count; | 876 | u8 retry_count; |
872 | 877 | ||
873 | /* Fabric information */ | 878 | /* Fabric information */ |
@@ -980,8 +985,8 @@ static inline void fc_lport_state_enter(struct fc_lport *lport, | |||
980 | */ | 985 | */ |
981 | static inline int fc_lport_init_stats(struct fc_lport *lport) | 986 | static inline int fc_lport_init_stats(struct fc_lport *lport) |
982 | { | 987 | { |
983 | lport->dev_stats = alloc_percpu(struct fcoe_dev_stats); | 988 | lport->stats = alloc_percpu(struct fc_stats); |
984 | if (!lport->dev_stats) | 989 | if (!lport->stats) |
985 | return -ENOMEM; | 990 | return -ENOMEM; |
986 | return 0; | 991 | return 0; |
987 | } | 992 | } |
@@ -992,7 +997,7 @@ static inline int fc_lport_init_stats(struct fc_lport *lport) | |||
992 | */ | 997 | */ |
993 | static inline void fc_lport_free_stats(struct fc_lport *lport) | 998 | static inline void fc_lport_free_stats(struct fc_lport *lport) |
994 | { | 999 | { |
995 | free_percpu(lport->dev_stats); | 1000 | free_percpu(lport->stats); |
996 | } | 1001 | } |
997 | 1002 | ||
998 | /** | 1003 | /** |
@@ -1116,6 +1121,7 @@ void fc_fill_hdr(struct fc_frame *, const struct fc_frame *, | |||
1116 | * EXCHANGE MANAGER LAYER | 1121 | * EXCHANGE MANAGER LAYER |
1117 | *****************************/ | 1122 | *****************************/ |
1118 | int fc_exch_init(struct fc_lport *); | 1123 | int fc_exch_init(struct fc_lport *); |
1124 | void fc_exch_update_stats(struct fc_lport *lport); | ||
1119 | struct fc_exch_mgr_anchor *fc_exch_mgr_add(struct fc_lport *, | 1125 | struct fc_exch_mgr_anchor *fc_exch_mgr_add(struct fc_lport *, |
1120 | struct fc_exch_mgr *, | 1126 | struct fc_exch_mgr *, |
1121 | bool (*match)(struct fc_frame *)); | 1127 | bool (*match)(struct fc_frame *)); |