adding some error checks
This commit is contained in:
committed by
Hongzhi Wang
parent
00ba6b6bb1
commit
2423996bba
@@ -166,7 +166,7 @@ struct thread_params {
|
|||||||
uint8_t iter_count;
|
uint8_t iter_count;
|
||||||
double iter_average;
|
double iter_average;
|
||||||
double bler;
|
double bler;
|
||||||
struct t_nrLDPCoffload_params *p_offloadParams;
|
struct nrLDPCoffload_params *p_offloadParams;
|
||||||
int8_t* p_out;
|
int8_t* p_out;
|
||||||
rte_atomic16_t nb_dequeued;
|
rte_atomic16_t nb_dequeued;
|
||||||
rte_atomic16_t processing_status;
|
rte_atomic16_t processing_status;
|
||||||
@@ -1575,8 +1575,20 @@ int32_t nrLDPC_decod_offload(t_nrLDPC_dec_params* p_decParams, uint8_t C, uint8_
|
|||||||
if (mode==0){
|
if (mode==0){
|
||||||
|
|
||||||
ret = rte_eal_init(argc_re, argv_re);
|
ret = rte_eal_init(argc_re, argv_re);
|
||||||
device_setup();
|
if (ret<0) {
|
||||||
ut_setup();
|
printf("Could not init EAL, ret %d\n",ret);
|
||||||
|
return(-1);
|
||||||
|
}
|
||||||
|
ret = device_setup();
|
||||||
|
if (ret != TEST_SUCCESS) {
|
||||||
|
printf("Couldn't create mempools");
|
||||||
|
return(-1);
|
||||||
|
}
|
||||||
|
ret=ut_setup();
|
||||||
|
if (ret != TEST_SUCCESS) {
|
||||||
|
printf("Couldn't create mempools");
|
||||||
|
return(-1);
|
||||||
|
}
|
||||||
|
|
||||||
p_offloadParams->E = E;
|
p_offloadParams->E = E;
|
||||||
p_offloadParams->n_cb = (p_decParams->BG==1)?(66*p_decParams->Z):(50*p_decParams->Z);
|
p_offloadParams->n_cb = (p_decParams->BG==1)?(66*p_decParams->Z):(50*p_decParams->Z);
|
||||||
@@ -1603,6 +1615,7 @@ int32_t nrLDPC_decod_offload(t_nrLDPC_dec_params* p_decParams, uint8_t C, uint8_
|
|||||||
get_num_ops(),p_offloadParams);
|
get_num_ops(),p_offloadParams);
|
||||||
if (f_ret != TEST_SUCCESS) {
|
if (f_ret != TEST_SUCCESS) {
|
||||||
printf("Couldn't create mempools");
|
printf("Couldn't create mempools");
|
||||||
|
return(-1);
|
||||||
}
|
}
|
||||||
f_ret = init_test_op_params(op_params, op_type,
|
f_ret = init_test_op_params(op_params, op_type,
|
||||||
0,
|
0,
|
||||||
@@ -1613,6 +1626,7 @@ int32_t nrLDPC_decod_offload(t_nrLDPC_dec_params* p_decParams, uint8_t C, uint8_
|
|||||||
get_num_lcores());
|
get_num_lcores());
|
||||||
if (f_ret != TEST_SUCCESS) {
|
if (f_ret != TEST_SUCCESS) {
|
||||||
printf("Couldn't init test op params");
|
printf("Couldn't init test op params");
|
||||||
|
return(-1);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -1659,11 +1673,16 @@ int32_t nrLDPC_decod_offload(t_nrLDPC_dec_params* p_decParams, uint8_t C, uint8_
|
|||||||
socket_id);
|
socket_id);
|
||||||
if (f_ret != TEST_SUCCESS) {
|
if (f_ret != TEST_SUCCESS) {
|
||||||
printf("Couldn't init queue buffers");
|
printf("Couldn't init queue buffers");
|
||||||
|
return(-1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
start_pmd_dec(ad, op_params, p_offloadParams, p_out);
|
ret = start_pmd_dec(ad, op_params, p_offloadParams, p_out);
|
||||||
|
if (ret<0) {
|
||||||
|
printf("Couldn't start pmd dec");
|
||||||
|
return(-1);
|
||||||
|
}
|
||||||
|
|
||||||
// free_buffers(ad, op_params);
|
// free_buffers(ad, op_params);
|
||||||
|
|
||||||
|
|||||||
@@ -87,14 +87,15 @@ int load_nrLDPClib_offload(void) {
|
|||||||
p_decParams->Z = 384;
|
p_decParams->Z = 384;
|
||||||
p_decParams->BG = 1;
|
p_decParams->BG = 1;
|
||||||
|
|
||||||
nrLDPC_decoder_offload(p_decParams,
|
AssertFatal(nrLDPC_decoder_offload(p_decParams,
|
||||||
1,
|
1,
|
||||||
0,
|
0,
|
||||||
0,
|
0,
|
||||||
25344,
|
25344,
|
||||||
8,
|
8,
|
||||||
l,
|
l,
|
||||||
llrProcBuf, 0);
|
llrProcBuf, 0)>0,
|
||||||
|
"error loading LDPC decoder offload library\n");
|
||||||
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|||||||
@@ -647,7 +647,7 @@ int main(int argc, char **argv)
|
|||||||
get_softmodem_params()->do_ra = 0;
|
get_softmodem_params()->do_ra = 0;
|
||||||
get_softmodem_params()->usim_test = 1;
|
get_softmodem_params()->usim_test = 1;
|
||||||
|
|
||||||
load_nrLDPClib_offload();
|
//load_nrLDPClib_offload();
|
||||||
|
|
||||||
if (snr1set == 0)
|
if (snr1set == 0)
|
||||||
snr1 = snr0 + 10;
|
snr1 = snr0 + 10;
|
||||||
|
|||||||
Reference in New Issue
Block a user