Skip to content

Commit

Permalink
Bugfix: index the combined counter by thread
Browse files Browse the repository at this point in the history
Fixes #9
  • Loading branch information
Pim van Pelt committed Oct 8, 2024
1 parent 86368e2 commit a5f31d6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sflow/sflow.c
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ update_counter_vector_simple (stat_segment_data_t *res, sflow_counters_t *ifCtrs
static void
update_counter_vector_combined(stat_segment_data_t *res, sflow_counters_t *ifCtrs, u32 hw_if_index) {
for (int th = 0; th < vec_len (res->simple_counter_vec); th++) {
for (int intf = 0; intf < vec_len (res->combined_counter_vec[intf]); intf++) {
for (int intf = 0; intf < vec_len (res->combined_counter_vec[th]); intf++) {
if(intf == hw_if_index) {
u64 pkts = res->combined_counter_vec[th][intf].packets;
u64 byts = res->combined_counter_vec[th][intf].bytes;
Expand Down

0 comments on commit a5f31d6

Please sign in to comment.