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
lizhongxiao
OpenXG-RAN
Commits
c832b7af
Commit
c832b7af
authored
Jul 06, 2023
by
Robert Schmidt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Configure CU/DU UE IDs in NSA/do-ra/phytest
parent
2e1107fa
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
4 deletions
+17
-4
openair2/RRC/NR/rrc_gNB_nsa.c
openair2/RRC/NR/rrc_gNB_nsa.c
+17
-4
No files found.
openair2/RRC/NR/rrc_gNB_nsa.c
View file @
c832b7af
...
...
@@ -41,6 +41,7 @@
#include "openair2/LAYER2/NR_MAC_gNB/mac_proto.h"
#include "openair2/LAYER2/nr_rlc/nr_rlc_oai_api.h"
#include "openair2/RRC/LTE/rrc_eNB_GTPV1U.h"
#include "openair2/F1AP/f1ap_ids.h"
#include "executables/softmodem-common.h"
#include "executables/nr-softmodem.h"
#include <openair2/RRC/NR/rrc_gNB_UE_context.h>
...
...
@@ -342,19 +343,30 @@ void rrc_add_nsa_user(gNB_RRC_INST *rrc, rrc_gNB_ue_context_t *ue_context_p, x2a
itti_send_msg_to_task
(
TASK_X2AP
,
ENB_MODULE_ID_TO_INSTANCE
(
0
),
msg
);
//Check right id instead of hardcoding
}
// below we configure the stack. In SA, we fully adopted F1, meaning that
// layers use different IDs (MAC/RLC use RNTI as DU UE ID, above use NGAP ID
// as CU UE ID.
uint32_t
du_ue_id
=
ue_context_p
->
ue_context
.
rnti
;
uint32_t
cu_ue_id
=
ue_context_p
->
ue_context
.
rnti
;
f1_ue_data_t
du_ue_data
=
{.
secondary_ue
=
cu_ue_id
};
du_add_f1_ue_data
(
du_ue_id
,
&
du_ue_data
);
f1_ue_data_t
cu_ue_data
=
{.
secondary_ue
=
du_ue_id
};
cu_add_f1_ue_data
(
cu_ue_id
,
&
cu_ue_data
);
LOG_I
(
RRC
,
"Assign CU UE ID %d and DU UE ID %d to UE RNTI %04x
\n
"
,
cu_ue_id
,
du_ue_id
,
ue_context_p
->
ue_context
.
rnti
);
// configure MAC and RLC
bool
ret
=
false
;
if
(
get_softmodem_params
()
->
phy_test
)
{
// phytest mode: we don't set up RA, etc
ret
=
nr_mac_add_test_ue
(
RC
.
nrmac
[
rrc
->
module_id
]
,
ue_context_p
->
ue_context
.
rnti
,
ue_context_p
->
ue_context
.
secondaryCellGroup
);
ret
=
nr_mac_add_test_ue
(
RC
.
nrmac
[
rrc
->
module_id
]
,
du_ue_id
,
ue_context_p
->
ue_context
.
secondaryCellGroup
);
}
else
{
NR_SCHED_LOCK
(
&
RC
.
nrmac
[
rrc
->
module_id
]
->
sched_lock
);
ret
=
nr_mac_prepare_ra_ue
(
RC
.
nrmac
[
rrc
->
module_id
],
ue_context_p
->
ue_context
.
rnti
,
ue_context_p
->
ue_context
.
secondaryCellGroup
);
ret
=
nr_mac_prepare_ra_ue
(
RC
.
nrmac
[
rrc
->
module_id
],
du_ue_id
,
ue_context_p
->
ue_context
.
secondaryCellGroup
);
NR_SCHED_UNLOCK
(
&
RC
.
nrmac
[
rrc
->
module_id
]
->
sched_lock
);
}
AssertFatal
(
ret
,
"cannot add NSA UE in MAC, aborting
\n
"
);
PROTOCOL_CTXT_SET_BY_MODULE_ID
(
&
ctxt
,
rrc
->
module_id
,
GNB_FLAG_YES
,
ue_context_p
->
ue_context
.
rnti
,
0
,
0
,
rrc
->
module_id
);
PROTOCOL_CTXT_SET_BY_MODULE_ID
(
&
ctxt
,
rrc
->
module_id
,
GNB_FLAG_YES
,
cu_ue_id
,
0
,
0
,
rrc
->
module_id
);
if
(
get_softmodem_params
()
->
do_ra
)
ctxt
.
enb_flag
=
0
;
LOG_W
(
RRC
,
"Calling RRC PDCP/RLC ASN1 request functions for protocol context %p with module_id %d, rnti %lx, frame %d, subframe %d eNB_index %d
\n
"
,
...
...
@@ -366,7 +378,7 @@ void rrc_add_nsa_user(gNB_RRC_INST *rrc, rrc_gNB_ue_context_t *ue_context_p, x2a
ctxt
.
eNB_index
);
nr_pdcp_add_drbs
(
ctxt
.
enb_flag
,
c
txt
.
rntiMaybeUE
id
,
c
u_ue_
id
,
0
,
ue_context_p
->
ue_context
.
rb_config
->
drb_ToAddModList
,
(
ue_context_p
->
ue_context
.
integrity_algorithm
<<
4
)
|
ue_context_p
->
ue_context
.
ciphering_algorithm
,
...
...
@@ -374,6 +386,7 @@ void rrc_add_nsa_user(gNB_RRC_INST *rrc, rrc_gNB_ue_context_t *ue_context_p, x2a
kUPint
,
ue_context_p
->
ue_context
.
secondaryCellGroup
->
rlc_BearerToAddModList
);
ctxt
.
rntiMaybeUEid
=
du_ue_id
;
// assume only a single bearer
const
NR_DRB_ToAddModList_t
*
drb_list
=
ue_context_p
->
ue_context
.
rb_config
->
drb_ToAddModList
;
DevAssert
(
drb_list
->
list
.
count
==
1
);
...
...
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