src/dpdk/drivers/net/bnxt/tf_ulp/ulp_mapper.c
static int32_t
ulp_mapper_glb_resource_read(struct bnxt_ulp_mapper_data *mapper_data,
			     enum tf_dir dir,
			     uint16_t idx,
			     uint64_t *regval)
{
	if (!mapper_data || !regval ||
	    dir >= TF_DIR_MAX || idx >= BNXT_ULP_GLB_REGFILE_INDEX_LAST)
		return -EINVAL;

	*regval = mapper_data->glb_res_tbl[dir][idx].resource_hndl;
	return 0;
}
/*
 * Read the global resource from the mapper global resource list
 *
 * The regval is always returned in big-endian.
 *
 * returns 0 on success
 */
Read the global resource from the mapper global resource list
The regval is always returned in big-endian.

returns 0 on success
Read the global resource from the mapper global resource list The regval is always returned in big - endian . returns 0 on success
static int32_t
ulp_mapper_glb_resource_read(struct bnxt_ulp_mapper_data *mapper_data,
			     enum tf_dir dir,
			     uint16_t idx,
			     uint64_t *regval)
{
	if (!mapper_data || !regval ||
	    dir >= TF_DIR_MAX || idx >= BNXT_ULP_GLB_REGFILE_INDEX_LAST)
		return -EINVAL;
	*regval = mapper_data->glb_res_tbl[dir][idx].resource_hndl;
	return 0;
}
static int32_t ulp_mapper_glb_resource_read ( struct bnxt_ulp_mapper_data * mapper_data , enum tf_dir dir , uint16_t idx , uint64_t * regval ) { if ( ! mapper_data || ! regval || dir >= TF_DIR_MAX || idx >= BNXT_ULP_GLB_REGFILE_INDEX_LAST ) return - EINVAL ; * regval = mapper_data -> glb_res_tbl [ dir ] [ idx ] . resource_hndl ; return 0 ; }
Read the global resource from the mapper global resource list
 The regval is always returned in big-endian.
Read the global resource from the mapper global resource list The regval is always returned in big - endian .