src/dpdk/drivers/net/bnxt/tf_ulp/ulp_utils.c
uint8_t *
ulp_blob_push_32(struct ulp_blob *blob,
		 uint32_t *data,
		 uint32_t datalen)
{
	uint8_t *val = (uint8_t *)data;
	uint32_t rc;
	uint32_t size = ULP_BITS_2_BYTE(datalen);

	if (!data || size > sizeof(uint32_t)) {
		BNXT_TF_DBG(ERR, "invalid argument\n");
		return 0;
	}

	rc = ulp_blob_push(blob, &val[sizeof(uint32_t) - size], datalen);
	if (!rc)
		return 0;

	return &val[sizeof(uint32_t) - size];
}
/*
 * Add data to the binary blob at the current offset.
 *
 * blob [in] The blob that data is added to.  The blob must
 * be initialized prior to pushing data.
 *
 * data [in] 32-bit value to be added to the blob.
 *
 * datalen [in] The number of bits to be added ot the blob.
 *
 * The offset of the data is updated after each push of data.
 * NULL returned on error, pointer pushed value otherwise.
 */
Add data to the binary blob at the current offset.
blob [in] The blob that data is added to.  The blob must
be initialized prior to pushing data.

data [in] 32-bit value to be added to the blob.

datalen [in] The number of bits to be added ot the blob.

The offset of the data is updated after each push of data.
NULL returned on error, pointer pushed value otherwise.
Add data to the binary blob at the current offset . blob [ in ] The blob that data is added to . The blob must be initialized prior to pushing data . data [ in ] 32 - bit value to be added to the blob . datalen [ in ] The number of bits to be added ot the blob . The offset of the data is updated after each push of data . NULL returned on error pointer pushed value otherwise .
uint8_t *
ulp_blob_push_32(struct ulp_blob *blob,
		 uint32_t *data,
		 uint32_t datalen)
{
	uint8_t *val = (uint8_t *)data;
	uint32_t rc;
	uint32_t size = ULP_BITS_2_BYTE(datalen);
	if (!data || size > sizeof(uint32_t)) {
		BNXT_TF_DBG(ERR, "invalid argument\n");
		return 0;
	}
	rc = ulp_blob_push(blob, &val[sizeof(uint32_t) - size], datalen);
	if (!rc)
		return 0;
	return &val[sizeof(uint32_t) - size];
}
uint8_t * ulp_blob_push_32 ( struct ulp_blob * blob , uint32_t * data , uint32_t datalen ) { uint8_t * val = ( uint8_t * ) data ; uint32_t rc ; uint32_t size = ULP_BITS_2_BYTE ( datalen ) ; if ( ! data || size > sizeof ( uint32_t ) ) { BNXT_TF_DBG ( ERR , " \n " ) ; return 0 ; } rc = ulp_blob_push ( blob , & val [ sizeof ( uint32_t ) - size ] , datalen ) ; if ( ! rc ) return 0 ; return & val [ sizeof ( uint32_t ) - size ] ; }
Add data to the binary blob at the current offset.
Add data to the binary blob at the current offset .