src/dpdk/drivers/net/bnxt/tf_ulp/ulp_utils.c
static uint32_t
ulp_bs_push_lsb(uint8_t *bs, uint16_t pos, uint8_t len, uint8_t *val)
{
	int i;
	int cnt = (len) / 8;
	int tlen = len;

	if (cnt > 0 && !(len % 8))
		cnt -= 1;

	for (i = 0; i < cnt; i++) {
		ulp_bs_put_lsb(bs, pos, 8, val[cnt - i]);
		pos += 8;
		tlen -= 8;
	}

	/* Handle the remainder bits */
	if (tlen)
		ulp_bs_put_lsb(bs, pos, tlen, val[0]);
	return len;
}
/* Assuming that val is in Big-Endian Format */
Assuming that val is in Big-Endian Format
Assuming that val is in Big - Endian Format
static uint32_t
ulp_bs_push_lsb(uint8_t *bs, uint16_t pos, uint8_t len, uint8_t *val)
{
	int i;
	int cnt = (len) / 8;
	int tlen = len;
	if (cnt > 0 && !(len % 8))
		cnt -= 1;
	for (i = 0; i < cnt; i++) {
		ulp_bs_put_lsb(bs, pos, 8, val[cnt - i]);
		pos += 8;
		tlen -= 8;
	}
	if (tlen)
		ulp_bs_put_lsb(bs, pos, tlen, val[0]);
	return len;
}
static uint32_t ulp_bs_push_lsb ( uint8_t * bs , uint16_t pos , uint8_t len , uint8_t * val ) { int i ; int cnt = ( len ) / 8 ; int tlen = len ; if ( cnt > 0 && ! ( len % 8 ) ) cnt -= 1 ; for ( i = 0 ; i < cnt ; i ++ ) { ulp_bs_put_lsb ( bs , pos , 8 , val [ cnt - i ] ) ; pos += 8 ; tlen -= 8 ; } if ( tlen ) ulp_bs_put_lsb ( bs , pos , tlen , val [ 0 ] ) ; return len ; }
Assuming that val is in Big-Endian Format
Assuming that val is in Big - Endian Format
/* Handle the remainder bits */