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
wangjie
OpenXG-RAN
Commits
456e90e2
Commit
456e90e2
authored
Apr 20, 2020
by
Cedric Roux
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rlc v2: bugfixes for mbms
parent
baa9cd01
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
64 additions
and
40 deletions
+64
-40
openair2/LAYER2/MAC/eNB_scheduler_mch.c
openair2/LAYER2/MAC/eNB_scheduler_mch.c
+4
-4
openair2/LAYER2/rlc_v2/rlc_oai_api.c
openair2/LAYER2/rlc_v2/rlc_oai_api.c
+60
-36
No files found.
openair2/LAYER2/MAC/eNB_scheduler_mch.c
View file @
456e90e2
...
...
@@ -714,7 +714,7 @@ schedule_MBMS_NFAPI(module_id_t module_idP, uint8_t CC_id, frame_t frameP,
mbms_rab_id
=
cc
->
mbms_SessionList
[
0
]
->
list
.
array
[
0
]
->
logicalChannelIdentity_r9
;
rlc_status
=
mac_rlc_status_ind
(
module_idP
,
0
/*0xfffd*/
,
frameP
,
subframeP
,
mac_rlc_status_ind
(
module_idP
,
0
xfffd
,
frameP
,
subframeP
,
module_idP
,
ENB_FLAG_YES
,
MBMS_FLAG_YES
,
cc
->
mbms_SessionList
[
0
]
->
list
.
array
[
0
]
->
logicalChannelIdentity_r9
,
//MTCH,
...
...
@@ -771,7 +771,7 @@ schedule_MBMS_NFAPI(module_id_t module_idP, uint8_t CC_id, frame_t frameP,
TBS
-
header_len_mcch
-
header_len_msi
-
sdu_length_total
-
header_len_mtch
,
header_len_mtch
,
rlc_status
.
bytes_in_buffer
);
sdu_lengths
[
num_sdus
]
=
mac_rlc_data_req
(
module_idP
,
0
,
module_idP
,
frameP
,
ENB_FLAG_YES
,
MBMS_FLAG_YES
,
cc
->
mbms_SessionList
[
0
]
->
list
.
array
[
0
]
->
logicalChannelIdentity_r9
,
sdu_lengths
[
num_sdus
]
=
mac_rlc_data_req
(
module_idP
,
0
xfffd
,
module_idP
,
frameP
,
ENB_FLAG_YES
,
MBMS_FLAG_YES
,
cc
->
mbms_SessionList
[
0
]
->
list
.
array
[
0
]
->
logicalChannelIdentity_r9
,
TBS
-
header_len_mcch
-
header_len_msi
-
sdu_length_total
-
header_len_mtch
,
(
char
*
)
&
mch_buffer
[
sdu_length_total
]
...
...
@@ -1553,7 +1553,7 @@ schedule_MBMS(module_id_t module_idP, uint8_t CC_id, frame_t frameP,
mbms_rab_id
=
cc
->
mbms_SessionList
[
0
]
->
list
.
array
[
0
]
->
logicalChannelIdentity_r9
;
rlc_status
=
mac_rlc_status_ind
(
module_idP
,
0
/*0xfffd*/
,
frameP
,
subframeP
,
mac_rlc_status_ind
(
module_idP
,
0
xfffd
,
frameP
,
subframeP
,
module_idP
,
ENB_FLAG_YES
,
MBMS_FLAG_YES
,
cc
->
mbms_SessionList
[
0
]
->
list
.
array
[
0
]
->
logicalChannelIdentity_r9
,
//MTCH,
...
...
@@ -1576,7 +1576,7 @@ schedule_MBMS(module_id_t module_idP, uint8_t CC_id, frame_t frameP,
TBS
-
header_len_mcch
-
header_len_msi
-
sdu_length_total
-
header_len_mtch
,
header_len_mtch
,
rlc_status
.
bytes_in_buffer
);
sdu_lengths
[
num_sdus
]
=
mac_rlc_data_req
(
module_idP
,
0
,
module_idP
,
frameP
,
ENB_FLAG_YES
,
MBMS_FLAG_YES
,
cc
->
mbms_SessionList
[
0
]
->
list
.
array
[
0
]
->
logicalChannelIdentity_r9
,
sdu_lengths
[
num_sdus
]
=
mac_rlc_data_req
(
module_idP
,
0
xfffd
,
module_idP
,
frameP
,
ENB_FLAG_YES
,
MBMS_FLAG_YES
,
cc
->
mbms_SessionList
[
0
]
->
list
.
array
[
0
]
->
logicalChannelIdentity_r9
,
TBS
-
header_len_mcch
-
header_len_msi
-
sdu_length_total
-
header_len_mtch
,
(
char
*
)
&
mch_buffer
[
sdu_length_total
]
...
...
openair2/LAYER2/rlc_v2/rlc_oai_api.c
View file @
456e90e2
...
...
@@ -52,6 +52,8 @@ void mac_rlc_data_ind (
{
rlc_ue_t
*
ue
;
rlc_entity_t
*
rb
;
int
rnti
;
int
channel_id
;
if
(
enb_flagP
==
1
&&
module_idP
!=
0
)
{
LOG_E
(
RLC
,
"%s:%d:%s: fatal, module_id must be 0 for eNB
\n
"
,
...
...
@@ -59,7 +61,7 @@ void mac_rlc_data_ind (
exit
(
1
);
}
if
(
/*module_idP != 0 ||*/
eNB_index
!=
0
||
/*enb_flagP != 1 ||*/
MBMS_flagP
!=
0
)
{
if
(
/*module_idP != 0 ||*/
eNB_index
!=
0
/*|| enb_flagP != 1 || MBMS_flagP != 0*/
)
{
LOG_E
(
RLC
,
"%s:%d:%s: fatal
\n
"
,
__FILE__
,
__LINE__
,
__FUNCTION__
);
exit
(
1
);
}
...
...
@@ -68,12 +70,26 @@ void mac_rlc_data_ind (
T
(
T_ENB_RLC_MAC_UL
,
T_INT
(
module_idP
),
T_INT
(
rntiP
),
T_INT
(
channel_idP
),
T_INT
(
tb_sizeP
));
/* TODO: better handle mbms, maybe we should not change rnti here */
if
(
!
enb_flagP
&&
MBMS_flagP
)
{
rnti
=
0xfffd
;
/* TODO: handle channel_id properly */
if
(
channel_idP
!=
5
)
{
LOG_E
(
RLC
,
"%s:%d:%s: fatal
\n
"
,
__FILE__
,
__LINE__
,
__FUNCTION__
);
exit
(
1
);
}
channel_id
=
7
;
}
else
{
rnti
=
rntiP
;
channel_id
=
channel_idP
;
}
rlc_manager_lock
(
rlc_ue_manager
);
ue
=
rlc_manager_get_ue
(
rlc_ue_manager
,
rnti
P
);
ue
=
rlc_manager_get_ue
(
rlc_ue_manager
,
rnti
);
switch
(
channel_id
P
)
{
case
1
...
2
:
rb
=
ue
->
srb
[
channel_id
P
-
1
];
break
;
case
3
...
7
:
rb
=
ue
->
drb
[
channel_id
P
-
3
];
break
;
switch
(
channel_id
)
{
case
1
...
2
:
rb
=
ue
->
srb
[
channel_id
-
1
];
break
;
case
3
...
7
:
rb
=
ue
->
drb
[
channel_id
-
3
];
break
;
default:
rb
=
NULL
;
break
;
}
...
...
@@ -81,8 +97,8 @@ void mac_rlc_data_ind (
rb
->
set_time
(
rb
,
rlc_current_time
);
rb
->
recv_pdu
(
rb
,
buffer_pP
,
tb_sizeP
);
}
else
{
LOG_E
(
RLC
,
"%s:%d:%s: fatal: no RB found (channel ID %d)
\n
"
,
__FILE__
,
__LINE__
,
__FUNCTION__
,
channel_idP
);
LOG_E
(
RLC
,
"%s:%d:%s: fatal: no RB found (
rnti %d
channel ID %d)
\n
"
,
__FILE__
,
__LINE__
,
__FUNCTION__
,
rnti
,
channel_id
);
exit
(
1
);
}
...
...
@@ -356,6 +372,10 @@ static void deliver_sdu(void *_ue, rlc_entity_t *entity, char *buf, int size)
mem_block_t
*
memblock
;
int
i
;
int
is_enb
;
int
is_mbms
;
/* TODO: be sure it's fine to check rnti for MBMS */
is_mbms
=
ue
->
rnti
==
0xfffd
;
/* is it SRB? */
for
(
i
=
0
;
i
<
2
;
i
++
)
{
...
...
@@ -425,8 +445,10 @@ rb_found:
}
}
if
(
!
get_pdcp_data_ind_func
()(
&
ctx
,
is_srb
,
0
,
rb_id
,
size
,
memblock
,
NULL
,
NULL
))
{
LOG_E
(
RLC
,
"%s:%d:%s: ERROR: pdcp_data_ind failed
\n
"
,
__FILE__
,
__LINE__
,
__FUNCTION__
);
if
(
!
get_pdcp_data_ind_func
()(
&
ctx
,
is_srb
,
is_mbms
,
rb_id
,
size
,
memblock
,
NULL
,
NULL
))
{
LOG_E
(
RLC
,
"%s:%d:%s: ERROR: pdcp_data_ind failed (is_srb %d rb_id %d rnti %d)
\n
"
,
__FILE__
,
__LINE__
,
__FUNCTION__
,
is_srb
,
rb_id
,
ue
->
rnti
);
/* what to do in case of failure? for the moment: nothing */
}
}
...
...
@@ -830,6 +852,7 @@ rlc_op_status_t rrc_rlc_config_asn1_req (const protocol_ctxt_t * const ctxt_pP
}
if
(
pmch_InfoList_r9_pP
!=
NULL
)
{
int
mbms_rnti
=
0xfffd
;
LTE_MBMS_SessionInfoList_r9_t
*
mbms_SessionInfoList_r9_p
=
NULL
;
LTE_MBMS_SessionInfo_r9_t
*
MBMS_SessionInfo_p
=
NULL
;
mbms_session_id_t
mbms_session_id
;
...
...
@@ -859,16 +882,14 @@ rlc_op_status_t rrc_rlc_config_asn1_req (const protocol_ctxt_t * const ctxt_pP
drb_id
=
(
mbms_service_id
*
LTE_maxSessionPerPMCH
)
+
mbms_session_id
;
// + (LTE_maxDRB + 3); // 15
}
LOG_I
(
RLC
,
PROTOCOL_CTXT_FMT
" CONFIG REQ MBMS ASN1 LC ID %u RB ID %u SESSION ID %u SERVICE ID %u, rnti %x
\n
"
,
LOG_I
(
RLC
,
PROTOCOL_CTXT_FMT
" CONFIG REQ MBMS ASN1 LC ID %u RB ID %u SESSION ID %u SERVICE ID %u,
mbms_
rnti %x
\n
"
,
PROTOCOL_CTXT_ARGS
(
ctxt_pP
),
lc_id
,
(
int
)
drb_id
,
mbms_session_id
,
mbms_service_id
,
rnti
mbms_
rnti
);
}
}
rlc_entity_t
*
rlc_um
;
rlc_ue_t
*
ue
;
...
...
@@ -876,10 +897,10 @@ rlc_op_status_t rrc_rlc_config_asn1_req (const protocol_ctxt_t * const ctxt_pP
//drb_id = rb_id;
rlc_manager_lock
(
rlc_ue_manager
);
ue
=
rlc_manager_get_ue
(
rlc_ue_manager
,
rnti
);
ue
=
rlc_manager_get_ue
(
rlc_ue_manager
,
mbms_
rnti
);
if
(
ue
->
drb
[
drb_id
-
1
]
!=
NULL
)
{
LOG_D
(
RLC
,
"%s:%d:%s: warning DRB %d already exist for ue %d, do nothing
\n
"
,
__FILE__
,
__LINE__
,
__FUNCTION__
,
(
int
)
drb_id
,
rnti
);
__FILE__
,
__LINE__
,
__FUNCTION__
,
(
int
)
drb_id
,
mbms_
rnti
);
}
else
{
rlc_um
=
new_rlc_entity_um
(
1000000
,
1000000
,
...
...
@@ -890,11 +911,14 @@ rlc_op_status_t rrc_rlc_config_asn1_req (const protocol_ctxt_t * const ctxt_pP
rlc_ue_add_drb_rlc_entity
(
ue
,
drb_id
,
rlc_um
);
LOG_D
(
RLC
,
"%s:%d:%s: added drb %d to ue %d
\n
"
,
__FILE__
,
__LINE__
,
__FUNCTION__
,
(
int
)
drb_id
,
rnti
);
__FILE__
,
__LINE__
,
__FUNCTION__
,
(
int
)
drb_id
,
mbms_
rnti
);
}
rlc_manager_unlock
(
rlc_ue_manager
);
}
}
}
if
(
drb2release_listP
!=
NULL
)
{
LOG_E
(
RLC
,
"%s:%d:%s: TODO
\n
"
,
__FILE__
,
__LINE__
,
__FUNCTION__
);
...
...
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