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
wangwenhui
OpenXG-RAN
Commits
4b6f5cea
Commit
4b6f5cea
authored
Dec 03, 2019
by
Cedric Roux
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rlc v2: have the L2 simulator functional
Not very clean, but will do the job for the time being.
parent
fbd69663
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
30 additions
and
12 deletions
+30
-12
openair2/LAYER2/rlc_v2/rlc_oai_api.c
openair2/LAYER2/rlc_v2/rlc_oai_api.c
+29
-12
openair2/LAYER2/rlc_v2/rlc_ue_manager.h
openair2/LAYER2/rlc_v2/rlc_ue_manager.h
+1
-0
No files found.
openair2/LAYER2/rlc_v2/rlc_oai_api.c
View file @
4b6f5cea
...
...
@@ -53,7 +53,13 @@ void mac_rlc_data_ind (
rlc_ue_t
*
ue
;
rlc_entity_t
*
rb
;
if
(
module_idP
!=
0
||
eNB_index
!=
0
||
/*enb_flagP != 1 ||*/
MBMS_flagP
!=
0
)
{
if
(
enb_flagP
==
1
&&
module_idP
!=
0
)
{
LOG_E
(
RLC
,
"%s:%d:%s: fatal, module_id must be 0 for eNB
\n
"
,
__FILE__
,
__LINE__
,
__FUNCTION__
);
exit
(
1
);
}
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
);
}
...
...
@@ -384,7 +390,7 @@ rb_found:
memcpy
(
memblock
->
data
,
buf
,
size
);
/* unused fields? */
ctx
.
instance
=
0
;
ctx
.
instance
=
ue
->
module_id
;
ctx
.
frame
=
0
;
ctx
.
subframe
=
0
;
ctx
.
eNB_index
=
0
;
...
...
@@ -392,7 +398,7 @@ rb_found:
ctx
.
brOption
=
0
;
/* used fields? */
ctx
.
module_id
=
0
;
ctx
.
module_id
=
ue
->
module_id
;
ctx
.
rnti
=
ue
->
rnti
;
is_enb
=
rlc_manager_get_enb_flag
(
rlc_ue_manager
);
...
...
@@ -531,7 +537,7 @@ rb_found:
itti_send_msg_to_task
(
TASK_RRC_ENB
,
0
,
msg
);
}
static
void
add_srb
(
int
rnti
,
struct
LTE_SRB_ToAddMod
*
s
)
static
void
add_srb
(
int
rnti
,
int
module_id
,
struct
LTE_SRB_ToAddMod
*
s
)
{
rlc_entity_t
*
rlc_am
;
rlc_ue_t
*
ue
;
...
...
@@ -606,6 +612,7 @@ static void add_srb(int rnti, struct LTE_SRB_ToAddMod *s)
rlc_manager_lock
(
rlc_ue_manager
);
ue
=
rlc_manager_get_ue
(
rlc_ue_manager
,
rnti
);
ue
->
module_id
=
module_id
;
if
(
ue
->
srb
[
srb_id
-
1
]
!=
NULL
)
{
LOG_D
(
RLC
,
"%s:%d:%s: warning SRB %d already exist for ue %d, do nothing
\n
"
,
__FILE__
,
__LINE__
,
__FUNCTION__
,
srb_id
,
rnti
);
...
...
@@ -626,7 +633,7 @@ static void add_srb(int rnti, struct LTE_SRB_ToAddMod *s)
rlc_manager_unlock
(
rlc_ue_manager
);
}
static
void
add_drb_am
(
int
rnti
,
struct
LTE_DRB_ToAddMod
*
s
)
static
void
add_drb_am
(
int
rnti
,
int
module_id
,
struct
LTE_DRB_ToAddMod
*
s
)
{
rlc_entity_t
*
rlc_am
;
rlc_ue_t
*
ue
;
...
...
@@ -683,6 +690,7 @@ static void add_drb_am(int rnti, struct LTE_DRB_ToAddMod *s)
rlc_manager_lock
(
rlc_ue_manager
);
ue
=
rlc_manager_get_ue
(
rlc_ue_manager
,
rnti
);
ue
->
module_id
=
module_id
;
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__
,
drb_id
,
rnti
);
...
...
@@ -703,7 +711,7 @@ static void add_drb_am(int rnti, struct LTE_DRB_ToAddMod *s)
rlc_manager_unlock
(
rlc_ue_manager
);
}
static
void
add_drb_um
(
int
rnti
,
struct
LTE_DRB_ToAddMod
*
s
)
static
void
add_drb_um
(
int
rnti
,
int
module_id
,
struct
LTE_DRB_ToAddMod
*
s
)
{
rlc_entity_t
*
rlc_um
;
rlc_ue_t
*
ue
;
...
...
@@ -756,6 +764,7 @@ static void add_drb_um(int rnti, struct LTE_DRB_ToAddMod *s)
rlc_manager_lock
(
rlc_ue_manager
);
ue
=
rlc_manager_get_ue
(
rlc_ue_manager
,
rnti
);
ue
->
module_id
=
module_id
;
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__
,
drb_id
,
rnti
);
...
...
@@ -773,14 +782,14 @@ static void add_drb_um(int rnti, struct LTE_DRB_ToAddMod *s)
rlc_manager_unlock
(
rlc_ue_manager
);
}
static
void
add_drb
(
int
rnti
,
struct
LTE_DRB_ToAddMod
*
s
)
static
void
add_drb
(
int
rnti
,
int
module_id
,
struct
LTE_DRB_ToAddMod
*
s
)
{
switch
(
s
->
rlc_Config
->
present
)
{
case
LTE_RLC_Config_PR_am
:
add_drb_am
(
rnti
,
s
);
add_drb_am
(
rnti
,
module_id
,
s
);
break
;
case
LTE_RLC_Config_PR_um_Bi_Directional
:
add_drb_um
(
rnti
,
s
);
add_drb_um
(
rnti
,
module_id
,
s
);
break
;
default:
LOG_E
(
RLC
,
"%s:%d:%s: fatal: unhandled DRB type
\n
"
,
...
...
@@ -801,9 +810,17 @@ rlc_op_status_t rrc_rlc_config_asn1_req (const protocol_ctxt_t * const ctxt_pP
)
{
int
rnti
=
ctxt_pP
->
rnti
;
int
module_id
=
ctxt_pP
->
module_id
;
int
i
;
if
(
/*ctxt_pP->enb_flag != 1 ||*/
ctxt_pP
->
module_id
!=
0
/*||
if
(
ctxt_pP
->
enb_flag
==
1
&&
(
ctxt_pP
->
module_id
!=
0
||
ctxt_pP
->
instance
!=
0
))
{
LOG_E
(
RLC
,
"%s: module_id != 0 or instance != 0 not handled for eNB
\n
"
,
__FUNCTION__
);
exit
(
1
);
}
if
(
0
/*||
ctxt_pP->instance != 0 || ctxt_pP->eNB_index != 0 ||
ctxt_pP->configured != 1 || ctxt_pP->brOption != 0 */
)
{
LOG_E
(
RLC
,
"%s: ctxt_pP not handled (%d %d %d %d %d %d)
\n
"
,
__FUNCTION__
,
...
...
@@ -824,13 +841,13 @@ rlc_op_status_t rrc_rlc_config_asn1_req (const protocol_ctxt_t * const ctxt_pP
if
(
srb2add_listP
!=
NULL
)
{
for
(
i
=
0
;
i
<
srb2add_listP
->
list
.
count
;
i
++
)
{
add_srb
(
rnti
,
srb2add_listP
->
list
.
array
[
i
]);
add_srb
(
rnti
,
module_id
,
srb2add_listP
->
list
.
array
[
i
]);
}
}
if
(
drb2add_listP
!=
NULL
)
{
for
(
i
=
0
;
i
<
drb2add_listP
->
list
.
count
;
i
++
)
{
add_drb
(
rnti
,
drb2add_listP
->
list
.
array
[
i
]);
add_drb
(
rnti
,
module_id
,
drb2add_listP
->
list
.
array
[
i
]);
}
}
...
...
openair2/LAYER2/rlc_v2/rlc_ue_manager.h
View file @
4b6f5cea
...
...
@@ -28,6 +28,7 @@ typedef void rlc_ue_manager_t;
typedef
struct
rlc_ue_t
{
int
rnti
;
int
module_id
;
/* necesarry for the L2 simulator - not clean, to revise */
/* due to openair calling status_ind/data_req, we need to keep this.
* To be considered 'hackish'.
*/
...
...
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