src/dpdk/drivers/net/qede/qede_debug.c
static u32 qed_read_from_cyclic_buf(void *buf,
				    u32 *offset,
				    u32 buf_size, u8 num_bytes_to_read)
{
	u8 i, *val_ptr, *bytes_buf = (u8 *)buf;
	u32 val = 0;

	val_ptr = (u8 *)&val;

	/* Assume running on a LITTLE ENDIAN and the buffer is network order
	 * (BIG ENDIAN), as high order bytes are placed in lower memory address.
	 */
	for (i = 0; i < num_bytes_to_read; i++) {
		val_ptr[i] = bytes_buf[*offset];
		*offset = qed_cyclic_add(*offset, 1, buf_size);
	}

	return val;
}
/* Reads the specified number of bytes from the specified cyclic buffer (up to 4
 * bytes) and returns them as a dword value. the specified buffer offset is
 * updated.
 */
Reads the specified number of bytes from the specified cyclic buffer (up to 4
bytes) and returns them as a dword value. the specified buffer offset is
updated.
Reads the specified number of bytes from the specified cyclic buffer ( up to 4 bytes ) and returns them as a dword value . the specified buffer offset is updated .
static u32 qed_read_from_cyclic_buf(void *buf,
				    u32 *offset,
				    u32 buf_size, u8 num_bytes_to_read)
{
	u8 i, *val_ptr, *bytes_buf = (u8 *)buf;
	u32 val = 0;
	val_ptr = (u8 *)&val;
	for (i = 0; i < num_bytes_to_read; i++) {
		val_ptr[i] = bytes_buf[*offset];
		*offset = qed_cyclic_add(*offset, 1, buf_size);
	}
	return val;
}
static u32 qed_read_from_cyclic_buf ( void * buf , u32 * offset , u32 buf_size , u8 num_bytes_to_read ) { u8 i , * val_ptr , * bytes_buf = ( u8 * ) buf ; u32 val = 0 ; val_ptr = ( u8 * ) & val ; for ( i = 0 ; i < num_bytes_to_read ; i ++ ) { val_ptr [ i ] = bytes_buf [ * offset ] ; * offset = qed_cyclic_add ( * offset , 1 , buf_size ) ; } return val ; }
Reads the specified number of bytes from the specified cyclic buffer (up to 4
 bytes) and returns them as a dword value.
Reads the specified number of bytes from the specified cyclic buffer ( up to 4 bytes ) and returns them as a dword value .
/* Assume running on a LITTLE ENDIAN and the buffer is network order
	 * (BIG ENDIAN), as high order bytes are placed in lower memory address.
	 */