File tree Expand file tree Collapse file tree 3 files changed +12
-4
lines changed
drivers/net/ethernet/broadcom/bnxt Expand file tree Collapse file tree 3 files changed +12
-4
lines changed Original file line number Diff line number Diff line change @@ -8770,14 +8770,19 @@ static void bnxt_enable_napi(struct bnxt *bp)
8770
8770
int i ;
8771
8771
8772
8772
for (i = 0 ; i < bp -> cp_nr_rings ; i ++ ) {
8773
- struct bnxt_cp_ring_info * cpr = & bp -> bnapi [i ]-> cp_ring ;
8774
- bp -> bnapi [i ]-> in_reset = false;
8773
+ struct bnxt_napi * bnapi = bp -> bnapi [i ];
8774
+ struct bnxt_cp_ring_info * cpr ;
8775
+
8776
+ cpr = & bnapi -> cp_ring ;
8777
+ if (bnapi -> in_reset )
8778
+ cpr -> sw_stats .rx .rx_resets ++ ;
8779
+ bnapi -> in_reset = false;
8775
8780
8776
- if (bp -> bnapi [ i ] -> rx_ring ) {
8781
+ if (bnapi -> rx_ring ) {
8777
8782
INIT_WORK (& cpr -> dim .work , bnxt_dim_work );
8778
8783
cpr -> dim .mode = DIM_CQ_PERIOD_MODE_START_FROM_EQE ;
8779
8784
}
8780
- napi_enable (& bp -> bnapi [ i ] -> napi );
8785
+ napi_enable (& bnapi -> napi );
8781
8786
}
8782
8787
}
8783
8788
@@ -10704,6 +10709,7 @@ static void bnxt_rx_ring_reset(struct bnxt *bp)
10704
10709
rxr -> bnapi -> in_reset = false;
10705
10710
bnxt_alloc_one_rx_ring (bp , i );
10706
10711
cpr = & rxr -> bnapi -> cp_ring ;
10712
+ cpr -> sw_stats .rx .rx_resets ++ ;
10707
10713
if (bp -> flags & BNXT_FLAG_AGG_RINGS )
10708
10714
bnxt_db_write (bp , & rxr -> rx_agg_db , rxr -> rx_agg_prod );
10709
10715
bnxt_db_write (bp , & rxr -> rx_db , rxr -> rx_prod );
Original file line number Diff line number Diff line change @@ -907,6 +907,7 @@ struct bnxt_rx_ring_info {
907
907
908
908
struct bnxt_rx_sw_stats {
909
909
u64 rx_l4_csum_errors ;
910
+ u64 rx_resets ;
910
911
u64 rx_buf_errors ;
911
912
};
912
913
Original file line number Diff line number Diff line change @@ -178,6 +178,7 @@ static const char * const bnxt_ring_tpa2_stats_str[] = {
178
178
179
179
static const char * const bnxt_rx_sw_stats_str [] = {
180
180
"rx_l4_csum_errors" ,
181
+ "rx_resets" ,
181
182
"rx_buf_errors" ,
182
183
};
183
184
You can’t perform that action at this time.
0 commit comments