Skip to content

Commit ce9a57f

Browse files
committed
issue: 4397660 Rename fields in cq_stats_t
Rename n_rx_drop_counter and n_rx_pkt_drop. Signed-off-by: Bashar Abdelgafer <[email protected]>
1 parent e8da8a8 commit ce9a57f

File tree

6 files changed

+15
-15
lines changed

6 files changed

+15
-15
lines changed

src/core/dev/cq_mgr_rx.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ class cq_mgr_rx {
115115
int reclaim_recv_single_buffer(mem_buf_desc_t *rx_reuse);
116116

117117
void get_cq_event(int count = 1) { xlio_ib_mlx5_get_cq_event(&m_mlx5_cq, count); };
118-
uint64_t get_n_rx_drop_counter() { return m_p_cq_stat->n_rx_drop_counter; }
118+
uint64_t get_n_rx_hw_pkt_drops() { return m_p_cq_stat->n_rx_hw_pkt_drops; }
119119

120120
protected:
121121
/**

src/core/dev/cq_mgr_rx_regrq.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ void cq_mgr_rx_regrq::cqe_to_mem_buff_desc(struct xlio_mlx5_cqe *cqe,
119119
p_rx_wc_buf_desc->rx.timestamps.hw_raw = ntohll(cqe->timestamp);
120120
uint32_t sop_rxdrop_qpn_flowtag_h_byte = ntohl(cqe->sop_rxdrop_qpn_flowtag);
121121
p_rx_wc_buf_desc->rx.flow_tag_id = sop_rxdrop_qpn_flowtag_h_byte & 0x00FFFFFF;
122-
m_p_cq_stat->n_rx_drop_counter += sop_rxdrop_qpn_flowtag_h_byte >> 24;
122+
m_p_cq_stat->n_rx_hw_pkt_drops += sop_rxdrop_qpn_flowtag_h_byte >> 24;
123123
p_rx_wc_buf_desc->rx.is_sw_csum_need =
124124
!(m_b_is_rx_hw_csum_on && (cqe->hds_ip_ext & MLX5_CQE_L4_OK) &&
125125
(cqe->hds_ip_ext & MLX5_CQE_L3_OK));
@@ -206,7 +206,7 @@ int cq_mgr_rx_regrq::drain_and_proccess(uintptr_t *p_recycle_buffers_last_wr_id
206206

207207
if (cqe_process_rx(buff, status)) {
208208
if (p_recycle_buffers_last_wr_id) {
209-
m_p_cq_stat->n_rx_pkt_drop++;
209+
m_p_cq_stat->n_rx_sw_pkt_drops++;
210210
reclaim_recv_buffer_helper(buff);
211211
} else {
212212
bool procces_now = is_eth_tcp_frame(buff);
@@ -296,7 +296,7 @@ bool cq_mgr_rx_regrq::poll_and_process_element_rx(uint64_t *p_cq_poll_sn, void *
296296
process_recv_buffer(buff, pv_fd_ready_array);
297297
}
298298
} else {
299-
m_p_cq_stat->n_rx_pkt_drop++;
299+
m_p_cq_stat->n_rx_sw_pkt_drops++;
300300
if (++m_debt >= (int)m_n_sysvar_rx_num_wr_to_post_recv) {
301301
compensate_qp_poll_failed();
302302
}

src/core/dev/cq_mgr_rx_strq.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ inline bool cq_mgr_rx_strq::strq_cqe_to_mem_buff_desc(struct xlio_mlx5_cqe *cqe,
226226
_hot_buffer_stride->rx.timestamps.hw_raw = ntohll(cqe->timestamp);
227227
uint32_t sop_rxdrop_qpn_flowtag_h_byte = ntohl(cqe->sop_rxdrop_qpn_flowtag);
228228
_hot_buffer_stride->rx.flow_tag_id = sop_rxdrop_qpn_flowtag_h_byte & 0x00FFFFFF;
229-
m_p_cq_stat->n_rx_drop_counter += sop_rxdrop_qpn_flowtag_h_byte >> 24;
229+
m_p_cq_stat->n_rx_hw_pkt_drops += sop_rxdrop_qpn_flowtag_h_byte >> 24;
230230
_hot_buffer_stride->rx.is_sw_csum_need =
231231
!(m_b_is_rx_hw_csum_on && (cqe->hds_ip_ext & MLX5_CQE_L4_OK) &&
232232
(cqe->hds_ip_ext & MLX5_CQE_L3_OK));
@@ -322,7 +322,7 @@ int cq_mgr_rx_strq::drain_and_proccess_helper(mem_buf_desc_t *buff, mem_buf_desc
322322
++ret_total;
323323
if (process_strq_cq_element_rx(buff, status)) {
324324
if (p_recycle_buffers_last_wr_id) {
325-
m_p_cq_stat->n_rx_pkt_drop++;
325+
m_p_cq_stat->n_rx_sw_pkt_drops++;
326326
reclaim_recv_buffer_helper(buff);
327327
} else {
328328
bool procces_now = is_eth_tcp_frame(buff);

src/core/dev/ring_simple.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1011,7 +1011,7 @@ void ring_simple::modify_cq_moderation(uint32_t period, uint32_t count)
10111011

10121012
uint64_t ring_simple::get_rx_cq_out_of_buffer_drop()
10131013
{
1014-
return m_p_cq_mgr_rx->get_n_rx_drop_counter();
1014+
return m_p_cq_mgr_rx->get_n_rx_hw_pkt_drops();
10151015
}
10161016

10171017
void ring_simple::adapt_cq_moderation()

src/core/util/xlio_stats.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -308,10 +308,10 @@ typedef struct {
308308
// CQ stat info
309309
typedef struct {
310310
uint64_t n_rx_stride_count;
311-
uint64_t n_rx_drop_counter;
311+
uint64_t n_rx_hw_pkt_drops;
312312
uint64_t n_rx_packet_count;
313313
uint64_t n_rx_consumed_rwqe_count;
314-
uint64_t n_rx_pkt_drop;
314+
uint64_t n_rx_sw_pkt_drops;
315315
uint64_t n_rx_lro_packets;
316316
uint64_t n_rx_lro_bytes;
317317
uint64_t n_rx_gro_packets;

src/stats/stats_reader.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -396,10 +396,10 @@ void update_delta_cq_stat(cq_stats_t *p_curr_cq_stats, cq_stats_t *p_prev_cq_sta
396396
int delay = user_params.interval;
397397
if (p_curr_cq_stats && p_prev_cq_stats) {
398398
p_prev_cq_stats->n_rx_drained_at_once_max = p_curr_cq_stats->n_rx_drained_at_once_max;
399-
p_prev_cq_stats->n_rx_pkt_drop =
400-
(p_curr_cq_stats->n_rx_pkt_drop - p_prev_cq_stats->n_rx_pkt_drop) / delay;
401-
p_prev_cq_stats->n_rx_drop_counter =
402-
(p_curr_cq_stats->n_rx_drop_counter - p_prev_cq_stats->n_rx_drop_counter) / delay;
399+
p_prev_cq_stats->n_rx_sw_pkt_drops =
400+
(p_curr_cq_stats->n_rx_sw_pkt_drops - p_prev_cq_stats->n_rx_sw_pkt_drops) / delay;
401+
p_prev_cq_stats->n_rx_hw_pkt_drops =
402+
(p_curr_cq_stats->n_rx_hw_pkt_drops - p_prev_cq_stats->n_rx_hw_pkt_drops) / delay;
403403

404404
p_prev_cq_stats->n_rx_sw_queue_len = p_curr_cq_stats->n_rx_sw_queue_len;
405405
p_prev_cq_stats->n_buffer_pool_len = p_curr_cq_stats->n_buffer_pool_len;
@@ -572,9 +572,9 @@ void print_cq_stats(cq_instance_block_t *p_cq_inst_arr)
572572
p_cq_stats = &p_cq_inst_arr[i].cq_stats;
573573
printf("======================================================\n");
574574
printf("\tCQ=[%u]\n", i);
575-
printf(FORMAT_STATS_64bit, "SW RX Packets dropped:", p_cq_stats->n_rx_pkt_drop,
575+
printf(FORMAT_STATS_64bit, "SW RX Packets dropped:", p_cq_stats->n_rx_sw_pkt_drops,
576576
post_fix);
577-
printf(FORMAT_STATS_64bit, "HW RX Packets dropped:", p_cq_stats->n_rx_drop_counter,
577+
printf(FORMAT_STATS_64bit, "HW RX Packets dropped:", p_cq_stats->n_rx_hw_pkt_drops,
578578
post_fix);
579579
printf(FORMAT_STATS_32bit, "Packets queue len:", p_cq_stats->n_rx_sw_queue_len);
580580
printf(FORMAT_STATS_32bit, "Drained max:", p_cq_stats->n_rx_drained_at_once_max);

0 commit comments

Comments
 (0)