@@ -123,6 +123,7 @@ struct sample_output {
123
123
uint64_t drop ;
124
124
uint64_t drop_xmit ;
125
125
uint64_t err ;
126
+ uint64_t err_pps ;
126
127
uint64_t xmit ;
127
128
} totals ;
128
129
struct {
@@ -669,13 +670,16 @@ static void stats_get_rx_cnt(struct stats_record *stats_rec,
669
670
}
670
671
671
672
if (out ) {
673
+ err = calc_errs_pps (& rec -> total , & prev -> total , t );
674
+
672
675
out -> rx_cnt .pps = calc_pps (& rec -> total , & prev -> total , t );
673
676
out -> rx_cnt .drop = calc_drop_pps (& rec -> total , & prev -> total , t );
674
- out -> rx_cnt .err = calc_errs_pps ( & rec -> total , & prev -> total , t ) ;
677
+ out -> rx_cnt .err = err ;
675
678
676
679
out -> totals .rx += calc_pkts (& rec -> total , & prev -> total , t );
677
680
out -> totals .drop += calc_drop_pkts (& rec -> total , & prev -> total , t );
678
681
out -> totals .err += calc_errs_pkts (& rec -> total , & prev -> total , t );
682
+ out -> totals .err_pps += err ;
679
683
}
680
684
}
681
685
@@ -918,6 +922,7 @@ static void stats_get_redirect_err_cnt(struct stats_record *stats_rec,
918
922
if (out ) {
919
923
out -> redir_cnt .err = sum_pps ;
920
924
out -> totals .err += sum_pkts ;
925
+ out -> totals .err_pps += sum_pps ;
921
926
}
922
927
}
923
928
@@ -964,6 +969,7 @@ static void stats_get_exception_cnt(struct stats_record *stats_rec,
964
969
if (out ) {
965
970
out -> except_cnt .hits = sum_pps ;
966
971
out -> totals .err += sum_pkts ;
972
+ out -> totals .err_pps += sum_pps ;
967
973
}
968
974
}
969
975
@@ -1004,18 +1010,20 @@ static void stats_get_devmap_xmit(struct stats_record *stats_rec,
1004
1010
if (out ) {
1005
1011
pps = calc_pps (& rec -> total , & prev -> total , t );
1006
1012
drop = calc_drop_pps (& rec -> total , & prev -> total , t );
1013
+ err = calc_errs_pps (& rec -> total , & prev -> total , t );
1007
1014
1008
1015
info = calc_info_pps (& rec -> total , & prev -> total , t );
1009
1016
if (info > 0 )
1010
1017
out -> xmit_cnt .bavg = (pps + drop ) / info ; /* calc avg bulk */
1011
1018
1012
1019
out -> xmit_cnt .pps = pps ;
1013
1020
out -> xmit_cnt .drop = drop ;
1014
- out -> xmit_cnt .err = calc_errs_pps ( & rec -> total , & prev -> total , t ) ;
1021
+ out -> xmit_cnt .err = err ;
1015
1022
1016
1023
out -> totals .xmit += calc_pkts (& rec -> total , & prev -> total , t );
1017
1024
out -> totals .drop_xmit += calc_drop_pkts (& rec -> total , & prev -> total , t );;
1018
1025
out -> totals .err += calc_errs_pkts (& rec -> total , & prev -> total , t );;
1026
+ out -> totals .err_pps += err ;
1019
1027
}
1020
1028
}
1021
1029
@@ -1069,6 +1077,7 @@ static void stats_get_devmap_xmit_multi(struct stats_record *stats_rec,
1069
1077
out -> totals .xmit += calc_pkts (& r -> total , & p -> total , t );
1070
1078
out -> totals .drop_xmit += calc_drop_pkts (& r -> total , & p -> total , t );
1071
1079
out -> totals .err += calc_errs_pkts (& r -> total , & p -> total , t );
1080
+ out -> totals .err_pps += calc_errs_pps (& r -> total , & p -> total , t );
1072
1081
continue ;
1073
1082
}
1074
1083
@@ -1129,15 +1138,15 @@ static void stats_print(const char *prefix, int mask, struct stats_record *r,
1129
1138
1130
1139
print_always ("%-23s" , prefix ?: "Summary" );
1131
1140
if (mask & SAMPLE_RX_CNT )
1132
- print_always (FMT_COLUMNl , RX (out -> totals . rx ));
1141
+ print_always (FMT_COLUMNl , RX (out -> rx_cnt . pps ));
1133
1142
if (mask & SAMPLE_REDIRECT_CNT )
1134
- print_always (FMT_COLUMNl , REDIR (out -> totals . redir ));
1143
+ print_always (FMT_COLUMNl , REDIR (out -> redir_cnt . suc ));
1135
1144
printf (FMT_COLUMNl ,
1136
- out -> totals .err + ((out -> totals . drop_xmit + out -> totals .drop ) * !(mask & SAMPLE_DROP_OK )),
1145
+ out -> totals .err_pps + ((out -> rx_cnt . drop + out -> xmit_cnt .drop ) * !(mask & SAMPLE_DROP_OK )),
1137
1146
(mask & SAMPLE_DROP_OK ) ? "err/s" : "err,drop/s" );
1138
1147
if (mask & SAMPLE_DEVMAP_XMIT_CNT ||
1139
1148
mask & SAMPLE_DEVMAP_XMIT_CNT_MULTI )
1140
- printf (FMT_COLUMNl , XMIT (out -> totals . xmit ));
1149
+ printf (FMT_COLUMNl , XMIT (out -> xmit_cnt . pps ));
1141
1150
printf ("\n" );
1142
1151
1143
1152
if (mask & SAMPLE_RX_CNT ) {
0 commit comments