Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

issue: 1332983 Add some debug prints to ring_cb #595

Merged
merged 2 commits into from
Apr 29, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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