diff --git a/process/pdhists.cpp b/process/pdhists.cpp index 6bacfd61..67365475 100644 --- a/process/pdhists.cpp +++ b/process/pdhists.cpp @@ -137,6 +137,7 @@ void PDHISTSPlugin::update_record(RecordExtPDHISTS *pdhists_data, const Packet & return; } uint64_t inv_dst = std::numeric_limits::max(); + uint64_t inv_ipt = std::numeric_limits::max(); uint8_t direction = pkt.source_pkt ? 0 : 1; uint64_t pkt_dir_chan_dst = calculate_packet_dst(pkt.channel_index, pdhists_data->last_pkt_index_channel[direction]); uint64_t pkt_dir_link_dst = calculate_packet_dst(pkt.link_index, pdhists_data->last_pkt_index_intf[direction]); @@ -163,7 +164,7 @@ void PDHISTSPlugin::update_record(RecordExtPDHISTS *pdhists_data, const Packet & if (pkt_dir_store_dst != inv_dst) { update_hist((uint32_t) pkt_dir_store_dst, pdhists_data->dist_hist_store[direction], HISTOGRAM_OFFSET, HISTOGRAM_SIZE); } - if (pkt_dir_ipt != inv_dst) { + if (pkt_dir_ipt != inv_ipt) { update_hist((uint32_t) pkt_dir_ipt, pdhists_data->ipt_hist[direction], HISTOGRAM_IPT_OFFSET, HISTOGRAM_IPT_SIZE); } if (pkt_chan_dst != inv_dst) { @@ -175,7 +176,7 @@ void PDHISTSPlugin::update_record(RecordExtPDHISTS *pdhists_data, const Packet & if (pkt_store_dst != inv_dst) { update_hist((uint32_t) pkt_store_dst, pdhists_data->dist_hist_store[2], HISTOGRAM_OFFSET, HISTOGRAM_SIZE); } - if (pkt_ipt != inv_dst) { + if (pkt_ipt != inv_ipt) { update_hist((uint32_t) pkt_ipt, pdhists_data->ipt_hist[2], HISTOGRAM_IPT_OFFSET, HISTOGRAM_IPT_SIZE); } diff --git a/process/pdhists.hpp b/process/pdhists.hpp index af3b43a1..87107cbd 100644 --- a/process/pdhists.hpp +++ b/process/pdhists.hpp @@ -87,7 +87,7 @@ namespace ipxp { #define HISTOGRAM_IPT_OFFSET 0 #define HISTOGRAM_IPT_SIZE 20 -#define PDHISTS_UNIREC_TEMPLATE "S_PDHISTS_CHAN,D_PDHISTS_CHAN,B_PDHISTS_CHAN,S_PDHISTS_INTF,D_PDHISTS_INTF,B_PDHISTS_INTF,S_PTHISTS,D_PTHISTS,B_PTHISTS" +#define PDHISTS_UNIREC_TEMPLATE "S_PDHISTS_CHAN,D_PDHISTS_CHAN,B_PDHISTS_CHAN,S_PDHISTS_INTF,D_PDHISTS_INTF,B_PDHISTS_INTF,S_PDHISTS_STORE,D_PDHISTS_STORE,B_PDHISTS_STORE,S_PTHISTS,D_PTHISTS,B_PTHISTS" UR_FIELDS( uint32* S_PDHISTS_CHAN, uint32* D_PDHISTS_CHAN, @@ -176,7 +176,6 @@ struct RecordExtPDHISTS : public RecordExt { ur_array_allocate(tmplt, record, F_S_PDHISTS_STORE, HISTOGRAM_SIZE); ur_array_allocate(tmplt, record, F_D_PDHISTS_STORE, HISTOGRAM_SIZE); ur_array_allocate(tmplt, record, F_B_PDHISTS_STORE, HISTOGRAM_SIZE); - ur_array_allocate(tmplt, record, F_S_PTHISTS, HISTOGRAM_IPT_SIZE); ur_array_allocate(tmplt, record, F_B_PTHISTS, HISTOGRAM_IPT_SIZE); ur_array_allocate(tmplt, record, F_D_PTHISTS, HISTOGRAM_IPT_SIZE);