Skip to content

Commit

Permalink
issue: 1332983 Add some debug prints to ring_cb (#595)
Browse files Browse the repository at this point in the history
Signed-off-by: Rafi Wiener <rafiw@mellanox.com>
  • Loading branch information
rafiw authored and liranoz12 committed Apr 29, 2018
1 parent 5a99f3e commit c25a939
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions src/vma/dev/ring_eth_cb.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,11 @@ void ring_eth_cb::create_resources(ring_resource_creation_info_t *p_ring_info,
}
}
m_strides_num = 1 << m_single_wqe_log_num_of_strides;
ring_logdbg("using strides_num %d stride size %d, wqe_count %d stride_bytes "
"%d, hdr_bytes %d num %d rec mode %d", m_strides_num, m_stride_size,
m_wq_count, cb_ring->stride_bytes, cb_ring->hdr_bytes, cb_ring->num,
m_packet_receive_mode);

memset(&m_curr_hw_timestamp, 0, sizeof(m_curr_hw_timestamp));
if (m_packet_receive_mode == PADDED_PACKET) {
size_t buffer_size = m_stride_size * m_strides_num * m_wq_count;
Expand All @@ -138,6 +143,7 @@ void ring_eth_cb::create_resources(ring_resource_creation_info_t *p_ring_info,
m_buff_data.addr = m_sge_ptrs[CB_UMR_PAYLOAD];
m_buff_data.length = m_stride_size * m_strides_num;
m_buff_data.lkey = get_mem_lkey(m_p_ib_ctx);
ring_logdbg("using buffer size %zd", buffer_size);
} else if (allocate_umr_mem(cb_ring, net_len)) {
ring_logerr("failed creating UMR QP");
throw_vma_exception("failed creating UMR QP");
Expand Down Expand Up @@ -236,9 +242,9 @@ int ring_eth_cb::allocate_umr_mem(vma_cyclic_buffer_ring_attr *cb_ring, uint16_t
buffer_size = m_packet_size * packets_num;
// will raise an exception on failure
base_ptr = (uint64_t)m_alloc.alloc_and_reg_mr(buffer_size, m_p_ib_ctx);
ring_logdbg("use buffer parameters, buffer_size %zd "
"strides_num %d stride size %d",
buffer_size, m_strides_num, m_stride_size);
ring_logdbg("using buffer parameters, buffer_size %zd "
"pad len %d packet size %d",
buffer_size, pad_len, m_packet_size);
prev_addr = base_ptr;
mr = m_alloc.find_ibv_mr_by_ib_ctx(m_p_ib_ctx);
BULLSEYE_EXCLUDE_BLOCK_START
Expand Down

0 comments on commit c25a939

Please sign in to comment.