src/dpdk/drivers/net/bnxt/tf_ulp/ulp_utils.c
static void
ulp_bs_pull_lsb(uint8_t *src, uint8_t *dst, uint32_t size,
		uint32_t offset, uint32_t len)
{
	uint32_t idx;
	uint32_t cnt = ULP_BITS_2_BYTE_NR(len);

	/* iterate bytewise to get data */
	for (idx = 0; idx < cnt; idx++) {
		ulp_bs_get_lsb(src, offset, ULP_BLOB_BYTE,
			       &dst[size - 1 - idx]);
		offset += ULP_BLOB_BYTE;
		len -= ULP_BLOB_BYTE;
	}

	/* Extract the last reminder data that is not 8 byte boundary */
	if (len)
		ulp_bs_get_lsb(src, offset, len, &dst[size - 1 - idx]);
}
/* Assuming that src is in little-Endian Format */
Assuming that src is in little-Endian Format
Assuming that src is in little - Endian Format
static void
ulp_bs_pull_lsb(uint8_t *src, uint8_t *dst, uint32_t size,
		uint32_t offset, uint32_t len)
{
	uint32_t idx;
	uint32_t cnt = ULP_BITS_2_BYTE_NR(len);
	for (idx = 0; idx < cnt; idx++) {
		ulp_bs_get_lsb(src, offset, ULP_BLOB_BYTE,
			       &dst[size - 1 - idx]);
		offset += ULP_BLOB_BYTE;
		len -= ULP_BLOB_BYTE;
	}
	if (len)
		ulp_bs_get_lsb(src, offset, len, &dst[size - 1 - idx]);
}
static void ulp_bs_pull_lsb ( uint8_t * src , uint8_t * dst , uint32_t size , uint32_t offset , uint32_t len ) { uint32_t idx ; uint32_t cnt = ULP_BITS_2_BYTE_NR ( len ) ; for ( idx = 0 ; idx < cnt ; idx ++ ) { ulp_bs_get_lsb ( src , offset , ULP_BLOB_BYTE , & dst [ size - 1 - idx ] ) ; offset += ULP_BLOB_BYTE ; len -= ULP_BLOB_BYTE ; } if ( len ) ulp_bs_get_lsb ( src , offset , len , & dst [ size - 1 - idx ] ) ; }
Assuming that src is in little-Endian Format
Assuming that src is in little - Endian Format
/* iterate bytewise to get data */ /* Extract the last reminder data that is not 8 byte boundary */