src/dpdk/drivers/net/qede/qede_debug.c
static u32 qed_ilt_dump_pages_range(u32 *dump_buf,
				    bool dump,
				    u32 start_page_id,
				    u32 num_pages,
				    struct phys_mem_desc *ilt_pages,
				    bool dump_page_ids)
{
	u32 page_id, end_page_id, offset = 0;

	if (num_pages == 0)
		return offset;

	end_page_id = start_page_id + num_pages - 1;

	for (page_id = start_page_id; page_id <= end_page_id; page_id++) {
		struct phys_mem_desc *mem_desc = &ilt_pages[page_id];

		/**
		 *
		 * if (page_id >= ->p_cxt_mngr->ilt_shadow_size)
		 *     break;
		 */

		if (!ilt_pages[page_id].virt_addr)
			continue;

		if (dump_page_ids) {
			/* Copy page ID to dump buffer */
			if (dump)
				*(dump_buf + offset) = page_id;
			offset++;
		} else {
			/* Copy page memory to dump buffer */
			if (dump)
				memcpy(dump_buf + offset,
				       mem_desc->virt_addr, mem_desc->size);
			offset += BYTES_TO_DWORDS(mem_desc->size);
		}
	}

	return offset;
}
/* Dumps the specified ILT pages to the specified buffer.
 * Returns the dumped size in dwords.
 */
Dumps the specified ILT pages to the specified buffer.
Returns the dumped size in dwords.
Dumps the specified ILT pages to the specified buffer . Returns the dumped size in dwords .
static u32 qed_ilt_dump_pages_range(u32 *dump_buf,
				    bool dump,
				    u32 start_page_id,
				    u32 num_pages,
				    struct phys_mem_desc *ilt_pages,
				    bool dump_page_ids)
{
	u32 page_id, end_page_id, offset = 0;
	if (num_pages == 0)
		return offset;
	end_page_id = start_page_id + num_pages - 1;
	for (page_id = start_page_id; page_id <= end_page_id; page_id++) {
		struct phys_mem_desc *mem_desc = &ilt_pages[page_id];
		if (!ilt_pages[page_id].virt_addr)
			continue;
		if (dump_page_ids) {
			if (dump)
				*(dump_buf + offset) = page_id;
			offset++;
		} else {
			if (dump)
				memcpy(dump_buf + offset,
				       mem_desc->virt_addr, mem_desc->size);
			offset += BYTES_TO_DWORDS(mem_desc->size);
		}
	}
	return offset;
}
static u32 qed_ilt_dump_pages_range ( u32 * dump_buf , bool dump , u32 start_page_id , u32 num_pages , struct phys_mem_desc * ilt_pages , bool dump_page_ids ) { u32 page_id , end_page_id , offset = 0 ; if ( num_pages == 0 ) return offset ; end_page_id = start_page_id + num_pages - 1 ; for ( page_id = start_page_id ; page_id <= end_page_id ; page_id ++ ) { struct phys_mem_desc * mem_desc = & ilt_pages [ page_id ] ; if ( ! ilt_pages [ page_id ] . virt_addr ) continue ; if ( dump_page_ids ) { if ( dump ) * ( dump_buf + offset ) = page_id ; offset ++ ; } else { if ( dump ) memcpy ( dump_buf + offset , mem_desc -> virt_addr , mem_desc -> size ) ; offset += BYTES_TO_DWORDS ( mem_desc -> size ) ; } } return offset ; }
Dumps the specified ILT pages to the specified buffer.
Dumps the specified ILT pages to the specified buffer .
/**
		 *
		 * if (page_id >= ->p_cxt_mngr->ilt_shadow_size)
		 *     break;
		 */ /* Copy page ID to dump buffer */ /* Copy page memory to dump buffer */