@@ -877,6 +877,7 @@ static void fdls_send_fabric_flogi(struct fnic_iport_s *iport)
877
877
oxid );
878
878
879
879
fnic_send_fcoe_frame (iport , frame , frame_size );
880
+ atomic64_inc (& iport -> iport_stats .fabric_flogi_sent );
880
881
err_out :
881
882
/* Even if fnic_send_fcoe_frame() fails we want to retry after timeout */
882
883
fdls_start_fabric_timer (iport , 2 * iport -> e_d_tov );
@@ -919,6 +920,7 @@ static void fdls_send_fabric_plogi(struct fnic_iport_s *iport)
919
920
oxid );
920
921
921
922
fnic_send_fcoe_frame (iport , frame , frame_size );
923
+ atomic64_inc (& iport -> iport_stats .fabric_plogi_sent );
922
924
923
925
err_out :
924
926
/* Even if fnic_send_fcoe_frame() fails we want to retry after timeout */
@@ -1080,6 +1082,7 @@ static void fdls_send_scr(struct fnic_iport_s *iport)
1080
1082
oxid );
1081
1083
1082
1084
fnic_send_fcoe_frame (iport , frame , frame_size );
1085
+ atomic64_inc (& iport -> iport_stats .fabric_scr_sent );
1083
1086
1084
1087
err_out :
1085
1088
/* Even if fnic_send_fcoe_frame() fails we want to retry after timeout */
@@ -1201,6 +1204,8 @@ fdls_send_tgt_adisc(struct fnic_iport_s *iport, struct fnic_tport_s *tport)
1201
1204
"0x%x: FDLS send ADISC to tgt fcid: 0x%x" ,
1202
1205
iport -> fcid , tport -> fcid );
1203
1206
1207
+ atomic64_inc (& iport -> iport_stats .tport_adisc_sent );
1208
+
1204
1209
fnic_send_fcoe_frame (iport , frame , frame_size );
1205
1210
1206
1211
err_out :
@@ -1310,6 +1315,7 @@ fdls_send_tgt_plogi(struct fnic_iport_s *iport, struct fnic_tport_s *tport)
1310
1315
iport -> fcid , tport -> fcid , oxid );
1311
1316
1312
1317
fnic_send_fcoe_frame (iport , frame , frame_size );
1318
+ atomic64_inc (& iport -> iport_stats .tport_plogi_sent );
1313
1319
1314
1320
err_out :
1315
1321
timeout = max (2 * iport -> e_d_tov , iport -> plogi_timeout );
@@ -1515,6 +1521,7 @@ fdls_send_tgt_prli(struct fnic_iport_s *iport, struct fnic_tport_s *tport)
1515
1521
iport -> fcid , tport -> fcid , oxid );
1516
1522
1517
1523
fnic_send_fcoe_frame (iport , frame , frame_size );
1524
+ atomic64_inc (& iport -> iport_stats .tport_prli_sent );
1518
1525
1519
1526
err_out :
1520
1527
timeout = max (2 * iport -> e_d_tov , iport -> plogi_timeout );
@@ -1626,6 +1633,8 @@ void fdls_tgt_logout(struct fnic_iport_s *iport, struct fnic_tport_s *tport)
1626
1633
iport -> fcid , oxid );
1627
1634
1628
1635
fnic_send_fcoe_frame (iport , frame , frame_size );
1636
+
1637
+ atomic64_inc (& iport -> iport_stats .tport_logo_sent );
1629
1638
}
1630
1639
1631
1640
static void fdls_tgt_discovery_start (struct fnic_iport_s * iport )
@@ -2515,6 +2524,7 @@ fdls_process_tgt_adisc_rsp(struct fnic_iport_s *iport,
2515
2524
2516
2525
switch (adisc_rsp -> els .adisc_cmd ) {
2517
2526
case ELS_LS_ACC :
2527
+ atomic64_inc (& iport -> iport_stats .tport_adisc_ls_accepts );
2518
2528
if (tport -> timer_pending ) {
2519
2529
FNIC_FCS_DBG (KERN_INFO , fnic -> lport -> host , fnic -> fnic_num ,
2520
2530
"tport 0x%p Canceling fabric disc timer\n" ,
@@ -2537,6 +2547,7 @@ fdls_process_tgt_adisc_rsp(struct fnic_iport_s *iport,
2537
2547
break ;
2538
2548
2539
2549
case ELS_LS_RJT :
2550
+ atomic64_inc (& iport -> iport_stats .tport_adisc_ls_rejects );
2540
2551
if (((els_rjt -> rej .er_reason == ELS_RJT_BUSY )
2541
2552
|| (els_rjt -> rej .er_reason == ELS_RJT_UNAB ))
2542
2553
&& (tport -> retry_counter < FDLS_RETRY_COUNT )) {
@@ -2608,11 +2619,13 @@ fdls_process_tgt_plogi_rsp(struct fnic_iport_s *iport,
2608
2619
2609
2620
switch (plogi_rsp -> els .fl_cmd ) {
2610
2621
case ELS_LS_ACC :
2622
+ atomic64_inc (& iport -> iport_stats .tport_plogi_ls_accepts );
2611
2623
FNIC_FCS_DBG (KERN_INFO , fnic -> lport -> host , fnic -> fnic_num ,
2612
2624
"PLOGI accepted by target: 0x%x" , tgt_fcid );
2613
2625
break ;
2614
2626
2615
2627
case ELS_LS_RJT :
2628
+ atomic64_inc (& iport -> iport_stats .tport_plogi_ls_rejects );
2616
2629
if (((els_rjt -> rej .er_reason == ELS_RJT_BUSY )
2617
2630
|| (els_rjt -> rej .er_reason == ELS_RJT_UNAB ))
2618
2631
&& (tport -> retry_counter < iport -> max_plogi_retries )) {
@@ -2630,6 +2643,7 @@ fdls_process_tgt_plogi_rsp(struct fnic_iport_s *iport,
2630
2643
return ;
2631
2644
2632
2645
default :
2646
+ atomic64_inc (& iport -> iport_stats .tport_plogi_misc_rejects );
2633
2647
FNIC_FCS_DBG (KERN_INFO , fnic -> lport -> host , fnic -> fnic_num ,
2634
2648
"PLOGI not accepted from target fcid: 0x%x" ,
2635
2649
tgt_fcid );
@@ -2733,6 +2747,7 @@ fdls_process_tgt_prli_rsp(struct fnic_iport_s *iport,
2733
2747
2734
2748
switch (prli_rsp -> els_prli .prli_cmd ) {
2735
2749
case ELS_LS_ACC :
2750
+ atomic64_inc (& iport -> iport_stats .tport_prli_ls_accepts );
2736
2751
FNIC_FCS_DBG (KERN_INFO , fnic -> lport -> host , fnic -> fnic_num ,
2737
2752
"PRLI accepted from target: 0x%x" , tgt_fcid );
2738
2753
@@ -2749,6 +2764,7 @@ fdls_process_tgt_prli_rsp(struct fnic_iport_s *iport,
2749
2764
}
2750
2765
break ;
2751
2766
case ELS_LS_RJT :
2767
+ atomic64_inc (& iport -> iport_stats .tport_prli_ls_rejects );
2752
2768
if (((els_rjt -> rej .er_reason == ELS_RJT_BUSY )
2753
2769
|| (els_rjt -> rej .er_reason == ELS_RJT_UNAB ))
2754
2770
&& (tport -> retry_counter < FDLS_RETRY_COUNT )) {
@@ -2772,6 +2788,7 @@ fdls_process_tgt_prli_rsp(struct fnic_iport_s *iport,
2772
2788
break ;
2773
2789
2774
2790
default :
2791
+ atomic64_inc (& iport -> iport_stats .tport_prli_misc_rejects );
2775
2792
FNIC_FCS_DBG (KERN_INFO , fnic -> lport -> host , fnic -> fnic_num ,
2776
2793
"PRLI not accepted from target: 0x%x" , tgt_fcid );
2777
2794
return ;
@@ -3075,6 +3092,7 @@ fdls_process_scr_rsp(struct fnic_iport_s *iport,
3075
3092
3076
3093
switch (scr_rsp -> scr .scr_cmd ) {
3077
3094
case ELS_LS_ACC :
3095
+ atomic64_inc (& iport -> iport_stats .fabric_scr_ls_accepts );
3078
3096
if (iport -> fabric .timer_pending ) {
3079
3097
FNIC_FCS_DBG (KERN_INFO , fnic -> lport -> host , fnic -> fnic_num ,
3080
3098
"Canceling fabric disc timer %p\n" , iport );
@@ -3086,7 +3104,7 @@ fdls_process_scr_rsp(struct fnic_iport_s *iport,
3086
3104
break ;
3087
3105
3088
3106
case ELS_LS_RJT :
3089
-
3107
+ atomic64_inc ( & iport -> iport_stats . fabric_scr_ls_rejects );
3090
3108
if (((els_rjt -> rej .er_reason == ELS_RJT_BUSY )
3091
3109
|| (els_rjt -> rej .er_reason == ELS_RJT_UNAB ))
3092
3110
&& (fdls -> retry_counter < FDLS_RETRY_COUNT )) {
@@ -3111,6 +3129,7 @@ fdls_process_scr_rsp(struct fnic_iport_s *iport,
3111
3129
break ;
3112
3130
3113
3131
default :
3132
+ atomic64_inc (& iport -> iport_stats .fabric_scr_misc_rejects );
3114
3133
break ;
3115
3134
}
3116
3135
}
@@ -3434,6 +3453,7 @@ fdls_process_flogi_rsp(struct fnic_iport_s *iport,
3434
3453
3435
3454
switch (flogi_rsp -> els .fl_cmd ) {
3436
3455
case ELS_LS_ACC :
3456
+ atomic64_inc (& iport -> iport_stats .fabric_flogi_ls_accepts );
3437
3457
if (iport -> fabric .timer_pending ) {
3438
3458
FNIC_FCS_DBG (KERN_INFO , fnic -> lport -> host , fnic -> fnic_num ,
3439
3459
"iport fcid: 0x%x Canceling fabric disc timer\n" ,
@@ -3507,6 +3527,7 @@ fdls_process_flogi_rsp(struct fnic_iport_s *iport,
3507
3527
break ;
3508
3528
3509
3529
case ELS_LS_RJT :
3530
+ atomic64_inc (& iport -> iport_stats .fabric_flogi_ls_rejects );
3510
3531
if (fabric -> retry_counter < iport -> max_flogi_retries ) {
3511
3532
FNIC_FCS_DBG (KERN_INFO , fnic -> lport -> host , fnic -> fnic_num ,
3512
3533
"FLOGI returned ELS_LS_RJT BUSY. Retry from timer routine %p" ,
@@ -3534,6 +3555,7 @@ fdls_process_flogi_rsp(struct fnic_iport_s *iport,
3534
3555
FNIC_FCS_DBG (KERN_INFO , fnic -> lport -> host , fnic -> fnic_num ,
3535
3556
"FLOGI response not accepted: 0x%x" ,
3536
3557
flogi_rsp -> els .fl_cmd );
3558
+ atomic64_inc (& iport -> iport_stats .fabric_flogi_misc_rejects );
3537
3559
break ;
3538
3560
}
3539
3561
}
@@ -3564,6 +3586,7 @@ fdls_process_fabric_plogi_rsp(struct fnic_iport_s *iport,
3564
3586
3565
3587
switch (plogi_rsp -> els .fl_cmd ) {
3566
3588
case ELS_LS_ACC :
3589
+ atomic64_inc (& iport -> iport_stats .fabric_plogi_ls_accepts );
3567
3590
if (iport -> fabric .timer_pending ) {
3568
3591
FNIC_FCS_DBG (KERN_INFO , fnic -> lport -> host , fnic -> fnic_num ,
3569
3592
"iport fcid: 0x%x fabric PLOGI response: Accepted\n" ,
@@ -3576,7 +3599,7 @@ fdls_process_fabric_plogi_rsp(struct fnic_iport_s *iport,
3576
3599
fdls_send_rpn_id (iport );
3577
3600
break ;
3578
3601
case ELS_LS_RJT :
3579
-
3602
+ atomic64_inc ( & iport -> iport_stats . fabric_plogi_ls_rejects );
3580
3603
if (((els_rjt -> rej .er_reason == ELS_RJT_BUSY )
3581
3604
|| (els_rjt -> rej .er_reason == ELS_RJT_UNAB ))
3582
3605
&& (iport -> fabric .retry_counter < iport -> max_plogi_retries )) {
@@ -3602,6 +3625,7 @@ fdls_process_fabric_plogi_rsp(struct fnic_iport_s *iport,
3602
3625
FNIC_FCS_DBG (KERN_INFO , fnic -> lport -> host , fnic -> fnic_num ,
3603
3626
"PLOGI response not accepted: 0x%x" ,
3604
3627
plogi_rsp -> els .fl_cmd );
3628
+ atomic64_inc (& iport -> iport_stats .fabric_plogi_misc_rejects );
3605
3629
break ;
3606
3630
}
3607
3631
}
@@ -3945,6 +3969,7 @@ fdls_process_unsupported_els_req(struct fnic_iport_s *iport,
3945
3969
FNIC_FCS_DBG (KERN_INFO , fnic -> lport -> host , fnic -> fnic_num ,
3946
3970
"Dropping unsupported ELS with illegal frame bits 0x%x\n" ,
3947
3971
d_id );
3972
+ atomic64_inc (& iport -> iport_stats .unsupported_frames_dropped );
3948
3973
return ;
3949
3974
}
3950
3975
@@ -3953,6 +3978,7 @@ fdls_process_unsupported_els_req(struct fnic_iport_s *iport,
3953
3978
FNIC_FCS_DBG (KERN_INFO , fnic -> lport -> host , fnic -> fnic_num ,
3954
3979
"Dropping unsupported ELS request in iport state: %d" ,
3955
3980
iport -> state );
3981
+ atomic64_inc (& iport -> iport_stats .unsupported_frames_dropped );
3956
3982
return ;
3957
3983
}
3958
3984
@@ -4381,6 +4407,8 @@ fdls_process_rscn(struct fnic_iport_s *iport, struct fc_frame_header *fchdr)
4381
4407
struct fnic * fnic = iport -> fnic ;
4382
4408
uint16_t rscn_payload_len ;
4383
4409
4410
+ atomic64_inc (& iport -> iport_stats .num_rscns );
4411
+
4384
4412
FNIC_FCS_DBG (KERN_INFO , fnic -> lport -> host , fnic -> fnic_num ,
4385
4413
"FDLS process RSCN %p" , iport );
4386
4414
0 commit comments