Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OpenXG-RAN
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
promise
OpenXG-RAN
Commits
43b08e7b
Commit
43b08e7b
authored
Nov 19, 2019
by
Daniel0326
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
temp debug for mac_rlc_status_ind
parent
cd6ebe2d
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
46 additions
and
25 deletions
+46
-25
cmake_targets/CMakeLists.txt
cmake_targets/CMakeLists.txt
+1
-1
common/utils/hashtable/hashtable.c
common/utils/hashtable/hashtable.c
+3
-3
openair2/LAYER2/MAC/eNB_scheduler_dlsch_NB_IoT.c
openair2/LAYER2/MAC/eNB_scheduler_dlsch_NB_IoT.c
+12
-12
openair2/LAYER2/RLC/AM_v9.3.0/rlc_am.c
openair2/LAYER2/RLC/AM_v9.3.0/rlc_am.c
+8
-3
openair2/LAYER2/RLC/rlc_mac.c
openair2/LAYER2/RLC/rlc_mac.c
+5
-4
openair2/RRC/LITE/L2_interface_NB_IoT.c
openair2/RRC/LITE/L2_interface_NB_IoT.c
+15
-1
openair2/UTIL/LISTS/list.c
openair2/UTIL/LISTS/list.c
+2
-1
No files found.
cmake_targets/CMakeLists.txt
View file @
43b08e7b
...
...
@@ -657,7 +657,7 @@ add_boolean_option(TRACE_RLC_MUTEX True "TRACE for RLC, possible proble
add_boolean_option
(
TRACE_RLC_AM_BO False
"TRACE for RLC AM, TO BE CHANGED IN A MORE GENERAL FLAG"
)
add_boolean_option
(
TRACE_RLC_AM_FREE_SDU False
"TRACE for RLC AM, TO BE CHANGED IN A MORE GENERAL FLAG"
)
add_boolean_option
(
TRACE_RLC_AM_HOLE False
"TRACE for RLC AM, TO BE CHANGED IN A MORE GENERAL FLAG"
)
add_boolean_option
(
TRACE_RLC_AM_PDU
False
"TRACE for RLC AM, TO BE CHANGED IN A MORE GENERAL FLAG"
)
add_boolean_option
(
TRACE_RLC_AM_PDU
True
"TRACE for RLC AM, TO BE CHANGED IN A MORE GENERAL FLAG"
)
add_boolean_option
(
TRACE_RLC_AM_RESEGMENT False
"TRACE for RLC AM, TO BE CHANGED IN A MORE GENERAL FLAG"
)
add_boolean_option
(
TRACE_RLC_AM_RX False
"TRACE for RLC AM, TO BE CHANGED IN A MORE GENERAL FLAG"
)
add_boolean_option
(
TRACE_RLC_AM_RX_DECODE False
"TRACE for RLC AM, TO BE CHANGED IN A MORE GENERAL FLAG"
)
...
...
common/utils/hashtable/hashtable.c
View file @
43b08e7b
...
...
@@ -285,15 +285,15 @@ hashtable_rc_t hashtable_get(const hash_table_t * const hashtblP, const hash_key
//printf("hash %d\n", hash);
node
=
hashtblP
->
nodes
[
hash
];
//
printf("nodes_value %d \n", hashtblP->nodes[hash]);
//
printf("nodes_value %d \n", hashtblP->nodes[hash]);
while
(
node
)
{
//printf("node_key %d \n",node->key);
if
(
node
->
key
==
keyP
)
{
//printf("node_key %d \n",node->key);
*
dataP
=
node
->
data
;
//printf("data : %p \n",node->data);
return
HASH_TABLE_OK
;
//printf("
node->
data : %p \n",node->data);
return
HASH_TABLE_OK
;
}
node
=
node
->
next
;
}
...
...
openair2/LAYER2/MAC/eNB_scheduler_dlsch_NB_IoT.c
View file @
43b08e7b
...
...
@@ -68,11 +68,11 @@ int schedule_DL_NB_IoT(module_id_t module_id, eNB_MAC_INST_NB_IoT *mac_inst, UE_
uint8_t
sdu_temp
[
SCH_PAYLOAD_SIZE_MAX_NB_IoT
];
//
//
logical_chan_id_t logical_channel; //
logical_chan_id_t
logical_channel
;
//
uint32_t
subheader_length
=
2
;
//
uint32_t payload_offset; //
uint32_t
payload_offset
;
//
uint32_t
search_space_end_sf
,
h_temp
,
f_temp
,
sf_temp
;
...
...
@@ -110,14 +110,14 @@ int schedule_DL_NB_IoT(module_id_t module_id, eNB_MAC_INST_NB_IoT *mac_inst, UE_
1
,
0
,
DCCH0_NB_IoT
,
0
);
83
);
data_size
=
rlc_status
.
bytes_in_buffer
;
LOG_N
(
MAC
,
"[NB-IoT] RLC indicate to MAC that the data size is : %d
\n
"
,
data_size
);
mac_sdu_size
=
mac_rlc_data_req
(
module_id
,
UE_info
->
rnti
,
0
,
module_id
,
frame_start
,
1
,
0
,
...
...
@@ -162,7 +162,7 @@ int schedule_DL_NB_IoT(module_id_t module_id, eNB_MAC_INST_NB_IoT *mac_inst, UE_
//data_size=200; //for testing
LOG_
D
(
MAC
,
"[%04d][DLSchedulerUSS] UE data size %d
\n
"
,
mac_inst
->
current_subframe
,
data_size
);
LOG_
I
(
MAC
,
"[%04d][DLSchedulerUSS] UE data size %d
\n
"
,
mac_inst
->
current_subframe
,
data_size
);
//Have DCCH data
if
(
data_size
==
0
)
{
...
...
@@ -176,7 +176,7 @@ int schedule_DL_NB_IoT(module_id_t module_id, eNB_MAC_INST_NB_IoT *mac_inst, UE_
if
(
TBS
>
data_size
+
subheader_length
)
{
TBS
=
get_tbs
(
data_size
,
I_tbs
,
&
I_sf
);
LOG_
D
(
MAC
,
"[%04d][DLSchedulerUSS] TBS change to %d because data size is smaller than previous TBS
\n
"
,
mac_inst
->
current_subframe
,
TBS
);
LOG_
I
(
MAC
,
"[%04d][DLSchedulerUSS] TBS change to %d because data size is smaller than previous TBS
\n
"
,
mac_inst
->
current_subframe
,
TBS
);
}
search_space_end_sf
=
cal_num_dlsf
(
mac_inst
,
hyperSF_start
,
frame_start
,
subframe_start
,
&
h_temp
,
&
f_temp
,
&
sf_temp
,
UE_info
->
R_max
);
...
...
@@ -216,7 +216,7 @@ int schedule_DL_NB_IoT(module_id_t module_id, eNB_MAC_INST_NB_IoT *mac_inst, UE_
{
end_flagSCH
=
check_resource_NPDSCH_NB_IoT
(
mac_inst
,
NPDSCH_info
,
NPDCCH_info
->
sf_end
,
I_delay
,
UE_info
->
R_max
,
UE_sched_ctrl_info
->
R_dl_data
,
n_sf
);
int
x
;
for
(
x
=
0
;
x
<
10
;
x
++
){
for
(
x
=
0
;
x
<
data_size
;
x
++
){
printf
(
"%02x "
,
UE_info
->
DLSCH_pdu
.
payload
[
x
]);
}
printf
(
"
\n
"
);
...
...
@@ -241,7 +241,7 @@ int schedule_DL_NB_IoT(module_id_t module_id, eNB_MAC_INST_NB_IoT *mac_inst, UE_
//New transmission need to request data from RLC and generate new MAC PDU
UE_info
->
I_mcs_dl
=
I_mcs
;
/*.......
//Request data from RLC layer
rlc_status
=
mac_rlc_status_ind
(
module_id
,
...
...
@@ -253,15 +253,15 @@ int schedule_DL_NB_IoT(module_id_t module_id, eNB_MAC_INST_NB_IoT *mac_inst, UE_
0
,
DCCH0_NB_IoT
,
TBS
-
subheader_length
);
*/
//mac_sdu_size = mac_rlc_data_req_eNB_NB_IoT(module_id, UE_info->rnti, 0, frame_start, 0, DCCH0_NB_IoT, sdu_temp
);
mac_sdu_size
=
mac_rlc_data_req
(
module_id
,
UE_info
->
rnti
,
module_id
,
frame_start
,
1
,
0
,
DCCH0_NB_IoT
,
TBS
,
(
char
*
)
&
sdu_temp
[
0
]
);
//channel=DCCH0_NB_IoT;
//Generate header
//
payload_offset = generate_dlsch_header_NB_IoT(UE_info->DLSCH_pdu.payload, 1, &logical_channel, &mac_sdu_size, 0, 0, TBS);
payload_offset
=
generate_dlsch_header_NB_IoT
(
UE_info
->
DLSCH_pdu
.
payload
,
1
,
&
logical_channel
,
&
mac_sdu_size
,
0
,
0
,
TBS
);
//Complete MAC PDU
//
memcpy(UE_info->DLSCH_pdu.payload+payload_offset, sdu_temp, mac_sdu_size);
memcpy
(
UE_info
->
DLSCH_pdu
.
payload
+
payload_offset
,
sdu_temp
,
mac_sdu_size
);
//UE_info->DLSCH_pdu.pdu_size=TBS;
UE_sched_ctrl_info
->
NPDCCH_sf_end
=
NPDCCH_info
->
sf_end
;
...
...
openair2/LAYER2/RLC/AM_v9.3.0/rlc_am.c
View file @
43b08e7b
...
...
@@ -420,7 +420,8 @@ rlc_am_get_pdus (
break
;
case
RLC_DATA_TRANSFER_READY_STATE
:
printf
(
"rlc_pP->nb_bytes_requested_by_mac=%d
\n
"
,
rlc_pP
->
nb_bytes_requested_by_mac
);
printf
(
"rlc_pP->status_requested=%u
\n
"
,
rlc_pP
->
status_requested
);
// TRY TO SEND CONTROL PDU FIRST
if
((
rlc_pP
->
nb_bytes_requested_by_mac
>=
2
)
&&
((
rlc_pP
->
status_requested
)
&&
!
(
rlc_pP
->
status_requested
&
RLC_AM_STATUS_NO_TX_MASK
)))
{
...
...
@@ -552,7 +553,7 @@ rlc_am_mac_status_indication (
rlc
->
last_absolute_subframe_status_indication
=
PROTOCOL_CTXT_TIME_MILLI_SECONDS
(
ctxt_pP
);
rlc
->
nb_bytes_requested_by_mac
=
tb_sizeP
;
printf
(
"********nb_bytes_req=%d********
\n
"
,
rlc
->
nb_bytes_requested_by_mac
);
status_resp
.
buffer_occupancy_in_bytes
=
rlc_am_get_buffer_occupancy_in_bytes
(
ctxt_pP
,
rlc
);
// For eNB scheduler : Add Max RLC header size for new PDU
...
...
@@ -690,12 +691,15 @@ rlc_am_mac_data_request (
#endif
list_init
(
&
data_req
.
data
,
NULL
);
printf
(
"l_rlc_p->nb_bytes_requested_by_mac=%d (in rlc_am.c)
\n
"
,
l_rlc_p
->
nb_bytes_requested_by_mac
);
rlc_am_get_pdus
(
ctxt_pP
,
l_rlc_p
);
list_add_list
(
&
l_rlc_p
->
pdus_to_mac_layer
,
&
data_req
.
data
);
printf
(
"*******nb_elements_3=%d (in rlc_am.c)***************
\n
"
,
data_req
.
data
.
nb_elements
);
printf
(
"***********head_3=%x (in rlc_am.c)***********
\n
"
,
&
l_rlc_p
->
pdus_to_mac_layer
.
head
);
//((rlc_am_entity_t *) rlc_pP)->tx_pdus += data_req.data.nb_elements;
if
((
nb_bytes_requested_by_mac
+
data_req
.
data
.
nb_elements
)
>
0
)
{
LOG_
D
(
RLC
,
PROTOCOL_RLC_AM_CTXT_FMT
" MAC_DATA_REQUEST %05d BYTES REQUESTED -> %d TBs
\n
"
,
LOG_
I
(
RLC
,
PROTOCOL_RLC_AM_CTXT_FMT
" MAC_DATA_REQUEST %05d BYTES REQUESTED -> %d TBs
\n
"
,
PROTOCOL_RLC_AM_CTXT_ARGS
(
ctxt_pP
,
l_rlc_p
),
nb_bytes_requested_by_mac
,
data_req
.
data
.
nb_elements
);
...
...
@@ -898,6 +902,7 @@ rlc_am_mac_data_request (
}
#endif
printf
(
"=========data_req.data=%d=======
\n
"
,
data_req
.
data
);
return
data_req
;
}
//-----------------------------------------------------------------------------
...
...
openair2/LAYER2/RLC/rlc_mac.c
View file @
43b08e7b
...
...
@@ -114,7 +114,7 @@ tbs_size_t mac_rlc_serialize_tb (char* buffer_pP, list_t transport_blocksP)
free_mem_block
(
tb_p
,
__func__
);
}
}
return
tbs_size
;
}
//-----------------------------------------------------------------------------
...
...
@@ -139,7 +139,7 @@ tbs_size_t mac_rlc_data_req(
srb_flag_t
srb_flag
=
(
channel_idP
<=
3
)
?
SRB_FLAG_YES
:
SRB_FLAG_NO
;
tbs_size_t
ret_tb_size
=
0
;
protocol_ctxt_t
ctxt
;
//printf("***********data_request=%d (in rlc_mac.c)***********\n",data_request);
PROTOCOL_CTXT_SET_BY_MODULE_ID
(
&
ctxt
,
module_idP
,
enb_flagP
,
rntiP
,
frameP
,
0
,
eNB_index
);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_MAC_RLC_DATA_REQ
,
VCD_FUNCTION_IN
);
...
...
@@ -178,7 +178,7 @@ tbs_size_t mac_rlc_data_req(
}
h_rc
=
hashtable_get
(
rlc_coll_p
,
key
,
(
void
**
)
&
rlc_union_p
);
if
(
h_rc
==
HASH_TABLE_OK
)
{
rlc_mode
=
rlc_union_p
->
mode
;
...
...
@@ -193,9 +193,10 @@ tbs_size_t mac_rlc_data_req(
break
;
case
RLC_MODE_AM
:
if
(
!
enb_flagP
)
rlc_am_set_nb_bytes_requested_by_mac
(
&
rlc_union_p
->
rlc
.
am
,
tb_sizeP
);
//
if (!enb_flagP) rlc_am_set_nb_bytes_requested_by_mac(&rlc_union_p->rlc.am,tb_sizeP);
data_request
=
rlc_am_mac_data_request
(
&
ctxt
,
&
rlc_union_p
->
rlc
.
am
,
enb_flagP
);
ret_tb_size
=
mac_rlc_serialize_tb
(
buffer_pP
,
data_request
.
data
);
printf
(
"****************data_request=%d (in rlc_mac.c)****************
\n
"
,
data_request
);
break
;
case
RLC_MODE_UM
:
...
...
openair2/RRC/LITE/L2_interface_NB_IoT.c
View file @
43b08e7b
...
...
@@ -1427,6 +1427,7 @@ boolean_t pdcp_data_req_NB_IoT(
sdu_buffer_sizeP
);
#endif
int
x
;
printf
(
"print the data in pdcp_data_req_NB_IoT
\n
"
);
for
(
x
=
0
;
x
<
sdu_buffer_sizeP
;
x
++
){
printf
(
"%02x "
,
pdcp_pdu_p
->
data
[
x
]);
}
...
...
@@ -2477,6 +2478,7 @@ rlc_op_status_t rlc_data_req_NB_IoT (const protocol_ctxt_t* const ctxt_pP,
rlc_union_t
*
rlc_union_p
=
NULL
;
hash_key_t
key
=
HASHTABLE_NOT_A_KEY_VALUE
;
hashtable_rc_t
h_rc
;
int
x
;
#if defined(Rel10) || defined(Rel14)
...
...
@@ -2576,7 +2578,7 @@ rlc_op_status_t rlc_data_req_NB_IoT (const protocol_ctxt_t* const ctxt_pP,
#ifdef DEBUG_RLC_DATA_REQ
LOG_D
(
RLC
,
"RLC_MODE_AM
\n
"
);
#endif
int
x
;
printf
(
"print the data in AM before new_sdu_p in rlc_data_req_NB_IoT
\n
"
)
;
for
(
x
=
0
;
x
<
sdu_sizeP
;
x
++
){
printf
(
"%02x "
,
sdu_pP
->
data
[
x
]);
}
...
...
@@ -2594,8 +2596,20 @@ rlc_op_status_t rlc_data_req_NB_IoT (const protocol_ctxt_t* const ctxt_pP,
((
struct
rlc_am_data_req
*
)
(
new_sdu_p
->
data
))
->
mui
=
muiP
;
((
struct
rlc_am_data_req
*
)
(
new_sdu_p
->
data
))
->
data_offset
=
sizeof
(
struct
rlc_am_data_req_alloc
);
free_mem_block
(
sdu_pP
,
__func__
);
printf
(
"print the data after new_sdu_p in rlc_data_req_NB_IoT
\n
"
);
for
(
x
=
0
;
x
<
sdu_sizeP
;
x
++
){
printf
(
"%02x "
,
new_sdu_p
->
data
[
x
]);
}
printf
(
"
\n
"
);
rlc_am_data_req
(
ctxt_pP
,
&
rlc_union_p
->
rlc
.
am
,
new_sdu_p
);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_RLC_DATA_REQ
,
VCD_FUNCTION_OUT
);
printf
(
"printf the data after rlc_am_data_req (in L2_interface_NB_IoT)
\n
"
);
for
(
x
=
0
;
x
<
sdu_sizeP
;
x
++
){
printf
(
"%02x "
,
new_sdu_p
->
data
[
x
]);
}
printf
(
"
\n
"
);
return
RLC_OP_STATUS_OK
;
}
else
{
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_RLC_DATA_REQ
,
VCD_FUNCTION_OUT
);
...
...
openair2/UTIL/LISTS/list.c
View file @
43b08e7b
...
...
@@ -216,7 +216,7 @@ list_add_list (list_t * sublistP, list_t * listP)
//-----------------------------------------------------------------------------
if
(
sublistP
)
{
if
(
sublistP
->
head
)
{
if
(
sublistP
->
head
!=
NULL
)
{
// access optimisation
mem_block_t
*
tail
;
...
...
@@ -234,6 +234,7 @@ list_add_list (list_t * sublistP, list_t * listP)
sublistP
->
head
=
NULL
;
sublistP
->
tail
=
NULL
;
listP
->
nb_elements
=
listP
->
nb_elements
+
sublistP
->
nb_elements
;
printf
(
"=============listp->nb_elements=%d (in list.c)=============
\n
"
,
listP
->
nb_elements
);
sublistP
->
nb_elements
=
0
;
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment