src/dpdk/drivers/net/bnxt/tf_ulp/ulp_utils.c
void
ulp_blob_perform_64B_byte_swap(struct ulp_blob *blob)
{
	uint32_t i, j, num;
	uint8_t xchar;
	uint32_t offset = ULP_64B_IN_BYTES - 1;

	/* validate the arguments */
	if (!blob) {
		BNXT_TF_DBG(ERR, "invalid argument\n");
		return; /* failure */
	}
	num = ULP_BITS_2_BYTE(blob->write_idx);
	for (i = 0; i < num; i = i + ULP_64B_IN_BYTES) {
		for (j = 0; j < (ULP_64B_IN_BYTES / 2); j++) {
			xchar = blob->data[i + j];
			blob->data[i + j] = blob->data[i + offset - j];
			blob->data[i + offset - j] = xchar;
		}
	}
}
/*
 * Perform the blob buffer 64 bit byte swap.
 * This api makes the first byte the last in
 * a given 64 bit value and vice-versa.
 *
 * blob [in] The blob's data to be used for swap.
 *
 * returns void.
 */
Perform the blob buffer 64 bit byte swap.
This api makes the first byte the last in
a given 64 bit value and vice-versa.

blob [in] The blob's data to be used for swap.

returns void.
Perform the blob buffer 64 bit byte swap . This api makes the first byte the last in a given 64 bit value and vice - versa . blob [ in ] The blob ' s data to be used for swap . returns void .
void
ulp_blob_perform_64B_byte_swap(struct ulp_blob *blob)
{
	uint32_t i, j, num;
	uint8_t xchar;
	uint32_t offset = ULP_64B_IN_BYTES - 1;
	if (!blob) {
		BNXT_TF_DBG(ERR, "invalid argument\n");
		return; 
	}
	num = ULP_BITS_2_BYTE(blob->write_idx);
	for (i = 0; i < num; i = i + ULP_64B_IN_BYTES) {
		for (j = 0; j < (ULP_64B_IN_BYTES / 2); j++) {
			xchar = blob->data[i + j];
			blob->data[i + j] = blob->data[i + offset - j];
			blob->data[i + offset - j] = xchar;
		}
	}
}
void ulp_blob_perform_64B_byte_swap ( struct ulp_blob * blob ) { uint32_t i , j , num ; uint8_t xchar ; uint32_t offset = ULP_64B_IN_BYTES - 1 ; if ( ! blob ) { BNXT_TF_DBG ( ERR , " \n " ) ; return ; } num = ULP_BITS_2_BYTE ( blob -> write_idx ) ; for ( i = 0 ; i < num ; i = i + ULP_64B_IN_BYTES ) { for ( j = 0 ; j < ( ULP_64B_IN_BYTES / 2 ) ; j ++ ) { xchar = blob -> data [ i + j ] ; blob -> data [ i + j ] = blob -> data [ i + offset - j ] ; blob -> data [ i + offset - j ] = xchar ; } } }
Perform the blob buffer 64 bit byte swap.
Perform the blob buffer 64 bit byte swap .
/* validate the arguments */ /* failure */